Skip to content

Instantly share code, notes, and snippets.

@7shi
Created February 12, 2010 10:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 7shi/302457 to your computer and use it in GitHub Desktop.
Save 7shi/302457 to your computer and use it in GitHub Desktop.
OpenBSDのrdsetrootを無理やり動かす
--- lib/libc/gen/nlist.c.orig Fri Feb 12 03:32:14 2010
+++ lib/libc/gen/nlist.c Fri Feb 12 20:49:07 2010
@@ -274,6 +274,9 @@
int
__elf_is_okay__(Elf_Ehdr *ehdr)
{
+#ifdef NOARCHCHECK
+ return IS_ELF(*ehdr);
+#else
int retval = 0;
/*
* We need to check magic, class size, endianess,
@@ -293,6 +296,7 @@
}
return retval;
+#endif
}
int
--- distrib/loongson/ramdisk/Makefile.orig Sat Feb 13 11:48:33 2010
+++ distrib/loongson/ramdisk/Makefile Fri Feb 12 20:53:16 2010
@@ -21,7 +21,7 @@
VND_CRDEV= /dev/r${VND}c
-DISKTYPE= rdroot
+DISKTYPE= rdroot2.5M
NBLKS= 8192
# minfree, opt, b/i trks, sects, cpg
NEWFSARGS= -m 0 -o space -i 4096
@@ -63,7 +63,7 @@
-vnconfig -u ${VND}
rdsetroot: ${TOP}/../common/elfrdsetroot.c
- ${HOSTCC} -o rdsetroot ${TOP}/../common/elfrdsetroot.c
+ ${HOSTCC} -o rdsetroot ${TOP}/../common/elfrdsetroot.c /usr/src/lib/libc/gen/nlist.c -DNOARCHCHECK -D__LP64__ -DELFSIZE=64
unconfig:
-umount -f ${MOUNT_POINT}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment