diff options
author | Simone Bortolin <simonebortolin@users.noreply.github.com> | 2022-09-17 23:52:41 +0200 |
---|---|---|
committer | Simone Bortolin <simonebortolin@users.noreply.github.com> | 2022-12-19 23:09:07 +0100 |
commit | fa07bfd0e7dd830e6797b3c61ba4c3995088c43d (patch) | |
tree | 1f355481917fc1e8dd3990aae1f8748b2e666763 /_ont | |
parent | Add some info for uboot (diff) | |
download | hack-gpon.github.io-fa07bfd0e7dd830e6797b3c61ba4c3995088c43d.tar hack-gpon.github.io-fa07bfd0e7dd830e6797b3c61ba4c3995088c43d.tar.gz hack-gpon.github.io-fa07bfd0e7dd830e6797b3c61ba4c3995088c43d.tar.bz2 hack-gpon.github.io-fa07bfd0e7dd830e6797b3c61ba4c3995088c43d.tar.lz hack-gpon.github.io-fa07bfd0e7dd830e6797b3c61ba4c3995088c43d.tar.xz hack-gpon.github.io-fa07bfd0e7dd830e6797b3c61ba4c3995088c43d.tar.zst hack-gpon.github.io-fa07bfd0e7dd830e6797b3c61ba4c3995088c43d.zip |
Diffstat (limited to '')
-rw-r--r-- | _ont/ont-huawei-ma5671a-root.md | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/_ont/ont-huawei-ma5671a-root.md b/_ont/ont-huawei-ma5671a-root.md index f10d1c1..781a930 100644 --- a/_ont/ont-huawei-ma5671a-root.md +++ b/_ont/ont-huawei-ma5671a-root.md @@ -5,7 +5,7 @@ parent: Huawei MA5671A layout: default --- -1. take the SFP molex and the 4 coloured cables and solder them to the molex according to the following diagram: +1. Take the SFP molex and the 4 coloured cables and solder them to the molex according to the following diagram: | USB TTL(UART) Adapter | wire colour in picture | SFP 20pins Molex connector | | --------------------- | ---------------------- | -------------------------- | @@ -16,19 +16,19 @@ layout: default {% include alert.html content="Use GND wire as ON/OFF switch, otherwise there will be a slight delay before data is displayed on the console (putty/TeraTerm)." alert="Important" icon="svg-warning" color="yellow" %} -0. Install python and `pyserial` with `pip` +{:style="counter-reset:none"} +2. Install python and `pyserial` with `pip` ```shell pip install pyserial ``` -1. make the connections as shown to a TTL adapter except for GND (which remains detached and is used as a switch) - +3. Make the connections as shown to a TTL adapter except for GND (which remains detached and is used as a switch) {% include image.html file="ma5671a-root-1.jpg" alt="Example of how the sfp-ttl connection should look like" caption="Example of how the sfp-ttl connection should look like" %} {% include image.html file="new-root-procedure\board-molex-arduino.jpg" alt="Example of how the sfp-ttl connection should look like with a custom board" caption="Example of how the sfp-ttl connection should look like with a custom board" %} {% include image.html file="ma5671a-root-2.jpg" alt="Molex SFP" caption="Molex SFP" %} {:style="counter-reset:none"} -2. run this programme and only then connect the GND pin +4. Run this programme and only then connect the GND pin ```py import sys @@ -84,19 +84,15 @@ except (KeyboardInterrupt, SystemExit): ser.close() sys.exit(1) ``` + {:style="counter-reset:none"} -4. Reboot the stick -5. Open Tera Term (or other serial terminal emulator), after load press `enter` to activate the console +5. Reboot the stick +6. Open Tera Term (or other serial terminal emulator), after load press `enter` to activate the console {% include image.html file="new-root-procedure\press-enter.jpg" alt="Press enter for activate the console" caption="Press enter for activate the console" %} - -{% include alert.html content="It is possible that there are still linux kernel init outputs, in which case press enter until they are finished (under no circumstances should vim be started if such scripts are sent to stdout), if you do not press `enter` often enough there may be a kernel panic and a stick reboot." alert="Important" icon="svg-warning" color="yellow" %} - -{% include image.html file="new-root-procedure\code-after-enter-shell.png" alt="Linux kernel init output after enter in console" caption="Linux kernel init output after enter in console" %} - {:style="counter-reset:none"} -5. With `cat` change the default shell from `/opt/lantiq/bin/minishell` to `/bin/ash` the file `/etc/passwd`: +7. With `sed` change the default shell from `/opt/lantiq/bin/minishell` to `/bin/ash` the file `/etc/passwd`: ```shell sed -i "s|/opt/lantiq/bin/minishell|/bin/ash|g" /etc/passwd @@ -114,12 +110,12 @@ sed -i "s|/opt/lantiq/bin/minishell|/bin/ash|g" /etc/passwd {% include alert.html content="The cause of these kernel panics could be insufficient power supply." alert="Info" icon="svg-info" color="blue" %} {:style="counter-reset:none"} -6. Reboot it this time connected to the router with cage or mediaconverter, with the port set to an IP on the 192.168.1.0/24 subnet (the stick has the IP 192.168.1.10) +8. Reboot it this time connected to the router with cage or mediaconverter, with the port set to an IP on the 192.168.1.0/24 subnet (the stick has the IP 192.168.1.10) {% include alert.html content="If your subnet is 192.168.1.0/24 make sure you have no ip conflicts." alert="Note" icon="svg-warning" color="yellow" %} {:style="counter-reset:none"} -7. Run the terminal and login to the stick with ssh +9. Run the terminal and login to the stick with ssh ```shell ssh root@192.168.1.10 @@ -128,7 +124,7 @@ ssh root@192.168.1.10 The password is `admin123`. {:style="counter-reset:none"} -9. Make a backup of all partitions, an easy way is: +10. Make a backup of all partitions, an easy way is: - On the stick run: ```shell cat /proc/mtd @@ -141,7 +137,11 @@ And in the lantiq shell: ```shell cat /dev/mtdX | nc 192.168.1.11 1234 ``` -10. upload the mtd5 image in `/tmp` whit the command + +{% include alert.html content="Replace 192.168.1.11 with you machine IP's address" alert="Info" icon="svg-info" color="blue" %} + +{:style="counter-reset:none"} +11. upload the mtd5 image in `/tmp` whit the command ``` scp mtd5.bin root@192.168.1.10:/tmp/ ``` @@ -149,13 +149,13 @@ then write the mtd5 file it into the second partition (the 1) with the command: ``` mtd -e image1 write mtd5.bin image1 ``` -11. change the `committed` variabile with +12. change the `committed` variabile with ``` setenv committed_image 1 saveenv printenv committed_image ``` -12. upload the mtd1 image in `/tmp` whit the command +13. upload the mtd1 image in `/tmp` whit the command ``` scp mtd2.bin root@192.168.1.10:/tmp/ ``` |