[yocto] [PATCH v2 2/3] recipes-bsp/u-boot: update build rules
ayaka
ayaka at soulik.info
Thu Jun 20 04:14:09 PDT 2019
From: Randy 'ayaka' Li <ayaka at soulik.info>
Adding the missing recipes header file.
Fixing the compiler error after oe-core update.
Disabled the -Werror flag which would break the build due to
update of toolchain.
Signed-off-by: Randy 'ayaka' Li <ayaka at soulik.info>
---
recipes-bsp/u-boot/u-boot-rockchip.inc | 12 ++++++++++++
.../u-boot/u-boot-rockchip/gcc9-no-Werror.patch | 13 +++++++++++++
recipes-bsp/u-boot/u-boot-rockchip_20171218.bb | 4 ++++
3 files changed, 29 insertions(+)
create mode 100644 recipes-bsp/u-boot/u-boot-rockchip/gcc9-no-Werror.patch
diff --git a/recipes-bsp/u-boot/u-boot-rockchip.inc b/recipes-bsp/u-boot/u-boot-rockchip.inc
index 5d89cd6..8815ac8 100644
--- a/recipes-bsp/u-boot/u-boot-rockchip.inc
+++ b/recipes-bsp/u-boot/u-boot-rockchip.inc
@@ -2,6 +2,7 @@
# Copyright (C) 2017 Trevor Woerner <twoerner at gmail.com>
# Released under the MIT license (see COPYING.MIT for the terms)
+require recipes-bsp/u-boot/u-boot-common.inc
require recipes-bsp/u-boot/u-boot.inc
DESCRIPTION = "Rockchip next-dev U-Boot"
@@ -14,6 +15,17 @@ DEPENDS = "dtc-native bc-native swig-native"
# u-boot will build native python module
inherit pythonnative
+do_configure () {
+ if [ -z "${UBOOT_CONFIG}" ]; then
+ if [ -n "${UBOOT_MACHINE}" ]; then
+ oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE}
+ else
+ oe_runmake -C ${S} O=${B} oldconfig
+ fi
+ cml1_do_configure
+ fi
+}
+
do_compile_prepend () {
export STAGING_INCDIR=${STAGING_INCDIR_NATIVE};
export STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE};
diff --git a/recipes-bsp/u-boot/u-boot-rockchip/gcc9-no-Werror.patch b/recipes-bsp/u-boot/u-boot-rockchip/gcc9-no-Werror.patch
new file mode 100644
index 0000000..198d846
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-rockchip/gcc9-no-Werror.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile b/Makefile
+index a2e1a09674..3697ece6fc 100644
+--- a/Makefile
++++ b/Makefile
+@@ -360,7 +360,7 @@ KBUILD_CPPFLAGS := -D__KERNEL__ -D__UBOOT__
+ KBUILD_CFLAGS := -Wall -Wstrict-prototypes \
+ -Wno-format-security \
+ -fno-builtin -ffreestanding
+-KBUILD_CFLAGS += -fshort-wchar -Werror
++KBUILD_CFLAGS += -fshort-wchar
+ KBUILD_AFLAGS := -D__ASSEMBLY__
+
+ # Read UBOOTRELEASE from include/config/uboot.release (if it exists)
diff --git a/recipes-bsp/u-boot/u-boot-rockchip_20171218.bb b/recipes-bsp/u-boot/u-boot-rockchip_20171218.bb
index 4545f13..f4ecbae 100644
--- a/recipes-bsp/u-boot/u-boot-rockchip_20171218.bb
+++ b/recipes-bsp/u-boot/u-boot-rockchip_20171218.bb
@@ -9,5 +9,9 @@ TAG = "release-${PV}"
SRC_URI = " \
git://github.com/rockchip-linux/u-boot.git;tag=${TAG};nobranch=1; \
file://binutils-2.28-ld-fix.patch \
+ file://gcc7_fixup.patch \
+ file://gcc9-no-Werror.patch \
"
S = "${WORKDIR}/git"
+
+SRCREV = "release-20171218"
--
2.21.0
More information about the yocto
mailing list