H. Peter Anvin
2007-Mar-16 01:40 UTC
[syslinux] SYSLINUX 3.40-pre15 -- more library work, Linux-loading demo module
Hello all, I have done more work on the syslinux shuffle library. This is more higher-level work, in particular it is specific to loading Linux kernels. This stuff allows manipulating initramfs on the fly, if desired. As a demo, I have written up a module which loads a Linux kernel with all the usual stuff, but optionally adds the DHCP packet from the PXE stack into a file named /dhcpinfo.dat in the initramfs. I really hope it is abstracted enough that it should be readily accessible to everyone; the main file is only 235 lines including comments. -hpa
Ferenc Wagner
2007-Apr-03 14:50 UTC
[syslinux] SYSLINUX 3.40-pre15 -- more library work, Linux-loading demo module
"H. Peter Anvin" <hpa at zytor.com> writes:> This stuff allows manipulating initramfs on the fly, if desired. As a > demo, I have written up a module which loads a Linux kernel with all the > usual stuff, but optionally adds the DHCP packet from the PXE stack into > a file named /dhcpinfo.dat in the initramfs.Hi, I'm trying it out in version 3.50-pre2. First of all, the following patch seems necessary: --- linux.c 2007-04-03 16:46:00.566289677 +0200 +++ linux_new.c 2007-04-03 16:45:47.804863682 +0200 @@ -156,6 +156,7 @@ fprintf(stderr, "%s: unknown option: %s\n", progname, arg); return 1; } + argp++; } if (!arg) { Even with this, my dhcpinfo.dat file is nothing but 12 zero bytes. I'm trying to investigate this further, but could use some guidance. -- Thanks, Feri.
Ferenc Wagner
2007-Apr-03 16:53 UTC
[syslinux] SYSLINUX 3.40-pre15 -- more library work, Linux-loading demo module
Hi, as a side note, make in the com32/modules directory doesn't make linux.c32 at least. And you probably know about the pcitest build failure: gcc -m32 -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os -fomit-frame-pointer -I../libutil/include -I../include -D__COM32__ -c -o pcitest.o pcitest.c pcitest.c: In function `display_pci_bus': pcitest.c:54: error: structure has no member named `vendor_name' pcitest.c:54: error: structure has no member named `product_name' pcitest.c: In function `main': pcitest.c:61: warning: unused parameter `argc' pcitest.c:61: warning: unused parameter `argv' make: *** [pcitest.o] Error 1 -- Thanks, Feri.