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

Karma: 0
Posts: 36


View Profile
« Reply #30 on: May 18, 2009, 12:46:32 PM »


I am trying to follow Benit0 instruction after downloading and applying the patch to the original tar ball:

make rd88f6281Sheevaplug_config NBOOT=1
Quote
Configuring for mv_kw board...
rm: cannot remove `asm': Is a directory
make[1]: *** [mv_kw] Error 1
make: *** [rd88f6281Sheevaplug_config] Error 2


If somehow I got to the point of make (I don't remember how but I was able to precede to the following)
export PATH=/path/to/marvel/gcc/bin:$PATH
make clean
make -s

and then I got this
Quote
make[1]: *** No rule to make target `/usr/include/bits/predefs.h', needed by `img2srec.o'.  Stop.
make: *** [tools] Error 2
I don't know where I should go now. [ I've tried kwonsk's instruction but I always got the MV_BOOTSIZE undefined error. ] I need to compile my u-boot.bin because I wanted to change the bootdelay from 3 (or 5 or whatever) to 0 seconds, besides getting the booting from SD card support --- the binary from kwonsk works great btw.
Logged

user_plug
Newbie
*

Karma: 0
Posts: 1


View Profile
« Reply #31 on: May 25, 2009, 12:35:18 AM »

I got  same message: 

#error "MV_BOOTSIZE undefined" on "make -s".

The problem was in Ubuntu shell, it was "dash":

#ls -l /bin/sh
#lrwxrwxrwx 1 root root 4 2007-02-26 17:07 /bin/sh -> dash

After changing to:

#ln -sf /bin/bash /bin/sh"

the problem was solved.


« Last Edit: May 25, 2009, 12:47:51 AM by user_plug » Logged

rc3
Newbie
*

Karma: 0
Posts: 36


View Profile
« Reply #32 on: June 23, 2009, 09:36:33 PM »

@user_plug
Thanks for the info, will try again.
Logged

rc3
Newbie
*

Karma: 0
Posts: 36


View Profile
« Reply #33 on: July 07, 2009, 11:18:56 AM »

Thanks user_plug, it works great!
Logged

CqCn
Full Member
***

Karma: 0
Posts: 169



View Profile
« Reply #34 on: August 06, 2009, 10:37:04 PM »

...
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.
Gothnet,  I am not familiar with the MMCmobile format.  Are the functionally compatible with SDCard (other than the half length) ?  I have currently my ShPlug running off an external SDCard plugged into the side slot.  If I use the MMCmobile, do I need a different sw driver, or it will work with my SDCard image?
Logged

Cordially, CqCn

mossroy
Newbie
*

Karma: 0
Posts: 30


View Profile
« Reply #35 on: August 09, 2009, 06:27:40 AM »

Hi all, I'm using the uboot version bundled with the Sheevaplug installer alpha 6.
It can boot on a ext2 SD card, but not on a ext3 SD card (it gives a "bad magic number" in this case)

Is ext3 supported by u-boot? Will it be in the future, or did I miss a step to make it work?

This is how I format my SD card in ext2 :
mkfs -t ext2 -I 128 /dev/mmcblk0p1

If I format it in ext3 :
mkfs -t ext3 -I 128 /dev/mmcblk0p1
U-boot won't boot on the SD card (bad magic number)
Logged

restamp
Global Moderator
Sr. Member
*****

Karma: 4
Posts: 273


View Profile
« Reply #36 on: August 09, 2009, 08:51:25 AM »

I can confirm that, with the Uboot from the alpha-6 installer,  I have/am successfully booted/booting my Plug from an ext2 FS on my SDcard that has 256 byte inodes (the default), so "-I 128" is not strictly necessary.  I've not tried from an ext3 partition, so thanks for the heads-up.

As stated in an earlier post, I have observed several problems with this Uboot:

(1) I can find no way of making it work with a filesystem on other than the first partition of the card, and

(2) It appears unable to read some small subset of files and directories on the filesystem, perhaps 10%.  Thus, if your boot doesn't work, do an "ext2ls mmc 0 /uImage" (or whatever your filename is called), and if this shows up as a zero length file, try copying it into another file and using that to boot from instead.  (If it works, it appears to consistently work.)

Good luck.
Logged

westyd1982
Newbie
*

Karma: 1
Posts: 29


View Profile
« Reply #37 on: August 20, 2009, 11:20:46 PM »

I loaded the SD enabled uboot, but when my plug boots off the SD card (Transcend 16GB) I get this error:

SDHC found. Card desciption is:
Manufacturer:       0x1e, OEM "AB"
Product name:       "SDC  ", revision 1.0
Serial number:      2098129
Manufacturing date: 7/2009
CRC:                0x00, b0 = 0

** Unable to read "/boot/uInitrd" from mmc 0:1 **

** Unable to read "/boot/uImage" from mmc 0:1 **
## Booting image at 00400000 ...
Bad Magic Number

I have a 4GB SanDisk Ultra II that works fine and gives the following message as it starts to boot:

SDHC found. Card desciption is:
Manufacturer:       0x03, OEM "SD"
Product name:       "SD04G", revision 8.0
Serial number:      1614153242
Manufacturing date: 9/2008
CRC:                0x00, b0 = 0

Both cards have Debian loaded exactly the same on the card.  What do I need to do to get my 16GB card to work?

Logged

fragfutter
Sr. Member
****

Karma: 12
Posts: 280


View Profile
« Reply #38 on: August 20, 2009, 11:39:16 PM »

not sure how good the sd-code in u-boot is. You could try to create a small boot partition on the sd-card and see if it can load a kernel and initr from there.

You are sure that the partitioning of the big card correct (kernel and initrd in the first primary partition, formated ext2 or ext3), right?
Logged

mossroy
Newbie
*

Karma: 0
Posts: 30


View Profile
« Reply #39 on: August 21, 2009, 12:21:10 AM »

westyd1982, I had exactly the same error when formatting my 8Gb SDHC card in ext3.
Once I formatted it in ext2, the error disappeared.
Logged

Gothnet
Newbie
*

Karma: 0
Posts: 33


View Profile
« Reply #40 on: August 21, 2009, 06:12:27 AM »

...
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.
Gothnet,  I am not familiar with the MMCmobile format.  Are the functionally compatible with SDCard (other than the half length) ?  I have currently my ShPlug running off an external SDCard plugged into the side slot.  If I use the MMCmobile, do I need a different sw driver, or it will work with my SDCard image?


Hey, sorry it took so long to reply, I haven't checked here (or used my plug) in a while. The problem with the MMC Mobile card was that the custom u-boot from kwonsk couldn't see it properly, like some of the other cards I have lying around. Once booted into an OS you could use it fine.

I think the drivers are the same and they are functionally compatible with SD, most devices that can use SD can use MMC, and MMCMobile is just half length MMC. My card even came with an extender to make it full length if needed.
Logged

CqCn
Full Member
***

Karma: 0
Posts: 169



View Profile
« Reply #41 on: August 21, 2009, 06:23:06 AM »

Hey, sorry it took so long to reply, I haven't checked here (or used my plug) in a while. The problem with the MMC Mobile card was that the custom u-boot from kwonsk couldn't see it properly, like some of the other cards I have lying around. Once booted into an OS you could use it fine.
Not clear what you mean here.  If booted from another place, can you then plug in your mmcmobile card and use it as a storage?  Are you saying that you have not found a way to boot from it?

Do you have some urls to the brand/model of such a card, please?  I do not think I have ever seen this form factor card...  Thanks.
« Last Edit: August 21, 2009, 05:46:59 PM by CqCn » Logged

Cordially, CqCn

westyd1982
Newbie
*

Karma: 1
Posts: 29


View Profile
« Reply #42 on: August 21, 2009, 11:24:54 AM »

not sure how good the sd-code in u-boot is. You could try to create a small boot partition on the sd-card and see if it can load a kernel and initr from there.

You are sure that the partitioning of the big card correct (kernel and initrd in the first primary partition, formated ext2 or ext3), right?

I have the first partition formatted as ext2 (~15gb) and the second as swap (~1gb).
Logged

fragfutter
Sr. Member
****

Karma: 12
Posts: 280


View Profile
« Reply #43 on: August 21, 2009, 01:32:02 PM »

try to make a small first primary partition for boot. Like 500MB as ext2. The rest with the root filesystem can be ext3 or ext4.
Having swap on a SD Card is not the best idea (even with builtin wear leveling)
Logged

westyd1982
Newbie
*

Karma: 1
Posts: 29


View Profile
« Reply #44 on: August 21, 2009, 11:01:47 PM »

try to make a small first primary partition for boot. Like 500MB as ext2. The rest with the root filesystem can be ext3 or ext4.
Having swap on a SD Card is not the best idea (even with builtin wear leveling)

Thanks.  I'll give it a try.  I'm not sure what to do about the swap partition on a flash device, except to minimize the swappiness.  Also what is the best filesystem?  I read some sites that suggest the ext2 has less disk access.
Logged

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