ref: 1. http://linkstationwiki.net/index.php/U-boot_bootloader#Flashing_U-Boot_from_U-Boot 2. http://downloads.linkstationwiki.net/ALL_LS_...
ref:
1. http://linkstationwiki.net/index.php/U-boot_bootloader#Flashing_U-Boot_from_U-Boot
3. http://trac.foonas.org/index.php/Platforms:lsppchg#Installing_uboot
4. http://downloads.linkstationwiki.net/Users/timtimred/lsppchg/u-boot-lsppchg-1.2.0-r2.bin
5. http://linkstationwiki.net/index.php/NetCat-A_UBoot-Friendly_Network_Utility
6. http://www.genbako.com/u-boot_loader/
7. http://www.genbako.com/u-boot_loader/nc111nt.zip
安裝 u-Boot 好處
1. 避免不時登入主機, 切換 partition mbr.
2. 可以與 pc 相同, 自動開機、關機(這個要設定 avr command)
3. 藉由 power button 切換磁區, 操作容易安全.(第一次做切換, 會有一點不習慣喔.)
執行 Flash ROM 時, 請先在 dos 中, 使用 nc111nt.zip.
nc -v -v -u -p 6666 192.168.11.150 6666
下載 firmimg.bin、u-boot-hg.flash.bin, 準備進行 Flash ROM 動作.
cd /mnt/share
mkdir u-boot
cd u-boot
dd if=u-boot-hg.flash.bin of=/dev/mtdblock1 bs=1k
cat u-boot-hg.flash.bin /dev/mtd1 (這裡不用 cmp. 因為, 使用時出現 cmp: applet not found)
dd if=firmimg.bin of=/dev/mtdblock0 bs=1k
cat firmimg.bin /dev/mtd0 (這裡不用 cmp. 因為, 使用時出現 cmp: applet not found)
reboot
就會進入 EM 模式
關閉netcat retry~~防止沒有開netcat時, boot process卡住的問題.
setenv 'netretry' 'no'
預設開機在/dev/hda3/在Debian Linux
setenv 'hdpart3' '0:3'
setenv 'hdload3' 'echo Loading ${hdpart3}:${hdfile};ext2load ide ${hdpart3} ${ldaddr} ${hdfile}'
setenv 'boothd3' 'setenv bootargs root=/dev/hda3;bootm ${ldaddr}'
setenv 'hdboot3' 'run hdload3 boothd3'
setenv 'bootcmd4' 'run hdboot3;run hdboot;run flboot'
setenv 'bootcmd' 'run bootcmd4'
saveenv
boot
boot 會出現之畫面如下
透過 ssh 登入 linkstation 畫面如下(進入 debian kernel 2.6 版)
可以透過 power button 切至 原廠模式, 登入之畫面如下.
操作 power button 切換模式教學
中文解釋說明
u-boot使用Power Button和Reset Button來切換的.
Power LED燈號會閃爍(微弱光亮), 開機延遲是10秒, 要透過 Power Button選擇開機模式, 按一下 Power Button, 會有stop booting的效果.
* 這時Power Button按一下, DISK FULL的紅色HDD LED會以固定頻率閃爍約5秒鐘, 表示你要用bootcmd1 hdd boot, 也就是/dev/hda1來開機.
* 再Power Button按一下, HDD LED會以固定頻率快速閃爍2次約5秒鐘, 表示你要用bootcmd2 fail boot, 也就是link station ROM boot來開機.
* 再Power Button按一下, HDD LED會以固定頻率快速閃爍3次約5秒鐘, 表示你要用bootcmd3 EM mode boot, 也就是要進入EM Mode開機, 做緊急維修.
* Reset Button按一下, HDD LED會以固定頻率閃爍約5秒鐘, 表示你要用serial console來監聽.
* 再按Reset Button一下, HDD LED會以固定頻率快速閃爍2次約5秒鐘, 表示你要用net console來監聽.
當選完決定開機選項後, 等待5秒HDD LED不閃爍後, Power Button再按一下, Power LED燈號會以很緩慢的速度閃爍, 這時就會開始開機了.