################################# # !!!CSAK SAJÁT FELELŐSSÉGRE!!! # ################################# BOOTLOADER MÓDOSÍTÁS (BY PEPE2K) -------------------------------- A készítő oldala: https://github.com/pepe2k/u-boot_mod Openwrt fórum: https://forum.openwrt.org/viewtopic.php?id=43237 /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ Módosítás végrehajtása: ----------------------- 1: A routerünknek megfelelő mappából letöltjük a módosított fw-t. PC-nket kábellel összekötjük a router egyik LAN portjával és felflasheljük (gyári fw esetén "factory", openwrt esetén "sysupgrade"). 2: Putty programban belépünk "telnet" -en (telnet, 192.168.1.1, 23), kiadjuk a "passwd" parancsot, és megváltoztatjuk a jelszót (jelszó beír, enter, jelszó beír, enter), majd bezárjuk a putty -t. 3: Ismét megnyitjuk a putty -t, de most már ssh-n lépünk be (ssh, 192.168.1.1, 22, user=root, passwd=jelszavunk), és kiadjuk az "u-boot-upgrade" parancsot: Putty-on ezt látjuk majd: (Yes vagy no -t kell majd a kérdések után írni. Ha minden rendben, akkor a megjelenő üzenetek zöld színűek lesznek.) root@OpenWrt:/# u-boot-upgrade ================================================================= DISCLAIMER: you are using this script at your own risk! The author of U-Boot modification and this script takes no responsibility for any of the results of using them. Updating U-Boot is a very dangerous operation and may damage your device! You have been warned! ================================================================= Are you sure you want to continue (type 'yes' or 'no')? yes ================================================================= [ ok ] Found U-Boot image file: uboot_for_d-link_dir-505.bin Do you want to use this file (type 'yes' or 'no')? yes [ ok ] MD5 checksum of new U-Boot image file is correct [ ok ] Backup of /dev/mtd0 successfully created Do you want to store backup in /etc/u-boot_mod/backup/ (recommended, type 'yes' or 'no')? no [ ok ] New U-Boot image successfully combined with backup file [info] New U-Boot image is ready to be written into FLASH Are you sure you want to continue (type 'yes' or 'no')? yes [ ok ] New U-Boot image successfully written into FLASH [ ok ] MD5 checksum of mtd0 and new U-Boot image are equal [info] Done! Ha itt tartunk, akkor kész is van a módosítás, a bootloader le van cserélve, újraindíthatjuk a routert. Ha viszont nem ezt látjuk, hanem valamilyen hibát ír, pl: "FATAL ERROR: could not write new U-Boot image into FLASH" "DO NOT RESET YOUR DEVICE NOW AND TRY AGAIN!" Akkor ahogy az angol szöveg is írja, semmiképpen ne indítsuk újra a routert, hanem próbáljuk újra az egész folyamatot előről végrehajtani!!! Ha a hibaüzenet ez: "FATAL ERROR: MD5 checksum of $MTD_DEVICE and new U-Boot image are not equal" "DO NOT RESET YOUR DEVICE NOW AND TRY AGAIN!" Akkor a jelen pillanatban a bootpartíción lévő uboot nem megfelelően lett felírva. Ilyenkor adjuk ki a következő parancsot: "mtd -e /dev/mtd0 write /tmp/mtd0_backup.bin /dev/mtd0 &>/dev/null" Majd ezt: "mtd verify /tmp/mtd0_backup.bin /dev/mtd0 2>&1" ################## # !!!FIGYELEM!!! # Mielött feltennénk a használni kívánt FW-t, előtte mentsük le a "/etc/u-boot_mod/backup/" mappából az eredeti boot partíciónkat (pl: winscp -vel)! ################## /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ Használat: ---------- 1: PC-n fix IP-t állítunk be: 192.168.1.2, maszk: 255.255.255.0, és kábellel összekötjük a router egyik LAN portjával. 2: A router indulásánál a RESET gombot nyomva tarjuk: min. 3mp - Webes FW feltöltő felület elindul (192.168.1.1) min. 5mb - U-Boot serial console min. 7mp - U-Boot network console 3: PC-n webböngészőben meghívjuk a 192.168.1.1 -et. Betölt a weboldal, ahol betallózzuk a feltölteni (és használni) kívánt FW-t, és indítjuk a feltöltést a gombbal. CSAK VÁGOTT, BOOTLOADER NÉLKÜLI FW-T TÖLTSÜNK BE! 4: Miután végzett az FW feltöltéssel a router újraindul az új FW-vel. Ha nem sikerült a művelet és nem indul el a router, akkor kezdjük előről az 1-es ponttól. /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\