diff --git a/Makefile.am b/Makefile.am index b97f012bc..4b0ef7f4c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -159,7 +159,10 @@ linux-initramfs.x86_64: linux.init.x86_64 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 -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 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 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 - 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.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 -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 $(OBJCOPY) --add-section=miniroot=$< $(GRUB_PAYLOADS_DIR)/knetbsd.miniroot.x86_64 $@ diff --git a/grub-core/tests/boot/kbsd.spec.txt b/grub-core/tests/boot/kbsd.spec.txt new file mode 100644 index 000000000..af171bc56 --- /dev/null +++ b/grub-core/tests/boot/kbsd.spec.txt @@ -0,0 +1,3 @@ +. type=dir + dev type=dir + console type=char device=0 mode=666 gid=0 uid=0 diff --git a/grub-core/tests/boot/knetbsd.init-i386.S b/grub-core/tests/boot/knetbsd.init-i386.S index c751421ba..587b4f41f 100644 --- a/grub-core/tests/boot/knetbsd.init-i386.S +++ b/grub-core/tests/boot/knetbsd.init-i386.S @@ -22,8 +22,6 @@ #define SYSCALL_WRITE 4 #define SYSCALL_RESET 208 #define SYSCALL_EXIT 1 -#define SYSCALL_MKNOD 14 -#define SYSCALL_MOUNT 410 #define SYSCALL_INT 0x80 #define RESET_NOSYNC 0x4 @@ -34,27 +32,6 @@ .global 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. */ movl $SYSCALL_OPEN, %eax pushl $FLAGS_NONE @@ -107,25 +84,3 @@ device: message: .ascii "Boot Test Passed Successfully\n" SUCCESSFUL_BOOT_STRING "\n" 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: \ No newline at end of file diff --git a/grub-core/tests/boot/knetbsd.init-x86_64.S b/grub-core/tests/boot/knetbsd.init-x86_64.S index 05a494594..1a19f3603 100644 --- a/grub-core/tests/boot/knetbsd.init-x86_64.S +++ b/grub-core/tests/boot/knetbsd.init-x86_64.S @@ -22,9 +22,7 @@ #define SYSCALL_WRITE 4 #define SYSCALL_RESET 208 #define SYSCALL_EXIT 1 -#define SYSCALL_MKNOD 14 #define SYSCALL_ARCH 165 -#define SYSCALL_MOUNT 410 #define SYSCALL_INT 0x80 #define SYSCALL_ARCH_IOPL 2 @@ -37,22 +35,6 @@ .global 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. */ movq $SYSCALL_OPEN, %rax leaq device, %rdi @@ -119,32 +101,5 @@ device: message: .ascii "Boot Test Passed Successfully\n" SUCCESSFUL_BOOT_STRING "\n" 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: .long 3 \ No newline at end of file