Installing Pepe2k U-boot_mod


I want to install Pepe2k's U-boot_mod on my router, but I'm not sure if my partition layout is appropriate. As you can see I have two 64kb partitions at the beginning. However, in his readme I see this line:

Warning! If size of the first partition is smaller than the size of the modified U-Boot image, you should not continue!

I think Pepe2k's U-boot partition will be 123kb, right? Is there a way to install it on this device?

dev:    size   erasesize  name
mtd0: 00010000 00010000 "u-boot"
mtd1: 00010000 00010000 "art"
mtd2: 00fd0000 00010000 "firmware"
mtd3: 00160000 00010000 "kernel"
mtd4: 00e70000 00010000 "rootfs"
mtd5: 00960000 00010000 "rootfs_data"
mtd6: 00010000 00010000 "art-backup"

U-Boot, pepe2k's or otherwise, has to be built for your model with all of its details in mind.

A boot loader isn't a generic thing.

If it isn't a model that @pepe2k directly supports, just because some binary physically fits in your partition doesn't mean it will work. The wrong boot loader for your router is a quick way to starting to shop for a new router,

1 Like

Thanks, I realise that Jeff. I have modified the makefile to build for my device which is based on a supported SoC - the QCA9531, now I just want to test it. I know it sounds like I'm being very cavalier, but hey, sometimes you just gotta live a little :grin:

I'm going to review these commit messages first

Might want to try it out by loading it with the existing boot loader to memory, and running it from memory, as you would an initramfs kernel or the like. With luck, you'll get your custom U-Boot running. With less luck, you probably won't have a bricked router. :wink:

1 Like

Looking at your partition table, I'd get copies of both your entire flash, as well as the two ART sections. While you might be able to "steal" the first ART partition, you might need to change how your device gets its cal/board data to refer to the other partition.


If I understand the theory it seems I can modify the bootargs and make the corresponding changes in my device definition file so the firmware lines up with it. I would then install Pepe2k's u-boot, reinstall my firmware from within the new u-boot, upload my art partition from within u-boot, and should be onward to happy days.

But is it possible for Pepe2k's u-boot, to fit into 64kb? There are other supported boards with 64k

#elif defined(CONFIG_FOR_COMFAST_CF_E314N) ||\

	#define CONFIG_BOOTARGS	"console=ttyS0,115200 root=31:03 "\
				"rootfstype=jffs2 init=/sbin/init "\

Read the page (and the graphics illustrating the situation), the answer is a clear "no". u-boot_mod is just shy of 70 KB, under some circumstances it might borrow that much from u-boot-env, but if it can, depends on the device in question and its partitioning.

Thanks. I still don't understand why that supported device has a 64 KB u-boot partition. Can you explain how the borrowing works?