@falstaff I think I have a slightly different issue with *** Failed to create volume 'kernel_backup', err = -28
I have used OEM flash page for 3 WAX220s without issue but this 4th one isn't working quite right. After flashing the 10MB .img the AP came up with OpenWRT, and then after doing sysupgrade the AP went in to a bootloop. Hooked up to the serial port and see the kernel_backup issue. There are some differences from bitweaver's kernel_backup error.
Some include:
ubi0 user volume is only 3 instead of 4
rootfs is different location, 'rootfs' to 0x463e0000 instead of 0x463c1000
kernel backup size, 'kernel_backup' from 0x46000000, size 0x3e0000 instead of 'kernel_backup' from 0x46000000, size 0x3c1000
Not sure if it matters since still only 2 PEB available.
I am unable to use nmrpflash. The ethernet broadcasts fine and the WAX hears it and sends the download but the WAX errors with configuring error timeout. With both openwrt and OEM image.
I am able to TFTPBOOT an initramfs binary and bootm. OpenWRT comes up, and I can sysupgrade -n the recovery itb. Actually I have to use -F to force it for a metadata error. OpenWRT comes up again and when I try to do a sysupgrade after the reboot the bootloop starts. I did try mtd erase part 6 but that command doesn't errors. New to the forum so not sure if I paste full logs here or external site. Hopefully I have just overlooked something easy, but without nmrpflash as an option I'm curious as where to go next.
tftpboot the initramfs with bootm
sysupgrade -n -F openwrt-mediatek-filogic-netgear_wax220-init
ubi0: attaching mtd6
ubi0: scanning is finished
ubi0: attached mtd6 (name "ubi", size 81 MiB)
ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
ubi0: good PEBs: 650, bad PEBs: 0, corrupted PEBs: 0
ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 0
ubi0: available PEBs: 3, total reserved PEBs: 647, PEBs reserved for bad PEB handling: 19
Reading from volume 'kernel' to 0x46000000, size 0x0 ... OK
*** Start recover image from backup ***
ubi0: detaching mtd6
ubi0: mtd6 is detached
sysupgrade openwrt-mediatek-filogic-netgear_wax220-squashfs-s
ysupgrade.bin
ubi0: attaching mtd6
ubi0: scanning is finished
ubi0: attached mtd6 (name "ubi", size 81 MiB)
ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
ubi0: good PEBs: 650, bad PEBs: 0, corrupted PEBs: 0
ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 0
ubi0: available PEBs: 2, total reserved PEBs: 648, PEBs reserved for bad PEB handling: 19
Reading from volume 'kernel' to 0x46000000, size 0x0 ... OK
*** Start update image to backup ***
Reading from volume 'rootfs' to 0x463e0000, size 0x0 ... OK
Updating volume 'kernel_backup' from 0x46000000, size 0x3e0000 ... ubi0 error: ubi_create_volume: not enough PEBs, only 2 available
ubi0 error: ubi_create_volume: cannot create volume 3, error -28
*** Failed to create volume 'kernel_backup', err = -28 ***
ubi0: detaching mtd6
ubi0: mtd6 is detached
MTD ERASE
MT7986> mtd erase part 6
MTD device part not found, ret -19
MT7986>
EDIT: Nevermind about the nmrpflash. I was able to erase ubi part with
mtd erase ubi
then nmrpflash worked. Back in business.
Bytes transferred = 10486296 (a00218 hex)
nmrp tftp upload complete.
write firmware...
*** Upgrading Firmware ***
*** Loaded 10486296 (0xa00218) bytes at 0x46000000 ***
Image is encrypted
model: WAX220
region: US
version: V1.0.0.0..r23486+1
dateTime: Thu Jan 1 00:00:00 1970
size: 0xa00000
block size: 0x20000
checksum: 0xb2d171fa
Decrypt image...
Decrypt finish
ubi0: attaching mtd6
ubi0: scanning is finished
ubi0: empty MTD device detected
ubi0: attached mtd6 (name "ubi", size 81 MiB)
ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
ubi0: good PEBs: 650, bad PEBs: 0, corrupted PEBs: 0
ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 0
ubi0: available PEBs: 627, total reserved PEBs: 23, PEBs reserved for bad PEB handling: 19
Updating volume 'kernel' from 0x46000800, size 0x3b35a8 ... OK
Updating volume 'rootfs' from 0x463b4000, size 0x43c400 ... OK
ubi0: detaching mtd6
ubi0: mtd6 is detached
*** Firmware upgrade completed! ***
upgrade firmeare success.
Saving Environment to MTD... Erasing on MTD device 'nmbm0'... OK
Writing to MTD device 'nmbm0'... OK
OK
reset config default succes.
nmrp closing...