I finally have the time to mess with this again tonight. I read over your comment atleast 10 times so far. It’s amazing how everything you said sounds super easy and makes complete sense… yet I somehow still have no idea how to actually do it.
I think my biggest issue at this point is that I simply don’t understand the terminology, and the actual process taking place. Ive never worked at this low of a level before.
Even Arch Linux sets up the core components like this during install.
But here, I don’t understand what all the different images and files are for, when they are needed, and where they go. I thought I did, but it not booting tells me otherwise lol
mmc partconf 0 1 1 0 gave the following error ERROR: unknown command 'partconf'
mmc bootbus 0 0 0 0 gave a similar error ERROR: unknown command 'bootbus'
partconf doesn’t seem to be available in OpenWRT, bootbus is listed in the help file but it doesn’t work either.
Tried mmc bootpart enable 1 1 /dev/mmcblk0 from the official getting started guide. This ran without error. However it still didn’t work. I still ended up with the issue below after rebooting using eMMC:
uploaded fix for ci-pipeline (currently building) and prepare a fix for build.sh in atf-branches to fail when make fails (looks like i did already for the 2025 atf, but not for the old one).
have not tested the new atf across all boards so still have the old one in pipeline…
MT7988> usb start
starting USB...
Bus xhci@11200000: xhci-mtk xhci@11200000: hcd: 0x0000000011200000, ippc: 0x0000000011203e00
xhci-mtk xhci@11200000: ports disabled mask: u3p-0x0, u2p-0x0
xhci-mtk xhci@11200000: u2p:1, u3p:1
Register 200010f NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus xhci@11200000 for devices... 5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
MT7988> ls usb 0:1
0 file(s), 0 dir(s)
My USB drive is formatted as exFAT, could that be why no files are found? Or am I missing something?
Use the emmc image and format nvme rootfs partition only. Copy emmc rootfs files over to nvme rootfs and change kernel cmdline to find the root on partition on nvme.
In a nutshell…
Then everything concerning boot stays on emmc and only rootfs is on nvme.
And yes uboot does not have exfat driver yet afaik.
Please use fat(32)
My uboot is prepared to have boot and root on nvme.so 2 partitions because kernel and modules are mapped together…it does not make much sense having itb on emmc where modules are only in nvme rootfs but not on emmc rootfs.
used a completely empty fat32 usb drive this time.
Booted using NAND mode and entered the uboot console.
Ran usb start (Output Below)
MT7988> usb start
starting USB...
Bus xhci@11200000: xhci-mtk xhci@11200000: hcd: 0x0000000011200000, ippc: 0x0000000011203e00
xhci-mtk xhci@11200000: ports disabled mask: u3p-0x0, u2p-0x0
xhci-mtk xhci@11200000: u2p:1, u3p:1
Register 200010f NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus xhci@11200000 for devices... 5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
Ran ls usb to find my drive. Mine ended up being 0:2
MT7988> ls usb 0:1
0 file(s), 0 dir(s)
MT7988> ls usb 1:1
** Bad device specification usb 1 **
Couldn't find partition usb 1:1
MT7988> ls usb 0:0
MT7988> ls usb 0:2
.fseventsd/
.Spotlight-V100/
295461 bpi-r4_emmc_fip.bin
4096 ._bpi-r4_emmc_fip.bin
2 file(s), 2 dir(s)
Ran the fatload and mmc write commands
MT7988> fatload usb 0:2 $loadaddr bpi-r4_emmc_fip.bin
295461 bytes read in 22 ms (12.8 MiB/s)
MT7988> mmc write ${loadaddr} 0x3400 0x1
MMC write: dev # 0, block # 13312, count 1 ... 1 blocks written: OK
After that I went back to the boot menu, powered down, switched back to eMMC boot, and got the following:
Ok well I’ve definitely made more progress this time around. It seems like it’s booting, but Im not sure if it’s actually running or if I just don’t know how to get in to it.
Over the serial connection the boot process stops around:
[ 5.879285] mtk_soc_eth 15100000.ethernet: generated random MAC address 20:08:02:00:00:00
[ 5.887476] mtk_soc_eth 15100000.ethernet: generated random MAC address 20:08:02:00:00:00
[ 5.899487] mtk_soc_eth 15100000.ethernet eth0: mediatek frame engine at 0xffffffc084c00000, irq 101
[ 5.909151] mtk_soc_eth 15100000.ethernet eth1: mediatek frame engine at 0xffffffc084c00000, irq 101
[ 5.918796] mtk_soc_eth 15100000.ethernet eth2: mediatek frame engine at 0xffffffc084c00000, irq 101
[ 5.929524] MediaTek MT7988 PHY mt7530-0:00: probe with driver MediaTek MT7988 PHY failed with error -22
[ 5.939383] MediaTek MT7988 PHY mt7530-0:01: probe with driver MediaTek MT7988 PHY failed with error -22
[ 5.949190] MediaTek MT7988 PHY mt7530-0:02: probe with driver MediaTek MT7988 PHY failed with error -22
[ 5.959080] MediaTek MT7988 PHY mt7530-0:03: probe with driver MediaTek MT7988 PHY failed with error -22
[ 5.968642] mt7530-mmio 15020000.switch: configuring for fixed/internal link mode
[ 5.976131] mt7530-mmio 15020000.switch: Link is Up - 10Gbps/Full - flow control rx/tx
[ 5.976814] mt7530-mmio 15020000.switch wan (uninitialized): PHY [mt7530-0:00] driver [Generic PHY] (irq=POLL)
[ 5.995116] mt7530-mmio 15020000.switch lan1 (uninitialized): PHY [mt7530-0:01] driver [Generic PHY] (irq=POLL)
[ 6.006111] mt7530-mmio 15020000.switch lan2 (uninitialized): PHY [mt7530-0:02] driver [Generic PHY] (irq=POLL)
[ 6.017073] mt7530-mmio 15020000.switch lan3 (uninitialized): PHY [mt7530-0:03] driver [Generic PHY] (irq=POLL)
[ 6.027440] mtk_soc_eth 15100000.ethernet eth0: entered promiscuous mode
[ 6.034167] DSA: tree 0 setup
[ 6.037402] clk: Disabling unused clocks
[ 6.042228] PM: genpd: Disabling unused power domains
[ 6.047541] Waiting for root device /dev/mmcblk0p6...
[ 6.118130] usb 2-1: new SuperSpeed USB device number 2 using xhci-mtk
[ 6.140563] hub 2-1:1.0: USB hub found
[ 6.144461] hub 2-1:1.0: 4 ports detected
[ 6.267903] usb 1-1: new high-speed USB device number 2 using xhci-mtk
[ 6.420157] hub 1-1:1.0: USB hub found
[ 6.424067] hub 1-1:1.0: 5 ports detected
[ 7.097901] usb 1-1.5: new high-speed USB device number 3 using xhci-mtk
The full log is a lot longer than this.
I’d check over SSH but it doesnt appear that any of the network ports are actually active.
So progress is being made, but im not sure where to go from here, I double checked GitHub and FW-Web Wiki but I didn’t see anything obvious that I could try.
Looking at the top of the output, this part seems like it’s probably more relevant.
## Error: "initrd" not defined
EXT_CSD[179], PARTITION_CONFIG:
BOOT_ACK: 0x1
BOOT_PARTITION_ENABLE: 0x1 (boot0)
PARTITION_ACCESS: 0x0 (user)
emmc available
bootconf=#conf-base#ov-emmc
fit=bpi-r4.itb
9299076 bytes read in 621 ms (14.3 MiB/s)
## Loading kernel from FIT Image at 46000000 ...
Using 'conf-base' configuration
Trying 'kernel-1' kernel subimage
Description: Linux Kernel 6.12.6-main
Type: Kernel Image
Compression: gzip compressed
Data Start: 0x460000e8
Data Size: 9254207 Bytes = 8.8 MiB
Architecture: AArch64
OS: Linux
Load Address: 0x44000000
Entry Point: 0x44000000
Hash algo: sha1
Hash value: a987131870d87c8201df5861373cfed59469fac4
Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 46000000 ...
Using 'conf-base' configuration
Trying 'fdt-base' fdt subimage
Description: Flattened Device Tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x468d3724
Data Size: 36744 Bytes = 35.9 KiB
Architecture: AArch64
Load Address: 0x47000000
Hash algo: sha1
Hash value: 30a48a4b032dbbb65ab6abe7e12ee5b755a2c100
Verifying Hash Integrity ... sha1+ OK
Loading fdt from 0x468d3724 to 0x47000000
## Loading fdt from FIT Image at 46000000 ...
Could not find configuration node
load of <NULL> failed
Booting using the fdt blob at 0x47000000
Working FDT set to 47000000
Uncompressing Kernel Image to 44000000
Loading Device Tree to 00000000fe7ef000, end 00000000fe7faf87 ... OK
Working FDT set to fe7ef000
Starting kernel ...
Resulting mmc dt node is missing properties (and not enabled) and cannot find device.
I guess your kernel does not have the ov-emmc part i had to add for 2.5g r4. I had to change uboot bootconf to use same overlays with 2 different base dt.
Try replace your kernel with actual 6.12
on my r3 i did these changes in uEnv.txt for nvme default boot:
bootnvme=run usenvme; if test "$device" = "nvme"; then run loadenv; printenv; run newboot;fi
bootmenu_3=4. Boot kernel from NVME.=run bootnvme
bootmenu_default=3
the loadenv here is to load uEnv.txt on nvme boot partition first
I not going to lie, Im completely lost on that one. Im not sure where to place the .itb file, or how to even find the uEnv.txt. Plus at this point I still haven’t setup the nvme, im struggling just to get the eMMC boot working.
On emmc you should have a BPI-BOOT (where the uEnv.txt and itb should be placed) and a BPI-ROOT (where the debian/ubuntu rootfs is located and modules need to be placed) partition after you flashed the image to emmc userpartition.
See here how to install kernel+modules from prebuilt archives:
The files are in same repo as releases. For emmc the easiest way is unpack itb to usb stick,start from there (run useusb;run newboot) and then copy all like above. Or using initrd.