coolsnowwolf / lede

Lean's LEDE source
Other
29.93k stars 19.54k forks source link

请求将添加Fine3399 #12446

Closed 1967937965 closed 2 months ago

1967937965 commented 2 months ago

详细叙述

Fine3399是rumu3f设计的一个多用途嵌入式主板,采用bozztek的SW799系列核心板,处理器为RK3399。

Fine3399资料网站: https://gitee.com/opengisbook/Fine3399-Official

长风大佬的dts提交(其中有SPI Flash和屏幕的定义,但被注释了): https://github.com/cm9vdA/build-linux/commit/ab3e4f56c5738e274b6200172816062648a44698

重复 issue

具体型号

Fine3399

详细日志

coolsnowwolf commented 2 months ago

已支持

1967937965 commented 2 months ago

fine3399编译报错,错误信息指出在执行dd命令时,无法找到rk3399-idbloader.bin文件,导致编译失败

1967937965 commented 2 months ago

/home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/linux-6.1.100/arch/arm64/boot/dts/rockchip/rk3568-seewo-sv21.dts:515.20-519.4: Warning (avoid_default_addr_size): /usb@fd000000/device@2: Relying on default #size-cells value aarch64-openwrt-linux-musl-cpp -nostdinc -x assembler-with-cpp -DDTS_NO_LEGACY -I/home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/linux-6.1.100/arch/arm64/boot/dts -I/home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/linux-6.1.100/arch/arm64/boot/dts/include -I/home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/linux-6.1.100/include/ -I/home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/linux-6.1.100/scripts/dtc/include-prefixes -undef -DDTS -o /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/image-rk3328-orangepi-r1-plus-lts.dtb.tmp /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/linux-6.1.100/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/linux-6.1.100/scripts/dtc/dtc -O dtb -i/home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/linux-6.1.100/arch/arm64/boot/dts/rockchip/ -Wno-unit_address_vs_reg -Wno-simple_bus_reg -Wno-unit_address_format -Wno-pci_bridge -Wno-pci_device_bus_num -Wno-pci_device_reg -Wno-avoid_unnecessary_addr_size -Wno-alias_paths -Wno-graph_child_address -Wno-graph_port -Wno-unique_unit_address -o /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/image-rk3399-guangmiao-g4c.dtb /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/image-rk3399-guangmiao-g4c.dtb.tmp rm -f /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/image-rk3399-fine-3399.dtb.tmp rm -f /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/image-rk3399-h3399pc.dtb.tmp rm -f /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/image-rk3399-sv901-eaio.dtb.tmp rm -f /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/image-rk3568-seewo-sv21.dtb.tmp /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/linux-6.1.100/scripts/dtc/dtc -O dtb -i/home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/linux-6.1.100/arch/arm64/boot/dts/rockchip/ -Wno-unit_address_vs_reg -Wno-simple_bus_reg -Wno-unit_address_format -Wno-pci_bridge -Wno-pci_device_bus_num -Wno-pci_device_reg -Wno-avoid_unnecessary_addr_size -Wno-alias_paths -Wno-graph_child_address -Wno-graph_port -Wno-unique_unit_address -o /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/image-rk3328-orangepi-r1-plus-lts.dtb /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/image-rk3328-orangepi-r1-plus-lts.dtb.tmp /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/linux-6.1.100/scripts/dtc/dtc -O dtb -i/home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/linux-6.1.100/arch/arm64/boot/dts/rockchip/ -Wno-unit_address_vs_reg -Wno-simple_bus_reg -Wno-unit_address_format -Wno-pci_bridge -Wno-pci_device_bus_num -Wno-pci_device_reg -Wno-avoid_unnecessary_addr_size -Wno-alias_paths -Wno-graph_child_address -Wno-graph_port -Wno-unique_unit_address -o /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/image-rk3328-orangepi-r1-plus.dtb /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/image-rk3328-orangepi-r1-plus.dtb.tmp rm -f /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/image-rk3399-guangmiao-g4c.dtb.tmp rm -f /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/image-rk3328-orangepi-r1-plus-lts.dtb.tmp rm -f /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/image-rk3328-orangepi-r1-plus.dtb.tmp mkdir -p /home/newuser/lede/bin/targets/rockchip/armv8 /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/tmp rm -rf /home/newuser/lede/build_dir/target-aarch64_generic_musl/json_info_files /home/newuser/lede/staging_dir/host/bin/mksquashfs4 /home/newuser/lede/build_dir/target-aarch64_generic_musl/root-rockchip /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/root.squashfs -nopad -noappend -root-owned -comp xz -Xpreset 9 -Xe -Xlc 0 -Xlp 2 -Xpb 2 -b 256k -p '/dev d 755 0 0' -p '/dev/console c 600 0 0 5 1' -no-xattrs rm -f /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/rumu3f_fine-3399-kernel.bin cp /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/vmlinux /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/rumu3f_fine-3399-kernel.bin Parallel mksquashfs: Using 8 processors Creating 4.0 filesystem on /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/root.squashfs, block size 262144. Pseudo file "/dev" exists in source filesystem "/home/newuser/lede/build_dir/target-aarch64_generic_musl/root-rockchip/dev". Ignoring, exclude it (-e/-ef) to override. [===================================================================================================================================================================================================-] 1801/1801 100%

Exportable Squashfs 4.0 filesystem, xz compressed, data block size 262144 compressed data, compressed metadata, compressed fragments, no xattrs, compressed ids duplicates are removed Filesystem size 6920.30 Kbytes (6.76 Mbytes) 24.90% of uncompressed filesystem size (27790.00 Kbytes) Inode table size 16468 bytes (16.08 Kbytes) 20.91% of uncompressed inode table size (78755 bytes) Directory table size 22962 bytes (22.42 Kbytes) 43.15% of uncompressed directory table size (53220 bytes) Number of duplicate files found 239 Number of inodes 2308 Number of files 1770 Number of fragments 78 Number of symbolic links 386 Number of device nodes 1 Number of fifo nodes 0 Number of socket nodes 0 Number of directories 151 Number of ids (unique uids + gids) 1 Number of uids 1 root (0) Number of gids 1 root (0) [ -f /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/rumu3f_fine-3399-kernel.bin -a -f /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/root.squashfs ]

This creates a new folder copies the dtb (as rockchip.dtb)

and the kernel image (as kernel.img)

rm -fR /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/tmp/openwrt-rockchip-armv8-rumu3f_fine-3399-squashfs-sysupgrade.img.gz.boot mkdir -p /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/tmp/openwrt-rockchip-armv8-rumu3f_fine-3399-squashfs-sysupgrade.img.gz.boot cp -fpR /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/image-rk3399-fine-3399.dtb /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/tmp/openwrt-rockchip-armv8-rumu3f_fine-3399-squashfs-sysupgrade.img.gz.boot/rockchip.dtb cp -fpR /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/rumu3f_fine-3399-kernel.bin /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/tmp/openwrt-rockchip-armv8-rumu3f_fine-3399-squashfs-sysupgrade.img.gz.boot/kernel.img

Make an U-boot image and copy it to the boot partition

mkimage -A arm -O linux -T script -C none -a 0 -e 0 -d mmc.bootscript /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/tmp/openwrt-rockchip-armv8-rumu3f_fine-3399-squashfs-sysupgrade.img.gz.boot/boot.scr Image Name:
Created: Sun Sep 8 18:12:18 2024 Image Type: ARM Linux Script (uncompressed) Data Size: 511 Bytes = 0.50 KiB = 0.00 MiB Load Address: 00000000 Entry Point: 00000000 Contents: Image 0: 503 Bytes = 0.49 KiB = 0.00 MiB

Typical Rockchip boot flow with Rockchip miniloader

Rockchp idbLoader which is combinded by Rockchip ddr init bin

and miniloader bin from Rockchip rkbin project

Generate a new partition table in /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/tmp/openwrt-rockchip-armv8-rumu3f_fine-3399-squashfs-sysupgrade.img.gz with 32 MiB of alignment

padding for the idbloader, uboot and trust image to fit:

http://opensource.rock-chips.com/wiki_Boot_option#Boot_flow

PADDING=1 /home/newuser/lede/scripts/gen_image_generic.sh /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/tmp/openwrt-rockchip-armv8-rumu3f_fine-3399-squashfs-sysupgrade.img.gz 32 /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/tmp/openwrt-rockchip-armv8-rumu3f_fine-3399-squashfs-sysupgrade.img.gz.boot 160 /home/newuser/lede/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/root.squashfs 32768

coolsnowwolf commented 2 months ago

已修复

1967937965 commented 2 months ago

修复后,编译时找不到fine3399选项