diff options
author | Simone Bortolin <simonebortolin@users.noreply.github.com> | 2022-12-08 18:02:45 +0100 |
---|---|---|
committer | Simone Bortolin <simonebortolin@users.noreply.github.com> | 2022-12-19 23:09:24 +0100 |
commit | 711619aad2fce56fde36b4bd760bc59f3fd1171e (patch) | |
tree | a8a0ae98e92914fe5269f6e4a1327c7cfeb1a489 /_ont | |
parent | Add info on how to change values on G-010G-P (#48) (diff) | |
download | hack-gpon.github.io-711619aad2fce56fde36b4bd760bc59f3fd1171e.tar hack-gpon.github.io-711619aad2fce56fde36b4bd760bc59f3fd1171e.tar.gz hack-gpon.github.io-711619aad2fce56fde36b4bd760bc59f3fd1171e.tar.bz2 hack-gpon.github.io-711619aad2fce56fde36b4bd760bc59f3fd1171e.tar.lz hack-gpon.github.io-711619aad2fce56fde36b4bd760bc59f3fd1171e.tar.xz hack-gpon.github.io-711619aad2fce56fde36b4bd760bc59f3fd1171e.tar.zst hack-gpon.github.io-711619aad2fce56fde36b4bd760bc59f3fd1171e.zip |
Diffstat (limited to '_ont')
-rw-r--r-- | _ont/ont-huawei-ma5671a.md | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/_ont/ont-huawei-ma5671a.md b/_ont/ont-huawei-ma5671a.md index 30f0036..d8c37c8 100644 --- a/_ont/ont-huawei-ma5671a.md +++ b/_ont/ont-huawei-ma5671a.md @@ -60,6 +60,26 @@ Configuration: asc0=0 115200 8-N-1 ## List of partitions +Partition layouts change depending on which image is booted, in particular: + +When booting image0: +``` +mtd2 ---> image0 (linux) +mtd5 --> image1 +mtd3 --> rootfs +mtd4 --> rootfs_data +``` +When booting image0: +``` +mtd2 ---> image0 +mtd3 --> image1 (linux) +mtd4 --> rootfs +mtd5 --> rootfs_data +``` + +For more info [XPONos partition layout](https://github.com/XPONos/linux_lantiq-falcon/commit/456f68f69a84c846a542a9f0ea47c37476535dcb). + + ## When booting from image0 | dev | size | erasesize | name | @@ -112,6 +132,22 @@ Configuration: asc0=0 115200 8-N-1 # scp rootfs.bin root@192.168.1.10:/tmp/ ``` +## Backup of all partition + +Make a backup of all partitions, an easy way is: +- On the stick run: +```shell +cat /proc/mtd +``` +- For each mtdX run, on computer shell: +```shell +nc -l -p 1234 > mtdX.bin +``` +And in the lantiq shell: +```shell +cat /dev/mtdX | nc 192.168.1.11 1234 +``` + ## Flashing a new rootfs {% include alert.html content="Only the inactive image can be flashed" alert="Info" icon="svg-info" color="blue" %} @@ -124,6 +160,21 @@ The follwing examples flashes a new rootfs to image1 and boots to it # reboot ``` +{% include alert.html content="Some OLTs only want to boot from image 0 and therefore this procedure must be preceded by the following procedure with obviously inverted images" alert="Warning" icon="svg-warning" color="yellow" %} + +## Cloning of mtd1 (image 0) into mtd5 (image 1) + +{% include alert.html content="Image 0 can be flashed to image 1 while image 1 cannot be flashed to image 0 because it has larger rootfs_data" alert="Warning" icon="svg-warning" color="yellow" %} + +The follwing examples clones a image0 to image1 and boots to it +```sh +# cat /dev/mtd2 > /tmp/mtd2.bin +# mtd -e image1 write /tmp/mtd2.bin image1 +# fw_setenv committed_image 1 +# fw_setenv image1_is_valid 1 +# reboot +``` + # Miscellaneous Links - [Support MA5671A SFP GPON - OpenWRT forum](https://forum.openwrt.org/t/support-ma5671a-sfp-gpon/48042) |