Openwrt - SAMA5D27-SOM1-EK1 Boot From SDMMC1

Moderator: nferre

jeppe
Posts: 4
Joined: Mon Dec 17, 2018 4:44 pm

Openwrt - SAMA5D27-SOM1-EK1 Boot From SDMMC1

Mon Dec 17, 2018 4:50 pm

Hello.

I have already read this topic: viewtopic.php?t=26504

I have the same goal: booting from mmc1 instead of mmc0. However, I use the Openwrt demo (linux4sam/bin/view/Linux4SAM/OpenWrt)

I have an Openwrt build which works fine from mmc0 (regular size sd card). I have tried:
cd build_dir/target-arm_cortex-a5+neon-vfpv4_glibc_eabi/u-boot-sama5d27_som1_ek_mmc/u-boot-linux4sam_6.0
make sama5d27_som1_ek_mmc1_defconfig
make menuconfig (change bootarg to mmc1)
rm .built
cd ../../../..
make -j1 V=s

However, it still cannot boot from mmc1.

If I put the same image on two cards, put one in mmc1 and the other in mmc0, it seems to boot fine. Still running on mmc0 it seems though.

How do I make this so it boots from mmc1 (micro sd) always?
blue_z
Location: USA
Posts: 1906
Joined: Thu Apr 19, 2007 10:15 pm

Re: Openwrt - SAMA5D27-SOM1-EK1 Boot From SDMMC1

Tue Dec 18, 2018 9:18 pm

jeppe wrote: I have already read this topic: viewtopic.php?t=26504
Then you need to read it again, but more carefully.
The solution posted by thackerp requires modification to two boot programs, but apparently you (so far) have chosen to implement only half the instructions.

Regards
jeppe
Posts: 4
Joined: Mon Dec 17, 2018 4:44 pm

Re: Openwrt - SAMA5D27-SOM1-EK1 Boot From SDMMC1

Wed Dec 19, 2018 11:24 am

Sorry, you are absolutely right.

I followed instructions for both programs now. I still get the following error when trying to boot from mmc1:

=> RomBOOT


AT91Bootstrap 3.8.11 (Tue Dec 18 13:44:37 UTC 2018)

SD/MMC: Image: Read file u-boot.bin to 0x23f00000
MMC: ADMA supported
SD: Card Capacity: High or Extended
SD: Specification Version 2.00
SD/MMC: Done to load image
<debug_uart>

U-Boot 2018.07-linux4sam_6.0 (Oct 11 2018 - 12:51:42 +0000)

CPU: SAMA5D27 1G bits DDR2 SDRAM
Crystal frequency: 24 MHz
CPU clock : 492 MHz
Master clock : 164 MHz
DRAM: 128 MiB
MMC: sdio-host@a0000000: 0, sdio-host@b0000000: 1
Loading Environment from FAT... OK
In: serial@f8020000
Out: serial@f8020000
Err: serial@f8020000
Net: eth0: ethernet@f8008000
Hit any key to stop autoboot: 0
** Bad device mmc 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
=>
jeppe
Posts: 4
Joined: Mon Dec 17, 2018 4:44 pm

Re: Openwrt - SAMA5D27-SOM1-EK1 Boot From SDMMC1

Wed Dec 19, 2018 11:43 am

Actually, just realized that on the first boot after the changes, I got the following error:

<debug_uart>

U-Boot 2018.07-linux4sam_6.0 (Oct 11 2018 - 12:51:42 +0000)

CPU: SAMA5D27 1G bits DDR2 SDRAM
Crystal frequency: 24 MHz
CPU clock : 492 MHz
Master clock : 164 MHz
DRAM: 128 MiB
MMC: sdio-host@a0000000: 0, sdio-host@b0000000: 1
Loading Environment from FAT... OK
In: serial@f8020000
Out: serial@f8020000
Err: serial@f8020000
Net: eth0: ethernet@f8008000
Hit any key to stop autoboot: 0
** Bad device mmc 0 **
## Loading kernel from FIT Image at 21000000 ...
Using 'kernel_dtb' configuration
Trying 'kernel@1' kernel subimage
Description: Linux4SAM Linux kernel
Type: Kernel Image
Compression: uncompressed
Data Start: 0x210000e0
Data Size: 3590528 Bytes = 3.4 MiB
Architecture: ARM
OS: Linux
Load Address: 0x22000000
Entry Point: 0x22000000
Hash algo: crc32
Hash value: e832821c
Hash algo: sha1
Hash value: 304353855aea01937b3c7ac29ecc4c7bfcadc33b
Verifying Hash Integrity ... crc32 error!
Bad hash value for 'hash@1' hash node in 'kernel@1' image node
Bad Data Hash
ERROR: can't get kernel image!
=>
jeppe
Posts: 4
Joined: Mon Dec 17, 2018 4:44 pm

Re: Openwrt - SAMA5D27-SOM1-EK1 Boot From SDMMC1

Thu Dec 20, 2018 1:46 pm

I found the issue. For others:

I needed to change to mmc1 two places in target/linux/at91/image/boards/sama5d27_som1_ek/uboot-env.txt as well

Return to “SAMA5-based”

Who is online

Users browsing this forum: No registered users and 4 guests