Firefly开源社区

参考官方AIO-3288C编译UBUNTU固件 kernel编译错误

38

积分

0

威望

0

贡献

技术小白

积分
38
发表于 2021-1-4 16:59:04     
/RK/firefly-sdk$ ./build.sh recovery
processing option: recovery
==========Start build recovery==========
TARGET_RECOVERY_CONFIG=
========================================
config is
use prebuilt recovery-arm.cpio.gz for CPIO image
kernel image doesn't exist, now build kernel image
processing option: kernel
============Start build kernel============
TARGET_ARCH          =arm
TARGET_KERNEL_CONFIG =firefly_linux_defconfig
TARGET_KERNEL_DTS    =rk3288-firefly-aioc
TARGET_KERNEL_CONFIG_FRAGMENT =
==========================================
#
# configuration written to .config
#
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     scripts/mod/devicetable-offsets.h
make[1]: “include/generated/mach-types.h”已是最新。
make[1]: “arch/arm/boot/dts/rk3288-firefly-aioc.dtb”已是最新。
  CHK     include/generated/timeconst.h
  CHK     include/generated/bounds.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CC      crypto/sha512_generic.o
  GZIP    kernel/config_data.gz
  CHK     kernel/config_data.h
crypto/sha512_generic.c: In function 'sha512_transform':
crypto/sha512_generic.c:132:1: warning: the frame size of 1080 bytes is larger than 1024 bytes [-Wframe-larger-than=]
error, forbidden warning:sha512_generic.c:132
make[1]: *** [scripts/Makefile.build:277:crypto/sha512_generic.o] 错误 1
make: *** [Makefile:1036: crypto] Error 2
make: *** Waiting for unfinished jobs....
  CC      drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.o
  CC      drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_sdio.o
  CC      drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_cdc.o
  CC      drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_wlfc.o
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c: In function 'sdioh_buffer_tofrom_bus':
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c:1346:3: warning: 'before.tv_nsec' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning:bcmsdh_sdmmc.c:1346
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c:1346:3: warning: 'before.tv_sec' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning:bcmsdh_sdmmc.c:1346
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c: In function 'sdioh_request_packet_chain':
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c:1290:3: warning: 'before.tv_nsec' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning:bcmsdh_sdmmc.c:1290
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c:1290:3: warning: 'before.tv_sec' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning:bcmsdh_sdmmc.c:1290
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c: In function 'sdioh_request_byte':
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c:984:3: warning: 'before.tv_nsec' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning:bcmsdh_sdmmc.c:984
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c:984:3: warning: 'before.tv_sec' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning:bcmsdh_sdmmc.c:984
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c: In function 'sdioh_request_word':
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c:1078:3: warning: 'before.tv_nsec' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning:bcmsdh_sdmmc.c:1078
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c:1078:3: warning: 'before.tv_sec' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning:bcmsdh_sdmmc.c:1078
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c: In function 'sdioh_request_buffer':
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c:1424:3: warning: 'before.tv_nsec' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning:bcmsdh_sdmmc.c:1424
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c:1424:3: warning: 'before.tv_sec' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning:bcmsdh_sdmmc.c:1424
make[6]: *** [scripts/Makefile.build:277:drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.o] 错误 1
make[6]: *** 正在等待未完成的任务....
  CC      drivers/net/wireless/rockchip_wlan/wifi_sys/rkwifi_sys_iface.o
  CC      drivers/net/wireless/rockchip_wlan/rkwifi/rk_wifi_config.o
make[5]: *** [scripts/Makefile.build:484:drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd] 错误 2
make[4]: *** [scripts/Makefile.build:484:drivers/net/wireless/rockchip_wlan/rkwifi] 错误 2
make[3]: *** [scripts/Makefile.build:484:drivers/net/wireless/rockchip_wlan] 错误 2
make[2]: *** [scripts/Makefile.build:484:drivers/net/wireless] 错误 2
make[1]: *** [scripts/Makefile.build:484:drivers/net] 错误 2
make: *** [Makefile:1036: drivers] Error 2
====Build kernel failed!====
Command exited with non-zero status 1
you take 0:07.97 to build recovery
====Build recovery failed!====
hutao@hutao-7460:~/RK/firefly-sdk$ ./build.sh
processing option: allff
============================================
TARGET_ARCH=arm
TARGET_PLATFORM=rk3288
TARGET_UBOOT_CONFIG=firefly-rk3288
TARGET_SPL_CONFIG=
TARGET_KERNEL_CONFIG=firefly_linux_defconfig
TARGET_KERNEL_DTS=rk3288-firefly-aioc
TARGET_TOOLCHAIN_CONFIG=
TARGET_BUILDROOT_CONFIG=
TARGET_RECOVERY_CONFIG=
TARGET_PCBA_CONFIG=rockchip_rk3288_pcba
TARGET_RAMBOOT_CONFIG=
============================================
============Start build uboot============
TARGET_UBOOT_CONFIG=firefly-rk3288
=========================================
make for firefly-rk3288_defconfig by -j8
#
# configuration written to .config
#
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config.h
  CFG     u-boot.cfg
  GEN     include/autoconf.mk.dep
  CFG     spl/u-boot.cfg
  CFG     tpl/u-boot.cfg
  GEN     include/autoconf.mk
  GEN     spl/include/autoconf.mk
  GEN     tpl/include/autoconf.mk
  CHK     include/config/uboot.release
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  CHK     include/generated/version_autogenerated.h
  CHK     include/generated/generic-asm-offsets.h
  CHK     include/generated/asm-offsets.h
  HOSTCC  tools/mkenvimage.o
  HOSTCC  tools/fit_image.o
  HOSTCC  tools/image-host.o
  HOSTCC  tools/dumpimage.o
  HOSTCC  tools/mkimage.o
  HOSTCC  tools/rockchip/boot_merger.o
  HOSTCC  tools/rockchip/loaderimage.o
  HOSTLD  tools/mkenvimage
  HOSTLD  tools/loaderimage
  HOSTLD  tools/dumpimage
  HOSTLD  tools/mkimage
  CHK     include/config.h
  CFG     u-boot.cfg
tools/rockchip/boot_merger.c: In function ‘initOpts’:
tools/rockchip/boot_merger.c:491:14: warning: ‘_loader_v’ directive output may be truncated writing 9 bytes into a region of size between 1 and 256 [-Wformat-truncation=]
  491 |           "%s_loader_v%d.%02d.%d%02d.bin", gOpts.chip, v0, v1, v2, v3);
      |              ^~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ././include/compiler.h:25,
                 from <command-line>:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 22 and 315 bytes into a destination of size 256
   67 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   68 |        __bos (__s), __fmt, __va_arg_pack ());
      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/rockchip/boot_merger.c: In function ‘main’:
tools/rockchip/boot_merger.c:895:11: warning: array subscript 20 is outside array bounds of ‘char[20]’ [-Warray-bounds]
  895 |  str[len] = 0;
      |  ~~~~~~~~~^~~
tools/rockchip/boot_merger.c:933:7: note: while referencing ‘name’
  933 |  char name[MAX_NAME_LEN];
      |       ^~~~
  HOSTLD  tools/boot_merger
  CC      cmd/version.o
  CC      common/main.o
  LD      common/built-in.o
  LD      cmd/built-in.o
  CC      drivers/usb/gadget/f_fastboot.o
  CC      lib/smbios.o
  CC      lib/display_options.o
  CC      lib/efi_loader/helloworld.o
  LD      lib/efi_loader/helloworld.so
  OBJCOPY lib/efi_loader/helloworld.efi
  LD      drivers/usb/gadget/built-in.o
  LD      lib/built-in.o
  LD      u-boot
  OBJCOPY u-boot.srec
  OBJCOPY u-boot-nodtb.bin
  SYM     u-boot.sym
make[2]: “arch/arm/dts/rk3288-firefly.dtb”已是最新。
  COPY    u-boot.dtb
  MKIMAGE u-boot-dtb.img
  CAT     u-boot-dtb.bin
  MKIMAGE u-boot.img
  COPY    u-boot.bin
  ALIGN   u-boot.bin
  CC      spl/common/spl/spl.o
  CC      tpl/arch/arm/mach-rockchip/tpl.o
  CC      tpl/common/spl/spl.o
  COPY    spl/u-boot-spl.dtb
  LD      tpl/arch/arm/mach-rockchip/built-in.o
  LD      spl/common/spl/built-in.o
  LD      tpl/common/spl/built-in.o
  COPY    tpl/u-boot-tpl.dtb
  CC      spl/lib/display_options.o
  CC      tpl/lib/display_options.o
  LD      spl/lib/built-in.o
  LD      tpl/lib/built-in.o
  LD      spl/u-boot-spl
  LD      tpl/u-boot-tpl
  OBJCOPY tpl/u-boot-tpl-nodtb.bin
  CAT     tpl/u-boot-tpl-dtb.bin
  COPY    tpl/u-boot-tpl.bin
  OBJCOPY spl/u-boot-spl-nodtb.bin
  CAT     spl/u-boot-spl-dtb.bin
  COPY    spl/u-boot-spl.bin
  CFGCHK  u-boot.cfg

load addr is 0x200000!
pack input u-boot.bin
pack file size: 612184(597 KB)
crc = 0x72039edb
uboot version: U-Boot 2017.09 (Jan 04 2021 - 16:47:04)
pack uboot.img success!
pack uboot okay! Input: u-boot.bin

load addr is 0x8400000!
pack input /home/hutao/RK/firefly-sdk/rkbin/bin/rk32/rk3288_tee_ta_v2.01.bin
pack file size: 734592(717 KB)
crc = 0x69d0e887
trustos version: Trust os
pack ./trust.img success!
pack trust okay! Input: /home/hutao/RK/firefly-sdk/rkbin/RKTRUST/RK3288TOS.ini
out:rk3288_loader_v1.08.258.bin
fix opt:rk3288_loader_v1.08.258.bin
merge success(rk3288_loader_v1.08.258.bin)
/home/hutao/RK/firefly-sdk/u-boot
pack rk3288_loader_v1.08.258.bin okay! Input: /home/hutao/RK/firefly-sdk/rkbin/RKBOOT/RK3288MINIALL.ini

Platform RK3288 is build OK, with new .config(make firefly-rk3288_defconfig)
/home/hutao/RK/firefly-sdk
====Build uboot ok!====
============Start build kernel============
TARGET_ARCH          =arm
TARGET_KERNEL_CONFIG =firefly_linux_defconfig
TARGET_KERNEL_DTS    =rk3288-firefly-aioc
TARGET_KERNEL_CONFIG_FRAGMENT =
==========================================
#
# configuration written to .config
#
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     scripts/mod/devicetable-offsets.h
  CHK     include/generated/utsrelease.h
make[1]: “arch/arm/boot/dts/rk3288-firefly-aioc.dtb”已是最新。
make[1]: “include/generated/mach-types.h”已是最新。
  CHK     include/generated/timeconst.h
  CHK     include/generated/bounds.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CC      crypto/sha512_generic.o
  CC      crypto/ecb.o
  GZIP    kernel/config_data.gz
  CHK     kernel/config_data.h
  CC      crypto/cbc.o
crypto/sha512_generic.c: In function 'sha512_transform':
crypto/sha512_generic.c:132:1: warning: the frame size of 1080 bytes is larger than 1024 bytes [-Wframe-larger-than=]
error, forbidden warning:sha512_generic.c:132
make[1]: *** [scripts/Makefile.build:277:crypto/sha512_generic.o] 错误 1
make[1]: *** 正在等待未完成的任务....
make: *** [Makefile:1036: crypto] Error 2
make: *** Waiting for unfinished jobs....
  CC      drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.o
  CC      drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmxtlv.o
  CC      drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_rtt.o
  CC      drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcm_app_utils.o
  CC      drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_gpio.o
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c: In function 'sdioh_buffer_tofrom_bus':
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c:1346:3: warning: 'before.tv_nsec' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning:bcmsdh_sdmmc.c:1346
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c:1346:3: warning: 'before.tv_sec' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning:bcmsdh_sdmmc.c:1346
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c: In function 'sdioh_request_packet_chain':
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c:1290:3: warning: 'before.tv_nsec' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning:bcmsdh_sdmmc.c:1290
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c:1290:3: warning: 'before.tv_sec' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning:bcmsdh_sdmmc.c:1290
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c: In function 'sdioh_request_byte':
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c:984:3: warning: 'before.tv_nsec' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning:bcmsdh_sdmmc.c:984
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c:984:3: warning: 'before.tv_sec' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning:bcmsdh_sdmmc.c:984
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c: In function 'sdioh_request_word':
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c:1078:3: warning: 'before.tv_nsec' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning:bcmsdh_sdmmc.c:1078
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c:1078:3: warning: 'before.tv_sec' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning:bcmsdh_sdmmc.c:1078
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c: In function 'sdioh_request_buffer':
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c:1424:3: warning: 'before.tv_nsec' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning:bcmsdh_sdmmc.c:1424
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c:1424:3: warning: 'before.tv_sec' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning:bcmsdh_sdmmc.c:1424
make[6]: *** [scripts/Makefile.build:277:drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.o] 错误 1
make[6]: *** 正在等待未完成的任务....
make[5]: *** [scripts/Makefile.build:484:drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd] 错误 2
make[4]: *** [scripts/Makefile.build:484:drivers/net/wireless/rockchip_wlan/rkwifi] 错误 2
make[3]: *** [scripts/Makefile.build:484:drivers/net/wireless/rockchip_wlan] 错误 2
make[2]: *** [scripts/Makefile.build:484:drivers/net/wireless] 错误 2
make[1]: *** [scripts/Makefile.build:484:drivers/net] 错误 2
make[1]: *** 正在等待未完成的任务....
make: *** [Makefile:1036: drivers] Error 2
====Build kernel failed!====


以上按照官方教材编译部分编译kernel编译错误,不知道什么原因
回复

使用道具 举报

791

积分

0

威望

0

贡献

技术大神

Rank: 3Rank: 3

积分
791
发表于 2021-1-6 09:25:13     
- 确认代码是否更新,编译环境是否安装。
- 进入 kernel 目录,先 make distclean,再编译试下
2021-01-06 09-23-43屏幕截图.png
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表