x-wrt / build-release

Auto build x-wrt release
102 stars 91 forks source link

x-wrt-24.01-b202401270830-mediatek-filogic-zbtlink_zbt-z8102ax image on devices with U-Boot BL31 v2.7 permantly rebooting #40

Closed 5gfreak closed 7 months ago

5gfreak commented 8 months ago

The image x-wrt-24.01-b202401270830-mediatek-filogic-zbtlink_zbt-z8102ax image on Z8102AX devices with U-Boot BL31 v2.7 causes permanent rebooting.

The image is only working on previous Z8102AX devices with U-boot BL31: v2.6 (release)

ptpt52 commented 8 months ago

could you get the console log?

5gfreak commented 8 months ago

puttylog.txt Yes attached please find the log. This is the currently installed U-boot NOTICE: BL2: Booting BL31 NOTICE: BL31: v2.7(release): NOTICE: BL31: Built : 05:15:20, Sep 20 2023

the image is only working on device with Uboot v2.6 NOTICE: BL2: Booting BL31 NOTICE: BL31: v2.6(release):1e58996-dirty NOTICE: BL31: Built : 03:33:06, Feb 14 2023

I also send you the base folder structure from the original FW base.zip

5gfreak commented 8 months ago

x-wrt log2.txt attached please find the log of your image, the previous one was from the original openwrt x-wrt log.txt

5gfreak commented 8 months ago

@ptpt52 do you need any other files? if so, let me know.

ptpt52 commented 8 months ago

boot initramfs https://downloads.x-wrt.com/rom/Downloads/mt7981/x-wrt-24.01-b202402030826-mediatek-filogic-zbtlink_zbt-z8102ax-initramfs-kernel.bin

tftpboot initramfs-kernel.bin
bootm

then login 192.168.15.1 and flash sysupgrade image https://downloads.x-wrt.com/rom/Downloads/mt7981/x-wrt-24.01-b202402030826-mediatek-filogic-zbtlink_zbt-z8102ax-squashfs-sysupgrade.bin

5gfreak commented 8 months ago

the kernel bin installed successfully but when installing the sysupgrade bin the device rebooting again the errors: Loading Environment from MTD... mtd: partition "ubi" extends beyond the end of device "nmbm0" -- size truncated to 0x7280000

[ 1.949152] ubi0 error: ubi_read_volume_table: the layout volume was not found [ 1.956461] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd4, error -22 [ 1.963548] UBI error: cannot attach mtd4 [ 1.968523] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6 [ 1.976021] Please append a correct "root=" boot option; here are the available partitions: [ 1.984379] 1f00 1024 mtdblock0 [ 1.984386] (driver?) [ 1.990901] 1f01 512 mtdblock1 [ 1.990905] (driver?) [ 1.997429] 1f02 2048 mtdblock2 [ 1.997433] (driver?) [ 2.003954] 1f03 2048 mtdblock3 [ 2.003959] (driver?) [ 2.010474] 1f04 65536 mtdblock4 [ 2.010477] (driver?) [ 2.017001] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) [ 2.025247] SMP: stopping secondary CPUs [ 2.029159] Kernel Offset: disabled [ 2.032632] CPU features: 0x0,00000000,20000802 [ 2.037150] Memory Limit: none [ 2.042433] Rebooting in 1 seconds..

attached please find the log

best regards x-wrt log3.txt

ptpt52 commented 8 months ago

print the uboot env

printenv
5gfreak commented 8 months ago

MT7981> printenv baudrate=115200 bootdelay=2 bootfile=x-wrt-24.01-b202401270830-mediatek-filogic-zbtlink_zbt-z8102ax-squashfs-sysupgrade.bin bootfile.simg=ZBT-Z8102AX-V2-full-GO2024-01-31-upgrade.bin bootmenu_0=Startup system (Default)=mtkboardboot bootmenu_1=Upgrade firmware=mtkupgrade fw bootmenu_2=Upgrade ATF BL2=mtkupgrade bl2 bootmenu_3=Upgrade ATF FIP=mtkupgrade fip bootmenu_4=Upgrade ATF BL31 only=mtkupgrade bl31 bootmenu_5=Upgrade bootloader only=mtkupgrade bl33 bootmenu_6=Upgrade single image=mtkupgrade simg bootmenu_7=Load image=mtkload bootmenu_8=Start Web failsafe=httpd ethact=ethernet@15100000 ethaddr=a6:da:39:f4:70:dc fdtcontroladdr=41e97960 fileaddr=46000000 filesize=14d9b37 ipaddr=192.168.1.1 loadaddr=0x46000000 mtdids=nmbm0=nmbm0 mtdparts=nmbm0:1024k(bl2),512k(u-boot-env),2048k(factory),2048k(fip),524288k(ubi) netmask=255.255.255.0 serverip=192.168.1.2 stderr=serial@11002000 stdin=serial@11002000 stdout=serial@11002000

Environment size: 934/131068 bytes MT7981>

ptpt52 commented 8 months ago

change

mtdparts=nmbm0:1024k(bl2),512k(u-boot-env),2048k(factory),2048k(fip),65536k(ubi)
5gfreak commented 8 months ago

and how can I change this?

5gfreak commented 8 months ago

well, I changed with the following: setenv mtdparts nmbm0:1024k(bl2),512k(u-boot-env),2048k(factory),2048k(fip),65536k(ubi)

but on rebooting finds no ubi partition: ubi0: attaching mtd6 ubi0: scanning is finished ubi0 error: ubi_read_volume_table: the layout volume was not found ubi0 error: ubi_attach_mtd_dev: failed to attach mtd6, error -22 UBI error: cannot attach mtd6 UBI error: cannot initialize UBI, error -22 UBI init error 22 Please check, if the correct MTD partition is used (size big enough?) Failed to attach UBI

is the command correct? setenv mtdparts nmbm0:1024k(bl2),512k(u-boot-env),2048k(factory),2048k(fip),65536k(ubi)

5gfreak commented 7 months ago

Dear ptpt52,

after a couple of tries I did get it run, but it only worked with the official openwrt snapshot. I first flashed the https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/openwrt-mediatek-filogic-zbtlink_zbt-z8102ax-initramfs-kernel.bin changed to 65536k(ubi), saved it and then flashed: https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/openwrt-mediatek-filogic-zbtlink_zbt-z8102ax-squashfs-sysupgrade.bin

It has been completed successfully. Unfortunately I couldn't get it with your sysupgrade image but for the moment I can live with this workaroung :-) and thank you for your valuable infos.

It seems that a new bootloader has to be implemented so as any image may be installed.

What I don't know is if one has to do the same procedure again for future images, or the ubi partition size wil be changed again.