当前位置: 首页 > news >正文

20250426在ubuntu20.04.2系统上打包NanoPi NEO开发板的FriendlyCore系统刷机eMMC的固件

20250426在ubuntu20.04.2系统上打包NanoPi NEO开发板的FriendlyCore系统刷机eMMC的固件
2025/4/26 21:30


缘起:使用NanoPi NEO开发板,编译FriendlyCore系统,打包eMMC固件的时候报错。

1、在ubuntu14.04下git clone异常该如何处理呢?

2、请问 现在 编译NanoPi NEO的FriendlyCore系统使用ubuntu哪一个版本比较好?
ubuntu14.04 编译异常/下载不了:./build.sh kernel  正克隆到 'wireguard'...【编译正常:./build.sh uboot  ./build.sh friendlywrt】
ubuntu16.04 没有来得及测试
ubuntu18.04 没有来得及测试
ubuntu20.04  编译异常:./build.sh friendlywrt
ubuntu22.04  编译异常:./build.sh uboot multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here


rootroot@ubuntu:~/friendlywrt-h3$ 
rootroot@ubuntu:~/friendlywrt-h3$ ./build.sh emmc-img
[INFO]: Copying /home/rootroot/friendlywrt-h3/friendlywrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi to /home/rootroot/friendlywrt-h3/scripts/sd-fuse/out/rootfs.ysGv1Yoeh/  
cp: cannot stat '/home/rootroot/friendlywrt-h3/friendlywrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/*': No such file or directory
[INFO]: Applying device/friendlyelec/h3/default-settings to /home/rootroot/friendlywrt-h3/scripts/sd-fuse/out/rootfs.ysGv1Yoeh  
sed: can't read ./etc/config/firewall: No such file or directory
[INFO]: Applying device/friendlyelec/h3/common-files to /home/rootroot/friendlywrt-h3/scripts/sd-fuse/out/rootfs.ysGv1Yoeh  
Re-running script under sudo...
[INFO]: prepare boot.img ...  
Re-running script under sudo...

0+0 records in
0+0 records out
0 bytes copied, 0.000541491 s, 0.0 kB/s
generating ./friendlywrt_4.14_armhf/boot.img done.
[INFO]: prepare rootfs.img ...  
Re-running script under sudo...
Creating filesystem with parameters:
    Size: 159383552
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 4864
    Inode size: 256
    Journal blocks: 1024
    Label: rootfs
    Blocks: 38912
    Block groups: 2
    Reserved block group size: 15
    Suggest size: 67108864
Created filesystem with 1434/9728 inodes and 11856/38912 blocks
'/home/rootroot/friendlywrt-h3/scripts/sd-fuse/prebuilt/partmap.template' -> 'friendlywrt_4.14_armhf/partmap.txt'
generating friendlywrt_4.14_armhf/partmap.txt done.
0
generating friendlywrt_4.14_armhf/rootfs.img done.
0
Generating empty userdata.img (size:104857600)
Creating filesystem with parameters:
    Size: 104857600
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 6400
    Inode size: 256
    Journal blocks: 1024
    Label: userdata
    Blocks: 25600
    Block groups: 1
    Reserved block group size: 7
    Suggest size: 25165824
Created filesystem with 11/6400 inodes and 1438/25600 blocks
[INFO]: clean ...  
Re-running script under sudo...
Creating RAW image: out/h3_eflasher-20250426.img (7800 MB)
---------------------------------
0+0 records in
0+0 records out
0 bytes copied, 0.000339886 s, 0.0 kB/s
Using device: /dev/loop13
---------------------------------
Eflasher filesystem fusing
Image root: ./eflasher

----------------------------------------------------------------
[/dev/loop13] capacity = 7438MB, 7799999488 bytes
current /dev/loop13 partition:
MBR.0 start : 0x0000100000 size 0x01d0da8c00  kB
----------------------------------------------------------------
parsing ./eflasher/partmap.txt:
part.0 flash=mmc,0:boot0:raw:0x2000,0x1fe000:u-boot-sunxi-with-spl.bin:[RAW] ./eflasher/u-boot-sunxi-with-spl.bin
part.1 flash=mmc,0:env:raw:0x200000,0x20000:env_eflasher.bin:[RAW] ./eflasher/env_eflasher.bin
part.2 flash=mmc,0:FriendlyARM:fat:0x70900000,0x0:FriendlyARM.img:[MBR] ./eflasher/FriendlyARM.img
part.3 flash=mmc,0:boot:fat:0x1800000,0x2800000:boot.img:[MBR] ./eflasher/boot.img
part.4 flash=mmc,0:rootfs:ext4:0x4000000,0x6c900000:rootfs.img:[MBR] ./eflasher/rootfs.img
----------------------------------------------------------------
create new MBR 3:
[MBR.0] start : 0x0070900000 size 0x0000000000 
[MBR.1] start : 0x0001800000 size 0x0002800000 
[MBR.2] start : 0x0004000000 size 0x006c900000 
----------------------------------------------------------------
copy from: ./eflasher to /dev/loop13
 [RAW. 0]:     2040 KB | ./eflasher/u-boot-sunxi-with-spl.bin > 100% : done.
 [RAW. 1]:      128 KB | ./eflasher/env_eflasher.bin          > 100% : done.
 [MBR. 0]:   163840 KB | ./eflasher/FriendlyARM.img           > 100% : done.
 [MBR. 1]:    40960 KB | ./eflasher/boot.img                  > 100% : done.
 [MBR. 2]:   651766 KB | ./eflasher/rootfs.img                > 100% : done.
----------------------------------------------------------------
/dev/loop13: msdos partitions 2 3 1
---------------------------------
Eflasher is fused successfully.
All done.
mkexfatfs 1.3.0
Creating... done.
Flushing... done.
File system created successfully.
---------------------------------
RAW image successfully created (21:06:03).
-rw-r--r-- 1 root root 7799999488 Apr 26 21:06 out/h3_eflasher-20250426.img
Tip: You can compress it to save disk space.

FUSE exfat 1.3.0
copying /home/rootroot/friendlywrt-h3/scripts/sd-fuse/friendlywrt_4.14_armhf/* to /tmp/media_exfat/friendlywrt_4.14_armhf ...
-rw-r--r-- 1 root root 7799999488 Apr 26 21:06 out/FriendlyWrt_20250426_NanoPi-NEO-Core_armhf_eflasher.img
all done.
-----------------------------------------
Run the following command for sdcard install:
    sudo dd if=out/FriendlyWrt_20250426_NanoPi-NEO-Core_armhf_eflasher.img bs=1M of=/dev/sdX
-----------------------------------------

rootroot@ubuntu:~/friendlywrt-h3$ 


很容易知道:
1、【预编译的固件】
X:\friendlywrt-h3\pre-download\eflasher.tgz
【解压缩脚本】
X:\friendlywrt-h3\pre-download\unpack.sh


2、【解压缩后的:预编译的固件】
 驱动器 X 中的卷是 rootroot
 卷的序列号是 97F9-E71D

 X:\friendlywrt-h3\scripts\sd-fuse\eflasher 的目录

2025/04/26  21:38    <DIR>          .
2025/04/26  20:59    <DIR>          ..
2019/12/30  11:25        41,943,040 boot.img
2019/12/30  11:25           131,072 env_eflasher.bin
2019/12/30  11:25       167,772,160 FriendlyARM.img
2019/12/30  11:25                51 info.conf
2019/12/30  11:25               476 partmap.txt
2019/12/30  11:25       667,409,384 rootfs.img
2019/12/30  11:25         2,088,960 u-boot-sunxi-with-spl.bin

               8 个文件    879,345,253 字节
               2 个目录 1,975,609,622,528 可用字节


使用./build.sh emmc-img打包固件的时候,只是使用预编译的固件,但是没有使用你编译的固件。比较神奇
【uboot】 X:\friendlywrt-h3\u-boot
2019/12/30  11:25         2,088,960 u-boot-sunxi-with-spl.bin
【内核】 X:\friendlywrt-h3\kernel
2019/12/30  11:25        41,943,040 boot.img
【文件系统】 X:\friendlywrt-h3\friendlywrt
2019/12/30  11:25       667,409,384 rootfs.img


3、打包后的eMMC的固件:接近8GB
X:\friendlywrt-h3\scripts\sd-fuse\out\FriendlyWrt_20250426_NanoPi-NEO-Core_armhf_eflasher.img

 驱动器 X 中的卷是 rootroot
 卷的序列号是 97F9-E71D

 X:\friendlywrt-h3\scripts\sd-fuse\out 的目录

2025/04/26  21:43    <DIR>          .
2025/04/26  20:59    <DIR>          ..
2025/04/26  21:06     7,799,999,488 FriendlyWrt_20250426_NanoPi-NEO-Core_armhf_eflasher.img
2025/04/26  20:59       640,000,000 FriendlyWrt_20250426_NanoPi-NEO-Core_armhf_sd.img
2025/04/26  21:06    <DIR>          images-for-eflasher
2025/04/26  11:28    <DIR>          output_h3_kmodules
2025/04/26  11:28    <DIR>          wireguard
               5 个文件  8,445,623,815 字节
               5 个目录 1,975,609,614,336 可用字节


参考资料:

https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO/zh
NanoPi NEO/zh

7 如何编译FriendlyCore系统
7.1 使用开源社区主线BSP
7.2 使用全志原厂BSP
7.2.1 准备工作
7.2.2 安装交叉编译器
7.2.3 编译lichee源码
7.2.4 编译U-boot
7.2.5 编译Linux内核
7.2.6 清理lichee源码


完整的LOG:

rootroot@ubuntu:~$ ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.221.129  netmask 255.255.255.0  broadcast 192.168.221.255
        inet6 fe80::5363:b466:6c6:19b8  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:87:5d:3a  txqueuelen 1000  (Ethernet)
        RX packets 149  bytes 28923 (28.9 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 233  bytes 27798 (27.7 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 138  bytes 12849 (12.8 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 138  bytes 12849 (12.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

rootroot@ubuntu:~$ 
rootroot@ubuntu:~$ 
rootroot@ubuntu:~$ ll
total 92
drwxr-xr-x 17 rootroot rootroot 4096 Apr 26 11:12 ./
drwxr-xr-x  3 root     root     4096 Apr  1  2021 ../
drwxr-xr-x  2 rootroot rootroot 4096 Apr 26 11:02 07_源代码/
-rw-------  1 rootroot rootroot 2076 Apr 26 11:43 .bash_history
-rw-r--r--  1 rootroot rootroot  220 Apr  1  2021 .bash_logout
-rw-r--r--  1 rootroot rootroot 3771 Apr  1  2021 .bashrc
drwxrwxr-x 11 rootroot rootroot 4096 Apr 26 10:52 .cache/
drwx------ 12 rootroot rootroot 4096 Apr 26 20:58 .config/
drwxr-xr-x  2 rootroot rootroot 4096 Apr  1  2021 Desktop/
drwxr-xr-x  2 rootroot rootroot 4096 Apr  1  2021 Documents/
drwxr-xr-x  2 rootroot rootroot 4096 Apr  1  2021 Downloads/
drwxrwxr-x 11 rootroot rootroot 4096 Apr 26 11:37 friendlywrt-h3/
drwx------  3 rootroot rootroot 4096 Apr  1  2021 .gnupg/
drwxr-xr-x  3 rootroot rootroot 4096 Apr  1  2021 .local/
drwxr-xr-x  2 rootroot rootroot 4096 Apr  1  2021 Music/
drwxr-xr-x  2 rootroot rootroot 4096 Apr  1  2021 Pictures/
-rw-r--r--  1 rootroot rootroot  807 Apr  1  2021 .profile
drwxr-xr-x  2 rootroot rootroot 4096 Apr  1  2021 Public/
-rw-rw-r--  1 rootroot rootroot    2 Apr 26 11:07 .repo_.gitconfig.json
drwx------  2 rootroot rootroot 4096 Apr  1  2021 .ssh/
-rw-r--r--  1 rootroot rootroot    0 Apr  1  2021 .sudo_as_admin_successful
drwxr-xr-x  2 rootroot rootroot 4096 Apr  1  2021 Templates/
drwxr-xr-x  2 rootroot rootroot 4096 Apr  1  2021 Videos/
-rw-------  1 rootroot rootroot  104 Apr 26 11:12 .Xauthority
rootroot@ubuntu:~$ cd friendlywrt-h3/
rootroot@ubuntu:~/friendlywrt-h3$ ll
total 480580
drwxrwxr-x 11 rootroot rootroot      4096 Apr 26 11:37 ./
drwxr-xr-x 17 rootroot rootroot      4096 Apr 26 11:12 ../
lrwxrwxrwx  1 rootroot rootroot        16 Apr 26 11:07 build.sh -> scripts/build.sh*
drwxrwxr-x  3 rootroot rootroot      4096 Apr 26 11:07 configs/
lrwxrwxrwx  1 rootroot rootroot        41 Apr 26 11:17 .current_config.mk -> device/friendlyelec/h3/nanopi_neo_core.mk
drwxrwxr-x  3 rootroot rootroot      4096 Apr 26 11:07 device/
drwxrwxr-x 14 rootroot rootroot      4096 Apr 26 11:07 friendlywrt/
drwxrwxr-x 27 rootroot rootroot      4096 Apr 26 11:38 kernel/
-rw-rw-r--  1 rootroot rootroot 164308041 Apr 26 11:11 kernel2.tgz
-rw-rw-r--  1 rootroot rootroot 311279142 Apr 26 11:37 kernel5编译后的.tgz
lrwxrwxrwx  1 rootroot rootroot        19 Apr 26 11:07 out -> scripts/sd-fuse/out/
drwxrwxr-x  2 rootroot rootroot      4096 Apr 17  2020 pre-download/
drwxrwxr-x  7 rootroot rootroot      4096 Apr 17  2020 .repo/
drwxrwxr-x  4 rootroot rootroot      4096 Apr 26 11:07 scripts/
drwxrwxr-x  5 rootroot rootroot      4096 Apr 26 11:07 toolchain/
drwxrwxr-x 27 rootroot rootroot      4096 Apr 26 11:17 u-boot/
-rw-rw-r--  1 rootroot rootroot  16476681 Apr 26 11:10 u-boot1.tgz
rootroot@ubuntu:~/friendlywrt-h3$ ll *.sh
lrwxrwxrwx 1 rootroot rootroot 16 Apr 26 11:07 build.sh -> scripts/build.sh*
rootroot@ubuntu:~/friendlywrt-h3$ 
rootroot@ubuntu:~/friendlywrt-h3$ ./build.sh 
USAGE: ./build.sh <parameter>

# select board: 
  ./build.sh nanopi_m1.mk
  ./build.sh nanopi_neo_core.mk
  ./build.sh nanopi_neo_air.mk
  ./build.sh nanopi_duo2.mk
  ./build.sh nanopi_r1s_h3.mk
  ./build.sh nanopi_neo_s.mk
  ./build.sh nanopi_m1_plus.mk
  ./build.sh nanopi_r1.mk
  ./build.sh nanopi_neo.mk
  ./build.sh zeropi.mk

# build module: 
  ./build.sh all                -build all
  ./build.sh uboot              -build uboot only
  ./build.sh kernel             -build kernel only
  ./build.sh friendlywrt        -build friendlywrt rootfs only
  ./build.sh sd-img             -pack sd-card image, used to create bootable SD card
  ./build.sh emmc-img           -pack sd-card image, used to write friendlywrt to emmc
# clean
  ./build.sh cleanall

rootroot@ubuntu:~/friendlywrt-h3$ 
rootroot@ubuntu:~/friendlywrt-h3$ ./build.sh sd-img
[INFO]: Copying /home/rootroot/friendlywrt-h3/friendlywrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi to /home/rootroot/friendlywrt-h3/scripts/sd-fuse/out/rootfs.J5lnqTyPt/  
cp: cannot stat '/home/rootroot/friendlywrt-h3/friendlywrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/*': No such file or directory
[INFO]: Applying device/friendlyelec/h3/default-settings to /home/rootroot/friendlywrt-h3/scripts/sd-fuse/out/rootfs.J5lnqTyPt  
sed: can't read ./etc/config/firewall: No such file or directory
[INFO]: Applying device/friendlyelec/h3/common-files to /home/rootroot/friendlywrt-h3/scripts/sd-fuse/out/rootfs.J5lnqTyPt  
Re-running script under sudo...
[sudo] password for rootroot: 
Sorry, try again.
[sudo] password for rootroot: 
[INFO]: prepare boot.img ...  
Re-running script under sudo...

0+0 records in
0+0 records out
0 bytes copied, 0.000374109 s, 0.0 kB/s
generating ./friendlywrt_4.14_armhf/boot.img done.
[INFO]: prepare rootfs.img ...  
Re-running script under sudo...
Creating filesystem with parameters:
    Size: 159383552
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 4864
    Inode size: 256
    Journal blocks: 1024
    Label: rootfs
    Blocks: 38912
    Block groups: 2
    Reserved block group size: 15
    Suggest size: 67108864
Created filesystem with 1434/9728 inodes and 11856/38912 blocks
'/home/rootroot/friendlywrt-h3/scripts/sd-fuse/prebuilt/partmap.template' -> 'friendlywrt_4.14_armhf/partmap.txt'
generating friendlywrt_4.14_armhf/partmap.txt done.
0
generating friendlywrt_4.14_armhf/rootfs.img done.
0
Generating empty userdata.img (size:104857600)
Creating filesystem with parameters:
    Size: 104857600
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 6400
    Inode size: 256
    Journal blocks: 1024
    Label: userdata
    Blocks: 25600
    Block groups: 1
    Reserved block group size: 7
    Suggest size: 25165824
Created filesystem with 11/6400 inodes and 1438/25600 blocks
[INFO]: clean ...  
Re-running script under sudo...
Creating RAW image: out/FriendlyWrt_20250426_NanoPi-NEO-Core_armhf_sd.img (640 MB)
---------------------------------
0+0 records in
0+0 records out
0 bytes copied, 0.000329701 s, 0.0 kB/s
Using device: /dev/loop12
---------------------------------
Friendlywrt_4.14_armhf filesystem fusing
Image root: ./friendlywrt_4.14_armhf

----------------------------------------------------------------
[/dev/loop12] capacity = 610MB, 640000000 bytes
current /dev/loop12 partition:
MBR.0 start : 0x0000100000 size 0x002615a000  kB
----------------------------------------------------------------
parsing ./friendlywrt_4.14_armhf/partmap.txt:
part.0 flash=mmc,0:boot0:raw:0x2000,0x17fe000:u-boot-sunxi-with-spl.bin:[RAW] ./friendlywrt_4.14_armhf/u-boot-sunxi-with-spl.bin
part.1 flash=mmc,0:boot:fat:0x1800000,0x2800000:boot.img:[MBR] ./friendlywrt_4.14_armhf/boot.img
part.2 flash=mmc,0:rootfs:ext4:0x4000000,0x9800000:rootfs.img:[MBR] ./friendlywrt_4.14_armhf/rootfs.img
part.3 flash=mmc,0:userdata:ext4:0xd800000,0x0:userdata.img:[MBR] ./friendlywrt_4.14_armhf/userdata.img
----------------------------------------------------------------
create new MBR 3:
[MBR.0] start : 0x0001800000 size 0x0002800000 
[MBR.1] start : 0x0004000000 size 0x0009800000 
[MBR.2] start : 0x000d800000 size 0x0000000000 
----------------------------------------------------------------
copy from: ./friendlywrt_4.14_armhf to /dev/loop12
 [RAW. 0]:     2040 KB | ./friendlywrt_4.14_armhf/u-boot-sunxi-with-spl.bin > 100% : done.
 [MBR. 0]:    40960 KB | ./friendlywrt_4.14_armhf/boot.img                  > 100% : done.
 [MBR. 1]:    46164 KB | ./friendlywrt_4.14_armhf/rootfs.img                > 100% : done.
 [MBR. 2]:     5752 KB | ./friendlywrt_4.14_armhf/userdata.img              > 100% : done.
----------------------------------------------------------------
/dev/loop12: msdos partitions 1 2 3
### try to resize2fs: /dev/loop12p3
resize2fs 1.45.5 (07-Jan-2020)
Resizing the filesystem on /dev/loop12p3 to 100954 (4k) blocks.
The filesystem on /dev/loop12p3 is now 100954 (4k) blocks long.

---------------------------------
Friendlywrt_4.14_armhf is fused successfully.
All done.
---------------------------------
RAW image successfully created (20:59:42).
-rw-r--r-- 1 root root 640000000 Apr 26 20:59 out/FriendlyWrt_20250426_NanoPi-NEO-Core_armhf_sd.img
Tip: You can compress it to save disk space.
-----------------------------------------
Run the following command for sdcard install:
    sudo dd if=out/FriendlyWrt_20250426_NanoPi-NEO-Core_armhf_sd.img bs=1M of=/dev/sdX
-----------------------------------------
rootroot@ubuntu:~/friendlywrt-h3$ 
rootroot@ubuntu:~/friendlywrt-h3$ ./build.sh .
Can't find a build config file, please check again
USAGE: ./build.sh <parameter>

# select board: 
  ./build.sh nanopi_m1.mk
  ./build.sh nanopi_neo_core.mk
  ./build.sh nanopi_neo_air.mk
  ./build.sh nanopi_duo2.mk
  ./build.sh nanopi_r1s_h3.mk
  ./build.sh nanopi_neo_s.mk
  ./build.sh nanopi_m1_plus.mk
  ./build.sh nanopi_r1.mk
  ./build.sh nanopi_neo.mk
  ./build.sh zeropi.mk

# build module: 
  ./build.sh all                -build all
  ./build.sh uboot              -build uboot only
  ./build.sh kernel             -build kernel only
  ./build.sh friendlywrt        -build friendlywrt rootfs only
  ./build.sh sd-img             -pack sd-card image, used to create bootable SD card
  ./build.sh emmc-img           -pack sd-card image, used to write friendlywrt to emmc
# clean
  ./build.sh cleanall

rootroot@ubuntu:~/friendlywrt-h3$ ./build.sh emmc-img
[INFO]: Copying /home/rootroot/friendlywrt-h3/friendlywrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi to /home/rootroot/friendlywrt-h3/scripts/sd-fuse/out/rootfs.2ZenZBFIN/  
cp: cannot stat '/home/rootroot/friendlywrt-h3/friendlywrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/*': No such file or directory
[INFO]: Applying device/friendlyelec/h3/default-settings to /home/rootroot/friendlywrt-h3/scripts/sd-fuse/out/rootfs.2ZenZBFIN  
sed: can't read ./etc/config/firewall: No such file or directory
[INFO]: Applying device/friendlyelec/h3/common-files to /home/rootroot/friendlywrt-h3/scripts/sd-fuse/out/rootfs.2ZenZBFIN  
Re-running script under sudo...
[INFO]: prepare boot.img ...  
Re-running script under sudo...

0+0 records in
0+0 records out
0 bytes copied, 0.000316074 s, 0.0 kB/s
generating ./friendlywrt_4.14_armhf/boot.img done.
[INFO]: prepare rootfs.img ...  
Re-running script under sudo...
Creating filesystem with parameters:
    Size: 159383552
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 4864
    Inode size: 256
    Journal blocks: 1024
    Label: rootfs
    Blocks: 38912
    Block groups: 2
    Reserved block group size: 15
    Suggest size: 67108864
Created filesystem with 1434/9728 inodes and 11856/38912 blocks
'/home/rootroot/friendlywrt-h3/scripts/sd-fuse/prebuilt/partmap.template' -> 'friendlywrt_4.14_armhf/partmap.txt'
generating friendlywrt_4.14_armhf/partmap.txt done.
0
generating friendlywrt_4.14_armhf/rootfs.img done.
0
Generating empty userdata.img (size:104857600)
Creating filesystem with parameters:
    Size: 104857600
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 6400
    Inode size: 256
    Journal blocks: 1024
    Label: userdata
    Blocks: 25600
    Block groups: 1
    Reserved block group size: 7
    Suggest size: 25165824
Created filesystem with 11/6400 inodes and 1438/25600 blocks
[INFO]: clean ...  
Re-running script under sudo...
Creating RAW image: out/h3_eflasher-20250426.img (7800 MB)
---------------------------------
0+0 records in
0+0 records out
0 bytes copied, 0.000562631 s, 0.0 kB/s
Using device: /dev/loop12
---------------------------------
Eflasher filesystem fusing
Image root: ./eflasher

----------------------------------------------------------------
[/dev/loop12] capacity = 7438MB, 7799999488 bytes
current /dev/loop12 partition:
MBR.0 start : 0x0000100000 size 0x01d0da8c00  kB
----------------------------------------------------------------
parsing ./eflasher/partmap.txt:
part.0 flash=mmc,0:boot0:raw:0x2000,0x1fe000:u-boot-sunxi-with-spl.bin:[RAW] ./eflasher/u-boot-sunxi-with-spl.bin
part.1 flash=mmc,0:env:raw:0x200000,0x20000:env_eflasher.bin:[RAW] ./eflasher/env_eflasher.bin
part.2 flash=mmc,0:FriendlyARM:fat:0x70900000,0x0:FriendlyARM.img:[MBR] ./eflasher/FriendlyARM.img
part.3 flash=mmc,0:boot:fat:0x1800000,0x2800000:boot.img:[MBR] ./eflasher/boot.img
part.4 flash=mmc,0:rootfs:ext4:0x4000000,0x6c900000:rootfs.img:[MBR] ./eflasher/rootfs.img
----------------------------------------------------------------
create new MBR 3:
[MBR.0] start : 0x0070900000 size 0x0000000000 
[MBR.1] start : 0x0001800000 size 0x0002800000 
[MBR.2] start : 0x0004000000 size 0x006c900000 
----------------------------------------------------------------
copy from: ./eflasher to /dev/loop12
 [RAW. 0]:     2040 KB | ./eflasher/u-boot-sunxi-with-spl.bin > 100% : done.
 [RAW. 1]:      128 KB | ./eflasher/env_eflasher.bin          > 100% : done.
 [MBR. 0]:   163840 KB | ./eflasher/FriendlyARM.img           > 100% : done.
 [MBR. 1]:    40960 KB | ./eflasher/boot.img                  > 100% : done.
 [MBR. 2]:   651766 KB | ./eflasher/rootfs.img                > 100% : done.
----------------------------------------------------------------
/dev/loop12: msdos partitions 2 3 1
---------------------------------
Eflasher is fused successfully.
All done.
./mk-sd-image.sh: line 142: mkfs.exfat: command not found
rootroot@ubuntu:~/friendlywrt-h3$ 
rootroot@ubuntu:~/friendlywrt-h3$ 
rootroot@ubuntu:~/friendlywrt-h3$ sudo apt-get install exfat-utils
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  exfat-fuse
The following NEW packages will be installed:
  exfat-fuse exfat-utils
0 upgraded, 2 newly installed, 0 to remove and 623 not upgraded.
Need to get 65.3 kB of archives.
After this operation, 302 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 exfat-fuse amd64 1.3.0-1 [24.6 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 exfat-utils amd64 1.3.0-1 [40.7 kB]
Fetched 65.3 kB in 3s (20.2 kB/s)      
Selecting previously unselected package exfat-fuse.
(Reading database ... 194685 files and directories currently installed.)
Preparing to unpack .../exfat-fuse_1.3.0-1_amd64.deb ...
Unpacking exfat-fuse (1.3.0-1) ...
Selecting previously unselected package exfat-utils.
Preparing to unpack .../exfat-utils_1.3.0-1_amd64.deb ...
Unpacking exfat-utils (1.3.0-1) ...
Setting up exfat-utils (1.3.0-1) ...
Setting up exfat-fuse (1.3.0-1) ...
Processing triggers for man-db (2.9.1-1) ...
rootroot@ubuntu:~/friendlywrt-h3$ 
rootroot@ubuntu:~/friendlywrt-h3$ ./build.sh emmc-img
[INFO]: Copying /home/rootroot/friendlywrt-h3/friendlywrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi to /home/rootroot/friendlywrt-h3/scripts/sd-fuse/out/rootfs.ysGv1Yoeh/  
cp: cannot stat '/home/rootroot/friendlywrt-h3/friendlywrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/*': No such file or directory
[INFO]: Applying device/friendlyelec/h3/default-settings to /home/rootroot/friendlywrt-h3/scripts/sd-fuse/out/rootfs.ysGv1Yoeh  
sed: can't read ./etc/config/firewall: No such file or directory
[INFO]: Applying device/friendlyelec/h3/common-files to /home/rootroot/friendlywrt-h3/scripts/sd-fuse/out/rootfs.ysGv1Yoeh  
Re-running script under sudo...
[INFO]: prepare boot.img ...  
Re-running script under sudo...

0+0 records in
0+0 records out
0 bytes copied, 0.000541491 s, 0.0 kB/s
generating ./friendlywrt_4.14_armhf/boot.img done.
[INFO]: prepare rootfs.img ...  
Re-running script under sudo...
Creating filesystem with parameters:
    Size: 159383552
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 4864
    Inode size: 256
    Journal blocks: 1024
    Label: rootfs
    Blocks: 38912
    Block groups: 2
    Reserved block group size: 15
    Suggest size: 67108864
Created filesystem with 1434/9728 inodes and 11856/38912 blocks
'/home/rootroot/friendlywrt-h3/scripts/sd-fuse/prebuilt/partmap.template' -> 'friendlywrt_4.14_armhf/partmap.txt'
generating friendlywrt_4.14_armhf/partmap.txt done.
0
generating friendlywrt_4.14_armhf/rootfs.img done.
0
Generating empty userdata.img (size:104857600)
Creating filesystem with parameters:
    Size: 104857600
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 6400
    Inode size: 256
    Journal blocks: 1024
    Label: userdata
    Blocks: 25600
    Block groups: 1
    Reserved block group size: 7
    Suggest size: 25165824
Created filesystem with 11/6400 inodes and 1438/25600 blocks
[INFO]: clean ...  
Re-running script under sudo...
Creating RAW image: out/h3_eflasher-20250426.img (7800 MB)
---------------------------------
0+0 records in
0+0 records out
0 bytes copied, 0.000339886 s, 0.0 kB/s
Using device: /dev/loop13
---------------------------------
Eflasher filesystem fusing
Image root: ./eflasher

----------------------------------------------------------------
[/dev/loop13] capacity = 7438MB, 7799999488 bytes
current /dev/loop13 partition:
MBR.0 start : 0x0000100000 size 0x01d0da8c00  kB
----------------------------------------------------------------
parsing ./eflasher/partmap.txt:
part.0 flash=mmc,0:boot0:raw:0x2000,0x1fe000:u-boot-sunxi-with-spl.bin:[RAW] ./eflasher/u-boot-sunxi-with-spl.bin
part.1 flash=mmc,0:env:raw:0x200000,0x20000:env_eflasher.bin:[RAW] ./eflasher/env_eflasher.bin
part.2 flash=mmc,0:FriendlyARM:fat:0x70900000,0x0:FriendlyARM.img:[MBR] ./eflasher/FriendlyARM.img
part.3 flash=mmc,0:boot:fat:0x1800000,0x2800000:boot.img:[MBR] ./eflasher/boot.img
part.4 flash=mmc,0:rootfs:ext4:0x4000000,0x6c900000:rootfs.img:[MBR] ./eflasher/rootfs.img
----------------------------------------------------------------
create new MBR 3:
[MBR.0] start : 0x0070900000 size 0x0000000000 
[MBR.1] start : 0x0001800000 size 0x0002800000 
[MBR.2] start : 0x0004000000 size 0x006c900000 
----------------------------------------------------------------
copy from: ./eflasher to /dev/loop13
 [RAW. 0]:     2040 KB | ./eflasher/u-boot-sunxi-with-spl.bin > 100% : done.
 [RAW. 1]:      128 KB | ./eflasher/env_eflasher.bin          > 100% : done.
 [MBR. 0]:   163840 KB | ./eflasher/FriendlyARM.img           > 100% : done.
 [MBR. 1]:    40960 KB | ./eflasher/boot.img                  > 100% : done.
 [MBR. 2]:   651766 KB | ./eflasher/rootfs.img                > 100% : done.
----------------------------------------------------------------
/dev/loop13: msdos partitions 2 3 1
---------------------------------
Eflasher is fused successfully.
All done.
mkexfatfs 1.3.0
Creating... done.
Flushing... done.
File system created successfully.
---------------------------------
RAW image successfully created (21:06:03).
-rw-r--r-- 1 root root 7799999488 Apr 26 21:06 out/h3_eflasher-20250426.img
Tip: You can compress it to save disk space.

FUSE exfat 1.3.0
copying /home/rootroot/friendlywrt-h3/scripts/sd-fuse/friendlywrt_4.14_armhf/* to /tmp/media_exfat/friendlywrt_4.14_armhf ...
-rw-r--r-- 1 root root 7799999488 Apr 26 21:06 out/FriendlyWrt_20250426_NanoPi-NEO-Core_armhf_eflasher.img
all done.
-----------------------------------------
Run the following command for sdcard install:
    sudo dd if=out/FriendlyWrt_20250426_NanoPi-NEO-Core_armhf_eflasher.img bs=1M of=/dev/sdX
-----------------------------------------
rootroot@ubuntu:~/friendlywrt-h3$ 
rootroot@ubuntu:~/friendlywrt-h3$ ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.221.129  netmask 255.255.255.0  broadcast 192.168.221.255
        inet6 fe80::5363:b466:6c6:19b8  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:87:5d:3a  txqueuelen 1000  (Ethernet)
        RX packets 328  bytes 143994 (143.9 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 310  bytes 42067 (42.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 150  bytes 14363 (14.3 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 150  bytes 14363 (14.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

rootroot@ubuntu:~/friendlywrt-h3$ 
rootroot@ubuntu:~/friendlywrt-h3$ 
rootroot@ubuntu:~/friendlywrt-h3$ 
rootroot@ubuntu:~/friendlywrt-h3$ cat /etc/issue
Ubuntu 20.04.2 LTS \n \l

rootroot@ubuntu:~/friendlywrt-h3$ 
rootroot@ubuntu:~/friendlywrt-h3$ uname -a\
> ^C
rootroot@ubuntu:~/friendlywrt-h3$ uname -a
Linux ubuntu 5.8.0-48-generic #54~20.04.1-Ubuntu SMP Sat Mar 20 13:40:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
rootroot@ubuntu:~/friendlywrt-h3$ 

相关文章:

  • Windows---注册表
  • Redis | Redis集群模式技术原理介绍
  • 如何选择游戏支付平台呢?
  • 基于OpenMV+STM32+OLED与YOLOv11+PaddleOCR的嵌入式车牌识别系统开发笔记
  • LINUX426 文件权限rwx、ugo、高级权限(冒险、强制、粘滞位)、chmod修改权限 umask默认权限 软件包
  • C++---类和对象(二)
  • WPF 上位机开发模板
  • 动态规划求解leetcode300.最长递增子序列(LIS)详解
  • NdrpEmbeddedPointerUnmarshall函数分析之第二次循环处理第二部分DomainSid
  • 三维重建(二十)——思路整理与第一步的进行
  • MongoDB 入门使用教程
  • 算法习题-力扣446周赛题解
  • 关于调度策略的系统性解析与物流机器人应用实践
  • 机器学习基础理论 - 频率派 vs 贝叶斯派
  • 在 Ubuntu24.04 LTS 上 Docker 部署英文版 n8n 和 部署中文版 n8n-i18n-chinese
  • 新增Webhook通知功能,文档目录树展示性能优化,zyplayer-doc 2.5.1 发布啦!
  • SSE协议
  • 《数字图像处理(面向新工科的电工电子信息基础课程系列教材)》图4-2
  • 数据资产价值及其实现路径-简答题回顾
  • 什么是WebSocket?NGINX如何支持WebSocket协议?
  • 一个失败的赛季咎由自取,皇马只能把希望留到夏天
  • 一季度规模以上工业企业利润由降转增,国家统计局解读
  • 新任浙江省委常委、组织部长杨荫凯到嘉兴南湖瞻仰红船
  • 中国驻英国大使郑泽光:中国需要世界,世界也需要中国
  • 建设高标准农田主要目标是什么?有哪些安排?两部门有关负责人答问
  • 外汇局:4月以来外汇市场交易保持平稳,跨境资金延续净流入