Firefly开源社区

打印 上一主题 下一主题

[Linux] RK3399编译LINUX镜像

21

积分

0

威望

0

贡献

技术小白

积分
21

RK3399编译LINUX镜像

发表于 2022-1-12 10:36:18      浏览:4344 | 回复:0        打印      只看该作者   [复制链接] 楼主
本帖最后由 fx_ing 于 2022-1-12 10:44 编辑

按照官网流程 make之后如何生成可烧写的文件,比如update.img文件,我按照教程./build.sh update之后有问题

hl@hl-ThinkCentre-M930t-N000:~/project/huolong/android/rk3399firefly/rk3399_linux_release_v2.5.1$./build.sh
processing option: allff
============================================
TARGET_ARCH=arm64
TARGET_PLATFORM=rk3399
TARGET_UBOOT_CONFIG=firefly-rk3399
TARGET_SPL_CONFIG=
TARGET_KERNEL_CONFIG=firefly_linux_defconfig
TARGET_KERNEL_DTS=rk3399-firefly
TARGET_TOOLCHAIN_CONFIG=
TARGET_BUILDROOT_CONFIG=
TARGET_RECOVERY_CONFIG=
TARGET_PCBA_CONFIG=rockchip_rk3399_pcba
TARGET_RAMBOOT_CONFIG=
============================================
============Start building uboot============
TARGET_UBOOT_CONFIG=firefly-rk3399
=========================================
## make firefly-rk3399_defconfig -j40
#
# configuration written to .config
#
scripts/kconfig/conf  --silentoldconfigKconfig
  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    tpl/include/autoconf.mk
  GEN    spl/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
  CHK    include/config.h
  CFG    u-boot.cfg
  HOSTLD tools/mkenvimage
  HOSTLD tools/loaderimage
  HOSTLD tools/dumpimage
  HOSTLD tools/mkimage
  HOSTLD tools/boot_merger
  CC     arch/arm/cpu/armv8/fwcall.o
  LD     arch/arm/cpu/armv8/built-in.o
  CC     cmd/version.o
  CC     common/main.o
  CC     drivers/usb/gadget/f_fastboot.o
  LD     cmd/built-in.o
  LD     common/built-in.o
  CC     lib/smbios.o
  CC     lib/display_options.o
  CC     lib/efi_loader/helloworld.o
  LD     lib/efi_loader/helloworld.so
  OBJCOPYlib/efi_loader/helloworld.efi
  LD     lib/built-in.o
  LD     drivers/usb/gadget/built-in.o
  LD     u-boot
  OBJCOPY u-boot.srec
  OBJCOPY u-boot-nodtb.bin
  SYM    u-boot.sym
start=$(/home/hl/project/huolong/android/rk3399firefly/rk3399_linux_release_v2.5.1/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-nmu-boot | grep __rel_dyn_start | cut -f 1 -d ' ');end=$(/home/hl/project/huolong/android/rk3399firefly/rk3399_linux_release_v2.5.1/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-nmu-boot | grep __rel_dyn_end | cut -f 1 -d ' '); tools/relocate-relau-boot-nodtb.bin 0x00200000 $start $end
make[2]: 'arch/arm/dts/rk3399-firefly.dtb' is up to date.
  COPY   u-boot.dtb
  CAT    u-boot-dtb.bin
  MKIMAGE u-boot.img
  MKIMAGE u-boot-dtb.img
  COPY   u-boot.bin
  ALIGN  u-boot.bin
  COPY   spl/u-boot-spl.dtb
  COPY   tpl/u-boot-tpl.dtb
  CC     tpl/common/spl/spl.o
  CC     spl/common/spl/spl.o
  CC     tpl/arch/arm/mach-rockchip/tpl.o
  CC     spl/arch/arm/cpu/armv8/fwcall.o
  CC     tpl/arch/arm/cpu/armv8/fwcall.o
  CC     tpl/lib/display_options.o
  CC     spl/lib/display_options.o
  LD     tpl/arch/arm/cpu/armv8/built-in.o
  LD     spl/arch/arm/cpu/armv8/built-in.o
  LD     tpl/arch/arm/mach-rockchip/built-in.o
  LD     tpl/common/spl/built-in.o
  LD     spl/common/spl/built-in.o
  LD     tpl/lib/built-in.o
  LD     spl/lib/built-in.o
  LD     tpl/u-boot-tpl
  LD     spl/u-boot-spl
  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: 946304(924 KB)
crc = 0xb7824cb3
uboot version: U-Boot 2017.09 (Jan 11 2022 - 21:06:51)
pack uboot.img success!
pack uboot okay! Input: u-boot.bin
out:trust.img
merge success(trust.img)
/home/hl/project/huolong/android/rk3399firefly/rk3399_linux_release_v2.5.1/u-boot
pack trust okay! Input:/home/hl/project/huolong/android/rk3399firefly/rk3399_linux_release_v2.5.1/rkbin/RKTRUST/RK3399TRUST.ini
Image Type:   Rockchip RK33 (SD/MMC) bootimage
Init Data Size: 153600 bytes
pack loader ok.(rk3399_loader_v1.26.126.bin)(0.00)
/home/hl/project/huolong/android/rk3399firefly/rk3399_linux_release_v2.5.1/u-boot
pack rk3399_loader_v1.26.126.bin okay! Input:/home/hl/project/huolong/android/rk3399firefly/rk3399_linux_release_v2.5.1/rkbin/RKBOOT/RK3399MINIALL.ini

Platform RK3399 is build OK, with new .config(make firefly-rk3399_defconfig-j40)
Running build_uboot succeeded.
Skipping build_loader for missing configs: RK_LOADER_BUILD_TARGET.
============Start building kernel============
TARGET_ARCH          =arm64
TARGET_KERNEL_CONFIG =firefly_linux_defconfig
TARGET_KERNEL_DTS   =rk3399-firefly
TARGET_KERNEL_CONFIG_FRAGMENT =
==========================================
/home/hl/project/huolong/android/rk3399firefly/rk3399_linux_release_v2.5.1
#
# configuration written to .config
#
scripts/kconfig/conf  --silentoldconfigKconfig
  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/arm64/boot/dts/rockchip/rk3399-firefly.dtb' is up to date.
  CHK    include/generated/timeconst.h
  CHK    include/generated/bounds.h
  CHK    include/generated/asm-offsets.h
  CALL   scripts/checksyscalls.sh
make[1]: 'include/generated/vdso-offsets.h' is up to date.
  CHK    include/generated/compile.h
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
make[1]: 'arch/arm64/boot/Image.lz4' is up to date.
  Image: kernel.img is ready
  CHK    include/config/kernel.release
  CHK    include/generated/uapi/linux/version.h
  CHK    include/generated/utsrelease.h
  CHK    scripts/mod/devicetable-offsets.h
  CHK    include/generated/timeconst.h
  CHK    include/generated/bounds.h
  CHK    include/generated/asm-offsets.h
  CALL   scripts/checksyscalls.sh
make[2]: 'include/generated/vdso-offsets.h' is up to date.
  Building modules, stage 2.
  MODPOST 1 modules
  Image: resource.img (with rk3399-firefly.dtb logo.bmp ) is ready
  Image: boot.img (with Image ramdisk.img resource.img) is ready
  Image: zboot.img (with Image.lz4 ramdisk.img resource.img) is ready
Running build_kernel succeeded.
Skipping build_toolchain for missing configs: RK_CFG_TOOLCHAIN.
Skipping build_buildroot for missing configs: RK_CFG_BUILDROOT.
buildroot/output//images/rootfs.ext4 not generated?
Running build_rootfs succeeded.
==========Start building recovery==========
TARGET_RECOVERY_CONFIG=
========================================
config is
use prebuilt recovery-arm64.cpio.gz for CPIO image
found kernel image
pack recovery.img...done.
you take 0:00.06 to build recovery
====Build recovery ok!====
Running build_recovery succeeded.
Skipping build_ramboot for missing configs: RK_CFG_RAMBOOT.
Running build_all succeeded.
/usr/bin/fakeroot
warning:/home/hl/project/huolong/android/rk3399firefly/rk3399_linux_release_v2.5.1/ubuntu_rootfs/rk3399_ubuntu_rootfs.imgnot found!

please set correct  RK_ROOTFS_IMG  in  device/rockchip/.BoardConfig.mk

create parameter...done.
/home/hl/project/huolong/android/rk3399firefly/rk3399_linux_release_v2.5.1/device/rockchip/rk3399/parameter-ubuntu.txt
0x00002000@0x00004000(uboot),0x00002000@0x00006000(trust),0x00002000@0x00008000(misc),0x00010000@0x0000a000(boot),0x00010000@0x0001a000(recovery),0x00010000@0x0002a000(backup),0x00600000@0x0005a000(rootfs),-@0x0065a000(userdata:grow)
create misc.img...done.
warning:   not found!
create uboot.img...done.
create idbloader.img...done.
create trust.img...done.
create loader...done.
create boot.img...done.
Image: image in rockdev is ready
Make image ok!
File name is  FIREFLY-RK3399-UBUNTU-GPT
Rename the file? [N|y]N
Make update.img
start to make update.img...
Resize rootfs partition size
dumpe2fs 1.42.13 (17-May-2015)
dumpe2fs: No such file or directory while trying to open/home/hl/project/huolong/android/rk3399firefly/rk3399_linux_release_v2.5.1/rockdev/rootfs.img
./mkupdate.sh: line 37: >>9: syntax error: operand expected (error tokenis ">>9")
Android Firmware Package Tool v1.66
------ PACKAGE ------
Add file: ./package-file
Add file: ./package-file done,offset=0x800,size=0x136,userspace=0x1
Add file: ./Image/MiniLoaderAll.bin
Add file: ./Image/MiniLoaderAll.bin done,offset=0x1000,size=0x7194e,userspace=0xe4
Add file: ./Image/parameter.txt
Add file: ./Image/parameter.txtdone,offset=0x73000,size=0x1f0,userspace=0x1
Add file: ./Image/trust.img
Add file: ./Image/trust.imgdone,offset=0x73800,size=0x400000,userspace=0x800
Add file: ./Image/uboot.img
Add file: ./Image/uboot.imgdone,offset=0x473800,size=0x400000,userspace=0x800
Add file: ./Image/boot.img
Add file: ./Image/boot.imgdone,offset=0x873800,size=0x1ea3000,userspace=0x3d46
Add file: ./Image/misc.img
Add file: ./Image/misc.img done,offset=0x2716800,size=0xc000,userspace=0x18
Add file: ./Image/recovery.img
Add file: ./Image/recovery.imgdone,offset=0x2722800,size=0x1e7f000,userspace=0x3cfe
Add file: ./Image/rootfs.img
Error:<AddFile> open file failed,err=2!
------ FAILED ------
Press any key to quit:
ERROR: Running build_updateimg failed!
ERROR: exit code 1 from line 1204:
    ./mkupdate.sh
C:\Users\fx\Desktop\20220112103426.jpg
回复

使用道具 举报

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

本版积分规则

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