Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| inbox:toh:zyxel:nbg7815_armor_g5 [2024/10/05 15:18] – wip pwned | inbox:toh:zyxel:nbg7815_armor_g5 [2024/12/13 11:35] – [Hardware] pwned | ||
|---|---|---|---|
| Line 10: | Line 10: | ||
| ===== Hardware ===== | ===== Hardware ===== | ||
| - | ^ CPU ^ Ram ^ Flash ^ Network | + | ^ Architecture |
| - | | Qualcomm IPQ8074A @ 2.2 GHz | 1 GB | 4 GB eMMC + 8 MB SPI NOR | 1x 1/2.5/5/10 GbE 1x 1/2.5 GbE 4x 1 GbE | a/ | + | ^ Vendor |
| - | < | + | ^ Bootloader |
| - | ^ Architecture | + | ^ System-On-Chip |
| - | ^ Vendor | + | ^ CPU/ |
| - | ^ Bootloader | + | ^ Flash-Chip |
| - | ^ System-On-Chip | + | ^ Flash size | 4 GB eMMC + 8 MB SPI NOR | |
| - | ^ CPU/ | + | ^ RAM |
| - | ^ Flash-Chip | + | ^ Bluetooth |
| - | ^ Flash size | 4 GB eMMC + 8 MB SPI NOR | | + | ^ Wireless |
| - | ^ RAM | + | ^ Wireless |
| - | ^ Bluetooth | + | ^ Ethernet |
| - | ^ Wireless | + | ^ Ethernet |
| - | ^ Wireless | + | ^ Switch |
| - | ^ Ethernet | + | ^ USB |
| - | ^ Ethernet | + | ^ [[# |
| - | ^ Switch | + | ^ PSU |
| - | ^ USB | + | |
| - | ^ [[# | + | |
| - | ^ PSU | + | |
| - | </ | + | |
| \\ | \\ | ||
| Line 57: | Line 53: | ||
| ===== Limitations ===== | ===== Limitations ===== | ||
| - | Currently (state of 2024) OpenWrt officially **__does not support__** the integrated FAN, the integrated LED and Bluetooth. | + | Currently (state of 2024) OpenWrt officially **__does not support__** the integrated FAN, the integrated LED. |
| * LED: [[https:// | * LED: [[https:// | ||
| * FAN: [[https:// | * FAN: [[https:// | ||
| - | * Bluetooth: is not supported. Only the driver is loaded but there are not mappings for CSR-8811. | ||
| * 5G 160MHz channel width is not supported officially. There is [[https:// | * 5G 160MHz channel width is not supported officially. There is [[https:// | ||
| - | :!: The device can **really run hot due to the disabled fan leading to throttling and instabilities**. Esp. if an USB device is connected. You be advised to either deploy an active cooler directed to the device itself or making your own build integrating the patch referenced above for proper cooling. To the state of 2024 this FAN patch is not working reliable. But there are others (simpler, script based) solutions available (which could disappear/ | + | :!: The device can **really run hot due to the disabled fan leading to throttling and instabilities**. Esp. if an USB device is connected. You be advised to either deploy an active cooler directed to the device itself or making your own build integrating the patch referenced above for proper cooling. To the state of 2024 this FAN patch is not working reliable. But there are others (simpler, script based) solutions available (which could disappear/ |
| \\ | \\ | ||
| ===== Forum Support Thread ===== | ===== Forum Support Thread ===== | ||
| - | [[https:// | + | [[https:// |
| \\ | \\ | ||
| Line 114: | Line 109: | ||
| ==== Backup ==== | ==== Backup ==== | ||
| - | :!: WIP | + | |
| + | Before you modify the device it is always a good idea to make a backup of the flash drive(s) installed. The generic process is described [[:docs:guide-user: | ||
| + | We have one 8MB SPI NOR flash chip and one 4GB emmc flash chip. For both you can use dd. The partition layout of both chips is described [[# | ||
| + | You can spare out the last two big partitions on the emmc chip if you want. They are not important. Transfer the files either via USB or ssh/ | ||
| + | \\ | ||
| ==== Installing OpenWrt ==== | ==== Installing OpenWrt ==== | ||
| - | :!: WIP use [[#Example 2|**Example 2**]] for now! | + | :!: **Do not power off the device during the process!** |
| - Login as root via SSH. | - Login as root via SSH. | ||
| - Change to directory '' | - Change to directory '' | ||
| - | - Get the [[#OpenWrt Firmware|OpenWrt Firmware]] onto your router by either: | + | - Get the [[#OpenWrt Firmware|OpenWrt Firmware]] onto your router by either |
| - | | + | |
| - | | + | |
| - Extract the firmware file. | - Extract the firmware file. | ||
| - | - Determine the bootconfig of the device. | + | - Determine the bootconfig of the device |
| - | - Flash OpenWrt to the currently not active kernel and rootfs partitions. | + | - Mark the partitions to boot OpenWrt. |
| - | - Mark the partitions to boot OpenWrt. | + | |
| - Reboot the device. | - Reboot the device. | ||
| - | **__Example:__** In this example we download and install a snapshot build on the router. | + | <tabbox Semi-automatic (Step 2-7)>< |
| + | cd / | ||
| + | wget -O openwrt-ipq807x-generic-zyxel_nbg7815-squashfs-sysupgrade.bin https:// | ||
| + | wget https:// | ||
| + | sh flash_to_openwrt.sh | ||
| + | </ | ||
| - | <tabbox Step 2-4>< | + | <tabbox Step 2-6>< |
| + | # Author: Karol Przybylski < | ||
| + | # https:// | ||
| + | |||
| + | # Step 2 | ||
| cd / | cd / | ||
| + | |||
| + | # Step 3 | ||
| wget -O zyxel_nbg7815-squashfs-sysupgrade.bin https:// | wget -O zyxel_nbg7815-squashfs-sysupgrade.bin https:// | ||
| if [ ! -f "/ | if [ ! -f "/ | ||
| Line 139: | Line 147: | ||
| exit 1 | exit 1 | ||
| fi | fi | ||
| + | |||
| + | # Step 4 | ||
| tar xvf zyxel_nbg7815-squashfs-sysupgrade.bin | tar xvf zyxel_nbg7815-squashfs-sysupgrade.bin | ||
| - | </ | ||
| - | <tabbox Step 5>< | ||
| - | mtd_part_a=$(grep -i " | ||
| - | get_bootconfig=$(hexdump -v -e '1/1 " | ||
| - | </code>< | + | # Step 5 |
| - | <tabbox Step 6>< | + | primaryboot_hlos=$(cat |
| + | if [ $primaryboot_hlos -eq 0 ]; then | ||
| + | dd if=/ | ||
| + | dd if=/ | ||
| + | echo 1 > / | ||
| + | else | ||
| + | dd if=/ | ||
| + | dd if=/ | ||
| + | echo 0 > / | ||
| + | fi | ||
| - | </code>< | + | primaryboot_rootfs=$(cat |
| - | <tabbox Step 7>< | + | if [ $primaryboot_rootfs -eq 0 ]; then |
| + | dd if=/ | ||
| + | dd if=/ | ||
| + | echo 1 > / | ||
| + | else | ||
| + | dd if=/ | ||
| + | dd if=/ | ||
| + | echo 0 > / | ||
| + | fi | ||
| + | # Step 6 | ||
| + | mkdir / | ||
| + | cat / | ||
| + | echo 1 > / | ||
| + | dd if=/ | ||
| + | dd if=/ | ||
| + | echo 0 > / | ||
| + | sync | ||
| </ | </ | ||
| - | **Example 2**: | + | :!: For reference: [[https://github.com/openwrt/ |
| - | < | + | |
| - | root@NBG7815:~# cd / | + | |
| - | root@NBG7815:~# wget -O openwrt-ipq807x-generic-zyxel_nbg7815-squashfs-sysupgrade.bin | + | |
| - | root@NBG7815: | + | |
| - | root@NBG7815: | + | |
| - | root@NBG7815: | + | |
| - | root@NBG7815: | + | |
| - | </ | + | |
| \\ | \\ | ||
| ===== Back to OEM firmware ===== | ===== Back to OEM firmware ===== | ||
| - | OpenWrt is currently not using the dual partition layout writing the opposite/ | + | OpenWrt is currently not using the dual partition layout writing the opposite/ |
| \\ | \\ | ||
| ==== Back to OEM firmware (1) ==== | ==== Back to OEM firmware (1) ==== | ||
| - | :!: WIP! | + | Be carefull with this process. |
| - Login via SSH to the router. | - Login via SSH to the router. | ||
| + | - To use this method it is required to install kmod-mtd-rw first: '' | ||
| - Change directory to /tmp. | - Change directory to /tmp. | ||
| - | - Get script | + | - Copy & paste the code from script '' |
| - | - Execute the script with '' | + | - Execute the script |
| + | - Reboot the device. | ||
| + | - After reboot force a reflash of OEM firmware via WebGui using one of the provided [[#OEM firmware| OEM firmware files]] to purge OpenWrt entirely. | ||
| + | |||
| + | <tabbox Step 4>< | ||
| + | cat <<' | ||
| + | # Script to changing active boot partitions | ||
| + | # Author: Karol Przybylski < | ||
| + | # Orginal script: | ||
| + | |||
| + | openwrt_type=$(cat / | ||
| + | |||
| + | if [ ${openwrt_type} == " | ||
| + | echo " | ||
| + | boot_part=$(hexdump -e '1/1 " | ||
| + | |||
| + | | ||
| + | |||
| + | if [ ${boot_part} | ||
| + | printf | ||
| + | else | ||
| + | printf | ||
| + | |||
| + | fi | ||
| + | insmod mtd-rw i_want_a_brick=1 | ||
| + | mtd write boot.bin /dev/mtd2 | ||
| + | mtd write boot.bin /dev/mtd3 | ||
| + | fi | ||
| + | |||
| + | if [ ${openwrt_type} == " | ||
| + | echo " | ||
| + | primaryboot_hlos=$(cat / | ||
| + | if [ $primaryboot_hlos -eq 0 ]; then | ||
| + | echo 1 > / | ||
| + | else | ||
| + | echo 0 > / | ||
| + | fi | ||
| + | |||
| + | mkdir / | ||
| + | cat / | ||
| + | echo 1 > / | ||
| + | dd if=/ | ||
| + | dd if=/ | ||
| + | echo 0 > / | ||
| + | sync | ||
| + | fi | ||
| + | EOF | ||
| + | </ | ||
| \\ | \\ | ||
| ==== Back to OEM firmware (2) ==== | ==== Back to OEM firmware (2) ==== | ||
| - | :!: WIP! | + | :!: Be carefull with this process. Make sure you write the correct images to the correct partitions! **Do not power off the device during the process!** |
| - Download OEM firmware: [[#OEM firmware|see below]] | - Download OEM firmware: [[#OEM firmware|see below]] | ||
| - Extract rootfs and kernel. Already extracted v8: [[https:// | - Extract rootfs and kernel. Already extracted v8: [[https:// | ||
| - Login via SSH to the router. | - Login via SSH to the router. | ||
| - | - Copy the files to the router to /tmp (e. g. using scp or an usb drive). | + | |
| - | - Flash the kernel and rootfs to the device. | + | |
| - | - Set active boot partition. | + | - Flash the kernel and rootfs to the currently not active partitions. Copy & paste the code from and execute the script with '' |
| - | \\ | + | - Copy & paste the code from [[#Back to OEM firmware (1)|script Step 4]] from [[#Back to OEM firmware (1)|Back to OEM firmware (1)]] and execute the script with '' |
| + | - Reboot | ||
| + | - After reboot force a reflash of OEM firmware via WebGui using one of the provided [[#OEM firmware| OEM firmware files]] to purge OpenWrt entirely. | ||
| + | |||
| + | <tabbox Step 6>< | ||
| + | cat <<' | ||
| + | # check files | ||
| + | |||
| + | if [ ! -f "/ | ||
| + | echo " | ||
| + | exit 1 | ||
| + | fi | ||
| + | |||
| + | if [ ! -f "/ | ||
| + | echo " | ||
| + | exit 1 | ||
| + | fi | ||
| + | |||
| + | # get bootconfig | ||
| + | |||
| + | mtd_part=$(grep -i " | ||
| + | bootconfig=$(hexdump -v -e '1/1 " | ||
| + | |||
| + | # write rootfs and kernel; mmcblk0p3=0/ | ||
| + | |||
| + | if [ " | ||
| + | dd if=/ | ||
| + | dd if=/ | ||
| + | dd if=/ | ||
| + | dd if=/ | ||
| + | sync | ||
| + | fi | ||
| + | if [ " | ||
| + | dd if=/ | ||
| + | dd if=/ | ||
| + | dd if=/ | ||
| + | dd if=/ | ||
| + | sync | ||
| + | fi | ||
| + | EOF | ||
| + | </ | ||
| ==== OEM firmware ==== | ==== OEM firmware ==== | ||
| Line 215: | Line 328: | ||
| - [[#Opening the case|Open the device case.]] | - [[#Opening the case|Open the device case.]] | ||
| - Connect to the device via [[# | - Connect to the device via [[# | ||
| - | - [[#U-Boot access|Access the device via bootloader.]] | + | - [[#Bootloader/U-Boot access|Access the device via bootloader.]] |
| - [[#TFTP boot OpenWrt|TFTP boot OpenWrt]] to either reinstall or fix a broken installation | [[#TFTP flash OEM firmware|TFTP flash OEM firmware]] to purge OpenWrt. | - [[#TFTP boot OpenWrt|TFTP boot OpenWrt]] to either reinstall or fix a broken installation | [[#TFTP flash OEM firmware|TFTP flash OEM firmware]] to purge OpenWrt. | ||
| \\ | \\ | ||
| Line 221: | Line 334: | ||
| ==== Opening the case ==== | ==== Opening the case ==== | ||
| - | <WRAP BOX> | + | - Remove the two rubber crosses from the device' bottom side. |
| - | FIXME //Describe what needs to be done to open the device, e.g. remove rubber feet, adhesive labels, | + | - Unscrew the two screws appearing after step 1. |
| - | </ | + | - Remove the socket. |
| + | - After step 3. another four screws | ||
| + | - Around the device' | ||
| + | - Keep the device with bottom side up and pry it up carefully around the case to remove the bottom side. Start at the side where the connectors are lead out. | ||
| + | |||
| + | *) You will likely break some of them. Especially those on the left or right side. The clips at the front' | ||
| \\ | \\ | ||
| + | |||
| + | {{media: | ||
| + | {{media: | ||
| + | {{media: | ||
| ==== Serial ==== | ==== Serial ==== | ||
| Line 239: | Line 361: | ||
| | Serial connection parameters | **TTL 115200, 8N1, 3.3V** | | | Serial connection parameters | **TTL 115200, 8N1, 3.3V** | | ||
| - | :!: Connect RX, TX, GND cable to your USB to TTL/USB to Serial adapter only! | + | :!: Connect RX, TX, GND cable to your USB to TTL/USB to Serial adapter only!\\ |
| \\ | \\ | ||
| Line 269: | Line 391: | ||
| - Generate the password:\\ \\ :!: **Do not enter the code below it into the current shell!** We have to open a new terminal application. We have distinguish here between Windows and Linux users!\\ \\ **__Linux__**: | - Generate the password:\\ \\ :!: **Do not enter the code below it into the current shell!** We have to open a new terminal application. We have distinguish here between Windows and Linux users!\\ \\ **__Linux__**: | ||
| < | < | ||
| - | cat << | + | cat <<'EOF' |
| ror32() { | ror32() { | ||
| echo $(( ($1 >> $2) | (($1 << (32 - $2) & (2**32-1)) ) )) | echo $(( ($1 >> $2) | (($1 << (32 - $2) & (2**32-1)) ) )) | ||
| Line 283: | Line 405: | ||
| <tabbox password> | <tabbox password> | ||
| < | < | ||
| - | sh tool.sh | + | sh tool.sh 013D72FF0710 |
| </ | </ | ||
| - Put the output from paragraph 4. in the terminal and press enter:\\ \\ < | - Put the output from paragraph 4. in the terminal and press enter:\\ \\ < | ||
| Line 314: | Line 436: | ||
| - Connect your PC/ | - Connect your PC/ | ||
| - Power up your router and get access to [[# | - Power up your router and get access to [[# | ||
| - | - Enter '' | + | - Enter '' |
| - | \\ | + | |
| ===== Photos ===== | ===== Photos ===== | ||
| - | {{media: | + | {{media: |
| - | \\ | + | \\ |
| ===== Flash-/ | ===== Flash-/ | ||
| Line 414: | Line 535: | ||
| 10 307234 | 10 307234 | ||
| 11 | 11 | ||
| - | </ | + | </ |
| + | \\ | ||
| ===== Bootlogs ===== | ===== Bootlogs ===== | ||