logo

Could not compile stylesheet for simplistic. Using last compiled stylesheet.
Question

How to boot on SATA using a micro-SD ?

posted in IGEPv5
Friday, May 15 2015, 06:49 PM
0
Hi !

I'd like to use a SD card as a boot loader, and start a rootfs on /dev/sdaX as mSATA.
Responses (10)
  • Accepted Answer

    Thursday, May 21 2015, 12:33 PM - #permalink
    0
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, May 21 2015, 07:48 PM - #permalink
    0
    Thanks, but it keeps booting on SD.
    The reply is currently minimized Show
  • Accepted Answer

    mcaro
    mcaro
    Offline
    Monday, May 25 2015, 09:23 AM - #permalink
    0
    You should configure the u-boot for that ...
    The reply is currently minimized Show
  • Accepted Answer

    Monday, May 25 2015, 07:06 PM - #permalink
    0
    Through the uEnv.txt or do I have to recompile u-boot ?
    Which option should I use ?
    • mcaro
      more than a month ago
      you can use uEnv.txt or command line too
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, June 02 2015, 11:42 PM - #permalink
    0
    I managed to boot directly on mSATA, but not the way I intended. In fact this is an undocumented feature.

    I did a classic two partition setup on the SSD and booted without any SD or parameter. And it worked !

    I use the 1010 mini-switch boot configuration and it turns out that the real boot order is :
    SD -> mSATA -> eMMC -> USB
    and not
    SD -> eMMC -> USB as indicated in the official manual.

    Also as I use Slackware, I have to set the filesystem as read-only in uEnv.txt in the /dev/sda1 partition.
    The content of this file is simply :
    mmcroot=/dev/sda2 ro

    That's weird because the SSD is obviously not a MMC... But it works.
    The reply is currently minimized Show
  • Accepted Answer

    mcaro
    mcaro
    Offline
    Wednesday, June 03 2015, 09:46 AM - #permalink
    0
    Please Review OMAP5432 reference manual, page 5976 (Ch: Booting Device Order Selection, 29.2.4.2).

    The boot sequence is always the same:

    * Load the appropriate MLO or HLO (from sys boot)
    * Execute the MLO or HLO (if found any image in the booting devices)
    * Load the u-boot from the same device used for boot (from where MLO or HLO is found)
    * The u-boot setup always try several boot devices for find & load the linux kernel as you can check here:

    omap5_common.h

    Check define: #define CONFIG_EXTRA_ENV_SETTINGS
    #define CONFIG_EXTRA_ENV_SETTINGS \
    	"loadaddr=0x80200000\0" \
    	"fdtaddr=0x80F80000\0" \
    	"fdt_high=0xffffffff\0" \
    	"rdaddr=0x81000000\0" \
    	"console=" CONSOLEDEV ",115200n8\0" \
    	"fdtfile=omap5-igep0050.dtb\0" \
    	"bootpart=0:2\0" \
    	"bootdir=/boot\0" \
    	"bootfile=zImage\0" \
    	"usbtty=cdc_acm\0" \
    	"vram=16M\0" \
    	"partitions=" PARTS_DEFAULT "\0" \
    	"optargs=\0" \
    	"bootdev=mmc\0"\
    	"mmcdev=0\0" \
    	"mmcroot=/dev/mmcblk0p2 rw\0" \
    	"mmcrootfstype=ext4 rootwait\0" \
    	"mmcargs=setenv bootargs console=${console} " \
    		"${kernel_mem} " \
    		"smsc75xx.mac=${mac_addr} " \
    		"${optargs} " \
    		"vram=${vram} " \
    		"root=${mmcroot} " \
    		"rootfstype=${mmcrootfstype}\0" \
    	"loadbootscript=fatload ${bootdev} ${mmcdev} ${loadaddr} boot.scr\0" \
    	"bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
    		"source ${loadaddr}\0" \
    	"loadbootenv=fatload ${bootdev} ${mmcdev} ${loadaddr} uEnv.txt\0" \
    	"importbootenv=echo Importing environment from mmc${mmcdev} ...; " \
    		"env import -t ${loadaddr} ${filesize}\0" \
    	"loadimage=load ${bootdev} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
    	"mmcboot=mmc dev ${mmcdev}; " \
    		"if mmc rescan; then " \
    			"echo SD/MMC found on device ${mmcdev};" \
    			"if run loadbootenv; then " \
    				"echo Loaded environment from ${bootenv};" \
    				"run importbootenv;" \
    			"fi;" \
    			"if test -n $uenvcmd; then " \
    				"echo Running uenvcmd ...;" \
    				"run uenvcmd;" \
    			"fi;" \
    			"if run loadimage; then " \
    				"run loadfdt; " \
    				"echo Booting from mmc${mmcdev} ...; " \
    				"run mmcargs; " \
    				"bootz ${loadaddr} - ${fdtaddr}; " \
    			"fi;" \
    		"fi;\0" \
    	"scsiboot=if run loadbootenv; then " \
    			"echo Loaded environment from ${bootenv};" \
    			"run importbootenv;" \
    		"fi;" \
    		"if test -n $uenvcmd; then " \
    			"echo Running uenvcmd ...;" \
    			"run uenvcmd;" \
    		"fi;" \
    		"if run loadimage; then " \
    			"run loadfdt; " \
    			"echo Booting from scsi${mmcdev} ...; " \
    			"run mmcargs; " \
    			"bootz ${loadaddr} - ${fdtaddr}; " \
    		"fi;\0" \
    	"loadfdt=load ${bootdev} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile};\0" \
    
    #define CONFIG_BOOTCOMMAND \
    	"run mmcboot;" \
    	"setenv bootdev scsi;" \
    	"setenv mmcroot /dev/sda2 rw;" \
    	"run scsiboot;" \
    	"setenv bootdev mmc;" \
    	"setenv mmcdev 1; " \
    	"setenv bootpart 1:2; " \
    	"setenv mmcroot /dev/mmcblk1p2 rw; " \
    	"run mmcboot;" \
    


    This sequence permits boot from microsd, sata or eMMC ...

    if the question is if it's possible boot from SATA directly (without the microsd) the answer is yes of course in the same way that is possible boot from eMMC or the microsd card ... the boot sequence is divided in two segments, the first is done directly by the ROM boot and the second is managed by the u-boot ...

    Please post the serial debug console log as attachment ....

    Regards

    Manel
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, June 04 2015, 10:11 PM - #permalink
    0
    Here's the mSATA boot log.
    Anyway, the incident is closed for me.
    Now I have to figure out how to boot on eMMC with a SD but it's not a priority for me.

    -Boot 2014.01-0-omap5-g44efc5c-dirty (May 11 2015 - 17:53:51)
    
    CPU  : OMAP5432 ES2.0
    Board: IGEPv5
    I2C:   ready
    DRAM:  2 GiB
    Board Name: IGEPv5 (IGEP0050-FULL-NI-RB0-4GiB) Rev: Engineering Sample - Serial: 0 Manufacturing date: 10:38 10/11/2014
    Manufacturer: (c) ISEE (www.isee.biz)
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Using default environment
    
    Target spinup took 0 ms.
    AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
    flags: 64bit ncq stag pm led clo only pmp pio slum part ccc apst 
    scanning bus for devices...
      Device 0: (0:0) Vendor: ATA Prod.: Samsung SSD 840 Rev: EXT4
                Type: Hard Disk
                Capacity: 238475.1 MB = 232.8 GB (488397168 x 512)
    Found 1 device(s).
    Net:   No ethernet found.
    Hit any key to stop autoboot:  0 
    Card did not respond to voltage select!
    mmc0(part 0) is current device
    Card did not respond to voltage select!
    reading uEnv.txt
    70 bytes read in 7 ms (9.8 KiB/s)
    Loaded environment from
    Importing environment from mmc0 ...
    4868024 bytes read in 143 ms (32.5 MiB/s)
    27842 bytes read in 33 ms (823.2 KiB/s)
    Booting from scsi0 ...
    Kernel image @ 0x80200000 [ 0x000000 - 0x4a47b8 ]
    ## Flattened Device Tree blob at 80f80000
       Booting using the fdt blob at 0x80f80000
       Using Device Tree in place at 80f80000, end 80f89cc1
    
    Starting kernel ...
    
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, October 22 2015, 10:36 PM - #permalink
    0
    About the sda1 partition containing the MLO and u-boot, has it to be formatted as FAT32 ?
    The reply is currently minimized Show
  • Accepted Answer

    Monday, October 26 2015, 09:43 AM - #permalink
    0
    Hi Linux-SWAT

    About the sda1 partition containing the MLO and u-boot, has it to be formatted as FAT32 ?

    Yes
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, October 27 2015, 12:00 PM - #permalink
    0
    Ok, thanks.
    The reply is currently minimized Show
Your Reply

SUPPORT


This email address is being protected from spambots. You need JavaScript enabled to view it.
This email address is being protected from spambots. You need JavaScript enabled to view it.
IGEP Community Wiki
IGEP Community Forum
IGEP Community Online Chat