• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1] 2 3 4
Author Topic: MMC/SD support in u-boot  (Read 62135 times)
kwonsk
Newbie
*

Karma: 0
Posts: 11


View Profile
« on: April 28, 2009, 11:51:11 PM »

Hi,all
Recently I finished SD(SDHC) card support for SheevaDev u-boot (based on u-boot-3.4.16).
I could successfuly "mmcinit" and "fatls,fatload..." with my 4G SDHC, 1G SD cards. Performance is
really nice, load 3MB uImage within 2 seconds.
Attached files are sources for SD support (fat.h, fat.c must be updated, there was bugfixes. u-boo-1.1.4 is too old).
Well, you also enable MMC/FAT support in the include/configs/mv_kw.h file.
(I could'nt use file attachment option in firefox. submit post with file attachment shows some errors and post fails
 Is this know problem?).
« Last Edit: May 10, 2009, 02:59:16 AM by Raśl Porcel » Logged

Gothnet
Newbie
*

Karma: 0
Posts: 33


View Profile
« Reply #1 on: April 29, 2009, 06:22:43 AM »

Hi,all
Recently I finished SD(SDHC) card support for SheevaDev u-boot (based on u-boot-3.4.16).

Excellent work, must check that out at some point (and actually get a proper build environment going for these things).

Just FYI - I find the full sized SD card sticking out of the side of the box to be quite ugly and probably has quite a lot of potential to get dislodged.
MMCmobile cards are about half length, and fit almost flush with the side, and seem to work just as well as my SDHC card. They only seem to come in sizes up to 2GB, but that ought to be adequate for an OS install.
Logged

plugit
Global Moderator
Full Member
*****

Karma: 0
Posts: 139



View Profile
« Reply #2 on: April 29, 2009, 11:19:09 AM »

Very cool! I can't wait to give it a try! Can it see an ext2/3 partition, so one could have their uImage in their rootfs?
Logged

kilowatt
Global Moderator
Full Member
*****

Karma: 3
Posts: 106


View Profile
« Reply #3 on: April 29, 2009, 11:26:34 AM »

(Plugit -  you beat me to it.  You posted as I was typing)

That is great...  

So I assume you need a fat partition on the SD card to read the kernel from.  u-boot also supports a command 'ext2load' which can read the kernel from an ext2 partition on a usb device.  Is this supported with your changes?  This is convenient since you don't need the fat partition and you can just put the kernel image in /boot/ or your root file system.

Mark
Logged

kwonsk
Newbie
*

Karma: 0
Posts: 11


View Profile
« Reply #4 on: April 29, 2009, 06:31:44 PM »

I just tried fat32 on SDHC card, but I think ext2 would'nt be a problem because it's not related with SD interface.
Bytheway does anybody succes posting with file attachment? I could'nt upload sources for your tries.
If  you wants source files then let me know your e-mail, then I'll send it via e-mail.
Logged

KaiBo
Newbie
*

Karma: 0
Posts: 35



View Profile
« Reply #5 on: April 29, 2009, 08:30:31 PM »

Bytheway does anybody succes posting with file attachment? I could'nt upload sources for your tries.
If  you wants source files then let me know your e-mail, then I'll send it via e-mail.
Nope, that did not work for me either.
But you can upload it on RapidShare or something like that.
Logged

kwonsk
Newbie
*

Karma: 0
Posts: 11


View Profile
« Reply #6 on: April 29, 2009, 09:08:36 PM »

I see. I've uploaded files for SD support at the following location.

http://rapidshare.com/files/227381680/sd.tgz.html
Logged

Benit0
Newbie
*

Karma: 0
Posts: 7


View Profile
« Reply #7 on: May 03, 2009, 04:30:05 PM »

The file is no longer available. Could you uploaded somewhere? I could give hosting for the file if needed.

Code:
This file is neither allocated to a Premium Account, or a Collector's Account, and can therefore only be downloaded 10 times.

This limit is reached.

To download this file, the uploader either needs to transfer this file into his/her Collector's Account, or upload the file again. The file can later be moved to a Collector's Account. The uploader just needs to click the delete link of the file to get further information.
Logged

kwonsk
Newbie
*

Karma: 0
Posts: 11


View Profile
« Reply #8 on: May 03, 2009, 09:39:57 PM »

I see, they have limited access time.
Please let me know your email address, I'll send it to you.
thansk
Logged

Raśl Porcel
Global Moderator
Jr. Member
*****

Karma: 0
Posts: 68


View Profile
« Reply #9 on: May 03, 2009, 10:27:13 PM »

God, everytime rapidshare gets more picky Tongue

I've uploaded it here: http://dev.gentoo.org/~armin76/arm/sheevaplug/sd.tgz
Logged

philipl
Newbie
*

Karma: 0
Posts: 22


View Profile
« Reply #10 on: May 04, 2009, 08:27:43 AM »

Are there instructions on how to build u-boot for the sheevaplug? I've got kwonsk's patch here but I don't know which u-boot target config to use.

Thanks!
Logged

Rabeeh Khoury
Administrator
Full Member
*****

Karma: 5
Posts: 218


View Profile
« Reply #11 on: May 04, 2009, 09:32:06 AM »

Bytheway does anybody succes posting with file attachment? I could'nt upload sources for your tries.
If  you wants source files then let me know your e-mail, then I'll send it via e-mail.
Nope, that did not work for me either.
But you can upload it on RapidShare or something like that.

Attachment fixed.
5MB max file size per attachment.

Logged

philipl
Newbie
*

Karma: 0
Posts: 22


View Profile
« Reply #12 on: May 04, 2009, 07:00:56 PM »

I really can't find any instructions or guides for building a working u-boot - not even the Marvell packages have docs. Here's where I am:

1) Get SheevaPlug_U-Boot.zip
2) Realise after many false starts, that the contents of u-boot-3.4.16.zip must be copied on top of the contents of u-boot-1.1.4.tar.bz2
3) Untar sd.tgz on top of that.
4) Get a cross-compiler. I'm using the Marvell one.
5) Edit Makefile to add -DMV_MMC to 'rd88f6281Sheevaplug_config'
6) make rd88f6281Sheevaplug_config
7) make
Cool Build fails in board/mv_feroceon/mv_kw/mv_cmd.c because CFG_FLASH_BASE is undefined.

There are multiple ways, some going through multiple #defines of getting CFG_FLASH_BASE but the sheeva config appears not to trigger any of them and I can't see which one should be used.

Any help would be much appreciated!
Logged

philipl
Newbie
*

Karma: 0
Posts: 22


View Profile
« Reply #13 on: May 04, 2009, 09:56:11 PM »

I really can't find any instructions or guides for building a working u-boot - not even the Marvell packages have docs. Here's where I am:

1) Get SheevaPlug_U-Boot.zip
2) Realise after many false starts, that the contents of u-boot-3.4.16.zip must be copied on top of the contents of u-boot-1.1.4.tar.bz2
3) Untar sd.tgz on top of that.
4) Get a cross-compiler. I'm using the Marvell one.
5) Edit Makefile to add -DMV_MMC to 'rd88f6281Sheevaplug_config'
6) make rd88f6281Sheevaplug_config
7) make
Cool Build fails in board/mv_feroceon/mv_kw/mv_cmd.c because CFG_FLASH_BASE is undefined.

There are multiple ways, some going through multiple #defines of getting CFG_FLASH_BASE but the sheeva config appears not to trigger any of them and I can't see which one should be used.

Any help would be much appreciated!


Ok, I did more digging and identified two things which seemed reasonable, and allowed me to fully build a u-boot binary.

Those steps:

A) Pass NBOOT=1 at config time. ie: "make rd88f6281Sheevaplug_config NBOOT=1"
B) In include/configs/mv_hw.h, force CONFIG_MMC and CFG_MMC_BASE to be defined.
     I had to manually delete board/mv_feroceon/USP/sdio/mmc.o after this change to make it take effect.

My plug hasn't arrived yet (hopefully by the end of the week), so I can't try it out yet, but I'll report back once I do, and if it's successful, I'll add this to the wiki.
Logged

kwonsk
Newbie
*

Karma: 0
Posts: 11


View Profile
« Reply #14 on: May 05, 2009, 12:23:56 AM »

I've read build instruction from mavell documents set. Basically philipl's instruction is correct.
1) tar jxvf u-boot-1.1.4.tar.bz2
2) mv u-boot-1.1.4 u-boot-3.4.16
3) unzip u-boot-3.4.16 (this will overwriting existing files)
4) cd u-boot-3.4.16
5) tar zxvf sd.tgz
6) Copy attatched mv_kw.h to include/configs/mv_hw.h
7) make rd88f6281Sheevaplug_config NBOOT=1
Cool make clean; make
And then you will get u-boot-rd88f6281Sheevaplug_400db_nand.bin
9) copy u-boot-rd88f6281Sheevaplug_400db_nand.bin to /tftpboot/u-boot.bin
(Assume that you setup tftp server)

In the sheevaplug u-boot prompt, 'bubt' command will update u-boot.bin image on the nand flash.
10) reset sheeva plug
And enjoy youself. I also attached prebuilt u-boot.bin image.

* mv_kw.h (21.82 KB - downloaded 1228 times.)
* u-boot.bin (459.96 KB - downloaded 2015 times.)
Logged

Pages: [1] 2 3 4
Print
Jump to: