Booting from SD card

153 views
Skip to first unread message

Bharath R

unread,
Nov 21, 2015, 2:32:52 PM11/21/15
to BeagleBoard
Hi,

I want to build my own SPL and uboot for BBB and want to boot them via SD card. What I expect to do is, I want to reserve 1MB for SPL, 1MB for Uboot, 5MB for Kernel rest rootfs in SD card. How can I do this? can anyone guide to a link where I can partition my SD card according this need?

And what are the changes to be made in SPL to point Uboot from other 1MB partition, similar what are the necessary change to be done in Uboot to load the kernel from other partition of SD card to RAM(DDR3)?

If it was a NAND Flash, I would've directly given the physical address. similarly can I give the physical address of SD to load from onto RAM?

Regards,
Bharath

Robert Nelson

unread,
Nov 21, 2015, 6:46:25 PM11/21/15
to Beagle Board
On Sat, Nov 21, 2015 at 1:32 PM, Bharath R <r.bhar...@gmail.com> wrote:
> Hi,
>
> I want to build my own SPL and uboot for BBB and want to boot them via SD
> card. What I expect to do is, I want to reserve 1MB for SPL, 1MB for Uboot,

Considering SPL is usually less then 109Kb to boot and U-boot is less
then 512Kb, save a 1MB by having both spl/uboot in the first 1MB

> 5MB for Kernel rest rootfs in SD card. How can I do this? can anyone guide
> to a link where I can partition my SD card according this need?

> And what are the changes to be made in SPL to point Uboot from other 1MB
> partition, similar what are the necessary change to be done in Uboot to load
> the kernel from other partition of SD card to RAM(DDR3)?
>
> If it was a NAND Flash, I would've directly given the physical address.
> similarly can I give the physical address of SD to load from onto RAM?

Considering your treating the SD like "nand" by placing this objects
at specific location, just use the raw offsets on the mmc card and
make sure your partition is out of the way for the rootfs..

Regards,

--
Robert Nelson
https://rcn-ee.com/

pw8...@gmail.com

unread,
Nov 23, 2015, 12:26:08 PM11/23/15
to BeagleBoard

On Sunday, November 22, 2015 at 6:02:52 AM UTC+10:30, Bharath R wrote:
Hi,

I want to build my own SPL and uboot for BBB and want to boot them via SD card. What I expect to do is, I want to reserve 1MB for SPL, 1MB for Uboot, 5MB for Kernel rest rootfs in SD card. How can I do this? can anyone guide to a link where I can partition my SD card according this need?

Bharath,

I've been following the instructions at

As Robert mentions you can use raw mode and place MLO/SPL and u-boot at specific locations:
dd if=MLO of=/dev/mmcblk0 bs=512 seek=256 count=256 conv=notrunc
dd if=u-boot.img of=/dev/mmcblk0 bs=512 seek=768 count=1024 conv=notrunc

I've got this successfully working on internal MMC, but when I use SD Card to get the following with u-boot:

U-Boot 2015.10 (Nov 21 2015 - 01:06:45 -0800)
       Watchdog enabled
I2C:   ready
DRAM:  512 MiB
initcall sequence 9ffa2468 failed at call 610a2c4f (err=-12)

### ERROR ### Please RESET the board ###

As a work around, I've placed u-boot.img in a FAT32 partition on the SDCard and it works.

Pete.

Bharath R

unread,
Nov 25, 2015, 1:20:45 AM11/25/15
to BeagleBoard
Thanks a lot Robert and Pete.

Regards,
Bharath
Reply all
Reply to author
Forward
0 new messages