How to write to a protected FIP partition in openwrt?

When you try to write u-boot image to a partition, sometimes you get this error msg:

Could not open mtd device: fip
Can't open device for writing!

You may use this trick to allow write to the FIP and other MTD partitions.

opkg update
opkg install kmod-mtd-rw

insmod /lib/modules/$(uname -r)/mtd-rw.ko i_want_a_brick=1
# the i_want_a_brick=1 part is needed!

Now you can run the mtd write command again.

If write still fail, make sure the partition name is correct. The partition name is case sensitive. You can check the partition name using

cat /proc/mtd
Scroll to Top