Update some instructions
This commit is contained in:
parent
d1e3a0d90a
commit
94b44862c9
1 changed files with 54 additions and 15 deletions
69
docs/spi.md
69
docs/spi.md
|
@ -22,34 +22,45 @@ Refer to [U-Boot](/uboot) page to build the image.
|
|||
|
||||
2. Bootable U-Boot on microSD card.
|
||||
|
||||
### Using Linux
|
||||
### Generic Linux
|
||||
|
||||
!!! info
|
||||
Concurrent access on SPI NOR and SATA drive can lead to unstable SATA. The following instructions has taken this issue into consideration and workaround it by disabling the SATA temporary.
|
||||
|
||||
Put u-boot binaries on home folder and rename it as **u-boot-spi.bin**.
|
||||
Download boot_spi_en.scr from [here](/files/software/boot_spi_en.scr) and put it to / and then reboot the system
|
||||
1) Put u-boot binaries on home folder and rename it as **u-boot-spi.bin**.
|
||||
|
||||
2) Download boot_spi_en.scr from [here](/files/software/boot_spi_en.scr) and put it to /boot/ and then reboot the system
|
||||
```
|
||||
sudo wget https://wiki.kobol.io/files/software/boot_spi_en.scr -O /boot_spi_en.scr
|
||||
sudo wget https://wiki.kobol.io/files/software/boot_spi_en.scr -O /boot/boot_spi_en.scr
|
||||
sudo reboot
|
||||
```
|
||||
|
||||
Switch to Helios4 serial console. Press any key to cancel the autoboot and execute these commands
|
||||
!!! info
|
||||
Source code of boot_spi_en.scr can be downloaded from [here](/files/software/boot_spi_en.cmd)
|
||||
|
||||
3) Switch to Helios4 serial console. Press any key to cancel the autoboot and execute these commands
|
||||
```
|
||||
setenv script_name "boot_spi_en.scr"
|
||||
setenv script_name "/boot/boot_spi_en.scr"
|
||||
stage_boot mmc_scr
|
||||
```
|
||||
|
||||
It will boot to Linux with modified device tree.
|
||||
|
||||
- - -
|
||||
|
||||
Log in to Helios4, verify whether mtdblock0 is exist using **lsblk**, and write the u-boot to SPI flash using this command
|
||||
4) Log in to Helios4, verify whether mtdblock0 is exist using **lsblk**
|
||||
```
|
||||
lsblk
|
||||
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
|
||||
mtdblock0 31:0 0 4M 0 disk
|
||||
mmcblk0 179:0 0 14.9G 0 disk
|
||||
└─mmcblk0p1 179:1 0 14.8G 0 part /
|
||||
```
|
||||
|
||||
5) Write the u-boot to SPI flash using this command
|
||||
```
|
||||
sudo dd if=~/u-boot-spi.bin of=/dev/mtdblock0
|
||||
```
|
||||
|
||||
Set DIP switches SW1 to SPI Boot
|
||||
6) Set DIP switches SW1 to SPI Boot
|
||||
|
||||
![Boot from SPI](/img/hardware/dipswitch_boot_spinor.png)
|
||||
|
||||
|
@ -61,9 +72,29 @@ BootROM - 1.73
|
|||
Booting from SPI flash
|
||||
```
|
||||
|
||||
## Set Up U-Boot
|
||||
### Armbian
|
||||
|
||||
Add U-Boot ENV variable.
|
||||
!!! info
|
||||
Preliminary
|
||||
|
||||
1) Open /boot/armbianEnv.txt and modify *spi_workaround="on"*
|
||||
|
||||
2) Reboot the system to apply the change
|
||||
|
||||
3) Login to the system and run
|
||||
```
|
||||
sudo nand-sata-install
|
||||
```
|
||||
|
||||
4) Select option **5 Install the bootloader to SPI Flash**
|
||||
|
||||
|
||||
## Set Up U-Boot Environment
|
||||
|
||||
!!! info
|
||||
The prebuilt SPI image has been configured to automatically run /boot/boot.scr and /boot.scr on microSD or USB drive. There is no need to set up u-boot environment to boot Armbian.
|
||||
|
||||
Add U-Boot ENV variables to prevent U-Boot to relocate fdt and initrd into RAM address that is not accessible by kernel, and set the correct device tree name for Helios4 board
|
||||
|
||||
```
|
||||
setenv fdt_high 0xffffffff
|
||||
|
@ -72,7 +103,7 @@ setenv fdtfile armada-388-helios4.dtb
|
|||
saveenv
|
||||
```
|
||||
|
||||
To automatically boot Linux on microSD card
|
||||
- To automatically boot Linux on microSD card
|
||||
|
||||
```
|
||||
setenv bootargs '${console} root=/dev/mmcblk0p1 rootwait'
|
||||
|
@ -80,6 +111,14 @@ setenv bootcmd 'ext2load mmc 0:1 ${kernel_addr_r} /boot/zImage; ext2load mmc 0:1
|
|||
saveenv
|
||||
```
|
||||
|
||||
!!! info
|
||||
The prebuilt SPI image has been configured to automatically run /boot/boot.scr and /boot.scr on microSD. There is no need to configure u-boot to boot Armbian on microSD.
|
||||
- To automatically boot Linux on USB drive (assume UUID=1234)
|
||||
|
||||
```
|
||||
setenv bootargs '${console} root=UUID=1234 rootwait'
|
||||
setenv bootcmd 'ext2load usb 0:1 ${kernel_addr_r} /boot/zImage; ext2load usb 0:1 ${ramdisk_addr_r} /boot/uInitrd; ext2load usb 0:1 ${fdt_addr} /boot/dtb/${fdtfile}; bootz ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr}'
|
||||
saveenv
|
||||
```
|
||||
|
||||
## Moving Rootfs to Other Device
|
||||
|
||||
Please refer to [Armbian](/armbian) page to move the rootfs from microSD to USB using *nand-sata-install* utility.
|
||||
|
|
Loading…
Reference in a new issue