Possible to flash R3 ubuntu image into eMMC/NAND?

If you overwrite emmc with openwrt then it useless searching for problem in ubuntu which is no more there.

Do you know how to install ubuntu in emmc?

Flash sdcard image (and bl2 to boot0) and replace fip should work.

Referring to the procedure in [bpi-r4] Debian or Ubuntu on emmc - #3 by chkdsk88, I’ve prepared the files needed:

ubuntu@afe0fd51a26a:~/BPI-Router-Images$ ll
total 111680
drwxr-xr-x 5 ubuntu ubuntu     4096 Sep 24 16:33 ./
drwxr-x--- 1 ubuntu ubuntu     4096 Sep 24 16:33 ../
drwxr-xr-x 8 ubuntu ubuntu     4096 Sep 24 15:25 .git/
drwxr-xr-x 3 ubuntu ubuntu     4096 Sep 24 15:25 .github/
-rw-r--r-- 1 ubuntu ubuntu       48 Sep 24 15:25 .gitignore
-rw-r--r-- 1 ubuntu ubuntu     1532 Sep 24 15:25 README.md
-rw-r--r-- 1 ubuntu ubuntu 99280305 Sep 24 15:35 bpi-r3_6.12.47-main.tar.gz
-rw-r--r-- 1 ubuntu ubuntu  7865152 Sep 24 16:29 bpi-r3_emmc.img.gz
-rw-r--r-- 1 ubuntu ubuntu  7123336 Sep 24 16:27 bpi-r3_sdmmc.img.gz
-rwxr-xr-x 1 ubuntu ubuntu     4266 Sep 24 15:25 buildchroot.sh*
-rwxr-xr-x 1 ubuntu ubuntu     9315 Sep 24 15:25 buildimg.sh*
drwxr-xr-x 8 ubuntu ubuntu     4096 Sep 24 15:25 conf/
-rwxr-xr-x 1 ubuntu ubuntu      751 Sep 24 15:25 config.sh*
-rw-r--r-- 1 ubuntu ubuntu     9581 Sep 24 15:25 downloadfiles.py
-rwxr-xr-x 1 ubuntu ubuntu      329 Sep 24 15:25 getfirmware.sh*
-rwxr-xr-x 1 ubuntu ubuntu     1301 Sep 24 15:25 image.sh*
-rw-r--r-- 1 ubuntu ubuntu      124 Sep 24 16:32 sourcefiles_bpi-r3.conf
ubuntu@afe0fd51a26a:~/BPI-Router-Images$
ubuntu@afe0fd51a26a:~/BPI-Router-Images$ cat sourcefiles_bpi-r3.conf 
skipubootdownload=1
imgfile=bpi-r3_emmc.img.gz
kernelfile=bpi-r3_6.12.47-main.tar.gz
userpackages="ethtool iperf3 tcpdump"
ubuntu@afe0fd51a26a:~/BPI-Router-Images$ 

But it reported error at the end:

ubuntu@afe0fd51a26a:~/BPI-Router-Images$ ./buildimg.sh bpi-r3 noble   
needed: python3 python3-requests parted qemu-user-static debootstrap binfmt-support
create image for bpi-r3 (arm64) noble 6.12 sdmmc
board  : bpi-r3
kernel : 6.12
device : sdmmc
{'skipubootdownload': '1', 'imgfile': 'bpi-r3_emmc.img.gz', 'kernelfile': 'bpi-r3_6.12.47-main.tar.gz', 'userpackages': '"ethtool iperf3 tcpdump"'}
bpi-r3mini_emmc_bl2.img
bpi-r3mini_spim-nand_bl2.img
bpi-r3mini_spim-nand_ubi_bl2.img
bpi-r3_emmc_bl2.img
...
...
...
bpi-r3_6.12.47-main.tar.gz already exists
-rw-r--r-- 1 ubuntu ubuntu 123 Sep 24 17:45 sourcefiles_bpi-r3.conf
image-file: bpi-r3_emmc.img.gz
kernel-file: bpi-r3_6.12.47-main.tar.gz
checking for needed packages...
$1:arm64
setting arch
$2:noble
isdebian:0,isubuntu:1
setting distro
create chroot 'ubuntu noble' for arm64
mounting tmpfs for building...
I: Retrieving InRelease 
I: Checking Release signature
I: Valid Release signature (key id F6ECB3762474EDA9D21B7022871920D1991BC93C)
I: Retrieving Packages 
I: Validating Packages 
...
...
...
I: Extracting tar...
I: Extracting util-linux...
I: Extracting zlib1g...
chroot: failed to run command ‘/debootstrap/debootstrap’: Exec format error
-rw-r--r-- 1 ubuntu ubuntu 7.6M Sep 24 16:29 bpi-r3_emmc.img.gz
ls: cannot access 'noble_arm64.tar.gz': No such file or directory
rootfs file missing
ubuntu@afe0fd51a26a:~/BPI-Router-Images$ 

Do you know how to fix this?

Not sure why the directories owner became root:

ubuntu@afe0fd51a26a:~/BPI-Router-Images$ ll
total 111680
drwxr-xr-x  7 ubuntu ubuntu     4096 Sep 24 17:45 ./
drwxr-x---  1 ubuntu ubuntu     4096 Sep 24 18:00 ../
drwxr-xr-x  8 ubuntu ubuntu     4096 Sep 24 15:25 .git/
drwxr-xr-x  3 ubuntu ubuntu     4096 Sep 24 15:25 .github/
-rw-r--r--  1 ubuntu ubuntu       48 Sep 24 15:25 .gitignore
-rw-r--r--  1 ubuntu ubuntu     1532 Sep 24 15:25 README.md
-rw-r--r--  1 ubuntu ubuntu 99280305 Sep 24 15:35 bpi-r3_6.12.47-main.tar.gz
-rw-r--r--  1 ubuntu ubuntu  7865152 Sep 24 16:29 bpi-r3_emmc.img.gz
-rw-r--r--  1 ubuntu ubuntu  7123336 Sep 24 16:27 bpi-r3_sdmmc.img.gz
-rwxr-xr-x  1 ubuntu ubuntu     4266 Sep 24 15:25 buildchroot.sh*
-rwxr-xr-x  1 ubuntu ubuntu     9315 Sep 24 15:25 buildimg.sh*
drwxr-xr-x  8 ubuntu ubuntu     4096 Sep 24 15:25 conf/
-rwxr-xr-x  1 ubuntu ubuntu      751 Sep 24 15:25 config.sh*
drwxrwxrwt  2 root   root         40 Sep 24 17:59 debian_bookworm_arm64/
-rw-r--r--  1 ubuntu ubuntu     9581 Sep 24 15:25 downloadfiles.py
-rwxr-xr-x  1 ubuntu ubuntu      329 Sep 24 15:25 getfirmware.sh*
-rwxr-xr-x  1 ubuntu ubuntu     1301 Sep 24 15:25 image.sh*
-rw-r--r--  1 ubuntu ubuntu      123 Sep 24 18:00 sourcefiles_bpi-r3.conf
drwxrwxrwt 13 root   root        340 Sep 24 17:50 ubuntu_noble_arm64/
ubuntu@afe0fd51a26a:~/BPI-Router-Images$ 

I guess you have to setup your wsl so that it can run aarch64 executables. This is done with binfmt. On a ‘normal’ distribution this is handled by systemd. On wsl I do not know…

Anyway, you would only need this to build your own rootfs, but that is not what Frank is suggesting. He suggests that you copy the rootfs from the sd card, so you won’t need to debootstrap one.

To properly use debootstrap for aarch64 on a x86, I would recommend that you setup dual-boot on your PC/laptop, so you can run a real linux distro.

I built all 3 Frank’s repo (u-boot, Linux, Images) in Docker container run by his Dockerfile, not directly in WSL:

ubuntu@afe0fd51a26a:~/BPI-Router-Images$ cat /etc/os-release 
PRETTY_NAME="Ubuntu 24.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.3 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
ubuntu@afe0fd51a26a:~/BPI-Router-Images$ 

Do you have solution on this?

I’m considering to generate an ubuntu image and flash it to eMMC first, like the process in [bpi-r4] Debian or Ubuntu on emmc - #3 by chkdsk88.

Like I said, your system cannot run aarch64 executables at the moment, whether it is wsl or docker or whatever. So you can’t use a script that uses debootstrap, until you fix that

Of course you can ignore the tips you get about copying the rootfs, your choice.

I’ve installed packages in WSL and the chroot error has gone. Do you have idea on the next error?

WSL:

sudo apt install qemu-user-static binfmt-support

Docker container:

ubuntu@afe0fd51a26a:~/BPI-Router-Images$ ./buildimg.sh bpi-r3 noble
needed: python3 python3-requests parted qemu-user-static debootstrap binfmt-support
create image for bpi-r3 (arm64) noble 6.12 sdmmc
board  : bpi-r3
kernel : 6.12
device : sdmmc
{'skipubootdownload': '1', 'imgfile': 'bpi-r3_emmc.img.gz', 'kernelfile': 'bpi-r3_6.12.47-main.tar.gz', 'userpackages': '"ethtool iperf3 tcpdump"'}
bpi-r3mini_emmc_bl2.img
...
...
...
bpi-r3_6.12.47-main.tar.gz already exists
-rw-r--r-- 1 ubuntu ubuntu 123 Sep 24 19:21 sourcefiles_bpi-r3.conf
image-file: bpi-r3_emmc.img.gz
kernel-file: bpi-r3_6.12.47-main.tar.gz
checking for needed packages...
$1:arm64
setting arch
$2:noble
isdebian:0,isubuntu:1
setting distro
create chroot 'ubuntu noble' for arm64
/home/ubuntu/BPI-Router-Images/ubuntu_noble_arm64 already exists - aborting
-rw-r--r-- 1 ubuntu ubuntu 7.6M Sep 24 16:29 bpi-r3_emmc.img.gz
ls: cannot access 'noble_arm64.tar.gz': No such file or directory
rootfs file missing
ubuntu@afe0fd51a26a:~/BPI-Router-Images$

It seems a script error, perhaps clean the working folder. Perhaps @frank-w knows, I do not use this script.

Not good. Installing packages in WSL2 does not help.

Instead, I patched buildchroot.sh and it built further a bit, however, the WSL2/Docker environment is still unable to perform partprobe/loopdev actions:

Processing triggers for man-db (2.12.0-4build2) ...
Processing triggers for libc-bin (2.39-0ubuntu8.5) ...
umounting tmpfs...
-rw-r--r-- 1 ubuntu ubuntu 7.6M Sep 24 16:29 bpi-r3_emmc.img.gz
-rw-r--r-- 1 root root 105M Sep 24 21:05 noble_arm64.tar.gz
unpack imgfile (bpi-r3_noble_6.12.47-main_sdmmc.img.gz)...
setting up imgfile to loopdev...
mounting loopdev...
sh: 1: udevadm: not found
Error: Partition(s) 1, 2, 3, 4, 5, 6 on /dev/loop2 have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use.  As a result, the old partition(s) will remain in use.  You should reboot now before making further changes.
sh: 1: udevadm: not found
partprobe failed

real    6m15.139s
user    0m24.980s
sys     0m4.215s
ubuntu@afe0fd51a26a:~/BPI-Router-Images$

I think it really needs a native Linux environment to build.

Here are the output files I can get, but they should be incompleted images and missing the important bpi-r3_noble_6.12.47-main.img.gz which I want to flash into eMMC:

ubuntu@afe0fd51a26a:~/BPI-Router-Images$ ll
total 7853664
drwxr-xr-x 6 ubuntu ubuntu       4096 Sep 24 21:11 ./
drwxr-x--- 1 ubuntu ubuntu       4096 Sep 24 21:12 ../
drwxr-xr-x 8 ubuntu ubuntu       4096 Sep 24 15:25 .git/
drwxr-xr-x 3 ubuntu ubuntu       4096 Sep 24 15:25 .github/
-rw-r--r-- 1 ubuntu ubuntu         48 Sep 24 15:25 .gitignore
-rw-r--r-- 1 ubuntu ubuntu       1532 Sep 24 15:25 README.md
-rw-r--r-- 1 ubuntu ubuntu   99280305 Sep 24 15:35 bpi-r3_6.12.47-main.tar.gz
-rw-r--r-- 1 ubuntu ubuntu    7865152 Sep 24 16:29 bpi-r3_emmc.img.gz
-rw-r--r-- 1 ubuntu ubuntu 7818182656 Sep 24 21:05 bpi-r3_noble_6.12.47-main_sdmmc.img
-rw-r--r-- 1 ubuntu ubuntu    7123336 Sep 24 16:27 bpi-r3_sdmmc.img.gz
-rwxr-xr-x 1 ubuntu ubuntu       4519 Sep 24 20:57 buildchroot.sh*
-rwxr-xr-x 1 ubuntu ubuntu       9315 Sep 24 15:25 buildimg.sh*
drwxr-xr-x 8 ubuntu ubuntu       4096 Sep 24 15:25 conf/
-rwxr-xr-x 1 ubuntu ubuntu        751 Sep 24 15:25 config.sh*
-rw-r--r-- 1 ubuntu ubuntu       9581 Sep 24 15:25 downloadfiles.py
-rwxr-xr-x 1 ubuntu ubuntu        329 Sep 24 15:25 getfirmware.sh*
-rwxr-xr-x 1 ubuntu ubuntu       1301 Sep 24 15:25 image.sh*
-rw-r--r-- 1 root   root    109595707 Sep 24 21:05 noble_arm64.tar.gz
-rw-r--r-- 1 ubuntu ubuntu        123 Sep 24 20:59 sourcefiles_bpi-r3.conf
drwxr-xr-x 2 root   root         4096 Sep 24 20:59 ubuntu_noble_arm64/
ubuntu@afe0fd51a26a:~/BPI-Router-Images$

@frank-w @ericwoud

If I have to continue building with WSL2/Docker, it is probably not able to build my own rootfs, right?

If so, how can I copy the rootfs from the SD card so I do not need to debootstrap one as suggested?

Without my own rootfs, can I still make use of my uboot (bpi-r3_sdmmc.img.gz) and kernel (bpi-r3_6.12.47-main.tar.gz)?

You can just copy rootfs from sdcard…it is basicly same…but copy it as root with full permissions…you can boot initrd in sdcard mode (so you can pack rootfs with tar and gzip from initrd without it be in use) and the put board in nand or emmc mode but also boot initrd and unpack to root partition…but your error above looks like your emmc is not recognized correctly or gpt is somehow strange…maybe you need to do the sgdisk fix to update backup gpt to primary one

sudo sgdisk --backup=bpi-r3_sgdisk.gpt /dev/sdb
sudo sgdisk --load-backup=bpi-r3_sgdisk.gpt /dev/sdb

But use the real device (mmcblk0) and also do this from initrd.

I have only tested buildscript in native ubuntu system. Afaik docker can no cross arch…so it always is host arch (i guess x86_64). No idea about WSL,not yet used it :stuck_out_tongue:

But why not using my already built images on gdrive.

I used your gpt, bl2 and fip but don’t know why it still get stucked before loading kernel:

BPI-R3> gpt read mmc 0
Partition 1:
Start 0MiB, size 0MiB
Block size 512, name gpt
Type U-Boot, bootable 0
UUID df7a38f6-9df4-11ec-a1e0-1c1b0d6d28f5
Type GUID 0fc63daf-8483-4772-8e79-3d69d8477de4

Partition 2:
Start 4MiB, size 0MiB
Block size 512, name u-boot-env
Type U-Boot, bootable 0
UUID 19a4763a-6b19-4a4b-a0c4-8cc34f4c2ab9
Type GUID 0fc63daf-8483-4772-8e79-3d69d8477de4

Partition 3:
Start 4MiB, size 2MiB
Block size 512, name factory
Type U-Boot, bootable 0
UUID 8142c1b2-1697-41d9-b1bf-a88d76c7213f
Type GUID 0fc63daf-8483-4772-8e79-3d69d8477de4

Partition 4:
Start 6MiB, size 2MiB
Block size 512, name fip
Type U-Boot, bootable 0
UUID 18de6587-4f17-4e08-a6c9-d9d3d424f4c5
Type GUID 0fc63daf-8483-4772-8e79-3d69d8477de4

Partition 5:
Start 8MiB, size 32MiB
Block size 512, name kernel
Type U-Boot, bootable 0
UUID 971f7556-ef1a-44cd-8b28-0cf8100b9c7e
Type GUID 0fc63daf-8483-4772-8e79-3d69d8477de4

Partition 6:
Start 40MiB, size 256MiB
Block size 512, name rootfs
Type U-Boot, bootable 0
UUID 309a3e76-270b-41b2-b5d5-ed8154e7542b
Type GUID 0fc63daf-8483-4772-8e79-3d69d8477de4

success!
BPI-R3> fatload usb 0:1 $loadaddr BananaPi/gpt_emmc_100m6g.img
17408 bytes read in 2 ms (8.3 MiB/s)
BPI-R3> mmc erase 0x0 0x400;mmc write ${loadaddr} 0x0 0x400
MMC erase: dev # 0, block # 0, count 1024 ... 1024 blocks erased: OK
MMC write: dev # 0, block # 0, count 1024 ... 1024 blocks written: OK
BPI-R3> setenv bl2file BananaPi/bpi-r3_emmc_bl2.img
BPI-R3> setenv fipfile BananaPi/bpi-r3_emmc_fip.bin
BPI-R3> run wremmc
bl2file=BananaPi/bpi-r3_emmc_bl2.img
200793 bytes read in 16 ms (12 MiB/s)
MMC erase: dev # 0, block # 0, count 1024 ... 1024 blocks erased: OK
MMC write: dev # 0, block # 0, count 1024 ... 1024 blocks written: OK
fipfile=BananaPi/bpi-r3_emmc_fip.bin
280749 bytes read in 21 ms (12.7 MiB/s)
MMC erase: dev # 0, block # 13312, count 4096 ... 4096 blocks erased: OK
MMC write: dev # 0, block # 13312, count 4096 ... 4096 blocks written: OK
BPI-R3> res
resetting ...

F0: 102B 0000
FA: 1040 0000
FA: 1040 0000 [0200]
F9: 103F 0000
F3: 1006 0033 [0200]
F3: 4001 00E0 [0200]
F3: 0000 0000
V0: 0000 0000 [0001]
00: 0000 0000
BP: 2400 0041 [0000]
G0: 1190 0000
EC: 0000 0000 [2000]
T0: 0000 021F [010F]
Jump to BL

NOTICE:  BL2: v2.12.0(release):a385740df-bpi-r3-emmc
NOTICE:  BL2: Built : 10:50:35, Aug 20 2025
NOTICE:  WDT: [40000000] Software reset (reboot)
NOTICE:  CPU: MT7986 (2000MHz)
NOTICE:  EMI: Using DDR4 settings
NOTICE:  EMI: Detected DRAM size: 2048MB
NOTICE:  EMI: complex R/W mem test passed
NOTICE:  BL2: Booting BL31
NOTICE:  BL31: v2.12.0(release):a385740df-bpi-r3-emmc
NOTICE:  BL31: Built : 10:50:38, Aug 20 2025


U-Boot 2025.07-bpi-geacd36c56c9c-dirty (Aug 20 2025 - 10:50:10 +0000)

CPU:   MediaTek MT7986
Model: BananaPi BPi-R3
DRAM:  2 GiB
Core:  48 devices, 22 uclasses, devicetree: separate
MMC:   mmc@11230000: 0
Loading Environment from MMC... Reading from MMC(0)... *** Warning - bad CRC, using default environment

In:    serial@11002000
Out:   serial@11002000
Err:   serial@11002000
=> board_late_init...
Net:   MediaTek MT7531

Warning: ethernet@15100000 (eth0) using random MAC address - 62:fa:12:db:0d:ab
eth0: ethernet@15100000
Hit any key to stop autoboot:  0


  *** U-Boot Boot Menu ***

      1. Enter kernel-name to boot from SD/EMMC.
      2. Boot kernel from TFTP.
      3. Boot from SD/EMMC.
      4. Boot kernel from NVME.
      Exit


  Press UP/DOWN to move, ENTER to select, ESC to quit



## Error: "initrd" not defined
EXT_CSD[179], PARTITION_CONFIG:
BOOT_ACK: 0x1
BOOT_PARTITION_ENABLE: 0x1 (boot0)
PARTITION_ACCESS: 0x0 (user)
emmc available
jedec_spi_nor spi_nor@0: unrecognized JEDEC id bytes: ff, ef, aa
Failed to initialize SPI flash at 0:0 (error -2)
NAND available
emmc nand
fit=bpi-r3.itb
Can't set block device
BPI-R3>

Next, I’ve built an ubuntu noble image by using your Images repo, and flashed eMMC via initrd:

# gunzip -c bpi-r3_noble_6.12.47-main_sdmmc.img.gz | dd bs=512 conv=notrunc,fsync of=/dev/mmcblk0
15269888+0 records in
15269888+0 records out
#

Boot eMMC with ubuntu noble installed:

Ubuntu 24.04.3 LTS bpi-r3 ttyS0

bpi-r3 login: root
Password:

Login incorrect
bpi-r3 login: root
Password:
Welcome to Ubuntu 24.04.3 LTS (GNU/Linux 6.12.47-bpi-r3-main aarch64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/pro

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

root@bpi-r3:~# pwd
/root
root@bpi-r3:~# cd /
root@bpi-r3:/# ls
bin                etc                lost+found  proc  sbin.usr-is-merged  usr
bin.usr-is-merged  home               media       root  srv                 var
boot               lib                mnt         run   sys
dev                lib.usr-is-merged  opt         sbin  tmp
root@bpi-r3:/#
root@bpi-r3:/# cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.3 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
root@bpi-r3:/#

Some questions here:

  1. How can I make your gpt, bl2 and fip work after flashing the eMMC?

  2. The ubuntu noble image is generated by using your pre-built u-boot bpi-r3_emmc.img.gz with my Linux bpi-r3_6.12.47-main.tar.gz. My u-boot built bpi-r3_sdmmc.img.gz instead. How can I build one for emmc like yours?

  3. The ubuntu noble image is missing executable such as ifconfig and iwconfig. How can I get them build-in? Is it needed to customize Linux packages or just append from userpackages in sourcefiles_bpi-r3.conf?

  4. Your Images repo script does not support specific flags for emmc and nand, right?

Thanks.

Strange,…have you tried the sgdisk fix above?

The fixed gpt images are an older way and should not be used anymore. I create partitions in my uboot repo in mtk_atf_2025 branch via sgdisk as this is more portable and can be adjusted if needed.

Regarding ifconfig and iwconfig…these are deprecated long time ago and “new” commands are ip (iproute2) and iw

What do you mean with flags for emmc and nand? Building images for these? I started sone time ago,but there are some depencies that have to be fixed for it…afair uboot already creates emmc base image already for r3 and r4,but i have to download the right file when building the image. Nand is currently separate branch “nand” which creates an ubinized image that have to be flashed to ubi mtd partition (bl2 is separate) this contains fip,kernel initrd and config.

For sgdisk, is this how it is used? (I can pend this problem as I am now able to build an ubuntu image myself.)

# sgdisk --backup=bpi-r3_sgdisk.gpt /dev/mmcblk0
Warning! Main partition table overlaps the first partition by 34 blocks!
You will need to delete this partition or resize it in another utility.
The operation has completed successfully.
#

So ip and iw commands should be modern. How can I install iproute2 in image? Have to customize Linux packages or append iproute2 from sourcefiles_bpi-r3.conf?

How to build bpi-r3_emmc.img.gz from u-boot repo? I just got bpi-r3_sdmmc.img.gz instead.

To continue the above statement, “Flags for emmc/nand” means to adjust the “device” variable as emmc/nand from build.conf in your u-boot repo. Then users would run “./build.sh createimg” to generate a bpi-r3_*.img.gz file. Now I can only generate bpi-r3_sdmmc.img.gz. Any ways to generate for other types?

I’ll take a look into the Images repo - “nand” branch.

Thanks.

Uboot repo already creates emmc base image

It only has to be filled with rootfs and kernel (what my images repo did).you can set the ubootfile in the sourcefiles_bpi-r3.conf to skip download.see readme in images repo

Iproute2 is already installed

ubuntu@afe0fd51a26a:~/u-boot$ ./build.sh createimg
ver:2025.07,ubranch:bpi
emmc not supported
ubuntu@afe0fd51a26a:~/u-boot$ cat build.conf 
uploaduser=$USER
uploadserver=r2
uploaddir=/var/lib/tftp

#board=bpi-r2
#board=bpi-r64
#board=bpi-r2pro
board=bpi-r3
#board=bpi-r3mini
#board=bpi-r4

device=emmc
#device=spi-nand
#device=spi-nor
ubuntu@afe0fd51a26a:~/u-boot$ find -name *.img.gz
./bpi-r3_sdmmc.img.gz
ubuntu@afe0fd51a26a:~/u-boot$ git branch
* 2025-07-bpi
ubuntu@afe0fd51a26a:~/u-boot$ 

emmc not supported

So your “2025-07-bpi” branch does not support for creating emmc base image. Your upstream branch is “mtk-atf-2025”?

Besides, in Images repo, which kind of packages can be added into? For instance, memtester and net-snmp ok?

image

You are aware that you can install any package, once running from that image? Using:

sudo apt install

The base image is created by atf code after uboot is built. See pipeline above… First compile uboot with device=emmc and then atf with same and run build.sh createimg to ger the base image.

For images repo i meant this

skipubootdownload=1
imgfile=bpi-r4_sdmmc.img.gz

To use the emmc base image.

But basicly you can pass all packages found by apt,but i do not add them by default…only thinking adding basic network packages like ethtool

Thanks. It works after I connect the board to WAN.