diff options
| author | Andrei Gherzan <andrei@balena.io> | 2019-07-30 13:47:22 +0200 |
|---|---|---|
| committer | Andrei Gherzan <andrei@balena.io> | 2019-07-30 13:47:36 +0200 |
| commit | 3accfaf97eac6e22a03b8b1cd25b51f016c7765d (patch) | |
| tree | 3bd42bdc073bf909f344dfcb8ffcfd73910f8ac1 | |
| parent | e9e3ad1920e1a6f4a05210c2ec4b77530871a886 (diff) | |
| download | meta-raspberrypi-ag/warrior-fix-rpi4-uboot.tar.gz | |
u-boot: Backport patch to fix u-boot compilation without USB configag/warrior-fix-rpi4-uboot
Raspberry Pi 4 doesn't have a working USB driver in u-boot. This makes
the defconfig not to enable the relevant config case which breaks the
build with:
error: expected '}' before
'BOOT_TARGET_DEVICES_references_USB_without_CONFIG_CMD_USB'
This was fixed in upstream and we backport the relevant commit.
Signed-off-by: Andrei Gherzan <andrei@balena.io>
| -rw-r--r-- | recipes-bsp/u-boot/u-boot-2019.01/0001-Fix-compilation-error-if-CONFIG_USB-is-disabled.patch | 73 | ||||
| -rw-r--r-- | recipes-bsp/u-boot/u-boot_2019.01.bbappend | 1 |
2 files changed, 74 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot-2019.01/0001-Fix-compilation-error-if-CONFIG_USB-is-disabled.patch b/recipes-bsp/u-boot/u-boot-2019.01/0001-Fix-compilation-error-if-CONFIG_USB-is-disabled.patch new file mode 100644 index 0000000..c402e04 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-2019.01/0001-Fix-compilation-error-if-CONFIG_USB-is-disabled.patch | |||
| @@ -0,0 +1,73 @@ | |||
| 1 | From e4617bdb29e9c88e85f056f3aea46a2c8a5312e2 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: akaher <akaher@vmware.com> | ||
| 3 | Date: Thu, 11 Apr 2019 05:23:50 +0000 | ||
| 4 | Subject: [PATCH] Fix compilation error if CONFIG_USB is disabled | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | This patch is to fix the following compilation error when | ||
| 10 | disabling CONFIG_USB for Rpi3: | ||
| 11 | |||
| 12 | include/config_distro_bootcmd.h:242:2: error: expected ‘}’ | ||
| 13 | before ‘BOOT_TARGET_DEVICES_references_USB_without_CONFIG_CMD_USB’ | ||
| 14 | BOOT_TARGET_DEVICES_references_USB_without_CONFIG_CMD_USB | ||
| 15 | |||
| 16 | Signed-off-by: Ajay Kaher <akaher@vmware.com> | ||
| 17 | Signed-off-by: Matthias Brugger <mbrugger@suse.com> | ||
| 18 | Upstream-status: Backport | ||
| 19 | --- | ||
| 20 | include/configs/rpi.h | 36 +++++++++++++++++++++++++++++++----- | ||
| 21 | 1 file changed, 31 insertions(+), 5 deletions(-) | ||
| 22 | |||
| 23 | diff --git a/include/configs/rpi.h b/include/configs/rpi.h | ||
| 24 | index 9ce41767a9..f76c7d18ef 100644 | ||
| 25 | --- a/include/configs/rpi.h | ||
| 26 | +++ b/include/configs/rpi.h | ||
| 27 | @@ -146,12 +146,38 @@ | ||
| 28 | "fdt_addr_r=0x02600000\0" \ | ||
| 29 | "ramdisk_addr_r=0x02700000\0" | ||
| 30 | |||
| 31 | +#if CONFIG_IS_ENABLED(CMD_MMC) | ||
| 32 | + #define BOOT_TARGET_MMC(func) \ | ||
| 33 | + func(MMC, mmc, 0) \ | ||
| 34 | + func(MMC, mmc, 1) | ||
| 35 | +#else | ||
| 36 | + #define BOOT_TARGET_MMC(func) | ||
| 37 | +#endif | ||
| 38 | + | ||
| 39 | +#if CONFIG_IS_ENABLED(CMD_USB) | ||
| 40 | + #define BOOT_TARGET_USB(func) func(USB, usb, 0) | ||
| 41 | +#else | ||
| 42 | + #define BOOT_TARGET_USB(func) | ||
| 43 | +#endif | ||
| 44 | + | ||
| 45 | +#if CONFIG_IS_ENABLED(CMD_PXE) | ||
| 46 | + #define BOOT_TARGET_PXE(func) func(PXE, pxe, na) | ||
| 47 | +#else | ||
| 48 | + #define BOOT_TARGET_PXE(func) | ||
| 49 | +#endif | ||
| 50 | + | ||
| 51 | +#if CONFIG_IS_ENABLED(CMD_DHCP) | ||
| 52 | + #define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na) | ||
| 53 | +#else | ||
| 54 | + #define BOOT_TARGET_DHCP(func) | ||
| 55 | +#endif | ||
| 56 | + | ||
| 57 | #define BOOT_TARGET_DEVICES(func) \ | ||
| 58 | - func(MMC, mmc, 0) \ | ||
| 59 | - func(MMC, mmc, 1) \ | ||
| 60 | - func(USB, usb, 0) \ | ||
| 61 | - func(PXE, pxe, na) \ | ||
| 62 | - func(DHCP, dhcp, na) | ||
| 63 | + BOOT_TARGET_MMC(func) \ | ||
| 64 | + BOOT_TARGET_USB(func) \ | ||
| 65 | + BOOT_TARGET_PXE(func) \ | ||
| 66 | + BOOT_TARGET_DHCP(func) | ||
| 67 | + | ||
| 68 | #include <config_distro_bootcmd.h> | ||
| 69 | |||
| 70 | #define CONFIG_EXTRA_ENV_SETTINGS \ | ||
| 71 | -- | ||
| 72 | 2.22.0 | ||
| 73 | |||
diff --git a/recipes-bsp/u-boot/u-boot_2019.01.bbappend b/recipes-bsp/u-boot/u-boot_2019.01.bbappend index 7cd8d66..b11dfc2 100644 --- a/recipes-bsp/u-boot/u-boot_2019.01.bbappend +++ b/recipes-bsp/u-boot/u-boot_2019.01.bbappend | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" | 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" |
| 2 | UBOOT_RPI4_SUPPORT_PATCHES = " \ | 2 | UBOOT_RPI4_SUPPORT_PATCHES = " \ |
| 3 | file://0001-Fix-compilation-error-if-CONFIG_USB-is-disabled.patch \ | ||
| 3 | file://0001-configs-rpi4-Add-defconfigs-for-rpi4-32-64.patch \ | 4 | file://0001-configs-rpi4-Add-defconfigs-for-rpi4-32-64.patch \ |
| 4 | file://0002-ARM-bcm283x-Add-BCM283x_BASE-define.patch \ | 5 | file://0002-ARM-bcm283x-Add-BCM283x_BASE-define.patch \ |
| 5 | file://0003-arm-mach-bcm283x-Define-configs-for-RaspberryPi-4.patch \ | 6 | file://0003-arm-mach-bcm283x-Define-configs-for-RaspberryPi-4.patch \ |
