]> Zhao Yanbai Git Server - minix.git/commitdiff
Add MKBOOTPARAM option
authorArun Thomas <arun@minix3.org>
Fri, 16 Sep 2011 15:31:07 +0000 (17:31 +0200)
committerArun Thomas <arun@minix3.org>
Fri, 16 Sep 2011 15:31:07 +0000 (17:31 +0200)
kernel/Makefile
kernel/arch/i386/arch_system.c
share/mk/bsd.own.mk

index 1b3c6da91c54fa2fce5a00193296ba36b6dcc8a7..6d89d7c66dfc83f9628833e5184b6716b66b77e9 100644 (file)
@@ -85,6 +85,10 @@ CPPFLAGS+= -DUSE_STATECTL
 CPPFLAGS+= -DUSE_TRACE
 .endif
 
+.if ${USE_BOOTPARAM} != "no"
+CPPFLAGS+= -DUSE_BOOTPARAM
+.endif
+
 # These come last, so the profiling buffer is at the end of the data segment
 SRCS+= profile.c do_sprofile.c
 
index 882ae7f2369c17d9e4586d83cb5cd4cbd48cde0c..d095b150bf799e8a540a4a0ef362013938d37212 100644 (file)
@@ -92,6 +92,7 @@ PUBLIC __dead void arch_shutdown(int how)
        /* Mask all interrupts, including the clock. */
        outb( INT_CTLMASK, ~0);
 
+#if USE_BOOTPARAM
        if(minix_panicing) {
                /* We're panicing? Then retrieve and decode currently
                 * loaded segment selectors.
@@ -198,6 +199,10 @@ PUBLIC __dead void arch_shutdown(int how)
                        panic("unexpected value for how: %d", how);
                        NOT_REACHABLE;
        }
+#else /* !USE_BOOTPARAM */
+       /* Poweroff without boot monitor */
+       arch_bios_poweroff();
+#endif
 
        NOT_REACHABLE;
 }
index 5a9c76057c3078544e0c7d8ad98ae5ecb29c91b3..9d5a21220c5023dc443c478a401dfdec9c8269eb 100644 (file)
@@ -760,7 +760,7 @@ _MKVARS.yes= \
 #MINIX-specific vars
 _MKVARS.yes+= \
        MKWATCHDOG MKACPI MKAPIC MKMCONTEXT MKDEBUGREG MKSYSDEBUG \
-       MKLIVEUPDATE MKSTATECTL MKTRACE
+       MKLIVEUPDATE MKSTATECTL MKTRACE MKBOOTPARAM
 .for var in ${_MKVARS.yes}
 ${var}?=       yes
 .endfor
@@ -830,6 +830,7 @@ MKSYSDEBUG:=        no
 MKLIVEUPDATE:= no
 MKSTATECTL:=   no
 MKTRACE:=      no
+MKBOOTPARAM:=  no
 .endif
 
 #
@@ -892,7 +893,7 @@ ${var}?= no
 #
 .for var in USE_HESIOD USE_INET6 USE_KERBEROS USE_LDAP USE_PAM USE_YP \
 USE_WATCHDOG USE_ACPI USE_APIC USE_MCONTEXT USE_DEBUGREG USE_SYSDEBUG \
-USE_LIVEUPDATE USE_STATECTL USE_TRACE
+USE_LIVEUPDATE USE_STATECTL USE_TRACE USE_BOOTPARAM
 .if (${${var:S/USE_/MK/}} == "no")
 ${var}:= no
 .else