Messages in this thread |  | | Subject | Re: Q: Linux rebooting directly into linux. | From | (Eric W. Biederman) | Date | 14 Nov 2000 07:59:18 -0700 |
| |
Erik Andersen <andersen@codepoet.org> writes:
> On Thu Nov 09, 2000 at 01:18:24AM -0700, Eric W. Biederman wrote: > > > > I have recently developed a patch that allows linux to directly boot > > into another linux kernel. > > Looks very cool. I'm curious about your decision to use ELF images. This > makes it much less conveinient to use due to the kernel postprocessing, and > makes it that the kernel binary from which you initially boot is not > necessirily the same as the binary that you re-boot into.
The decision here was that I needed to pass a vector of <physical address, length, data> pairs. The elf program header is dead simple and provides it. So I either had to invent a complicated argument passing mechanism for a syscall or have the kernel parse a file.
> Wouldn't it be more reasonable to simply try to exec whatever file is provided? > If the concern is initrds; they can be simply pasted into the kernel binary.
That's exactly what my preprocessing does.
vmlinux is also an elf binary. As is arch/i386/boot/bvmlinux but it is compressed.
All mkelfImage does is the pasting of initrd's, command lines, and just a touch of argument conversion code.
What I don't do deliberately is allow or need setup.S which does syscalls to run. All it does are BIOS calls, and store them in a nasty data structure. I have replaced that data structure with something that is maintainable.
I would like very much to not need mkelfImage. However that requires further changes to the kernel, and I cannot boot an unpatched kernel with that method.
Eric - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |