fixup u-boot compiling error
v2 cover fixup u-boot compiling error
From: Randy 'ayaka' Li <[email protected]>
Changelog
v2:
Fixed unset SRCREV stopped building in the previous time Fixed compiler warning in GCC 9 of new oe
Randy 'ayaka' Li (2):
recipes-bsp/u-boot: fixup build for gcc7
recipes-bsp/u-boot: update build rules
Randy Li (1):
recipes-bsp/u-boot: update to the latest version
recipes-bsp/u-boot/u-boot-rockchip.inc | 12 ++++++ .../u-boot/u-boot-rockchip/gcc7_fixup.patch | 38 +++++++++++++++++++ .../u-boot-rockchip/gcc9-no-Werror.patch | 13 +++++++ .../u-boot/u-boot-rockchip_20171218.bb | 4 ++ recipes-bsp/u-boot/u-boot-rockchip_git.bb | 19 ++++++++++ 5 files changed, 86 insertions(+) create mode 100644 recipes-bsp/u-boot/u-boot-rockchip/gcc7_fixup.patch create mode 100644 recipes-bsp/u-boot/u-boot-rockchip/gcc9-no-Werror.patch create mode 100644 recipes-bsp/u-boot/u-boot-rockchip_git.bb
Signature · 1 line
2.21.0
PATCH v2 1/3 recipes-bsp/u-boot: fixup build for gcc7
From: Randy 'ayaka' Li <[email protected]>
--- .../u-boot/u-boot-rockchip/gcc7_fixup.patch | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 recipes-bsp/u-boot/u-boot-rockchip/gcc7_fixup.patch
recipes-bsp/u-boot/u-boot-rockchip/gcc7_fixup.patch new file +38 -0
@@ -0,0 +1,38 @@ +diff --git a/include/linux/log2.h b/include/linux/log2.h +index aa1de63090..5526af036d 100644 +--- a/include/linux/log2.h ++++ b/include/linux/log2.h +@@ -12,12 +12,6 @@ + #include <linux/types.h> + #include <linux/bitops.h> + +-/* +- * deal with unrepresentable constant logarithms +- */ +-extern __attribute__((const, noreturn)) +-int ____ilog2_NaN(void); +- + /* + * non-constant log of base 2 calculators + * - the arch may override these in asm/bitops.h if they can be implemented +@@ -82,7 +76,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n) + #define ilog2(n) \ + ( \ + __builtin_constant_p(n) ? ( \ +- (n) < 1 ? ____ilog2_NaN() : \ ++ (n) < 2 ? 0 : \ + (n) & (1ULL << 63) ? 63 : \ + (n) & (1ULL << 62) ? 62 : \ + (n) & (1ULL << 61) ? 61 : \ +@@ -145,10 +139,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n) + (n) & (1ULL << 4) ? 4 : \ + (n) & (1ULL << 3) ? 3 : \ + (n) & (1ULL << 2) ? 2 : \ +- (n) & (1ULL << 1) ? 1 : \ +- (n) & (1ULL << 0) ? 0 : \ +- ____ilog2_NaN() \ +- ) : \ ++ 1 ) : \ + (sizeof(n) <= 4) ? \ + __ilog2_u32(n) : \ + __ilog2_u64(n) \
Signature · 1 line
2.21.0
PATCH v2 2/3 recipes-bsp/u-boot: update build rules
In reply to ayakaFrom: Randy 'ayaka' Li <[email protected]>
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.
--- 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
recipes-bsp/u-boot/u-boot-rockchip.inc +12 -0
@@ -2,6 +2,7 @@ # Copyright (C) 2017 Trevor Woerner <[email protected]> # 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};
recipes-bsp/u-boot/u-boot-rockchip/gcc9-no-Werror.patch new file +13 -0
@@ -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)
recipes-bsp/u-boot/u-boot-rockchip_20171218.bb +4 -0
@@ -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"
Signature · 1 line
2.21.0
PATCH v2 3/3 recipes-bsp/u-boot: update to the latest version
In reply to ayakaFrom: Randy Li <[email protected]>
--- recipes-bsp/u-boot/u-boot-rockchip_git.bb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 recipes-bsp/u-boot/u-boot-rockchip_git.bb
recipes-bsp/u-boot/u-boot-rockchip_git.bb new file +19 -0
@@ -0,0 +1,19 @@ +# Copyright (C) 2019 SUMOMO Computer Assocation +# Released under the MIT license (see COPYING.MIT for the terms) +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +include u-boot-rockchip.inc + +DESCRIPTION = "Rockchip U-Boot" + +LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6" + +SRC_URI = " \ + git://github.com/rockchip-linux/u-boot.git;branch=release; \ + file://gcc7_fixup.patch \ + file://gcc9-no-Werror.patch \ +" +SRCREV = "${AUTOREV}" + +S = "${WORKDIR}/git" +PV = "v2019.01"
Signature · 1 line
2.21.0