[Etherboot-developers] Boot LynxOS with etherboot
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: Armin S. <ac...@sy...> - 2001-10-22 08:41:21
|
Hi all,
with the following patch it is possible to boot
a LynxOS KDI image with etherboot. The patch is
against 5.0.4, maybe you like to implement this feature.
In case of response, please CC me, I'm not on the list.
Regards,
Armin Schindler <ac...@sy...>
Sysgo RTS GmbH
Am Pfaffenstein 14
D-55270 Klein-Winternheim / Germany
phone: +49 6136 9948-0
fax : +49 6136 9948-10
--------------------------------------
diff -ur etherboot-5.0.4_orig/src/Config etherboot-5.0.4/src/Config
--- etherboot-5.0.4_orig/src/Config Thu Sep 13 06:25:11 2001
+++ etherboot-5.0.4/src/Config Thu Sep 20 15:28:00 2001
@@ -239,8 +239,9 @@
# Enable tagged image, generic ELF, Multiboot ELF
# or FreeBSD ELF/a.out boot image support
-CFLAGS32+= -DTAGGED_IMAGE -DELF_IMAGE
-# CFLAGS32+= -DAOUT_IMAGE -DIMAGE_MULTIBOOT -DIMAGE_FREEBSD
+#CFLAGS32+= -DTAGGED_IMAGE -DELF_IMAGE
+#CFLAGS32+= -DAOUT_IMAGE -DIMAGE_MULTIBOOT -DIMAGE_FREEBSD
+CFLAGS32+= -DAOUT_IMAGE -DAOUT_LYNX_KDI
# Change download protocol to NFS, default is TFTP
# CFLAGS32+= -DDOWNLOAD_PROTO_NFS
Only in etherboot-5.0.4/src: Config~
diff -ur etherboot-5.0.4_orig/src/osloader.c etherboot-5.0.4/src/osloader.c
--- etherboot-5.0.4_orig/src/osloader.c Thu Aug 2 01:42:57 2001
+++ etherboot-5.0.4/src/osloader.c Thu Sep 20 16:00:37 2001
@@ -405,10 +405,25 @@
longjmp(restart_etherboot, -2);
}
#endif
+#ifdef AOUT_LYNX_KDI
+ (*entry)();
+#endif
printf("unexpected a.out variant\n");
longjmp(restart_etherboot, -2);
}
offset = 0;
+
+#ifdef AOUT_LYNX_KDI
+ segment++;
+ if (segment == 0) {
+ curaddr = 0x100000;
+ info.head.a_entry = curaddr + 0x20;
+ }
+ memcpy((void *)curaddr, data, len);
+ curaddr += len;
+ return 1;
+#endif
+
do {
if (segment != -1) {
if (skip) {
|