Also just an issue of note... I thought the button nearest the MMC card
should do a re-set, sometimes it does actually reset and pressing it
numerous times causes the MLO to be re-loaded each time, at other times
the power has to be removed.
The issue is consistently with the MMC producing lovely cryptic error
messages such as:-
> U-Boot SPL 2011.12 (Jan 10 2012 - 16:19:41)
> Texas Instruments OMAP4430 ES2.1
> OMAP SD/MMC: 0
> mmc_send_cmd: timedout waiting for cmddis!
> ** Can't read from device 0 **
> spl: fat register err - -1
> ### ERROR ### Please RESET the board ###
Seemingly no matter what I do, which MLO or u-boot version is used
somewhere along the line it all goes wonky and the mmc starts to issue
errors!
What I have managed to do is create a working SDHC by using a MLO that
works from:-
http://rsalveti.wordpress.com/2011/07/11/net-booting-with-tftp-and-pxe-with-pandaboard/
To do this I first issued:-
sudo dd if=/dev/zero of=/dev/sdb bs=100M count=1; sync
Then used gparted to create a fat table, then a 70MiB fat32-lba-boot
partition.
Ejected the card and re-inserted it.
Copied the above MLO, ejected the card and booted the pandaboard with it
giving the following output:-
> Texas Instruments X-Loader 1.5.0 (Jun 28 2011 - 01:39:31)
> Reading boot sector
> u-boot.bin not found or blank nand contents - attempting serial
> boot . . .
> ## Ready for binary (kermit) download to 0x80E80000 at 115200 bps...
Re-inserted the card to the PC, and downloaded the above u-boot to it,
ejected the card and booted the pandaboard.
> Texas Instruments X-Loader 1.5.0 (Jun 28 2011 - 01:39:31)
> Reading boot sector
> Loading u-boot.bin from mmc
>
>
> U-Boot 2011.06-dirty (Jul 11 2011 - 01:31:39)
>
> CPU : OMAP4430
> Board: OMAP4 Panda
> I2C: ready
> DRAM: 1 GiB
> MMC: OMAP SD/MMC: 0
> Using default environment
>
> In: serial
> Out: serial
> Err: serial
> Net: No ethernet found.
> Hit any key to stop autoboot: 0
> mmc_send_cmd: timedout waiting for cmddis!
> ** Can't read from device 0 **
>
> ** Unable to use mmc 0:1 for fatload **
> mmc_send_cmd: timedout waiting for cmddis!
> ** Can't read from device 0 **
>
> ** Unable to use mmc 0:1 for fatload **
> mmc_send_cmd: timedout waiting for cmddis!
> ** Can't read from device 0 **
>
> ** Unable to use mmc 0:1 for fatload **
> (Re)start USB...
> USB: Register 1313 NbrPorts 3
> USB EHCI 1.00
> scanning bus for devices... The request port(2) is not configured
> EHCI timed out on TD - token=0x80008c80
> The request port(2) is not configured
> 4 USB Device(s) found
> scanning bus for storage devices... 0 Storage Device(s) found
> scanning bus for ethernet devices... 1 Ethernet Device(s) found
> Waiting for Ethernet connection... done.
> BOOTP broadcast 1
> DHCP client bound to address 192.168.1.68
> Using sms0 device
> TFTP from server 0.0.0.0; our IP address is 192.168.1.68
> Filename 'uImage'.
> Load address: 0x82000000
Not good!
I then got the source from the linaro stable git tree and manually
modified the omap4_common.h file to the following:-
> #define CONFIG_BOOTCOMMAND \
> "if usb start; then " \
> "fatload usb 0:1 0x80000000 uImage; " \
> "fatload usb 0:1 0x81600000 uInitrd; " \
> "setenv bootargs ro elevator=noop console=ttyO2,115200n8 vram=32M mem=456M@0x80000000 mem=512M@0xA0000000 root=UUID=8809ebb3-c026-4d88-8544-0a750672f9fb fixrtc earlyprintk omapdss.def_disp=hdmi omapfb.mode=dvi:1920x1080MR-24@60; " \
> "bootm 0x80000000 0x81600000; " \
> "fi"
with various messages but
I'm sure this is not the best place to do the mod, but I don't know
enough about the development environment and how the structure of the
files and their sequence works... but it does the job and produces :-
> Texas Instruments X-Loader 1.5.0 (Jun 28 2011 - 01:39:31)
> Reading boot sector
> Loading u-boot.bin from mmc
>
>
> U-Boot 2011.12-rc1-dirty (Jan 17 2012 - 18:14:21)
>
> CPU : OMAP4430 ES2.1
> Board: OMAP4 Panda
> I2C: ready
> DRAM: 1 GiB
> WARNING: Caches not enabled
> MMC: OMAP SD/MMC: 0
> Using default environment
>
> In: serial
> Out: serial
> Err: serial
> Net: No ethernet found.
> Hit any key to stop autoboot: 0
> (Re)start USB...
> USB: Register 1313 NbrPorts 3
> USB EHCI 1.00
> scanning bus for devices... The request port(2) is not configured
> The request port(2) is not configured
> 4 USB Device(s) found
> scanning bus for storage devices... 0 Storage Device(s) found
> scanning bus for ethernet devices... 1 Ethernet Device(s) found
>
> ** Invalid boot device **
>
> ** Invalid boot device **
> Wrong Image Format for bootm command
> ERROR: can't get kernel image!
>
So now we are cooking with gas :-D
I have a working SDHC card that boots and when I insert a USB card onto
the pandaboard with the correct file systems it reads, and boots.
Obviously there is something seriously wrong with the MMC code somewhere
as sometimes when I copy say both the MLO and u-boot at the same time it
baulks at the loading of the u-boot, sometimes not... sometimes it can
even manage to load a boot.scr and then the next time it fails and no
matter what I do (power off, reset, re-create the card from scratch, and
so on...) it then decides to error, then for no apparent reason it all
starts to work again.
I have tried various different cards: samsung 8G type 10, sandisk 2 gig
type 2, sandisk 8 gig ultra, sandisk micro sd with a SDHC converter and
all seem to inconsistently hang up, corrupt, or just plain fail to work
then for no reason will work partially or completely ok :-/ :-S
My next stage is to re-build the Ubuntu Precise Pangolin kernel uImage
to remove its MMC drivers as when the kernel boots it then starts to
generate errors on the MMC :-
> mmcblk0: error -84 transferring data, sector 6, nr 2, cmd response 0x900, card status 0x0
> [ 10.876251] end_request: I/O error, dev mmcblk0, sector 6
> [ 10.876708] mmcblk0: error -84 transferring data, sector 7, nr 1, cmd response 0x900, card status 0x0
> [ 10.876708] end_request: I/O error, dev mmcblk0, sector 7
> [ 10.877380] mmcblk0: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card status 0xb00
> [ 10.877410] mmcblk0: retrying using single block read
> [ 10.877868] mmcblk0: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card status 0x0
> [ 10.877868] end_request: I/O error, dev mmcblk0, sector 0
> [ 10.878326] mmcblk0: error -84 transferring data, sector 1, nr 7, cmd response 0x900, card status 0x0
> [ 10.878326] end_request: I/O error, dev mmcblk0, sector 1
>
Sometimes its just a few errors and the boot continues, other times it
gets into an endless error condition.
And now for the ubuntu question.
On the rare occasion I've managed to get a fully bootable MMC, including
the OS it runs a setup utility that asks for user id, time zone, etc and
replaces the initrd.. however when I run it from the USB it doesn't run
this setup and instead boots with a guest only login.
I'm guessing there is something in the uInitrd that for some reason is
not running the first time, possibly because its on the USB not the MMC
or as I suspect, because an error in the MMC has caused it to abort its
initial scripts as I seem to recall the first thing it tries to do is to
resize the "root" partition and if this is hardcoded to be /dev/mcblk0p2
its going to fail and when replacing the original initrd hard coded
to /dev/mcblk0p1 again its going to fail.
My question is, what/how does the uInitrd work? what is run within it
and what sequence does it take?
I have also tried the ubuntu-11.10-preinstalled-desktop-armel-omap4.img
and edited the UUID of the second partition to match that of the edited
uboot ompa4_common.h change... Again it does not seem to run the setup
phase.
Anyways, any help would be much appreciated.
JonXx
Arrr yes I see now! I managed to extract the initrd and found
jasper_growroot and jasper_setup which are as you said hard-coded to
varying degrees to depend on mmcblk0p[123] and the kernel command line
containing anything other than UUID.
>
> If all you want is to run from USB, run the stock image until the
> install steps are completed, then shutdown and use your desktop to
> copy the second partition to your USB device, ensuring that the UUID
> is moved from mmcblk0p2 to the USB drive. Then reboot.
This is the problem, I can't get this far due to cards causing errors
which then corrupt the file systems... or the cards failing to boot with
cmd-dis or unable to read errors.
>
> Alternatively, you can run netinstall to install all the components
> directly to the USB drive. It is available at
> http://ports/ubuntu.com/ubuntu-ports/dists/precise/main/installer-armhf/current/images/omap4/netboot/boot.img-serial
> (or boot.img-fb if you want to use keyboard/monitor).
>
> As to the mmc errors, that could be either the SD cards or possibly
> you have a bad panda. I have 8 panda's here, and a larger selection
> of SD cards, and have not seen that issue yet (I test the preinstalled
> images weekly, and netinstall daily on most of the systems).
Now you've got me thinking, I have one more thing to try, instead of
using my multi-card reader I'm going to try the micro card to usb
converter and then put the micro card into a SDHC converter this would
at least exclude one possible problem as thinking back I was having the
same problems with the beagleboard!
At the time I just assumed that maybe the code wasn't production ready
as there was a lot of work going on in u-boot/MLO/Kernel that was omap
specific, as these devices are/were meant to be quite cutting edge.
>
> Cheers,
>
> Tobin Davis
Thank you for your help
JonXx