Simplify knetbsd bootcheck by using specfile
This commit is contained in:
parent
e95616a173
commit
dc1bff761f
4 changed files with 9 additions and 93 deletions
|
@ -159,7 +159,10 @@ linux-initramfs.x86_64: linux.init.x86_64 Makefile
|
||||||
kfreebsd-mfsroot.i386.img: kfreebsd.init.i386 Makefile
|
kfreebsd-mfsroot.i386.img: kfreebsd.init.i386 Makefile
|
||||||
TDIR=`mktemp -d`; mkdir $$TDIR/dev; mkdir $$TDIR/sbin; cp $< $$TDIR/sbin/init; makefs -t ffs -s 30m -f 1000 -o minfree=0,version=1 $@ $$TDIR; rm -rf $$TDIR
|
TDIR=`mktemp -d`; mkdir $$TDIR/dev; mkdir $$TDIR/sbin; cp $< $$TDIR/sbin/init; makefs -t ffs -s 30m -f 1000 -o minfree=0,version=1 $@ $$TDIR; rm -rf $$TDIR
|
||||||
|
|
||||||
knetbsd.image.i386: knetbsd.init.i386
|
knetbsd.image.i386: knetbsd.init.i386 $(srcdir)/grub-core/tests/boot/kbsd.spec.txt
|
||||||
|
TDIR=`mktemp -d` && mkdir $$TDIR/dev && mkdir $$TDIR/sbin && cp $< $$TDIR/sbin/init && makefs -F $(srcdir)/grub-core/tests/boot/kbsd.spec.txt -t ffs -s 64k -f 10 -o minfree=0,version=1 $@ $$TDIR && rm -rf $$TDIR
|
||||||
|
|
||||||
|
kopenbsd.image.i386: kopenbsd.init.i386
|
||||||
TDIR=`mktemp -d` && mkdir $$TDIR/dev && mkdir $$TDIR/sbin && cp $< $$TDIR/sbin/init && makefs -t ffs -s 64k -f 10 -o minfree=0,version=1 $@ $$TDIR && rm -rf $$TDIR
|
TDIR=`mktemp -d` && mkdir $$TDIR/dev && mkdir $$TDIR/sbin && cp $< $$TDIR/sbin/init && makefs -t ffs -s 64k -f 10 -o minfree=0,version=1 $@ $$TDIR && rm -rf $$TDIR
|
||||||
|
|
||||||
knetbsd.miniroot-image.i386.img: knetbsd.image.i386 $(GRUB_PAYLOADS_DIR)/knetbsd.miniroot.i386
|
knetbsd.miniroot-image.i386.img: knetbsd.image.i386 $(GRUB_PAYLOADS_DIR)/knetbsd.miniroot.i386
|
||||||
|
@ -168,8 +171,8 @@ knetbsd.miniroot-image.i386.img: knetbsd.image.i386 $(GRUB_PAYLOADS_DIR)/knetbsd
|
||||||
kfreebsd-mfsroot.x86_64.img: kfreebsd.init.x86_64 Makefile
|
kfreebsd-mfsroot.x86_64.img: kfreebsd.init.x86_64 Makefile
|
||||||
TDIR=`mktemp -d`; mkdir $$TDIR/dev; mkdir $$TDIR/sbin; cp $< $$TDIR/sbin/init; makefs -t ffs -s 30m -f 1000 -o minfree=0,version=1 $@ $$TDIR; rm -rf $$TDIR
|
TDIR=`mktemp -d`; mkdir $$TDIR/dev; mkdir $$TDIR/sbin; cp $< $$TDIR/sbin/init; makefs -t ffs -s 30m -f 1000 -o minfree=0,version=1 $@ $$TDIR; rm -rf $$TDIR
|
||||||
|
|
||||||
knetbsd.image.x86_64: knetbsd.init.x86_64
|
knetbsd.image.x86_64: knetbsd.init.x86_64 $(srcdir)/grub-core/tests/boot/kbsd.spec.txt
|
||||||
TDIR=`mktemp -d` && mkdir $$TDIR/dev && mkdir $$TDIR/sbin && cp $< $$TDIR/sbin/init && makefs -t ffs -s 64k -f 10 -o minfree=0,version=1 $@ $$TDIR && rm -rf $$TDIR
|
TDIR=`mktemp -d` && mkdir $$TDIR/dev && mkdir $$TDIR/sbin && cp $< $$TDIR/sbin/init && makefs -F $(srcdir)/grub-core/tests/boot/kbsd.spec.txt -t ffs -s 64k -f 10 -o minfree=0,version=1 $@ $$TDIR && rm -rf $$TDIR
|
||||||
|
|
||||||
knetbsd.miniroot-image.x86_64.img: knetbsd.image.x86_64 $(GRUB_PAYLOADS_DIR)/knetbsd.miniroot.x86_64
|
knetbsd.miniroot-image.x86_64.img: knetbsd.image.x86_64 $(GRUB_PAYLOADS_DIR)/knetbsd.miniroot.x86_64
|
||||||
$(OBJCOPY) --add-section=miniroot=$< $(GRUB_PAYLOADS_DIR)/knetbsd.miniroot.x86_64 $@
|
$(OBJCOPY) --add-section=miniroot=$< $(GRUB_PAYLOADS_DIR)/knetbsd.miniroot.x86_64 $@
|
||||||
|
|
3
grub-core/tests/boot/kbsd.spec.txt
Normal file
3
grub-core/tests/boot/kbsd.spec.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
. type=dir
|
||||||
|
dev type=dir
|
||||||
|
console type=char device=0 mode=666 gid=0 uid=0
|
|
@ -22,8 +22,6 @@
|
||||||
#define SYSCALL_WRITE 4
|
#define SYSCALL_WRITE 4
|
||||||
#define SYSCALL_RESET 208
|
#define SYSCALL_RESET 208
|
||||||
#define SYSCALL_EXIT 1
|
#define SYSCALL_EXIT 1
|
||||||
#define SYSCALL_MKNOD 14
|
|
||||||
#define SYSCALL_MOUNT 410
|
|
||||||
#define SYSCALL_INT 0x80
|
#define SYSCALL_INT 0x80
|
||||||
|
|
||||||
#define RESET_NOSYNC 0x4
|
#define RESET_NOSYNC 0x4
|
||||||
|
@ -34,27 +32,6 @@
|
||||||
.global start,_start
|
.global start,_start
|
||||||
start:
|
start:
|
||||||
_start:
|
_start:
|
||||||
/* mount. */
|
|
||||||
movl $SYSCALL_MOUNT, %eax
|
|
||||||
push $(tmpfs_args_end - tmpfs_args)
|
|
||||||
push $tmpfs_args
|
|
||||||
push $0
|
|
||||||
push $devfsdir
|
|
||||||
push $devfstype
|
|
||||||
pushl $0
|
|
||||||
int $SYSCALL_INT
|
|
||||||
addl $20, %esp
|
|
||||||
|
|
||||||
/* mknod. */
|
|
||||||
movl $SYSCALL_MKNOD, %eax
|
|
||||||
pushl $0
|
|
||||||
pushl $0x2140
|
|
||||||
leal device, %ebx
|
|
||||||
pushl %ebx
|
|
||||||
pushl $0
|
|
||||||
int $SYSCALL_INT
|
|
||||||
addl $16, %esp
|
|
||||||
|
|
||||||
/* open. */
|
/* open. */
|
||||||
movl $SYSCALL_OPEN, %eax
|
movl $SYSCALL_OPEN, %eax
|
||||||
pushl $FLAGS_NONE
|
pushl $FLAGS_NONE
|
||||||
|
@ -107,25 +84,3 @@ device:
|
||||||
message:
|
message:
|
||||||
.ascii "Boot Test Passed Successfully\n" SUCCESSFUL_BOOT_STRING "\n"
|
.ascii "Boot Test Passed Successfully\n" SUCCESSFUL_BOOT_STRING "\n"
|
||||||
messageend:
|
messageend:
|
||||||
devfstype:
|
|
||||||
.ascii "tmpfs"
|
|
||||||
.byte 0
|
|
||||||
devfsdir:
|
|
||||||
.ascii "/dev"
|
|
||||||
.byte 0
|
|
||||||
tmpfs_args:
|
|
||||||
/* Version. */
|
|
||||||
.long 1
|
|
||||||
|
|
||||||
/* Maximum inodes. */
|
|
||||||
.quad 0
|
|
||||||
/* Maximum size. */
|
|
||||||
.quad 0
|
|
||||||
|
|
||||||
/* UID */
|
|
||||||
.long 0
|
|
||||||
/* GID */
|
|
||||||
.long 0
|
|
||||||
/* Mode */
|
|
||||||
.long 0777
|
|
||||||
tmpfs_args_end:
|
|
|
@ -22,9 +22,7 @@
|
||||||
#define SYSCALL_WRITE 4
|
#define SYSCALL_WRITE 4
|
||||||
#define SYSCALL_RESET 208
|
#define SYSCALL_RESET 208
|
||||||
#define SYSCALL_EXIT 1
|
#define SYSCALL_EXIT 1
|
||||||
#define SYSCALL_MKNOD 14
|
|
||||||
#define SYSCALL_ARCH 165
|
#define SYSCALL_ARCH 165
|
||||||
#define SYSCALL_MOUNT 410
|
|
||||||
#define SYSCALL_INT 0x80
|
#define SYSCALL_INT 0x80
|
||||||
#define SYSCALL_ARCH_IOPL 2
|
#define SYSCALL_ARCH_IOPL 2
|
||||||
|
|
||||||
|
@ -37,22 +35,6 @@
|
||||||
.global start,_start
|
.global start,_start
|
||||||
start:
|
start:
|
||||||
_start:
|
_start:
|
||||||
/* mount. */
|
|
||||||
movq $SYSCALL_MOUNT, %rax
|
|
||||||
movq $devfstype, %rdi
|
|
||||||
movq $devfsdir, %rsi
|
|
||||||
movq $0, %rdx
|
|
||||||
movq $tmpfs_args, %r10
|
|
||||||
movq $(tmpfs_args_end - tmpfs_args), %r8
|
|
||||||
syscall
|
|
||||||
|
|
||||||
/* mknod. */
|
|
||||||
movq $SYSCALL_MKNOD, %rax
|
|
||||||
leaq device, %rdi
|
|
||||||
movq $0x2140, %rsi
|
|
||||||
movq $0, %rdx
|
|
||||||
syscall
|
|
||||||
|
|
||||||
/* open. */
|
/* open. */
|
||||||
movq $SYSCALL_OPEN, %rax
|
movq $SYSCALL_OPEN, %rax
|
||||||
leaq device, %rdi
|
leaq device, %rdi
|
||||||
|
@ -119,32 +101,5 @@ device:
|
||||||
message:
|
message:
|
||||||
.ascii "Boot Test Passed Successfully\n" SUCCESSFUL_BOOT_STRING "\n"
|
.ascii "Boot Test Passed Successfully\n" SUCCESSFUL_BOOT_STRING "\n"
|
||||||
messageend:
|
messageend:
|
||||||
devfstype:
|
|
||||||
.ascii "tmpfs"
|
|
||||||
.byte 0
|
|
||||||
devfsdir:
|
|
||||||
.ascii "/dev"
|
|
||||||
.byte 0
|
|
||||||
tmpfs_args:
|
|
||||||
/* Version. */
|
|
||||||
.long 1
|
|
||||||
|
|
||||||
/* Alignment long. */
|
|
||||||
.long 0
|
|
||||||
|
|
||||||
/* Maximum inodes. */
|
|
||||||
.quad 0
|
|
||||||
/* Maximum size. */
|
|
||||||
.quad 0
|
|
||||||
|
|
||||||
/* UID */
|
|
||||||
.long 0
|
|
||||||
/* GID */
|
|
||||||
.long 0
|
|
||||||
/* Mode */
|
|
||||||
.long 0777
|
|
||||||
/* Alignment long. */
|
|
||||||
.long 0
|
|
||||||
tmpfs_args_end:
|
|
||||||
iopl_arg:
|
iopl_arg:
|
||||||
.long 3
|
.long 3
|
Loading…
Reference in a new issue