|Re: [hatari-devel] Running Linux in Hatari?|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
On 3/16/19 4:12 AM, Thorsten Otto wrote:
On Samstag, 16. März 2019 01:29:00 CET Eero Tamminen wrote:
What exactly the --lilo option does?
Essentially, it is a bootloader for the linux kernel built into aranym. The
parameters are taken from the config file:
Kernel = system/vmlinux
Args = root=/dev/hda1 video=atafb:vga16 stram_swap=0 debug=par
LoadToFastRam = No
is there some specific API that should be implemented?
Yes, the kernel expects certain things to be passed via a bootinfo structure.
It is implemented in https://github.com/aranym/aranym/blob/master/src/
Thanks. I've adapted the code for Hatari (needed some defines from
kernel headers), but it doesn't work fully yet.
Nicolas and others, is it OK if I push that code to Hatari repository?
It adds [LILO] section to config file, and --lilo <bool> command line.
For now I've put lilo.c into falcon/ subdirectory, as Linux needs 030+
CPU (and lilo.c errors otherwise), but I'm not sure is that the best
PS. It seems that nobody has compiled Aranym LILO code with DEBUG
enabled for few years as it gives a mass of compiler warnings.
I think I've also noticed some bugs in the code:
* neither kernel nor ramdisk loading checks properly whether
there's enough memory for them, e.g. if no FastRAM is
specified -> segfaults
- there could be some validation for elf header values too
* config file command line len isn't checked before copying it
to bootinfo struct, not it's taken into account before
concatenating stuff to it -> bootinfo corruption