From abc72faf316e6153d6e4ea3513d9cf49816dad9d Mon Sep 17 00:00:00 2001 From: Dalon Westergreen Date: Wed, 22 May 2019 12:16:38 -0700 Subject: arria10: Add support for wic and u-boot 2019.07 Mainline uboot for arria10 supports creating the boot header required for spl using mkimage. With this update, it is now possible to build the sdcard image without external tools. Signed-off-by: Dalon Westergreen --- conf/machine/arria10.conf | 29 +++++++++++++++++++++++++++-- wic/sdimage-arria10.wks | 8 ++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 wic/sdimage-arria10.wks diff --git a/conf/machine/arria10.conf b/conf/machine/arria10.conf index d5f3427..b7313ae 100644 --- a/conf/machine/arria10.conf +++ b/conf/machine/arria10.conf @@ -4,7 +4,10 @@ require conf/machine/include/socfpga.inc -PREFERRED_VERSION_u-boot-socfpga ?= "v2014.10%" +PREFERRED_VERSION_u-boot-socfpga ?= "v2019.07%" + +SPL_BINARY = "u-boot-with-spl.sfp" +UBOOT_BINARY = "u-boot-dtb.img" UBOOT_CONFIG ??= "arria10-socdk" @@ -18,5 +21,27 @@ KMACHINE = "arria10" KERNEL_DEVICETREE ?= "\ socfpga_arria10_socdk_sdmmc.dtb \ socfpga_arria10_socdk_qspi.dtb \ - socfpga_arria10_socdk_nand.dts \ + socfpga_arria10_socdk_nand.dtb \ " + +SERIAL_CONSOLES ?= "115200;ttyS0" + +UBOOT_EXTLINUX ?= "1" +UBOOT_EXTLINUX_LABELS ?= "default" +UBOOT_EXTLINUX_DEFAULT_LABEL ?= "Arria10 SOCDK SDMMC" + +UBOOT_EXTLINUX_MENU_DESCRIPTION_default ?= "Arria10 SOCDK SDMMC" +UBOOT_EXTLINUX_KERNEL_IMAGE_default ?= "../${KERNEL_IMAGETYPE}" +UBOOT_EXTLINUX_FDT_default ?= "../socfpga_arria10_socdk_sdmmc.dtb" +UBOOT_EXTLINUX_KERNEL_ARGS_default ?= "rootwait rw earlycon" +UBOOT_EXTLINUX_ROOT_default ?= "root=/dev/mmcblk0p3" + +IMAGE_BOOT_FILES ?= " \ + ${KERNEL_DEVICETREE} \ + ${KERNEL_IMAGETYPE} \ + ${UBOOT_BINARY} \ + extlinux.conf;extlinux/extlinux.conf \ + " + +WKS_FILE ?= "sdimage-arria10.wks" +IMAGE_FSTYPES +="wic" diff --git a/wic/sdimage-arria10.wks b/wic/sdimage-arria10.wks new file mode 100644 index 0000000..6ab3284 --- /dev/null +++ b/wic/sdimage-arria10.wks @@ -0,0 +1,8 @@ +# short-description: Create an SD card image for the Arria 10 SoC. +# long-description: Create an SD card image for the Arria 10 SoC. +# Boot files are located in the first vfat partition and u-Boot is located in +# the third partition. + +part --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4 --size 50M +part --source rawcopy --sourceparams="file=u-boot-with-spl.sfp" --ondisk mmcblk --system-id=a2 --align 4 --fixed-size 10M +part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4 -- cgit v1.2.3-54-g00ecf