Differences
This shows you the differences between the selected revision and the current version of the page.
howto:loader_o 2007/12/13 21:43 | howto:loader_o 2017/09/06 17:34 current | ||
---|---|---|---|
Line 13: | Line 13: | ||
===== Use pre-compiled loader.o ===== | ===== Use pre-compiled loader.o ===== | ||
- | If you think that compiling loader.o by yourself is too much hassle then you can use a [[http://download.dsmg600.info/people/sala/loader.o|pre-compiled loader.o]] | + | If you think that compiling loader.o by yourself is too much hassle then you can use a [[http://dns323.kood.org/downloads/people/sala/loader.o|pre-compiled loader.o]] |
===== Preparing proper kernel image for loading ===== | ===== Preparing proper kernel image for loading ===== | ||
For kernel building instructions look [[howto:kernel_build|kernel building wiki page]]. | For kernel building instructions look [[howto:kernel_build|kernel building wiki page]]. | ||
- | Before you start compiling kernel you should apply this patch, which is going to fix [[http://forum.dsmg600.info/t850-building-kernel-loadero.html|memory detection problem]]. | + | Before you start compiling kernel you should apply this patch, which is going to fix [[http://dns323.kood.org/forum/t850-building-kernel-loadero.html|memory detection problem]]. |
<code patch> | <code patch> | ||
--- arch/ppc/platforms/sandpoint_setup.c.orig 2007-08-09 18:02:58.000000000 -0400 | --- arch/ppc/platforms/sandpoint_setup.c.orig 2007-08-09 18:02:58.000000000 -0400 | ||
Line 33: | Line 33: | ||
static void __init | static void __init | ||
+ | </code> | ||
+ | If you would like to use custom cmdline parameter for your kernel, for example "root=/dev/sda3" then you will also need this patch: | ||
+ | - Search for "#endif /* CONFIG_BLK_DEV_INITRD */" in arch/ppc/platform/sandpoint_setup.c | ||
+ | - Add following lines after "#endif /* CONFIG_BLK_DEV_INITRD */" line: | ||
+ | <code> if ( r6 ) | ||
+ | { | ||
+ | *(char *)(r7+KERNELBASE) = 0; | ||
+ | strcpy(cmd_line, (char *)(r6+KERNELBASE)); | ||
+ | } | ||
</code> | </code> | ||
After you have successfully built a kernel image you should note that the loader need the kernel to be in binary format. It can be done with powerpc-linux-objcopy command. | After you have successfully built a kernel image you should note that the loader need the kernel to be in binary format. It can be done with powerpc-linux-objcopy command. | ||
Line 39: | Line 48: | ||
===== Using loader.o to load a kernel image ===== | ===== Using loader.o to load a kernel image ===== | ||
<code>sync;insmod /mnt/HD_a2/loader.o kernel=/mnt/HD_a2/vmlinux</code> | <code>sync;insmod /mnt/HD_a2/loader.o kernel=/mnt/HD_a2/vmlinux</code> | ||
+ | or | ||
+ | <code>sync;insmod /mnt/HD_a2/loader.o kernel=/mnt/HD_a2/vmlinux cmdline="root=/dev/sda3"</code> | ||
+ | |||
+ | ===== Use pre-compiled vmlinux ===== | ||
+ | Pre-compiled vmlinux is available at [[http://dns323.kood.org/downloads/people/sala/vmlinux|here]]. | ||
+ | It does support custom cmdline parameter. I does have usb and usb storage modules built in, <del>so it is possible to load operating system from usb stick</del>. This kernel image is optimized to boot [[:howto:chroot_gentoo|Gentoo linux]]. .config is available at [[http://dns323.kood.org/downloads/people/sala/loader.config|here]].\\ | ||
+ | <del>To load from usb stick:</del> | ||
+ | <code>sync;insmod /mnt/HD_a2/loader.o kernel=/mnt/HD_a2/vmlinux cmdline="root=/dev/sdb1"</code> |