raspberrypi / firmware

This repository contains pre-compiled binaries of the current Raspberry Pi kernel and modules, userspace libraries, and bootloader/GPU firmware.
5.18k stars 1.68k forks source link

MMC boot compatibility #187

Closed thexeno closed 10 years ago

thexeno commented 11 years ago

Hi! I'm trying to use a dual voltage mmc of 2GB, labeled Kingston., to burn a raspbian image on it. But i discovered that i can't, in the sense that everytime the ACT led is saying that the .elf file is not found (it flashes 3 times). But i know that, at least months ago, the mmc has been used.

There's any compatibility issue with this memory? it can be downgraded the boot part to be compatible again?

ghollingworth commented 11 years ago

Don't believe that we've changed anything, are you sure all the standard files are correctly in the first partition, i.e. start.elf fixup.dat config.txt and cmdline.txt

Thanks

Gordon

Director of Engineering, Raspberry Pi (Trading) Limited T: +44 (0) 1223 322633 M: +44 (0) 7450 946289 E: gordon@raspberrypi.org W: www.raspberrypi.org

thexeno commented 11 years ago

well, I use Win32DiskImager but before, under a Linux distro, I use Gparted to reerase all partitions and create one big and free fat32 partition. Then under windows the utility write everything, and under a windows OS I can see only (in a 2GB memory) a 55Mb partition with all of those .txt files. I don't know if this is the right way, but with an SD it works. That's all I know :) And if I want to reuse the MMC, I should use a gparted or dd again, or other specific programs under windows, because I can see and format only the 55Mb partition. Other point is the dimension: the img file is 1,80GiB and memory 2(I mean, 1.93) GiB. Can be a problem? Should I use a smaller image? On an SD this is not a problem.

It's a pretty standard DUAL-VOLTAGE MMC, with this code mmcm 05346 005 a00lf

I think that it's an errore due to the "new" boot system, implemented after Oct 2012 when loader.bin files are not included. I think that this kind of memory is looking for that file (which still corresponds to 3 flashes too).

Can I implemente the old boot system on latest Raspbian?

popcornmix commented 11 years ago

If you copy bootcode.bin and loader.bin from an old "Oct 2012" image, does the latest rasbian boot (or at least get further). I'm not aware of any change that would stop mmc cards working (or heard any similar reports).

thexeno commented 11 years ago

Can I find the old image somewhere, maybe here? I tried to search something quite old, failing.

popcornmix commented 11 years ago

It's all in github. E.g.: https://github.com/Hexxeh/rpi-firmware/commits/master/bootcode.bin

bademux commented 11 years ago

OK, got it 3 flashes: loader.bin not found - commit/f973a2cab2c5d7b86f64e725c95aefa3226ae401 (Oct 16, 2012) 5 flashes: start.elf not found - commit/17ff0bb5bb46210bad235d32589d35f951f269cf (Oct 10, 2012) tested with rpi2011.12 + Kingston MMC

phire commented 11 years ago

Yeah, I've been getting the same issues.

I do my videocore testing on old (16-64mb) MMC cards because I only need a few kilobytes and it seams SD cards aren't designed to go through many insert/remove cycles; I've already destroyed two SD cards during the early reversing of the videocore instruction set. MMC cards are much simpler, with no thin protruding plastic bits to break off.

This works fine when I'm replacing bootcode.bin, bootrom manages to load it off the MMC card just fine, but if I want to experiment with replacing start.elf or custom bare metal code to run on the ARM then I run into this issue.

From memory, bootrom and bootcode.bin use the same (ALTMMC) interface for reading the sdcard slot, and the code looks like it's closely related, but there must be some difference in how they are controlling the MMC card. I might take another look at this code.

3 flashes and 5 flashes are basically the same error: bootcode.bin can't read the next file in the boot chain off the mmc card.

ghollingworth commented 11 years ago

Unfortunately I cannot reproduce this problem on my desk, what I need is a Pi + MMC card that reproduces the issue...

Please email me gordon at raspberrypi dot org to set it up... Always return Pi's / SDCards with extra stuff to say thanks!

Gordon

thexeno commented 11 years ago

There's somthing new up with MMC "legacy" support?

popcornmix commented 10 years ago

Is this still an issue?

thexeno commented 10 years ago

Yes, but could be an incompatibility of the MMC, since the procedure is the same of SDs (which are working well). On the forum of Rasp has been asked to me to send the memory, but I don't think this is worth shipping: I was find a reasons to that card of being useful but now I use this as a storage. Moreover in Rasp, often, 2Gb (like the mmc) are not so much.

As a conclusion: from the conceptual point of view is still a problem.

popcornmix commented 10 years ago

@thexeno Can you either send card to @ghollingworth or close the issue?

NedScott commented 10 years ago

Just came across this since I had found an old 16MB (yes, MB) MMC card laying around and wanted to try using it to boot the Pi and then use a USB drive (half of it was plastic, so I was able to cut it to make it low profile). Possibly the same issue, and I'd be more than happy to send the card to anyone who wants to tinker with it, if there still is anyone. I personally don't mind much, and heck, you could even keep the card if you want, but I thought I would offer since it will just otherwise sit in a box for the rest of time. Cheers.

thexeno commented 10 years ago

Very nice! You can send it if you don't use tha card. Maybe someone can work on it, like @popcornmix said. Send it to @ghollingworth I didn't sent my card cause I use it for other purposes.

snajpa commented 8 years ago

Is it still possible to add MMC support to the boot firmware? I would gladly send a dozen of MMCs to anyone willing to implement it.

The reason why I wish for MMC support is that I'm looking for a solution, how to boot without any real card, just a microcontroller acting as one (data will be on the network) - because I would like to abstract myself from having to solve flash wear out problem completely, I don't want to have any unreliable flash in the build cluster. (We're putting together a build farm for Fedora).

The SD protocol is a] constrained by legal BS on the card side (not a free standard), b] too complicated to be implemented on a relatively dumb and slow MCU, so that's why I'd opt for MMC, if there was the option.

popcornmix commented 8 years ago

The bootrom is what initially reads the sd or mmc card and tries to load bootcode.bin. This does support at least some MMC cards. If you get as far as LEDs flashing, then things are good. If you don't then it's probably not possible to support (the bootrom is not modifiable).

Assuming you get as far as flashing LEDs, but the Pi fails to fully boot, then it may be possible to fix in software. Getting an MMC card to @ghollingworth would be the first step.

snajpa commented 8 years ago

Thanks, @popcornmix, that sounds good. So I'll go ahead with implementing just MMC.

NedScott commented 8 years ago

If anyone is still interested in working on this, I still have a MMC card that I am willing to mail off to anywhere. You can even keep the card :)

FalconFour commented 7 years ago

I'd like to stop by here as well and offer my small pile of incompatible RS-MMC and MMCMobile cards to this cause. I have a project whose whole OS (based on Tiny Core Linux) and application all fit within the confines of a 128MB card, and there are plentiful listings of RS-MMC and MMCMobile cards on eBay that fit nicely into the Adafruit PiTFT enclosure without protruding (as full SD cards do). Thus, the RS-MMC form factor is an extremely useful bonus.

I'd been using MicroSD "shortening" adapters, but they're usually designed for MacBooks and they either protrude slightly (and are poorly manufactured, leaving intermittent connection issues), or have a SMD MicroSD carrier on top that requires enclosure modding to fit. But whenever I use a MicroSD card in an adapter, it always, always, always works.

With the RS-MMC/MMCMobile game, it's been a nightmare - 4 misses and 2 "hits" - as to what cards can be made to boot properly. (All of these are given the same set of files to boot with, using Tiny Core Linux 6.1 on a single FAT32 partition - tried both as FAT16 and FAT32) 1) AData "MyFlash" 128MB RS-MMC cards, 13-pin (I bought 4 of these before knowing of a compatibility problem) - these give 7 blinks at best, with lots of debugging here --> https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=134285 2) ATP 512mb RS-MMC, 7-pin - 4 blinks. 3) Lexar 512mb MMCMobile, 13-pin - Boots to display, but gives a panic saying "unable to mount root fs on unknown-block(1,0)". It appears that, while it loaded the kernel image, it didn't also load the ramdisk image before handing it off to boot. Couldn't get this one working. 4) Sandisk 128MB RS-MMC, 7-pin - 4 blinks. 5) Kingston 1GB MMCMobile, 13-pin - works flawlessly. In fact, this was the first RS-MMC card I owned, and I later bought the others thinking that the RS-MMC form factor was more or less standard... 6) Kingston 512MB RS-MMC, 7-pin - works flawlessly (though noticeably slower to boot). Interesting that this is the first 7-pin card I've seen that boots. When I bought it, the display image was that of the 13-pin version - but it thankfully turned out to boot properly anyway.

So, who wants me to ship them cards 1 through 4? I have about 4 clones of the Adata 128mb card to send around as well, for what it's worth.

Also would love to know of any utilities that can help decode the capabilities of the card (per Wikipedia, https://en.wikipedia.org/wiki/MultiMediaCard#Table ) as to help explain why the boot loader is so picky about the cards it'll work with...