Skip to contentSkip to conversation

i386/x86_64 boot: boot parameters export via sysfs

PATCH In review Huang, Ying 1 participant 1 message Oct 9, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 i386/x86_64 boot: boot parameters export via sysfs

This patch export the boot parameters via sysfs. This can be used for debugging and kexec.

---

 i386/kernel/Makefile    |    1 
 i386/kernel/ksysfs.c    |  242 ++++++++++++++++++++++++++++++++++++++++++++++++
 i386/kernel/setup.c     |    2 
 x86_64/kernel/Makefile  |    1 
 x86_64/kernel/setup64.c |    2 
 5 files changed, 246 insertions(+), 2 deletions(-)
arch/x86_64/kernel/Makefile +1 -0
Index: linux-2.6.23-rc8/arch/x86_64/kernel/Makefile
===================================================================
@@ -39,6 +39,7 @@
 obj-$(CONFIG_K8_NB)		+= k8.o
 obj-$(CONFIG_AUDIT)		+= audit.o
 obj-$(CONFIG_STACK_UNWIND)	+= unwind.o
+obj-$(CONFIG_SYSFS)		+= ../../i386/kernel/ksysfs.o
 
 obj-$(CONFIG_MODULES)		+= module.o
 obj-$(CONFIG_PCI)		+= early-quirks.o
arch/x86_64/kernel/setup64.c +1 -1
Index: linux-2.6.23-rc8/arch/x86_64/kernel/setup64.c
===================================================================
@@ -24,7 +24,7 @@
 #include <asm/sections.h>
 #include <asm/setup.h>
 
-struct boot_params __initdata boot_params;
+struct boot_params boot_params;
 
 cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE;
 
arch/i386/kernel/ksysfs.c new file +242 -0

242 lines not on this page · raw message

arch/i386/kernel/Makefile +1 -0
Index: linux-2.6.23-rc8/arch/i386/kernel/Makefile
===================================================================
@@ -44,6 +44,7 @@
 obj-$(CONFIG_K8_NB)		+= k8.o
 obj-$(CONFIG_MGEODE_LX)		+= geode.o mfgpt.o
 obj-$(CONFIG_STACK_UNWIND)	+= unwind.o
+obj-$(CONFIG_SYSFS)		+= ksysfs.o
 
 obj-$(CONFIG_VMI)		+= vmi.o vmiclock.o
 obj-$(CONFIG_PARAVIRT)		+= paravirt.o
arch/i386/kernel/setup.c +1 -1
Index: linux-2.6.23-rc8/arch/i386/kernel/setup.c
===================================================================
@@ -126,7 +126,7 @@
 
 static char __initdata command_line[COMMAND_LINE_SIZE];
 
-struct boot_params __initdata boot_params;
+struct boot_params boot_params;
 
 #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
 struct edd edd;