meanwile i finaly buld also the kernel as bruce mentionned and followed the compleet procedur ehe withe on this forum.
and my source conf is :
skipubootdownload=1
skipkerneldownload=1
replacebl2=1
bl2file=bpi-r4_emmc_8GB_bl2.img
imgfile=bpi-r4_emmc.img.gz
kernelfile=bpi-r4_6.17.0-main.tar.gz
userpackages=“docker.io docker-compose cockpit network-manager wireguard qemu-system-aarch64 libvirt-daemon-system virtinst bridge-utils apparmor apparmor-utils”
it my terminal just finish tu build here ise the last line
/proc/ is not mounted. This is not a supported mode of operation. Please fix
your invocation environment to mount /proc/ and /sys/ properly. Proceeding anyway.
Your mileage may vary.
packing bpi-r4_noble_6.17.0-main_sdmmc.img.gz
install it this way:
gunzip -c bpi-r4_noble_6.17.0-main_sdmmc.img.gz | sudo dd bs=1M status=progress conv=notrunc,fsync of=/dev/sdX
i use the script for a emmc boot , and what i see the final image name is sdmmc?? so i will try to copy to a sd and boot from sd if word il will continue to follow the procedure and flash the emmc with this image
Emmc has bl2 on boot0…it is not part of the image. Image building script does not support emmc (only by using emmc image previously downloaded),so target filename is always sdmmc atm.
finaly this config you just added : option to replace bl2 when creating image. but file must be downloaded manually at the moment.
replacebl2=1
bl2file=bpi-r4_sdmmc_8GB_bl2.img
in sourcefiles_bpi-r4.conf
is valide if you i use your scritp (BPI-Router-Image without bulding before the kernel and the boot manualy?
So if i use the today bruce post (full build procedure), i dont need this conf and local file before ? right
Why compile uboot and kernel? If you do not change config you can use precompiled files.
For bl2 replace you have to use the new option or you run “build.sh createimg” after building uboot with 8gb atf. But i think the new option is easier than building all manually.
According to @Myrko feedback, not adding skipubootdownload=1 and skipkerneldownload=1 to sourcefiles_bpi-r4.conf that the build script will download the unexpected released files (e.g. kernel 6.12.51 and uboot unknown version + sdmmc device by default).
Therefore, to add both skip*download=1 options that would ensure the build script to use the designated uboot and kernel. Base on this, users may build them manually, or just download the released files from those Github release pages. After collecting the files to the Images repo workspace, run the one-line build command.
If the target device is sdmmc not emmc, I think the manual build should become:
It should output bpi-r4_sdmmc.img.gz and some bl2 fip files in 8GB mode.
Since that the u-boot is already packed in DDR4 8GB mode, you may not need to assign the replacebl2 and bl2file settings in the later sourcefiles_bpi-r4.conf.
ubuntu@afe0fd51a26a:~/BPI-Router-Images$ cat sourcefiles_bpi-r4.conf
skipubootdownload=1
skipkerneldownload=1
imgfile=bpi-r4_sdmmc.img.gz # Now the uboot pack should be built in 8GB mode
kernelfile=bpi-r4_6.17.0-main.tar.gz
userpackages="ethtool iperf3 tcpdump" # Append more packages from what the "apt install" supported
ubuntu@afe0fd51a26a:~/BPI-Router-Images$
Run:
./buildimg.sh bpi-r4 noble
Output should still be named bpi-r4_noble_6.17.0-main_sdmmc.img.gz as same as I build the u-boot for emmc.
what’s the reason for 8gb not being detected in the first place? why does bl2 need updating? is openwrt limited? for anything other than x86? just curious
The 8gb variant uses different dram chips which need special mode in ATF to work.there is no known way of auto-detection and dram configuration is closed source (there is a dram.o binary blob in mtk atf source).