Build Device: MacBook 2021 with M1 Pro, MacOS 13.0.1
Target Device: NanoPi R2s with RK3328 SoC
At first I built it with multi-thread, most of the package builds well but uboot failed
Then I tried to build uboot only with single thread, and get lots of use of undeclared identifier
error
image|675x500
Full Output
make package/boot/uboot-rockchip/compile -j1 V=s
make[2]: Entering directory '/Volumes/openwrt/openwrt/scripts/config'
make[2]: 'conf' is up to date.
make[2]: Leaving directory '/Volumes/openwrt/openwrt/scripts/config'
make[1]: Entering directory '/Volumes/openwrt/openwrt'
make[2]: Entering directory '/Volumes/openwrt/openwrt/package/libs/toolchain'
echo "libc" >> /Volumes/openwrt/openwrt/staging_dir/target-aarch64_generic_musl/pkginfo/toolchain.default.install
echo "libgcc" >> /Volumes/openwrt/openwrt/staging_dir/target-aarch64_generic_musl/pkginfo/toolchain.default.install
echo "libstdcpp" >> /Volumes/openwrt/openwrt/staging_dir/target-aarch64_generic_musl/pkginfo/toolchain.default.install
echo "libpthread" >> /Volumes/openwrt/openwrt/staging_dir/target-aarch64_generic_musl/pkginfo/toolchain.default.install
echo "librt" >> /Volumes/openwrt/openwrt/staging_dir/target-aarch64_generic_musl/pkginfo/toolchain.default.install
make[2]: Leaving directory '/Volumes/openwrt/openwrt/package/libs/toolchain'
time: package/libs/toolchain/compile#0.16#0.13#0.35
make[2]: Entering directory '/Volumes/openwrt/openwrt/package/boot/arm-trusted-firmware-rockchip'
Makefile:49: WARNING: skipping arm-trusted-firmware-rockchip -- package has no install section
make[2]: Leaving directory '/Volumes/openwrt/openwrt/package/boot/arm-trusted-firmware-rockchip'
time: package/boot/arm-trusted-firmware-rockchip/compile#0.21#0.12#0.43
make[2]: Entering directory '/Volumes/openwrt/openwrt/package/boot/uboot-rockchip'
rm -f /Volumes/openwrt/openwrt/build_dir/target-aarch64_generic_musl/u-boot-nanopi-r2s-rk3328/u-boot-2021.07/.built
touch /Volumes/openwrt/openwrt/build_dir/target-aarch64_generic_musl/u-boot-nanopi-r2s-rk3328/u-boot-2021.07/.built_check
make -C /Volumes/openwrt/openwrt/build_dir/target-aarch64_generic_musl/u-boot-nanopi-r2s-rk3328/u-boot-2021.07 CROSS_COMPILE=aarch64-openwrt-linux-musl- DTC="/Volumes/openwrt/openwrt/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/linux-5.15.88/scripts/dtc/dtc" HOSTCC="gcc" HOSTCFLAGS="-O2 -I/Volumes/openwrt/openwrt/staging_dir/host/include -I/Volumes/openwrt/openwrt/staging_dir/hostpkg/include -I/Volumes/openwrt/openwrt/staging_dir/target-aarch64_generic_musl/host/include -I/Volumes/openwrt/openwrt/staging_dir/host/include -I/Volumes/openwrt/openwrt/staging_dir/hostpkg/include -I/Volumes/openwrt/openwrt/staging_dir/target-aarch64_generic_musl/host/include -std=gnu11" HOSTLDFLAGS="-L/Volumes/openwrt/openwrt/staging_dir/host/lib -L/Volumes/openwrt/openwrt/staging_dir/hostpkg/lib -L/Volumes/openwrt/openwrt/staging_dir/target-aarch64_generic_musl/host/lib" LOCALVERSION="-OpenWrt-r21859-116c73fd71" STAGING_PREFIX="/Volumes/openwrt/openwrt/staging_dir/host" PKG_CONFIG_PATH="/Volumes/openwrt/openwrt/staging_dir/host/lib/pkgconfig" PKG_CONFIG_LIBDIR="/Volumes/openwrt/openwrt/staging_dir/host/lib/pkgconfig" PKG_CONFIG_EXTRAARGS="--static" V='' BL31=/Volumes/openwrt/openwrt/staging_dir/target-aarch64_generic_musl/image/rk3328_bl31.elf
make[3]: Entering directory '/Volumes/openwrt/openwrt/build_dir/target-aarch64_generic_musl/u-boot-nanopi-r2s-rk3328/u-boot-2021.07'
===================== WARNING ======================
This board uses CONFIG_SPL_FIT_GENERATOR. Please migrate
to binman instead, to avoid the proliferation of
arch-specific scripts with no tests.
====================================================
CFGCHK u-boot.cfg
WRAP tools/lib/crc8.c
tools/Makefile:251: warning: pattern recipe did not update peer target 'tools/env/crc8.c'.
tools/Makefile:251: warning: pattern recipe did not update peer target 'tools/common/crc8.c'.
HOSTCC tools/lib/crc8.o
HOSTLD tools/gen_ethaddr_crc
ld: warning: directory not found for option '-L/Volumes/openwrt/openwrt/staging_dir/target-aarch64_generic_musl/host/lib'
WRAP tools/lib/crc32.c
tools/Makefile:251: warning: pattern recipe did not update peer target 'tools/common/crc32.c'.
HOSTCC tools/lib/crc32.o
HOSTLD tools/mkenvimage
ld: warning: directory not found for option '-L/Volumes/openwrt/openwrt/staging_dir/target-aarch64_generic_musl/host/lib'
HOSTCC tools/aisimage.o
In file included from tools/aisimage.c:9:
In file included from include/image.h:19:
In file included from ./arch/arm/include/asm/byteorder.h:29:
In file included from include/linux/byteorder/little_endian.h:13:
include/linux/types.h:146:9: error: unknown type name '__u64'; did you mean '__s64'?
typedef __u64 __bitwise __le64;
^
/Volumes/openwrt/openwrt/staging_dir/host/include/asm/types.h:19:44: note: '__s64' declared here
__extension__ typedef __signed__ long long __s64;
^
In file included from tools/aisimage.c:9:
In file included from include/image.h:19:
In file included from ./arch/arm/include/asm/byteorder.h:29:
In file included from include/linux/byteorder/little_endian.h:13:
include/linux/types.h:147:9: error: unknown type name '__u64'; did you mean '__s64'?
typedef __u64 __bitwise __be64;
^
/Volumes/openwrt/openwrt/staging_dir/host/include/asm/types.h:19:44: note: '__s64' declared here
__extension__ typedef __signed__ long long __s64;
^
In file included from tools/aisimage.c:9:
In file included from include/image.h:19:
In file included from ./arch/arm/include/asm/byteorder.h:29:
In file included from include/linux/byteorder/little_endian.h:14:
include/linux/byteorder/swab.h:125:42: error: unknown type name '__u64'; did you mean '__s64'?
static __inline__ __attribute__((const)) __u64 __fswab64(__u64 x)
^
/Volumes/openwrt/openwrt/staging_dir/host/include/asm/types.h:19:44: note: '__s64' declared here
__extension__ typedef __signed__ long long __s64;
^
In file included from tools/aisimage.c:9:
In file included from include/image.h:19:
In file included from ./arch/arm/include/asm/byteorder.h:29:
In file included from include/linux/byteorder/little_endian.h:14:
include/linux/byteorder/swab.h:125:58: error: unknown type name '__u64'; did you mean '__s64'?
static __inline__ __attribute__((const)) __u64 __fswab64(__u64 x)
^
/Volumes/openwrt/openwrt/staging_dir/host/include/asm/types.h:19:44: note: '__s64' declared here
__extension__ typedef __signed__ long long __s64;
^
In file included from tools/aisimage.c:9:
In file included from include/image.h:19:
In file included from ./arch/arm/include/asm/byteorder.h:29:
In file included from include/linux/byteorder/little_endian.h:14:
include/linux/byteorder/swab.h:130:12: error: use of undeclared identifier '__u64'
return (((__u64)__swab32(l)) << 32) | ((__u64)(__swab32(h)));
^
include/linux/byteorder/swab.h:130:42: error: use of undeclared identifier '__u64'
return (((__u64)__swab32(l)) << 32) | ((__u64)(__swab32(h)));
^
include/linux/byteorder/swab.h:135:19: error: unknown type name '__u64'; did you mean '__s64'?
static __inline__ __u64 __swab64p(const __u64 *x)
^
/Volumes/openwrt/openwrt/staging_dir/host/include/asm/types.h:19:44: note: '__s64' declared here
__extension__ typedef __signed__ long long __s64;
^
In file included from tools/aisimage.c:9:
In file included from include/image.h:19:
In file included from ./arch/arm/include/asm/byteorder.h:29:
In file included from include/linux/byteorder/little_endian.h:14:
include/linux/byteorder/swab.h:135:41: error: unknown type name '__u64'; did you mean '__s64'?
static __inline__ __u64 __swab64p(const __u64 *x)
^
/Volumes/openwrt/openwrt/staging_dir/host/include/asm/types.h:19:44: note: '__s64' declared here
__extension__ typedef __signed__ long long __s64;
^
In file included from tools/aisimage.c:9:
In file included from include/image.h:19:
In file included from ./arch/arm/include/asm/byteorder.h:29:
In file included from include/linux/byteorder/little_endian.h:14:
include/linux/byteorder/swab.h:137:9: error: use of undeclared identifier '__u64'
return __arch__swab64p(x);
^
include/linux/byteorder/swab.h:62:30: note: expanded from macro '__arch__swab64p'
# define __arch__swab64p(x) __swab64(*(x))
^
include/linux/byteorder/swab.h:89:24: note: expanded from macro '__swab64'
(__builtin_constant_p((__u64)(x)) ? \
^
include/linux/byteorder/swab.h:137:9: error: use of undeclared identifier '__u64'
include/linux/byteorder/swab.h:62:30: note: expanded from macro '__arch__swab64p'
# define __arch__swab64p(x) __swab64(*(x))
^
include/linux/byteorder/swab.h:90:2: note: expanded from macro '__swab64'
___swab64((x)) : \
^
include/linux/byteorder/swab.h:32:4: note: expanded from macro '___swab64'
((__u64)( \
^
include/linux/byteorder/swab.h:137:9: error: use of undeclared identifier '__u64'
include/linux/byteorder/swab.h:62:30: note: expanded from macro '__arch__swab64p'
# define __arch__swab64p(x) __swab64(*(x))
^
include/linux/byteorder/swab.h:90:2: note: expanded from macro '__swab64'
___swab64((x)) : \
^
include/linux/byteorder/swab.h:33:4: note: expanded from macro '___swab64'
(__u64)(((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \
^
include/linux/byteorder/swab.h:137:9: error: use of undeclared identifier '__u64'
include/linux/byteorder/swab.h:62:30: note: expanded from macro '__arch__swab64p'
# define __arch__swab64p(x) __swab64(*(x))
^
include/linux/byteorder/swab.h:90:2: note: expanded from macro '__swab64'
___swab64((x)) : \
^
include/linux/byteorder/swab.h:33:13: note: expanded from macro '___swab64'
(__u64)(((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \
^
include/linux/byteorder/swab.h:137:9: error: use of undeclared identifier '__u64'
include/linux/byteorder/swab.h:62:30: note: expanded from macro '__arch__swab64p'
# define __arch__swab64p(x) __swab64(*(x))
^
include/linux/byteorder/swab.h:90:2: note: expanded from macro '__swab64'
___swab64((x)) : \
^
include/linux/byteorder/swab.h:33:26: note: expanded from macro '___swab64'
(__u64)(((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \
^
include/linux/byteorder/swab.h:137:9: error: use of undeclared identifier '__u64'
include/linux/byteorder/swab.h:62:30: note: expanded from macro '__arch__swab64p'
# define __arch__swab64p(x) __swab64(*(x))
^
include/linux/byteorder/swab.h:90:2: note: expanded from macro '__swab64'
___swab64((x)) : \
^
include/linux/byteorder/swab.h:34:4: note: expanded from macro '___swab64'
(__u64)(((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \
^
include/linux/byteorder/swab.h:137:9: error: use of undeclared identifier '__u64'
include/linux/byteorder/swab.h:62:30: note: expanded from macro '__arch__swab64p'
# define __arch__swab64p(x) __swab64(*(x))
^
include/linux/byteorder/swab.h:90:2: note: expanded from macro '__swab64'
___swab64((x)) : \
^
include/linux/byteorder/swab.h:34:13: note: expanded from macro '___swab64'
(__u64)(((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \
^
include/linux/byteorder/swab.h:137:9: error: use of undeclared identifier '__u64'
include/linux/byteorder/swab.h:62:30: note: expanded from macro '__arch__swab64p'
# define __arch__swab64p(x) __swab64(*(x))
^
include/linux/byteorder/swab.h:90:2: note: expanded from macro '__swab64'
___swab64((x)) : \
^
include/linux/byteorder/swab.h:34:26: note: expanded from macro '___swab64'
(__u64)(((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \
^
include/linux/byteorder/swab.h:137:9: error: use of undeclared identifier '__u64'
include/linux/byteorder/swab.h:62:30: note: expanded from macro '__arch__swab64p'
# define __arch__swab64p(x) __swab64(*(x))
^
include/linux/byteorder/swab.h:90:2: note: expanded from macro '__swab64'
___swab64((x)) : \
^
include/linux/byteorder/swab.h:35:4: note: expanded from macro '___swab64'
(__u64)(((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \
^
include/linux/byteorder/swab.h:137:9: error: use of undeclared identifier '__u64'
include/linux/byteorder/swab.h:62:30: note: expanded from macro '__arch__swab64p'
# define __arch__swab64p(x) __swab64(*(x))
^
include/linux/byteorder/swab.h:90:2: note: expanded from macro '__swab64'
___swab64((x)) : \
^
include/linux/byteorder/swab.h:35:13: note: expanded from macro '___swab64'
(__u64)(((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \
^
include/linux/byteorder/swab.h:137:9: error: use of undeclared identifier '__u64'
include/linux/byteorder/swab.h:62:30: note: expanded from macro '__arch__swab64p'
# define __arch__swab64p(x) __swab64(*(x))
^
include/linux/byteorder/swab.h:90:2: note: expanded from macro '__swab64'
___swab64((x)) : \
^
include/linux/byteorder/swab.h:35:26: note: expanded from macro '___swab64'
(__u64)(((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[4]: *** [scripts/Makefile.host:112: tools/aisimage.o] Error 1
make[3]: *** [Makefile:1822: tools] Error 2
make[3]: Leaving directory '/Volumes/openwrt/openwrt/build_dir/target-aarch64_generic_musl/u-boot-nanopi-r2s-rk3328/u-boot-2021.07'
make[2]: *** [Makefile:109: /Volumes/openwrt/openwrt/build_dir/target-aarch64_generic_musl/u-boot-nanopi-r2s-rk3328/u-boot-2021.07/.built] Error 2
make[2]: Leaving directory '/Volumes/openwrt/openwrt/package/boot/uboot-rockchip'
time: package/boot/uboot-rockchip/nanopi-r2s-rk3328/compile#0.82#0.89#2.26
ERROR: package/boot/uboot-rockchip failed to build (build variant: nanopi-r2s-rk3328).
make[1]: *** [package/Makefile:116: package/boot/uboot-rockchip/compile] Error 1
make[1]: Leaving directory '/Volumes/openwrt/openwrt'
make: *** [/Volumes/openwrt/openwrt/include/toplevel.mk:231: package/boot/uboot-rockchip/compile] Error 2
Thanks if anyone can help