nvram コマンド

玄箱/Pro

LS-GL にもあった nvram コマンド
KUROUTOSHIKOU KUROBOX Series KUROBOX/PRO(KOSHO)
KUROBOX-PRO login: root
Password:


BusyBox v1.4.1 (2007-02-06 15:15:35 JST) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ # nvram --help
nvram: invalid option -- -
nvram Ver.1.00
nvram -c <printenv|del|set|get|eraseall|dump>
~ # nvram -c printenv
1: [baudrate=115200]
2: [loads_echo=0]
3: [ipaddr=192.168.11.150]
4: [serverip=192.168.11.1]
5: [rootpath=/nfs/arm]
6: [cpuName=926]
7: [CASset=min]
8: [MALLOC_len=4]
9: [bootargs_end=:::DB88FXX81:eth0:none]
10: [ethact=egiga0]
11: [ethaddr=00:16:01:A4:C3:80]
12: [stdin=serial]
13: [stdout=serial]
14: [stderr=serial]
15: [enaMonExt=no]
16: [enaFlashBuf=yes]
17: [enaCpuStream=no]
18: [ethprime=egiga0]
19: [buffalo_ver=BOOTVER=1.091]
20: [build_time=15:59:38]
21: [initrd=initrd.buffalo]
22: [kernel=uImage.buffalo]
23: [bootargs_base=console=ttyS0,115200]
24: [bootargs_root=root=/dev/mtdblock2 rw panic=5]
25: [bootargs=$(bootargs_base) $(bootargs_root) $(buffalo_ver)]
26: [nand_uImage_offset=20000]
27: [default_kernel_addr=0x00100000]
28: [default_initrd_addr=0x02000000]
29: [bootcmd=nboot $(default_kernel_addr)  0 $(nand_uImage_offset) ;setenv bootargs $(bootargs_base) $(bootargs_root) $(buf
falo_ver); bootm $(default_kernel_addr)]
30: [def_tftp=tftp $(default_kernel_addr) $(kernel); tftp $(default_initrd_addr) $(initrd); setenv bootargs $(bootargs_base
) $(bootargs_root)  rw initrd=0x02000040,20M panic=5 $(buffalo_ver); bootm $(default_kernel_addr) $(default_initrd_addr)]
31: [nand_boot=yes]
32: [bootdelay=3]
33: [disaMvPnp=no]
34: [overEthAddr=no]
35: [usb0Mode=host]
36: [usb1Mode=host]
~ # nvram -c get bootdelay
bootdelay=3
~ #
基本的には同じか?

strings を見る

~ # which nvram
/usr/local/sbin/nvram
~ # strings `!!`
-sh: !!: not found
~ # strings /usr/local/sbin/nvram |less
	:
	:
/dev/mtd0
	:
	:
/dev/mtd0 に何かがありそう。
~ # less /dev/mtd0
                           @譏@緜@@褪@緞                                                                                 畧
@R當0篩V磔斟總@R疇@@並: 畫>秣0稍0篩 眩@R@謳@  穉?B鄰0 穉?C鄰0C瞰?G釁醫?Q醯:笶0
穉?A醋@縊@処!                                 綫謖@綰
             @衢・R@@﨨饑@A饑DA饒饑珎@@狄@@・X   ・ M@謌@綫@@裘@綯@
倨0処・&      @@・・・・                                          @訌@ 稍@@[7mN@@[7mO@@・・P@-蘋@絽@訐@ 畧@P禊P  綫@
・・L     ・X       ・h       ・       梯@
・t
・
飛@TK・pK・緬・(L・|L・侈・$M・pM・POB釛痂OC釛畫
P秬    秬@
B@@
R@@D@P竈QC@@ 螳綯@P痾QC@@袂/G釛疸/G釛疱/G釛當P@@A
P秬    秬@
B@@
睾 D@P竈QC@@ 螳綯@P痾QC@@袂釛疸釛疱釛當P@@A@Q穉?Q鄒0畫@@ZP?A釛痂?Q鄒0秩P?A釛痂?Q鄙:茶D0茶P?A鄒0 穽?G釛
痂@-薜B絖
/dev/mtd0@詁$@襾2綯@P瓩代$"紊R紊B@@ZC1 秬0
/dev/mtd0
こういうのを「宇宙から電波を受信」というのか(笑)
単に環境変数が入っていると思ったのに、、、残念。

では、またまた strings

~ # strings /dev/mtd0 |less
nknu nwo
DDoirO  1n
  2n
UPC   = hgiH "
 woL
TSIL
@C2T0
@C2T
C2 @
D0@-
phy_ng
system_not_found
system_bootend
stop_sound
system_shutdown
U-Boot 1.1.1 (Feb 13 2007 - 15:59:43) Marvell version: 1.12.1 - TINY
e03f<ij??ji<f30ef30e?ji<<ij?e03f
i<?j0ef33fe0j?<i
j?<i3fe00ef3i<?jj?<i3fe00ef3i<?j
i<?j0ef33fe0j?<i
f30e?ji<<ij?e03fe03f<ij??ji<f30e
nand_erase
nand_read_ecc
nand_write_ecc
nand_write_page
 n;^
Qkkbal
i]Wb
9a&g
MGiI
wn>Jj
#.zf
+o*7
pci_init_board
mvEgigaInit
mvEgigaLoad
cpumap
cpumap - Display CPU memory mapping settings.
      display CPU memory mapping settings.
CPU Memory mapping :
enaMonExt
cacheMode
enaPT
 page table:
  (00000000 - 0fffffff) => (00000000 - 0fffffff) Non-Cachable/Bufferable
write-through
  (10000000 - 7fffffff) => (10000000 - 7fffffff) Cachable/Non-Bufferable(write-through)
  (80000000 - 8fffffff) => (00000000 - 0fffffff) Cachable/Non-Bufferable(write-through)
  (10000000 - 7fffffff) => (10000000 - 7fffffff) Cachable/Bufferable(write-back)
  (80000000 - 8fffffff) => (00000000 - 0fffffff) Cachable/Bufferable(write-back)
  (90000000 - 9fffffff) => (90000000 - 9fffffff) Non-Cachable/Bufferable
  (a0000000 - afffffff) => (90000000 - 9fffffff) Cachable/Non-Bufferable(write-through)
  (b0000000 - dfffffff) => (b0000000 - dfffffff) Cachable/Non-Bufferable(write-through)
  (e0000000 - efffffff) => (f0000000 - ffffffff) Cachable/Non-Bufferable(write-through)
  (a0000000 - afffffff) => (90000000 - 9fffffff) Cachable/Bufferable(write-back)
  (b0000000 - dfffffff) => (b0000000 - dfffffff) Cachable/Bufferable(write-back)
  (e0000000 - efffffff) => (f0000000 - ffffffff) Cachable/Bufferable(write-back)
  (f0000000 - ffffffff) => (f0000000 - ffffffff) Non-Cachable/Bufferable
No page table.
Intializing Page Table...
write-back
Done
diskboot
diskboot- boot from IDE device
loadAddr dev:part
ide     - IDE sub-system
reset - reset IDE controller
ide info  - show available IDE devices
ide device [dev] - show or set current device
ide part [dev] - print partition table of one or all IDE devices
ide read  addr blk# cnt
ide write addr blk# cnt - read/write `cnt' blocks starting at block `blk#'
    to/from memory address `addr'
bootdevice
Usage:
** No boot device **
** Device %x not available
** Invalid boot device, use `dev[:part]' **
U-Boot
PPCBoot
** Invalid partition type "%.32s" (expect "U-Boot")
Loading from IDE device %x, partition %d: Name: %.32s  Type: %.32s
** Read error on %x:%d
** Bad Magic Number **
autostart
Automatic boot of image at addr 0x%08lX ...
ADAPTER ERROR
CONNECT
	:
	:
	:
cbaudrate=115200
loads_echo=0
ipaddr=192.168.11.150
serverip=192.168.11.1
rootpath=/nfs/arm
cpuName=926
CASset=min
MALLOC_len=4
bootargs_end=:::DB88FXX81:eth0:none
ethact=egiga0
ethaddr=00:16:01:A4:C3:80
stdin=serial
stdout=serial
stderr=serial
enaMonExt=no
enaFlashBuf=yes
enaCpuStream=no
ethprime=egiga0
buffalo_ver=BOOTVER=1.091
build_time=15:59:38
initrd=initrd.buffalo
kernel=uImage.buffalo
bootargs_base=console=ttyS0,115200
bootargs_root=root=/dev/mtdblock2 rw panic=5
bootargs=$(bootargs_base) $(bootargs_root) $(buffalo_ver)
nand_uImage_offset=20000
default_kernel_addr=0x00100000
default_initrd_addr=0x02000000
bootcmd=nboot $(default_kernel_addr)  0 $(nand_uImage_offset) ;setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver); bootm $(default_kernel_addr)
def_tftp=tftp $(default_kernel_addr) $(kernel); tftp $(default_initrd_addr) $(initrd); setenv bootargs $(bootargs_base) $(bootargs_root)  rw initrd=0x02000040,20M panic=5 $(buffalo_ver); bootm $(default_kernel_addr) $(default_initrd_addr)
nand_boot=yes
bootdelay=3
disaMvPnp=no
overEthAddr=no
usb0Mode=host
usb1Mode=host

~
(END)
U-Boot と環境変数が入っているようだ。

strings 最強!




KURO-BOX/PRO
玄人志向
楽天市場
TSUKUMO ネットショップ
Yahoo!ショッピング
Sofmap
クレバリー
TwoTop New!


デュアル S-ATA HDD
ハックの記録
LinkStation/玄箱 をハックしよう

HDD からのブートに失敗したら

Copyright (C) 2003-2007 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市