booting RISC OS from linux with kexec
Jan Rinze (235) 368 posts |
Hi all, I have made some progress with booting RISC OS from Linux using kexec. Why you may ask is quite simple. I really would love a splash screen on my beagleboard that asks me if I want to boot Linux or RISC OS. Also it can cater for a Linux based GCCSDK environment on the Linux partition. Disks formatted with !SCSIformat essentially do have an acorn format partition. If the disk is formatted with a partition size smaller than the full disk there will be space left for a Linux OS. For example I have a 500GB disk which has 20GB acorn scsi filecore. Using !SCSIform i formatted the disk but only for the 20GB. Under linux using acorn-fdisk i created the extra partitions for Linux. RISC OS does not see them but Linux can if the kernel is compiled with adfs and acorn partitions enabled. So the next step will be a nice splash screen and a choice for RISC OS or Linux. Not sure if people are interested but i really like this kind of dual-boot things :-) Jan Rinze. |
Thomas v.E. (39) 49 posts |
I would be very interested in this. I’m want to turn the IGEP in my main computer, but due to RISC OS video/web browser capabilities a dual boot linux system would be handy! |
W P Blatchley (147) 247 posts |
Likewise, I’ll be wanting to do this in the future, too. Interesting work, Jan. |
Jan Rinze (235) 368 posts |
To be able to boot a RISC OS ROM from Linux you will need the latest kexec-tools from its git repository. git://git.kernel.org/pub/scm/linux/kernel/git/horms/kexec-tools.git This has support for loading uBoot format uImage binaries. Also the RISC OS ROM needs to be converted to this same uBoot uImage format using the mkimage tool: mkimage -A arm -O linux -T kernel -C none -a 0×81000000 -e 0×81000000 -n “RISC OS” -d <the rom> uImage.bin I have done a quick’n dirty port of mkimage to RISC OS but i think people will be better off with the Linux version. The kernel running on the beagleboard needs to have kexec support enabled. So that potentially means recompiling the kernel yourself. Booting the ROM from Linux:
The sync and mount is here because you don’t want to mess up your disc. After the kexec -e RISC OS will be booted immediately so no shutdown procedure will happen. |
Jeffrey Lee (213) 6048 posts |
A slight revision to the above – a while ago I added an entry point at offset 0×64 for use when you’re booting the ROM as if it were a linux kernel. Linux kernels get passed a machine type ID in R2, so the 0×64 entry point uses that machine ID to select the right board config. So if you use ”-e 0×81000064” then things should be a bit better for people who aren’t using beagleboards :)
Likewise. My port seems to work OK, but I need to double-check my ‘fake’ mmap() implementation behaves properly before I can safely release it. Keep up the good work! |
Jan Rinze (235) 368 posts |
LOL! i did the same thing with the mmap :-) mine works pretty well. Funny how solutions are so similar. |
Stephen Crocker (328) 8 posts |
This sounds potentially quite handy for the Touchbook as well. It has the added bonus of a busybox shell as one of the boot options, which would save boot time. If kexec can capture the debugging output, it could make up for the lack of a serial port as well. |
Trevor Johnson (329) 1645 posts |
Regarding |
Stephen Leary (372) 272 posts |
I also could’nt get this to work. I tried the 0×08 and 0×64 locations from linux on my IGEPv2. The machine hangs and no output is seen on the serial console. |
Stephen Crocker (328) 8 posts |
The patched U-Boot for USB console support mentioned in that post sounds potentially interesting, assuming that it supports the Touchbook’s USB controller. |
Trevor Johnson (329) 1645 posts |
I suppose the But, on a possibly related note, I found this information on Freeze – does anyone have any experience using this? |
Jan Rinze (235) 368 posts |
booting a uImage.bin with kexec seems to hang after the message ‘OMAPvideo: dss_reset’. So it seems that the current ROMs are not entirely compatible with kexec. Since kexec can be quite useful for booting from Linux, specially on devices that don’t have the same bootloader as the beagleboard it might be worth to investigate why it hangs there. |