A20 Olinuxino micro: sample SATA boot config

Started by kr_eten, July 20, 2016, 05:13:10 PM

Previous topic - Next topic

kr_eten

I recently managed to configure the Olinuxino micro to boot the OS from the sata drive.

Following topic describes the general approach, which involves copying files and so on:

https://www.olimex.com/forum/index.php?topic=2665.msg18593#msg18593

In addition to that, I needed to edit boot.scr and boot.cmd (basically same thing) along with uEnv.txt.

Here is the example configuration:


quick@OLinuXino-A20:~$ uname -a
Linux OLinuXino-A20 3.4.103-00033-g9a1cd03-dirty #29 SMP PREEMPT Tue Apr 5 08:21:20 EEST 2016 armv7l GNU/Linux



quick@OLinuXino-A20:~$ sudo mkdir /mnt/mnc



quick@OLinuXino-A20:~$ sudo mount /dev/mmcblk0p1 /mnt/mnc



quick@OLinuXino-A20:~$ ls /mnt/mnc/
back_up      bkpboot.scr  boot.cmd  script.bin            script_a20_Lime2_NAND_rel_2        script_a20_lime2_emmc  uEnv.txt
bkpboot.cmd  bkpuEnv.txt  boot.scr  script_a20-SOM_rel_3  script_a20_OLinuXino-micro_rel_10  script_a20_lime_rel_3  uImage



quick@OLinuXino-A20:~$ cat /mnt/mnc/boot.cmd
setenv bootm_boot_mode sec
setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootwait panic=10
load mmc 0:1 0x43000000 script.bin || load mmc 0:1 0x43000000 boot/script.bin
load mmc 0:1 0x42000000 uImage || load mmc 0:1 0x42000000 boot/uImage
setenv machid 10bb
bootm 0x42000000



quick@OLinuXino-A20:~$ cat /mnt/mnc/uEnv.txt
root=/dev/sda1



quick@OLinuXino-A20:~$ zcat /proc/config.gz | grep -i sata
# CONFIG_SATA_PMP is not set
# CONFIG_SATA_AHCI_PLATFORM is not set
CONFIG_SW_SATA_AHCI_PLATFORM=y


To compile the boot.scr from boot.cmd:

mkimage -C none -A arm -T script -d boot.cmd boot.scr