From e9bb7f0c6d3f77312970034ca0a63b3df0e3ba8e Mon Sep 17 00:00:00 2001 From: Paul Barker Date: Fri, 8 Sep 2017 10:12:54 +0000 Subject: Support using u-boot with Image format for raspberrypi3-64 For raspberrypi3-64 we need to use the Image or Image.gz format with u-boot instead of the legacy uImage format. We also need to issue the 'booti' command to boot the kernel instead of 'bootm'. Signed-off-by: Paul Barker --- conf/machine/include/rpi-base.inc | 14 ++++++++++++-- conf/machine/raspberrypi3-64.conf | 5 +++++ 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'conf') diff --git a/conf/machine/include/rpi-base.inc b/conf/machine/include/rpi-base.inc index f29db29..970f4d8 100644 --- a/conf/machine/include/rpi-base.inc +++ b/conf/machine/include/rpi-base.inc @@ -41,7 +41,17 @@ KERNEL_DEVICETREE ?= " \ overlays/pi3-miniuart-bt.dtbo \ overlays/vc4-kms-v3d.dtbo \ " -KERNEL_IMAGETYPE ?= "Image" + +# By default: +# +# * When u-boot is disabled use the "Image" format which can be directly loaded +# by the rpi firmware. +# +# * When u-boot is enabled use the "uImage" format and the "bootm" command +# within u-boot to load the kernel. +KERNEL_BOOTCMD ??= "bootm" +KERNEL_IMAGETYPE_UBOOT ??= "uImage" +KERNEL_IMAGETYPE ?= "${@bb.utils.contains('RPI_USE_U_BOOT', '1', '${KERNEL_IMAGETYPE_UBOOT}', 'Image', d)}" MACHINE_FEATURES += "apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio" @@ -83,7 +93,7 @@ def make_dtb_boot_files(d): IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* \ ${@make_dtb_boot_files(d)} \ - ${@bb.utils.contains('KERNEL_IMAGETYPE', 'uImage', \ + ${@bb.utils.contains('RPI_USE_U_BOOT', '1', \ '${KERNEL_IMAGETYPE} u-boot.bin;${SDIMG_KERNELIMAGE} boot.scr', \ '${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE}', d)} \ " diff --git a/conf/machine/raspberrypi3-64.conf b/conf/machine/raspberrypi3-64.conf index 237684a..ebc9f38 100644 --- a/conf/machine/raspberrypi3-64.conf +++ b/conf/machine/raspberrypi3-64.conf @@ -39,3 +39,8 @@ VC4_CMA_SIZE ?= "cma-256" UBOOT_MACHINE = "rpi_3_config" MACHINE_FEATURES_append = " vc4graphics" + +# When u-boot is enabled we need to use the "Image" format and the "booti" +# command to load the kernel +KERNEL_IMAGETYPE_UBOOT ?= "Image" +KERNEL_BOOTCMD ?= "booti" -- cgit v1.2.3-54-g00ecf