Hello,
I would like resize factory part of flash (make it bigger). I have HW customized by manufacturer (32MB FLASH) and my custom image is bigger than 8MB (12). It is possible to do it using dts file or kernel configuration? It is partition table managed by kernel or by uboot?
Just change the DTS file to match your hardware. Change the size of the Firmware partition, leaving the rest as it is. With the modified DTS you have to compile from source.
The uboot should have been modified already by the guys who installed the bigger flash.
Thank you very much. It seems, its solved.
But I dont understand
[ 0.835545] 0x000000000000-0x000000030000 : "u-boot"
[ 0.842419] 0x000000030000-0x000000040000 : "u-boot-env"
[ 0.849753] 0x000000040000-0x000000060000 : "factory"
[ 0.856807] 0x000000050000-0x000002010000 : "firmware"
Factory end at 60000 and firmware start at 50000? Before I've changed the value, the factory ended at 50000
Must have misunderstood. You have more flash then standard. The only partition that you should change is the firmware part. Why would you like increase the factory part? And the size looks wrong.
32 MB is 0x2000000. So the factory size can't be more then 0x2000000 - 0x050000 = 0x1FB0000
i hope you didn't flash anything over the factory partition. Hardware specific details are normally stored there. Mac addresses for your board, wifi data (channels, calibration etc).
Don't touch the Uboot part. Keep it readonly in your modified DTS to be sure you don't erase it by accident.
I'm curious ... what flash chip are you using?
And does the device reboot when you issue the reboot command?
Or do you need to power cycle the device to reboot?
P/N of flash I can share next week. And about reboot, yes it is working. Somebody here has shared the patch for hard reset the flash before reboot. Without it its freezing as you said. It is needed to powercycle the router.
I have very customized lede image and 16MB is not enough for me. Our supplier made new version of this router for us
/dev/root is as big as big is the image you made. Size you may internally change with DTS is the overlay part.
dts files are placed here target/linux/ramips/dts
BTW - 32MB image version exist so if you need your custom image, just select this version in make menuconfig
Thank you for your answer Demontefacto, I did it and everything with more than 16MB can be generated and uploaded then flashed to the router.
But we still have to flash the firmware with CLI interface with "mtd write ...", we can't preload the image from the beginning using webinterface with default address 192.168.1.1
Because the default firmware size for hardware is only 16MB, we can't still flash the firmware more than 16MB for the very first flashing.
Try:
Login to router with telnet/ssh
Conect router to internet
Go into tmp folder
Wget 32MB image version into tmp
Then sysupgrade -v -n /tmp/....sysupgrade.bin and share output, please.
And share dmesg with partition part
And df -h