Michael Walle | 43730ba | 2015-02-13 18:45:57 +0100 | [diff] [blame] | 1 | Intro |
| 2 | ----- |
| 3 | The Buffalo Linkstation Pro/Live, codename LS-XHL and LS-CHLv2, is a single |
| 4 | disk NAS server. The PCBs of the LS-XHL and LS-CHLv2 are almost the same. |
| 5 | The LS-XHL has a faster CPU and more RAM with a wider data bus, therefore |
| 6 | the LS-XHL PCB has two SDRAM chips. Both have a Kirkwood CPU (Marvell |
| 7 | 88F6281). The only on-board storage is a 4 Mbit SPI flash which stores the |
| 8 | bootloader and its environment. The linux kernel and the initial ramdisk |
| 9 | are loaded from the hard disk. |
| 10 | |
Michael Walle | 30387ee | 2019-04-11 15:36:21 +0200 | [diff] [blame] | 11 | Important! Changes since v2019.07 |
| 12 | --------------------------------- |
| 13 | In u-boot v2019.07 the driver for the SATA port was changed to a new |
| 14 | one. This means that the old "ide" command and block interface is not |
| 15 | supported anymore. More important, the boot commands have changed. You have |
| 16 | to overwrite the boot commands in your envionment with the new ones: |
| 17 | |
| 18 | env default -f bootcmd_legacy |
| 19 | env default -f bootcmd_hdd |
| 20 | saveenv |
Michael Walle | 43730ba | 2015-02-13 18:45:57 +0100 | [diff] [blame] | 21 | |
| 22 | Rescue Mode |
| 23 | ----------- |
| 24 | These linkstations don't have a populated serial port. There is no way to |
| 25 | access an (unmodified) board other than using the netconsole. If you want |
| 26 | to recover from a bad environment setting or an empty environment, you can |
| 27 | do this only with a working network connection. |
| 28 | |
| 29 | Therefore, on entering the resuce mode, a random ethernet address is |
| 30 | generated if no valid address could be loaded from the environment variable |
| 31 | 'ethaddr' and a DHCP request is sent. After a successful DHCP response is |
| 32 | received, the network settings are configured and the ncip is unset. Thus |
| 33 | all netconsole packets are broadcasted and you can use the netconsole to |
Michael Walle | 560a5c3 | 2022-08-17 21:38:09 +0200 | [diff] [blame] | 34 | access the board from any host within the network segment. To determine the |
| 35 | IP address assigned to the board, you either have to sniff the traffic or |
Michael Walle | 43730ba | 2015-02-13 18:45:57 +0100 | [diff] [blame] | 36 | check the logs/leases of your DHCP server. |
| 37 | |
| 38 | The resuce mode is selected by holding the push button for at least one |
| 39 | second, while powering-on the device. The status LED turns solid amber if |
| 40 | the resuce mode is enabled, thus providing a visual feedback. |
| 41 | |
| 42 | Pressing the same button for at least 10 seconds on power-up will erase the |
| 43 | environment and reset the board. In this case the visual indication will |
| 44 | be: |
Michael Walle | 560a5c3 | 2022-08-17 21:38:09 +0200 | [diff] [blame] | 45 | - blue, for about one second |
| 46 | - amber, for about nine seconds |
| 47 | - red, until you release the button |
Michael Walle | 43730ba | 2015-02-13 18:45:57 +0100 | [diff] [blame] | 48 | |
| 49 | This ensures, that you still can recover a device with a broken |
| 50 | environment by first erasing the environment and then entering the rescue |
| 51 | mode. |
| 52 | |
| 53 | Once the rescue mode is started, use the ncb binary from the tools/ |
Michael Walle | 560a5c3 | 2022-08-17 21:38:09 +0200 | [diff] [blame] | 54 | directory to access your board. |
Michael Walle | 43730ba | 2015-02-13 18:45:57 +0100 | [diff] [blame] | 55 | |
| 56 | The common use case for this is setting a MAC address. Let us assume you |
Michael Walle | 560a5c3 | 2022-08-17 21:38:09 +0200 | [diff] [blame] | 57 | have an empty environment, the board comes up with the amber LED turned on. |
Michael Walle | 43730ba | 2015-02-13 18:45:57 +0100 | [diff] [blame] | 58 | Then you enter the rescue mode, connect to the board with the ncb tool and |
| 59 | use the following commands to set your MAC address: |
| 60 | |
Michael Walle | 560a5c3 | 2022-08-17 21:38:09 +0200 | [diff] [blame] | 61 | setenv -f ethaddr 00:00:00:00:00:00 |
| 62 | saveenv |
| 63 | reset |
Michael Walle | 43730ba | 2015-02-13 18:45:57 +0100 | [diff] [blame] | 64 | |
| 65 | Of course you need to replace the 00:00:00:00:00:00 with your valid MAC |
| 66 | address, which can be found on a sticker on the bottom of your box. |
| 67 | |
Michael Walle | 560a5c3 | 2022-08-17 21:38:09 +0200 | [diff] [blame] | 68 | You cannot store the network console setting in the environment. On reset |
| 69 | it is automatically restored to serial. Therefore, you have to use the |
| 70 | push-button to enter resuce mode again. |
| 71 | |
Michael Walle | 43730ba | 2015-02-13 18:45:57 +0100 | [diff] [blame] | 72 | |
| 73 | Status LED |
| 74 | ---------- |
Michael Walle | 560a5c3 | 2022-08-17 21:38:09 +0200 | [diff] [blame] | 75 | blue |
Michael Walle | 43730ba | 2015-02-13 18:45:57 +0100 | [diff] [blame] | 76 | Bootloader is running normally. |
| 77 | |
Michael Walle | 560a5c3 | 2022-08-17 21:38:09 +0200 | [diff] [blame] | 78 | amber |
Michael Walle | 43730ba | 2015-02-13 18:45:57 +0100 | [diff] [blame] | 79 | No ethaddr set. Use the `Rescue Mode` to set one. |
| 80 | |
Michael Walle | 560a5c3 | 2022-08-17 21:38:09 +0200 | [diff] [blame] | 81 | red |
Michael Walle | 43730ba | 2015-02-13 18:45:57 +0100 | [diff] [blame] | 82 | Something bad happend during loading the operating system. |
| 83 | |
| 84 | The default behavior of the linux kernel is to turn on the blue LED. So if |
| 85 | the blinking blue LED changes to solid blue the kernel was loaded |
| 86 | successfully. |
| 87 | |
| 88 | |
| 89 | Power-on Switch |
| 90 | --------------- |
| 91 | The power-on switch is a software switch. If it is not in ON position when |
| 92 | the bootloader starts, the bootloader will disable the HDD and USB power |
| 93 | and stop the fan. Then it loops until the switch is in ON position again, |
| 94 | enables the power and fan again and continue booting. |
| 95 | |
| 96 | |
| 97 | Boot sources |
| 98 | ------------ |
| 99 | The environment defines several different boot sources: |
| 100 | |
| 101 | legacy |
| 102 | This is the default boot source. It loads the kernel and ramdisk from the |
| 103 | attached HDD using the original filenames. The load addresses were |
| 104 | modified to support loading larger kernels. But it should behave the same |
| 105 | as the original bootloader. |
| 106 | |
| 107 | hdd |
| 108 | Use this for new-style booting. Loads three files /vmlinuz, /initrd.img |
| 109 | and /dtb from the boot partition. This should work out of the box if you |
| 110 | have debian and the flash-kernel package installed. |
| 111 | |
| 112 | usb |
| 113 | Same as hdd expect, that the files are loaded from an attached USB mass |
| 114 | storage device and the filename for the device tree is kirkwood-lsxhl.dtb |
| 115 | (or kirkwood-lschlv2.dtb). |
| 116 | |
| 117 | net |
| 118 | Same as usb expect, that the file are loaded from the network. |
| 119 | |
| 120 | rescue |
| 121 | Automatically activated if the push button is pressed for at least one |
| 122 | second on power-up. Does a DHCP request and enables the network console. |
| 123 | See `Rescue Mode` for more information. |
| 124 | |
| 125 | You can change the boot source by setting the 'bootsource' variable to the |
| 126 | corresponding value. Please note, that the restore_env script will the the |
| 127 | bootsource back to 'legacy'. |
| 128 | |
| 129 | |
| 130 | Flash map |
| 131 | --------- |
| 132 | 00000 - 5ffff u-boot |
| 133 | 60000 - 6ffff reserved, may be used to store dtb |
| 134 | 70000 - 7ffff u-boot environment |
| 135 | |
| 136 | |
| 137 | Compiling |
| 138 | --------- |
| 139 | make lsxhl_config (or lschlv2_config) |
| 140 | make u-boot.kwb |
| 141 | |
| 142 | |
| 143 | Update your board |
| 144 | ----------------- |
| 145 | Just flash the resulting u-boot.kwb to the beginning of the SPI flash. If |
| 146 | you already have a bootloader CLI, you can use the following commands: |
| 147 | |
| 148 | sf probe 0 |
| 149 | bootp ${loadaddr} u-boot.kwb |
| 150 | sf erase 0 +${filelen} |
| 151 | sf write 0 ${fileaddr} ${filesize} |