override read-only flag of /dev/mtd1 partition

Andreas Fenkart afenkart at gmail.com
Mon Oct 26 06:28:09 PDT 2015


Hi,

I try to modify the u-boot params using fw_setenv from linux prompt,
unfortunately that fails since /dev/mtd1 is read-only

# fw_setenv -s enable-rescue-system.txt
Can't open /dev/mtd1: Permission denied

Obviously, since our u-boot / linux got the flash layout wrong:

Creating 3 MTD partitions on "m25p80":
0x000000000000-0x0000000c0000 : "bootloader"
0x0000000c0000-0x0000000c2000 : "ubparams"
mtd: partition "ubparams" doesn't end on an erase block -- force read-only
0x0000000c2000-0x000000400000 : "unused"
mtd: partition "unused" doesn't start on an erase block boundary --
force read-only

The reason for accessing the u-boot is to switch the bootcmd to boot
our new and shiny kernel upgrade. Intent is to leave the factory
kernel untouched and use it as a fallback just in case.

What are my options to tinker with the u-boot environment, without
having to replace the kernel first? Is there some magic knob, to
switch off the read-only flag. As you can see there is nothing
valuable coming after the u-boot params, and u-boot itself is aligned
correctly.

kind regards,
Andi



More information about the linux-mtd mailing list