@@ -798,6 +798,41 @@ config CMDLINE
depends on CMDLINE_OVERWRITE || CMDLINE_EXTEND
default "console=ttySC1,115200"
+config PARAM_BOOL
+ bool "Default kernel params"
+ help
+ Setting this option allows the boot parameters to be set.
+
+config PARAM_MOUNT_ROOT_RDONLY
+ int "MOUNT_ROOT_RDONLY"
+ depends on PARAM_BOOL
+ default 1
+
+config PARAM_RAMDISK_FLAGS
+ hex "RAMDISK_FLAGS"
+ depends on PARAM_BOOL
+ default 0
+
+config PARAM_ORIG_ROOT_DEV
+ hex "ORIG_ROOT_DEV"
+ depends on PARAM_BOOL
+ default 0x200
+
+config PARAM_LOADER_TYPE
+ hex "LOADER_TYPE"
+ depends on PARAM_BOOL
+ default 1
+
+config PARAM_INITRD_START
+ hex "INITRD_START"
+ depends on PARAM_BOOL
+ default 0
+
+config PARAM_INITRD_SIZE
+ hex "INITRD_SIZE"
+ depends on PARAM_BOOL
+ default 0
+
endmenu
menu "Bus options"
@@ -4,17 +4,26 @@
#include <asm-generic/setup.h>
#ifdef __KERNEL__
+#define PARAM ((unsigned char *)empty_zero_page)
+
+#if defined(CONFIG_PARAM_BOOL)
+#define MOUNT_ROOT_RDONLY (unsigned long)CONFIG_PARAM_MOUNT_ROOT_RDONLY
+#define RAMDISK_FLAGS (unsigned long)CONFIG_PARAM_RAMDISK_FLAGS
+#define ORIG_ROOT_DEV (unsigned long)CONFIG_PARAM_ORIG_ROOT_DEV
+#define LOADER_TYPE (unsigned long)CONFIG_PARAM_LOADER_TYPE
+#define INITRD_START (unsigned long)CONFIG_PARAM_INITRD_START
+#define INITRD_SIZE (unsigned long)CONFIG_PARAM_INITRD_SIZE
+#else
/*
* This is set up by the setup-routine at boot-time
*/
-#define PARAM ((unsigned char *)empty_zero_page)
-
#define MOUNT_ROOT_RDONLY (*(unsigned long *) (PARAM+0x000))
#define RAMDISK_FLAGS (*(unsigned long *) (PARAM+0x004))
#define ORIG_ROOT_DEV (*(unsigned long *) (PARAM+0x008))
#define LOADER_TYPE (*(unsigned long *) (PARAM+0x00c))
#define INITRD_START (*(unsigned long *) (PARAM+0x010))
#define INITRD_SIZE (*(unsigned long *) (PARAM+0x014))
+#endif
/* ... */
#define COMMAND_LINE ((char *) (PARAM+0x100))