xref: /openbmc/u-boot/board/buffalo/lsxl/README (revision b9cb64825b5e6efeb715abd8b48d9b12f98973e9)
1*43730ba7SMichael WalleIntro
2*43730ba7SMichael Walle-----
3*43730ba7SMichael WalleThe Buffalo Linkstation Pro/Live, codename LS-XHL and LS-CHLv2, is a single
4*43730ba7SMichael Walledisk NAS server. The PCBs of the LS-XHL and LS-CHLv2 are almost the same.
5*43730ba7SMichael WalleThe LS-XHL has a faster CPU and more RAM with a wider data bus, therefore
6*43730ba7SMichael Wallethe LS-XHL PCB has two SDRAM chips. Both have a Kirkwood CPU (Marvell
7*43730ba7SMichael Walle88F6281). The only on-board storage is a 4 Mbit SPI flash which stores the
8*43730ba7SMichael Wallebootloader and its environment. The linux kernel and the initial ramdisk
9*43730ba7SMichael Walleare loaded from the hard disk.
10*43730ba7SMichael Walle
11*43730ba7SMichael Walle
12*43730ba7SMichael WalleRescue Mode
13*43730ba7SMichael Walle-----------
14*43730ba7SMichael WalleThese linkstations don't have a populated serial port. There is no way to
15*43730ba7SMichael Walleaccess an (unmodified) board other than using the netconsole. If you want
16*43730ba7SMichael Walleto recover from a bad environment setting or an empty environment, you can
17*43730ba7SMichael Walledo this only with a working network connection.
18*43730ba7SMichael Walle
19*43730ba7SMichael WalleTherefore, on entering the resuce mode, a random ethernet address is
20*43730ba7SMichael Wallegenerated if no valid address could be loaded from the environment variable
21*43730ba7SMichael Walle'ethaddr' and a DHCP request is sent. After a successful DHCP response is
22*43730ba7SMichael Wallereceived, the network settings are configured and the ncip is unset. Thus
23*43730ba7SMichael Walleall netconsole packets are broadcasted and you can use the netconsole to
24*43730ba7SMichael Walleaccess board from any host within the network segment. To determine the IP
25*43730ba7SMichael Walleaddress assigned to the board, you either have to sniff the traffic or
26*43730ba7SMichael Wallecheck the logs/leases of your DHCP server.
27*43730ba7SMichael Walle
28*43730ba7SMichael WalleThe resuce mode is selected by holding the push button for at least one
29*43730ba7SMichael Wallesecond, while powering-on the device. The status LED turns solid amber if
30*43730ba7SMichael Wallethe resuce mode is enabled, thus providing a visual feedback.
31*43730ba7SMichael Walle
32*43730ba7SMichael WallePressing the same button for at least 10 seconds on power-up will erase the
33*43730ba7SMichael Walleenvironment and reset the board. In this case the visual indication will
34*43730ba7SMichael Wallebe:
35*43730ba7SMichael Walle- blinking blue, for about one second
36*43730ba7SMichael Walle- solid amber, for about nine seconds
37*43730ba7SMichael Walle- blinking amber, until you release the button
38*43730ba7SMichael Walle
39*43730ba7SMichael WalleThis ensures, that you still can recover a device with a broken
40*43730ba7SMichael Walleenvironment by first erasing the environment and then entering the rescue
41*43730ba7SMichael Wallemode.
42*43730ba7SMichael Walle
43*43730ba7SMichael WalleOnce the rescue mode is started, use the ncb binary from the tools/
44*43730ba7SMichael Walledirectory to access your board. There is a helper script named
45*43730ba7SMichael Walle'restore_env' to save your changes. It unsets all the network variables
46*43730ba7SMichael Wallewhich were set by the rescue mode, saves your changes and then resets the
47*43730ba7SMichael Walleboard.
48*43730ba7SMichael Walle
49*43730ba7SMichael WalleThe common use case for this is setting a MAC address. Let us assume you
50*43730ba7SMichael Wallehave an empty environment, the board comes up with the amber LED blinking.
51*43730ba7SMichael WalleThen you enter the rescue mode, connect to the board with the ncb tool and
52*43730ba7SMichael Walleuse the following commands to set your MAC address:
53*43730ba7SMichael Walle
54*43730ba7SMichael Walle  setenv ethaddr 00:00:00:00:00:00
55*43730ba7SMichael Walle  run restore_env
56*43730ba7SMichael Walle
57*43730ba7SMichael WalleOf course you need to replace the 00:00:00:00:00:00 with your valid MAC
58*43730ba7SMichael Walleaddress, which can be found on a sticker on the bottom of your box.
59*43730ba7SMichael Walle
60*43730ba7SMichael Walle
61*43730ba7SMichael WalleStatus LED
62*43730ba7SMichael Walle----------
63*43730ba7SMichael Walleblinking blue
64*43730ba7SMichael Walle  Bootloader is running normally.
65*43730ba7SMichael Walle
66*43730ba7SMichael Walleblinking amber
67*43730ba7SMichael Walle  No ethaddr set. Use the `Rescue Mode` to set one.
68*43730ba7SMichael Walle
69*43730ba7SMichael Walleblinking red
70*43730ba7SMichael Walle  Something bad happend during loading the operating system.
71*43730ba7SMichael Walle
72*43730ba7SMichael WalleThe default behavior of the linux kernel is to turn on the blue LED. So if
73*43730ba7SMichael Wallethe blinking blue LED changes to solid blue the kernel was loaded
74*43730ba7SMichael Wallesuccessfully.
75*43730ba7SMichael Walle
76*43730ba7SMichael Walle
77*43730ba7SMichael WallePower-on Switch
78*43730ba7SMichael Walle---------------
79*43730ba7SMichael WalleThe power-on switch is a software switch. If it is not in ON position when
80*43730ba7SMichael Wallethe bootloader starts, the bootloader will disable the HDD and USB power
81*43730ba7SMichael Walleand stop the fan. Then it loops until the switch is in ON position again,
82*43730ba7SMichael Walleenables the power and fan again and continue booting.
83*43730ba7SMichael Walle
84*43730ba7SMichael Walle
85*43730ba7SMichael WalleBoot sources
86*43730ba7SMichael Walle------------
87*43730ba7SMichael WalleThe environment defines several different boot sources:
88*43730ba7SMichael Walle
89*43730ba7SMichael Wallelegacy
90*43730ba7SMichael Walle  This is the default boot source. It loads the kernel and ramdisk from the
91*43730ba7SMichael Walle  attached HDD using the original filenames. The load addresses were
92*43730ba7SMichael Walle  modified to support loading larger kernels. But it should behave the same
93*43730ba7SMichael Walle  as the original bootloader.
94*43730ba7SMichael Walle
95*43730ba7SMichael Wallehdd
96*43730ba7SMichael Walle  Use this for new-style booting. Loads three files /vmlinuz, /initrd.img
97*43730ba7SMichael Walle  and /dtb from the boot partition. This should work out of the box if you
98*43730ba7SMichael Walle  have debian and the flash-kernel package installed.
99*43730ba7SMichael Walle
100*43730ba7SMichael Walleusb
101*43730ba7SMichael Walle  Same as hdd expect, that the files are loaded from an attached USB mass
102*43730ba7SMichael Walle  storage device and the filename for the device tree is kirkwood-lsxhl.dtb
103*43730ba7SMichael Walle  (or kirkwood-lschlv2.dtb).
104*43730ba7SMichael Walle
105*43730ba7SMichael Wallenet
106*43730ba7SMichael Walle  Same as usb expect, that the file are loaded from the network.
107*43730ba7SMichael Walle
108*43730ba7SMichael Wallerescue
109*43730ba7SMichael Walle  Automatically activated if the push button is pressed for at least one
110*43730ba7SMichael Walle  second on power-up. Does a DHCP request and enables the network console.
111*43730ba7SMichael Walle  See `Rescue Mode` for more information.
112*43730ba7SMichael Walle
113*43730ba7SMichael WalleYou can change the boot source by setting the 'bootsource' variable to the
114*43730ba7SMichael Wallecorresponding value. Please note, that the restore_env script will the the
115*43730ba7SMichael Wallebootsource back to 'legacy'.
116*43730ba7SMichael Walle
117*43730ba7SMichael Walle
118*43730ba7SMichael WalleFlash map
119*43730ba7SMichael Walle---------
120*43730ba7SMichael Walle00000 - 5ffff   u-boot
121*43730ba7SMichael Walle60000 - 6ffff   reserved, may be used to store dtb
122*43730ba7SMichael Walle70000 - 7ffff   u-boot environment
123*43730ba7SMichael Walle
124*43730ba7SMichael Walle
125*43730ba7SMichael WalleCompiling
126*43730ba7SMichael Walle---------
127*43730ba7SMichael Wallemake lsxhl_config (or lschlv2_config)
128*43730ba7SMichael Wallemake u-boot.kwb
129*43730ba7SMichael Walle
130*43730ba7SMichael Walle
131*43730ba7SMichael WalleUpdate your board
132*43730ba7SMichael Walle-----------------
133*43730ba7SMichael WalleJust flash the resulting u-boot.kwb to the beginning of the SPI flash. If
134*43730ba7SMichael Walleyou already have a bootloader CLI, you can use the following commands:
135*43730ba7SMichael Walle
136*43730ba7SMichael Walle sf probe 0
137*43730ba7SMichael Walle bootp ${loadaddr} u-boot.kwb
138*43730ba7SMichael Walle sf erase 0 +${filelen}
139*43730ba7SMichael Walle sf write 0 ${fileaddr} ${filesize}
140