From 46581e701a40cd9ad7f9f87a26a04a95eda27588 Mon Sep 17 00:00:00 2001 From: Arun Thomas Date: Fri, 16 Sep 2011 17:31:07 +0200 Subject: [PATCH] Add MKBOOTPARAM option --- kernel/Makefile | 4 ++++ kernel/arch/i386/arch_system.c | 5 +++++ share/mk/bsd.own.mk | 5 +++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/kernel/Makefile b/kernel/Makefile index 1b3c6da91..6d89d7c66 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -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 diff --git a/kernel/arch/i386/arch_system.c b/kernel/arch/i386/arch_system.c index 882ae7f23..d095b150b 100644 --- a/kernel/arch/i386/arch_system.c +++ b/kernel/arch/i386/arch_system.c @@ -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; } diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 5a9c76057..9d5a21220 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -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 -- 2.44.0