Beagleboard SD card image
Chris Hall (132) 3554 posts |
A new SD card image is being shipped with current Beagleboards which has different files in the FAT partition of the card. These files are MLO, U-BOOT.bin, uEnv.txt and UIMAGE. The effect of these is to boot up into a Linux GUI. The files are not easily altered to boot into RISC OS (I haven’t found how to do it yet). Clearly the older ‘MLO’ and ‘u-boot.bin’ with ‘boot.scr’ and ‘user.scr’ with the relevant commands to load RISC OS will continue to work for now but are unlikely to be updated if a new board revision needs a tweak to these files. It might therefore be necessary to ‘package’ the RISC OS ROM into a UImage file in the near future (which can be put in place of the new ‘UIMAGE’ file). Is this easy? |
Jeffrey Lee (213) 6048 posts |
It looks like when they added the uenv.txt stuff they changed the behaviour of u-boot so that it won’t look for boot.scr files any more (or at least not look for them by default). So to work around this I just updated SDCreate so that it places both a uenv.txt file and a boot.scr file on the card. At the moment the uenv.txt just contains the following (and is only placed for BB/BB-xM images): uenvcmd=fatload mmc ${mmcdev} ${loadaddr} riscos;go ${loadaddr}
Yes, you just need to feed the mkimage tool the right command line, e.g.: mkimage -A arm -O linux -T kernel -C none -a 0x81000000 -e 0x81000064 -n "RISC OS" -d <infile> <outfile> (Note the use of an entry point at offset 0×64 into the image – this allows the ROM to determine the machine type by looking at the Linux machine ID number that u-boot passes to uImage files) There’s a RISC OS port of mkimage over on riscos.info, so it would be pretty easy to integrate this into the ROM build process. |
Chris Hall (132) 3554 posts |
places both a uenv.txt file and a boot.scr file on the card Is this so that newer images just use the ‘uEnv.txt’ file and older images just use the ‘boot.scr’ file? |
Jeffrey Lee (213) 6048 posts |
Yes. |
Chris Hall (132) 3554 posts |
Presumably on the new image SD cards, we can simply add a file called ‘user.txt’ to allow an alternative boot up [if the USER button is pressed] into the Linux GUI on suitably prepared cards (i.e. with th enecessary file structure in a secondary partition)? I think that is how the revision C5 image [for the non-XM Beagleboard] allows you to reflash the NAND if the user button is held down? |
Jeffrey Lee (213) 6048 posts |
I’m not sure. I don’t think they’ve hardcoded user.txt support into the new version of u-boot, so you’d need an appropriate uenv.txt file to poll the user button and run the alternate script. You can probably work out how to do it by looking at the uenv.txt file that comes with the new Linux image. |
Chris Hall (132) 3554 posts |
Presumably on the new image SD cards, we can simply add a file called ‘user.txt’ to allow an alternative boot up [if the USER button is pressed] into the Linux GUI on suitably prepared cards (i.e. with th enecessary file structure in a secondary partition)? I’m not sure. I don’t think they’ve hardcoded user.txt support into the new version of u-boot, I have taken the new SD card image (for the Beagleboard XM version 4_25 ) which contains the files: mlo 21.7k 19 Apr 2011 u-boot.bin 278.1k 19 Apr 2011 uImage 3.0M 19 Apr 2011 uEnv.txt 134 19 Apr 2011 with 108 Mbytes free. I have added the files ‘boot.scr’, ‘uEnv.txt’ and ‘riscos’ and ‘cmos’ from the usual place [the file ‘boot.scr’ is ignored on newer SD cards but provides a multi-boot capability on older cards] and also added a file ‘user.txt’ which contains the following (all on one line): uenvcmd=mpurate=1000; dvimode="hd720 omapfb.vram=0:8M,1:4M,2:4M"; vram=16M; optargs="consoleblank=0"; console="tty0 console=ttyS2,115200n8" Now my ARMini boots up in riscos except that if the user button is pressed on reset then it boots up into the Linux GUI. One problen is that RISC OS is set up to have a static IP address and the Linux GUI is set up to use DHCP. This means that a power off is required between these states, not just a reset (otherwise the Linux GUI simply hangs during start up). However when using the new SD card format neither RISC OS nor Linux will open my NAS device. Linux can see it but gives an error when trying to open it (dbus error org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)). RISC OS gives an error ‘Cannot find given server’. Both can browse the internet OK and RISC OS can see shared discs OK. Any ideas please? Meanwhile I’m back to the old format of card (using boot.scr and user.scr – i.e. with the older ‘mlo’ and ‘u-boot.bin’). |