I have an Extollo Una which runs a version of OpenWRT (15.05.1). I would like to update the flash without risking a bricked situation. The device was completely bricked before. I had to copy another device's Winbond flash (manually desoldering and reading) and burn that to this device. So now I have 2 devices with the same Mac and device IDs. As the device also functions as Powerline, I would like to make sure to restore the original back to the correct state with it's unique IDs restored.
I have a copy of the bad flash and the good flash. What I'm looking to do is:
- Set up the device to boot via TFTP. Although I'm not quite sure how to even save changes on the device.
- Find the location where the bad flash was different from the good flash (minus whatever went wrong), and hopefully rewrite the WInbond flash using the mtd commands with the correct data.
I am not very knowledgeable with embedded linux, although with a bit of guidance I can surely manage.
Here's what I see so far:
cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00010000 "0:SBL1"
mtd1: 00020000 00010000 "0:MIBIB"
mtd2: 00060000 00010000 "0:QSEE"
mtd3: 00010000 00010000 "0:CDT"
mtd4: 00010000 00010000 "0:DDRPARAMS"
mtd5: 00080000 00010000 "0:APPSBL"
mtd6: 00010000 00010000 "0:ART"
mtd7: 00010000 00010000 "NVRAM"
mtd8: 01000000 00020000 "config1"
mtd9: 02000000 00020000 "imagea"
mtd10: 01000000 00020000 "config2"
mtd11: 02000000 00020000 "imageb"
mtd12: 02000000 00020000 "imagec"
mtd13: 00307000 0001f000 "kernel"
mtd14: 00ba0000 0001f000 "ubi_rootfs"
mtd15: 0001f000 0001f000 "rootfs_data"
mtd16: 00c98000 0001f000 "config"
mtd17: 00c98000 0001f000 "config2"
df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 118408 80 118328 0% /
mtd:ubi_rootfs 12032 12032 0 100% /rom
tmpfs 118408 1040 117368 1% /tmp
tmpfs 118408 80 118328 0% /tmp/root
overlayfs:/tmp/root 118408 80 118328 0% /
tmpfs 512 0 512 0% /dev
/dev/ubi1_0 10092 36 9504 0% /mnt/rwdir
/dev/ubi2_0 10092 28 9512 0% /mnt/rwdir2
TLDR:
How can I save data to this device in a non volatile way?
How can I then enable TFTP?
How can I update the raw flash in order to restore the original factory MAC addresses, etc... after having cloned another device directly to the chip.