kernel: add generic image_cmdline hack to MIPS targets
SVN-Revision: 17563
This commit is contained in:
parent
47ac8caa62
commit
d59f5b3a98
@ -95,6 +95,7 @@ CONFIG_HZ=250
|
|||||||
CONFIG_HZ_250=y
|
CONFIG_HZ_250=y
|
||||||
# CONFIG_I2C is not set
|
# CONFIG_I2C is not set
|
||||||
# CONFIG_IDE is not set
|
# CONFIG_IDE is not set
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INITRAMFS_SOURCE=""
|
CONFIG_INITRAMFS_SOURCE=""
|
||||||
CONFIG_INOTIFY=y
|
CONFIG_INOTIFY=y
|
||||||
CONFIG_INOTIFY_USER=y
|
CONFIG_INOTIFY_USER=y
|
||||||
|
@ -107,6 +107,7 @@ CONFIG_HZ=250
|
|||||||
# CONFIG_HZ_100 is not set
|
# CONFIG_HZ_100 is not set
|
||||||
CONFIG_HZ_250=y
|
CONFIG_HZ_250=y
|
||||||
# CONFIG_I2C is not set
|
# CONFIG_I2C is not set
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INITRAMFS_SOURCE=""
|
CONFIG_INITRAMFS_SOURCE=""
|
||||||
CONFIG_INOTIFY=y
|
CONFIG_INOTIFY=y
|
||||||
CONFIG_INOTIFY_USER=y
|
CONFIG_INOTIFY_USER=y
|
||||||
|
@ -124,6 +124,7 @@ CONFIG_HZ_250=y
|
|||||||
# CONFIG_IDE is not set
|
# CONFIG_IDE is not set
|
||||||
CONFIG_IEEE80211=m
|
CONFIG_IEEE80211=m
|
||||||
CONFIG_IEEE80211_CRYPT_WEP=m
|
CONFIG_IEEE80211_CRYPT_WEP=m
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INITRAMFS_SOURCE=""
|
CONFIG_INITRAMFS_SOURCE=""
|
||||||
CONFIG_INOTIFY=y
|
CONFIG_INOTIFY=y
|
||||||
CONFIG_INOTIFY_USER=y
|
CONFIG_INOTIFY_USER=y
|
||||||
|
@ -135,6 +135,7 @@ CONFIG_HZ=250
|
|||||||
# CONFIG_HZ_100 is not set
|
# CONFIG_HZ_100 is not set
|
||||||
CONFIG_HZ_250=y
|
CONFIG_HZ_250=y
|
||||||
# CONFIG_I2C is not set
|
# CONFIG_I2C is not set
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INITRAMFS_SOURCE=""
|
CONFIG_INITRAMFS_SOURCE=""
|
||||||
CONFIG_INOTIFY=y
|
CONFIG_INOTIFY=y
|
||||||
CONFIG_INOTIFY_USER=y
|
CONFIG_INOTIFY_USER=y
|
||||||
|
@ -76,6 +76,7 @@ CONFIG_HAVE_OPROFILE=y
|
|||||||
CONFIG_HW_RANDOM=y
|
CONFIG_HW_RANDOM=y
|
||||||
# CONFIG_I2C is not set
|
# CONFIG_I2C is not set
|
||||||
# CONFIG_IDE is not set
|
# CONFIG_IDE is not set
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INITRAMFS_SOURCE=""
|
CONFIG_INITRAMFS_SOURCE=""
|
||||||
CONFIG_IRQ_CPU=y
|
CONFIG_IRQ_CPU=y
|
||||||
# CONFIG_ISDN is not set
|
# CONFIG_ISDN is not set
|
||||||
|
@ -77,6 +77,7 @@ CONFIG_HAVE_MLOCK=y
|
|||||||
CONFIG_HAVE_OPROFILE=y
|
CONFIG_HAVE_OPROFILE=y
|
||||||
CONFIG_HW_RANDOM=y
|
CONFIG_HW_RANDOM=y
|
||||||
# CONFIG_I2C is not set
|
# CONFIG_I2C is not set
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INITRAMFS_SOURCE=""
|
CONFIG_INITRAMFS_SOURCE=""
|
||||||
CONFIG_IRQ_CPU=y
|
CONFIG_IRQ_CPU=y
|
||||||
# CONFIG_ISDN is not set
|
# CONFIG_ISDN is not set
|
||||||
|
@ -98,6 +98,7 @@ CONFIG_I2C_BOARDINFO=y
|
|||||||
CONFIG_I2C_GPIO=y
|
CONFIG_I2C_GPIO=y
|
||||||
CONFIG_ICPLUS_PHY=y
|
CONFIG_ICPLUS_PHY=y
|
||||||
# CONFIG_IDE is not set
|
# CONFIG_IDE is not set
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INITRAMFS_ROOT_GID=0
|
CONFIG_INITRAMFS_ROOT_GID=0
|
||||||
CONFIG_INITRAMFS_ROOT_UID=0
|
CONFIG_INITRAMFS_ROOT_UID=0
|
||||||
CONFIG_INITRAMFS_SOURCE="../../root"
|
CONFIG_INITRAMFS_SOURCE="../../root"
|
||||||
|
@ -110,6 +110,7 @@ CONFIG_I2C_ALGOBIT=y
|
|||||||
CONFIG_I2C_BOARDINFO=y
|
CONFIG_I2C_BOARDINFO=y
|
||||||
CONFIG_I2C_GPIO=y
|
CONFIG_I2C_GPIO=y
|
||||||
CONFIG_ICPLUS_PHY=y
|
CONFIG_ICPLUS_PHY=y
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INITRAMFS_ROOT_GID=0
|
CONFIG_INITRAMFS_ROOT_GID=0
|
||||||
CONFIG_INITRAMFS_ROOT_UID=0
|
CONFIG_INITRAMFS_ROOT_UID=0
|
||||||
CONFIG_INITRAMFS_SOURCE="../../root"
|
CONFIG_INITRAMFS_SOURCE="../../root"
|
||||||
|
@ -110,6 +110,7 @@ CONFIG_I2C_ALGOBIT=y
|
|||||||
CONFIG_I2C_BOARDINFO=y
|
CONFIG_I2C_BOARDINFO=y
|
||||||
CONFIG_I2C_GPIO=y
|
CONFIG_I2C_GPIO=y
|
||||||
CONFIG_ICPLUS_PHY=y
|
CONFIG_ICPLUS_PHY=y
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INITRAMFS_ROOT_GID=0
|
CONFIG_INITRAMFS_ROOT_GID=0
|
||||||
CONFIG_INITRAMFS_ROOT_UID=0
|
CONFIG_INITRAMFS_ROOT_UID=0
|
||||||
CONFIG_INITRAMFS_SOURCE="../../root"
|
CONFIG_INITRAMFS_SOURCE="../../root"
|
||||||
|
@ -74,6 +74,7 @@ CONFIG_HW_HAS_PCI=y
|
|||||||
CONFIG_HW_RANDOM=y
|
CONFIG_HW_RANDOM=y
|
||||||
# CONFIG_I2C is not set
|
# CONFIG_I2C is not set
|
||||||
# CONFIG_IDE is not set
|
# CONFIG_IDE is not set
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INITRAMFS_SOURCE=""
|
CONFIG_INITRAMFS_SOURCE=""
|
||||||
CONFIG_IP175C_PHY=y
|
CONFIG_IP175C_PHY=y
|
||||||
CONFIG_IRQ_CPU=y
|
CONFIG_IRQ_CPU=y
|
||||||
|
@ -87,6 +87,7 @@ CONFIG_HAVE_OPROFILE=y
|
|||||||
CONFIG_HW_HAS_PCI=y
|
CONFIG_HW_HAS_PCI=y
|
||||||
CONFIG_HW_RANDOM=y
|
CONFIG_HW_RANDOM=y
|
||||||
# CONFIG_I2C is not set
|
# CONFIG_I2C is not set
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INITRAMFS_SOURCE=""
|
CONFIG_INITRAMFS_SOURCE=""
|
||||||
CONFIG_IP175C_PHY=y
|
CONFIG_IP175C_PHY=y
|
||||||
CONFIG_IRQ_CPU=y
|
CONFIG_IRQ_CPU=y
|
||||||
|
@ -93,6 +93,7 @@ CONFIG_I2C_ALGOPCA=m
|
|||||||
CONFIG_I2C_ALGOPCF=m
|
CONFIG_I2C_ALGOPCF=m
|
||||||
CONFIG_I2C_BOARDINFO=y
|
CONFIG_I2C_BOARDINFO=y
|
||||||
CONFIG_I2C_CHARDEV=m
|
CONFIG_I2C_CHARDEV=m
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INITRAMFS_SOURCE=""
|
CONFIG_INITRAMFS_SOURCE=""
|
||||||
CONFIG_IRQ_CPU=y
|
CONFIG_IRQ_CPU=y
|
||||||
CONFIG_KEXEC=y
|
CONFIG_KEXEC=y
|
||||||
|
@ -97,6 +97,7 @@ CONFIG_IEEE80211_CRYPT_CCMP=m
|
|||||||
CONFIG_IEEE80211_CRYPT_TKIP=m
|
CONFIG_IEEE80211_CRYPT_TKIP=m
|
||||||
CONFIG_IEEE80211_CRYPT_WEP=m
|
CONFIG_IEEE80211_CRYPT_WEP=m
|
||||||
CONFIG_IFB=m
|
CONFIG_IFB=m
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INET_DIAG=m
|
CONFIG_INET_DIAG=m
|
||||||
CONFIG_INET_TCP_DIAG=m
|
CONFIG_INET_TCP_DIAG=m
|
||||||
CONFIG_INITRAMFS_ROOT_GID=1000
|
CONFIG_INITRAMFS_ROOT_GID=1000
|
||||||
|
@ -79,6 +79,7 @@ CONFIG_HZ=250
|
|||||||
CONFIG_HZ_250=y
|
CONFIG_HZ_250=y
|
||||||
# CONFIG_I2C is not set
|
# CONFIG_I2C is not set
|
||||||
# CONFIG_IDE is not set
|
# CONFIG_IDE is not set
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INITRAMFS_SOURCE=""
|
CONFIG_INITRAMFS_SOURCE=""
|
||||||
# CONFIG_IP_ROUTE_VERBOSE is not set
|
# CONFIG_IP_ROUTE_VERBOSE is not set
|
||||||
CONFIG_IRQ_CPU=y
|
CONFIG_IRQ_CPU=y
|
||||||
|
@ -90,6 +90,7 @@ CONFIG_HZ=250
|
|||||||
# CONFIG_HZ_100 is not set
|
# CONFIG_HZ_100 is not set
|
||||||
CONFIG_HZ_250=y
|
CONFIG_HZ_250=y
|
||||||
# CONFIG_I2C is not set
|
# CONFIG_I2C is not set
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INITRAMFS_SOURCE=""
|
CONFIG_INITRAMFS_SOURCE=""
|
||||||
# CONFIG_IP_ROUTE_VERBOSE is not set
|
# CONFIG_IP_ROUTE_VERBOSE is not set
|
||||||
CONFIG_IRQ_CPU=y
|
CONFIG_IRQ_CPU=y
|
||||||
|
@ -100,6 +100,7 @@ CONFIG_HZ=250
|
|||||||
CONFIG_HZ_250=y
|
CONFIG_HZ_250=y
|
||||||
# CONFIG_I2C is not set
|
# CONFIG_I2C is not set
|
||||||
# CONFIG_IDE is not set
|
# CONFIG_IDE is not set
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INITRAMFS_SOURCE=""
|
CONFIG_INITRAMFS_SOURCE=""
|
||||||
CONFIG_INOTIFY=y
|
CONFIG_INOTIFY=y
|
||||||
CONFIG_INOTIFY_USER=y
|
CONFIG_INOTIFY_USER=y
|
||||||
|
@ -94,6 +94,7 @@ CONFIG_HZ=250
|
|||||||
CONFIG_HZ_250=y
|
CONFIG_HZ_250=y
|
||||||
# CONFIG_I2C is not set
|
# CONFIG_I2C is not set
|
||||||
# CONFIG_IDE is not set
|
# CONFIG_IDE is not set
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INITRAMFS_SOURCE=""
|
CONFIG_INITRAMFS_SOURCE=""
|
||||||
CONFIG_INOTIFY=y
|
CONFIG_INOTIFY=y
|
||||||
CONFIG_INOTIFY_USER=y
|
CONFIG_INOTIFY_USER=y
|
||||||
|
@ -106,6 +106,7 @@ CONFIG_HZ=250
|
|||||||
# CONFIG_HZ_100 is not set
|
# CONFIG_HZ_100 is not set
|
||||||
CONFIG_HZ_250=y
|
CONFIG_HZ_250=y
|
||||||
# CONFIG_I2C is not set
|
# CONFIG_I2C is not set
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INITRAMFS_SOURCE=""
|
CONFIG_INITRAMFS_SOURCE=""
|
||||||
CONFIG_INOTIFY=y
|
CONFIG_INOTIFY=y
|
||||||
CONFIG_INOTIFY_USER=y
|
CONFIG_INOTIFY_USER=y
|
||||||
|
@ -170,6 +170,7 @@ CONFIG_HZ_250=y
|
|||||||
# CONFIG_I2C is not set
|
# CONFIG_I2C is not set
|
||||||
CONFIG_I8253=y
|
CONFIG_I8253=y
|
||||||
CONFIG_I8259=y
|
CONFIG_I8259=y
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INET_DIAG=y
|
CONFIG_INET_DIAG=y
|
||||||
CONFIG_INET_TCP_DIAG=y
|
CONFIG_INET_TCP_DIAG=y
|
||||||
CONFIG_INET_XFRM_MODE_BEET=y
|
CONFIG_INET_XFRM_MODE_BEET=y
|
||||||
|
@ -0,0 +1,59 @@
|
|||||||
|
--- a/arch/mips/kernel/setup.c
|
||||||
|
+++ b/arch/mips/kernel/setup.c
|
||||||
|
@@ -545,8 +545,28 @@ static void __init resource_init(void)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifdef CONFIG_IMAGE_CMDLINE_HACK
|
||||||
|
+static void __init process__image_cmdline(void)
|
||||||
|
+{
|
||||||
|
+ extern char __image_cmdline[];
|
||||||
|
+
|
||||||
|
+ if (__image_cmdline[0] == '\0')
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ if (__image_cmdline[0] == '-') {
|
||||||
|
+ strlcpy(arcs_cmdline, __image_cmdline, sizeof(arcs_cmdline));
|
||||||
|
+ } else {
|
||||||
|
+ strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline));
|
||||||
|
+ strlcat(arcs_cmdline, __image_cmdline, sizeof(arcs_cmdline));
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+#else
|
||||||
|
+static void inline process__image_cmdline(void) {}
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
void __init setup_arch(char **cmdline_p)
|
||||||
|
{
|
||||||
|
+ process__image_cmdline();
|
||||||
|
cpu_probe();
|
||||||
|
prom_init();
|
||||||
|
|
||||||
|
--- a/arch/mips/Kconfig
|
||||||
|
+++ b/arch/mips/Kconfig
|
||||||
|
@@ -771,6 +771,10 @@ config SYNC_R4K
|
||||||
|
config MIPS_MACHINE
|
||||||
|
def_bool n
|
||||||
|
|
||||||
|
+config IMAGE_CMDLINE_HACK
|
||||||
|
+ bool "OpenWrt specific image command line hack"
|
||||||
|
+ default n
|
||||||
|
+
|
||||||
|
config NO_IOPORT
|
||||||
|
def_bool n
|
||||||
|
|
||||||
|
--- a/arch/mips/kernel/head.S
|
||||||
|
+++ b/arch/mips/kernel/head.S
|
||||||
|
@@ -143,6 +143,12 @@ FEXPORT(__kernel_entry)
|
||||||
|
j kernel_entry
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#ifdef CONFIG_IMAGE_CMDLINE_HACK
|
||||||
|
+ .ascii "CMDLINE:"
|
||||||
|
+EXPORT(__image_cmdline)
|
||||||
|
+ .fill 0x400
|
||||||
|
+#endif /* CONFIG_IMAGE_CMDLINE_HACK */
|
||||||
|
+
|
||||||
|
__REF
|
||||||
|
|
||||||
|
NESTED(kernel_entry, 16, sp) # kernel entry point
|
@ -8,13 +8,13 @@
|
|||||||
+config PROM_EMU
|
+config PROM_EMU
|
||||||
+ def_bool n
|
+ def_bool n
|
||||||
|
|
||||||
config NO_IOPORT
|
config IMAGE_CMDLINE_HACK
|
||||||
def_bool n
|
bool "OpenWrt specific image command line hack"
|
||||||
--- a/arch/mips/kernel/head.S
|
--- a/arch/mips/kernel/head.S
|
||||||
+++ b/arch/mips/kernel/head.S
|
+++ b/arch/mips/kernel/head.S
|
||||||
@@ -143,6 +143,15 @@ FEXPORT(__kernel_entry)
|
@@ -149,6 +149,15 @@ EXPORT(__image_cmdline)
|
||||||
j kernel_entry
|
.fill 0x400
|
||||||
#endif
|
#endif /* CONFIG_IMAGE_CMDLINE_HACK */
|
||||||
|
|
||||||
+#ifdef CONFIG_PROM_EMU
|
+#ifdef CONFIG_PROM_EMU
|
||||||
+EXPORT(prom_emu_argv)
|
+EXPORT(prom_emu_argv)
|
||||||
@ -28,7 +28,7 @@
|
|||||||
__REF
|
__REF
|
||||||
|
|
||||||
NESTED(kernel_entry, 16, sp) # kernel entry point
|
NESTED(kernel_entry, 16, sp) # kernel entry point
|
||||||
@@ -183,6 +192,19 @@ NESTED(kernel_entry, 16, sp) # kernel
|
@@ -189,6 +198,19 @@ NESTED(kernel_entry, 16, sp) # kernel
|
||||||
LONG_S zero, (t0)
|
LONG_S zero, (t0)
|
||||||
bne t0, t1, 1b
|
bne t0, t1, 1b
|
||||||
|
|
||||||
|
@ -0,0 +1,59 @@
|
|||||||
|
--- a/arch/mips/kernel/setup.c
|
||||||
|
+++ b/arch/mips/kernel/setup.c
|
||||||
|
@@ -545,8 +545,28 @@ static void __init resource_init(void)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifdef CONFIG_IMAGE_CMDLINE_HACK
|
||||||
|
+static void __init process__image_cmdline(void)
|
||||||
|
+{
|
||||||
|
+ extern char __image_cmdline[];
|
||||||
|
+
|
||||||
|
+ if (__image_cmdline[0] == '\0')
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ if (__image_cmdline[0] == '-') {
|
||||||
|
+ strlcpy(arcs_cmdline, __image_cmdline, sizeof(arcs_cmdline));
|
||||||
|
+ } else {
|
||||||
|
+ strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline));
|
||||||
|
+ strlcat(arcs_cmdline, __image_cmdline, sizeof(arcs_cmdline));
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+#else
|
||||||
|
+static void inline process__image_cmdline(void) {}
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
void __init setup_arch(char **cmdline_p)
|
||||||
|
{
|
||||||
|
+ process__image_cmdline();
|
||||||
|
cpu_probe();
|
||||||
|
prom_init();
|
||||||
|
|
||||||
|
--- a/arch/mips/Kconfig
|
||||||
|
+++ b/arch/mips/Kconfig
|
||||||
|
@@ -766,6 +766,10 @@ config SYNC_R4K
|
||||||
|
config MIPS_MACHINE
|
||||||
|
def_bool n
|
||||||
|
|
||||||
|
+config IMAGE_CMDLINE_HACK
|
||||||
|
+ bool "OpenWrt specific image command line hack"
|
||||||
|
+ default n
|
||||||
|
+
|
||||||
|
config NO_IOPORT
|
||||||
|
def_bool n
|
||||||
|
|
||||||
|
--- a/arch/mips/kernel/head.S
|
||||||
|
+++ b/arch/mips/kernel/head.S
|
||||||
|
@@ -143,6 +143,12 @@ FEXPORT(__kernel_entry)
|
||||||
|
j kernel_entry
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#ifdef CONFIG_IMAGE_CMDLINE_HACK
|
||||||
|
+ .ascii "CMDLINE:"
|
||||||
|
+EXPORT(__image_cmdline)
|
||||||
|
+ .fill 0x400
|
||||||
|
+#endif /* CONFIG_IMAGE_CMDLINE_HACK */
|
||||||
|
+
|
||||||
|
__REF
|
||||||
|
|
||||||
|
NESTED(kernel_entry, 16, sp) # kernel entry point
|
@ -8,13 +8,13 @@
|
|||||||
+config PROM_EMU
|
+config PROM_EMU
|
||||||
+ def_bool n
|
+ def_bool n
|
||||||
|
|
||||||
config NO_IOPORT
|
config IMAGE_CMDLINE_HACK
|
||||||
def_bool n
|
bool "OpenWrt specific image command line hack"
|
||||||
--- a/arch/mips/kernel/head.S
|
--- a/arch/mips/kernel/head.S
|
||||||
+++ b/arch/mips/kernel/head.S
|
+++ b/arch/mips/kernel/head.S
|
||||||
@@ -143,6 +143,15 @@ FEXPORT(__kernel_entry)
|
@@ -149,6 +149,15 @@ EXPORT(__image_cmdline)
|
||||||
j kernel_entry
|
.fill 0x400
|
||||||
#endif
|
#endif /* CONFIG_IMAGE_CMDLINE_HACK */
|
||||||
|
|
||||||
+#ifdef CONFIG_PROM_EMU
|
+#ifdef CONFIG_PROM_EMU
|
||||||
+EXPORT(prom_emu_argv)
|
+EXPORT(prom_emu_argv)
|
||||||
@ -28,7 +28,7 @@
|
|||||||
__REF
|
__REF
|
||||||
|
|
||||||
NESTED(kernel_entry, 16, sp) # kernel entry point
|
NESTED(kernel_entry, 16, sp) # kernel entry point
|
||||||
@@ -183,6 +192,19 @@ NESTED(kernel_entry, 16, sp) # kernel
|
@@ -189,6 +198,19 @@ NESTED(kernel_entry, 16, sp) # kernel
|
||||||
LONG_S zero, (t0)
|
LONG_S zero, (t0)
|
||||||
bne t0, t1, 1b
|
bne t0, t1, 1b
|
||||||
|
|
||||||
|
@ -0,0 +1,59 @@
|
|||||||
|
--- a/arch/mips/kernel/setup.c
|
||||||
|
+++ b/arch/mips/kernel/setup.c
|
||||||
|
@@ -546,8 +546,28 @@ static void __init resource_init(void)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifdef CONFIG_IMAGE_CMDLINE_HACK
|
||||||
|
+static void __init process__image_cmdline(void)
|
||||||
|
+{
|
||||||
|
+ extern char __image_cmdline[];
|
||||||
|
+
|
||||||
|
+ if (__image_cmdline[0] == '\0')
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ if (__image_cmdline[0] == '-') {
|
||||||
|
+ strlcpy(arcs_cmdline, __image_cmdline, sizeof(arcs_cmdline));
|
||||||
|
+ } else {
|
||||||
|
+ strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline));
|
||||||
|
+ strlcat(arcs_cmdline, __image_cmdline, sizeof(arcs_cmdline));
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+#else
|
||||||
|
+static void inline process__image_cmdline(void) {}
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
void __init setup_arch(char **cmdline_p)
|
||||||
|
{
|
||||||
|
+ process__image_cmdline();
|
||||||
|
cpu_probe();
|
||||||
|
prom_init();
|
||||||
|
|
||||||
|
--- a/arch/mips/Kconfig
|
||||||
|
+++ b/arch/mips/Kconfig
|
||||||
|
@@ -806,6 +806,10 @@ config SYNC_R4K
|
||||||
|
config MIPS_MACHINE
|
||||||
|
def_bool n
|
||||||
|
|
||||||
|
+config IMAGE_CMDLINE_HACK
|
||||||
|
+ bool "OpenWrt specific image command line hack"
|
||||||
|
+ default n
|
||||||
|
+
|
||||||
|
config NO_IOPORT
|
||||||
|
def_bool n
|
||||||
|
|
||||||
|
--- a/arch/mips/kernel/head.S
|
||||||
|
+++ b/arch/mips/kernel/head.S
|
||||||
|
@@ -143,6 +143,12 @@ FEXPORT(__kernel_entry)
|
||||||
|
j kernel_entry
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#ifdef CONFIG_IMAGE_CMDLINE_HACK
|
||||||
|
+ .ascii "CMDLINE:"
|
||||||
|
+EXPORT(__image_cmdline)
|
||||||
|
+ .fill 0x400
|
||||||
|
+#endif /* CONFIG_IMAGE_CMDLINE_HACK */
|
||||||
|
+
|
||||||
|
__REF
|
||||||
|
|
||||||
|
NESTED(kernel_entry, 16, sp) # kernel entry point
|
@ -8,13 +8,13 @@
|
|||||||
+config PROM_EMU
|
+config PROM_EMU
|
||||||
+ def_bool n
|
+ def_bool n
|
||||||
|
|
||||||
config NO_IOPORT
|
config IMAGE_CMDLINE_HACK
|
||||||
def_bool n
|
bool "OpenWrt specific image command line hack"
|
||||||
--- a/arch/mips/kernel/head.S
|
--- a/arch/mips/kernel/head.S
|
||||||
+++ b/arch/mips/kernel/head.S
|
+++ b/arch/mips/kernel/head.S
|
||||||
@@ -143,6 +143,15 @@ FEXPORT(__kernel_entry)
|
@@ -149,6 +149,15 @@ EXPORT(__image_cmdline)
|
||||||
j kernel_entry
|
.fill 0x400
|
||||||
#endif
|
#endif /* CONFIG_IMAGE_CMDLINE_HACK */
|
||||||
|
|
||||||
+#ifdef CONFIG_PROM_EMU
|
+#ifdef CONFIG_PROM_EMU
|
||||||
+EXPORT(prom_emu_argv)
|
+EXPORT(prom_emu_argv)
|
||||||
@ -28,7 +28,7 @@
|
|||||||
__REF
|
__REF
|
||||||
|
|
||||||
NESTED(kernel_entry, 16, sp) # kernel entry point
|
NESTED(kernel_entry, 16, sp) # kernel entry point
|
||||||
@@ -183,6 +192,19 @@ NESTED(kernel_entry, 16, sp) # kernel
|
@@ -189,6 +198,19 @@ NESTED(kernel_entry, 16, sp) # kernel
|
||||||
LONG_S zero, (t0)
|
LONG_S zero, (t0)
|
||||||
bne t0, t1, 1b
|
bne t0, t1, 1b
|
||||||
|
|
||||||
|
@ -0,0 +1,59 @@
|
|||||||
|
--- a/arch/mips/kernel/setup.c
|
||||||
|
+++ b/arch/mips/kernel/setup.c
|
||||||
|
@@ -546,8 +546,28 @@ static void __init resource_init(void)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifdef CONFIG_IMAGE_CMDLINE_HACK
|
||||||
|
+static void __init process__image_cmdline(void)
|
||||||
|
+{
|
||||||
|
+ extern char __image_cmdline[];
|
||||||
|
+
|
||||||
|
+ if (__image_cmdline[0] == '\0')
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ if (__image_cmdline[0] == '-') {
|
||||||
|
+ strlcpy(arcs_cmdline, __image_cmdline, sizeof(arcs_cmdline));
|
||||||
|
+ } else {
|
||||||
|
+ strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline));
|
||||||
|
+ strlcat(arcs_cmdline, __image_cmdline, sizeof(arcs_cmdline));
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+#else
|
||||||
|
+static void inline process__image_cmdline(void) {}
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
void __init setup_arch(char **cmdline_p)
|
||||||
|
{
|
||||||
|
+ process__image_cmdline();
|
||||||
|
cpu_probe();
|
||||||
|
prom_init();
|
||||||
|
|
||||||
|
--- a/arch/mips/Kconfig
|
||||||
|
+++ b/arch/mips/Kconfig
|
||||||
|
@@ -840,6 +840,10 @@ config SYNC_R4K
|
||||||
|
config MIPS_MACHINE
|
||||||
|
def_bool n
|
||||||
|
|
||||||
|
+config IMAGE_CMDLINE_HACK
|
||||||
|
+ bool "OpenWrt specific image command line hack"
|
||||||
|
+ default n
|
||||||
|
+
|
||||||
|
config NO_IOPORT
|
||||||
|
def_bool n
|
||||||
|
|
||||||
|
--- a/arch/mips/kernel/head.S
|
||||||
|
+++ b/arch/mips/kernel/head.S
|
||||||
|
@@ -143,6 +143,12 @@ FEXPORT(__kernel_entry)
|
||||||
|
j kernel_entry
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#ifdef CONFIG_IMAGE_CMDLINE_HACK
|
||||||
|
+ .ascii "CMDLINE:"
|
||||||
|
+EXPORT(__image_cmdline)
|
||||||
|
+ .fill 0x400
|
||||||
|
+#endif /* CONFIG_IMAGE_CMDLINE_HACK */
|
||||||
|
+
|
||||||
|
__REF
|
||||||
|
|
||||||
|
NESTED(kernel_entry, 16, sp) # kernel entry point
|
@ -8,13 +8,13 @@
|
|||||||
+config PROM_EMU
|
+config PROM_EMU
|
||||||
+ def_bool n
|
+ def_bool n
|
||||||
|
|
||||||
config NO_IOPORT
|
config IMAGE_CMDLINE_HACK
|
||||||
def_bool n
|
bool "OpenWrt specific image command line hack"
|
||||||
--- a/arch/mips/kernel/head.S
|
--- a/arch/mips/kernel/head.S
|
||||||
+++ b/arch/mips/kernel/head.S
|
+++ b/arch/mips/kernel/head.S
|
||||||
@@ -143,6 +143,15 @@ FEXPORT(__kernel_entry)
|
@@ -149,6 +149,15 @@ EXPORT(__image_cmdline)
|
||||||
j kernel_entry
|
.fill 0x400
|
||||||
#endif
|
#endif /* CONFIG_IMAGE_CMDLINE_HACK */
|
||||||
|
|
||||||
+#ifdef CONFIG_PROM_EMU
|
+#ifdef CONFIG_PROM_EMU
|
||||||
+EXPORT(prom_emu_argv)
|
+EXPORT(prom_emu_argv)
|
||||||
@ -28,7 +28,7 @@
|
|||||||
__REF
|
__REF
|
||||||
|
|
||||||
NESTED(kernel_entry, 16, sp) # kernel entry point
|
NESTED(kernel_entry, 16, sp) # kernel entry point
|
||||||
@@ -183,6 +192,19 @@ NESTED(kernel_entry, 16, sp) # kernel
|
@@ -189,6 +198,19 @@ NESTED(kernel_entry, 16, sp) # kernel
|
||||||
LONG_S zero, (t0)
|
LONG_S zero, (t0)
|
||||||
bne t0, t1, 1b
|
bne t0, t1, 1b
|
||||||
|
|
||||||
|
@ -87,6 +87,7 @@ CONFIG_IFXMIPS_MII0=y
|
|||||||
CONFIG_IFXMIPS_PROM_ASC1=y
|
CONFIG_IFXMIPS_PROM_ASC1=y
|
||||||
CONFIG_IFXMIPS_SSC=y
|
CONFIG_IFXMIPS_SSC=y
|
||||||
CONFIG_IFXMIPS_WDT=y
|
CONFIG_IFXMIPS_WDT=y
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INITRAMFS_SOURCE=""
|
CONFIG_INITRAMFS_SOURCE=""
|
||||||
CONFIG_IRQ_CPU=y
|
CONFIG_IRQ_CPU=y
|
||||||
CONFIG_KALLSYMS=y
|
CONFIG_KALLSYMS=y
|
||||||
|
@ -81,6 +81,7 @@ CONFIG_IFXMIPS_MII0=y
|
|||||||
CONFIG_IFXMIPS_PROM_ASC1=y
|
CONFIG_IFXMIPS_PROM_ASC1=y
|
||||||
CONFIG_IFXMIPS_SSC=y
|
CONFIG_IFXMIPS_SSC=y
|
||||||
CONFIG_IFXMIPS_WDT=y
|
CONFIG_IFXMIPS_WDT=y
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INITRAMFS_SOURCE=""
|
CONFIG_INITRAMFS_SOURCE=""
|
||||||
CONFIG_IRQ_CPU=y
|
CONFIG_IRQ_CPU=y
|
||||||
CONFIG_KALLSYMS=y
|
CONFIG_KALLSYMS=y
|
||||||
|
@ -76,6 +76,7 @@ CONFIG_HAVE_OPROFILE=y
|
|||||||
CONFIG_HW_HAS_PCI=y
|
CONFIG_HW_HAS_PCI=y
|
||||||
CONFIG_HW_RANDOM=m
|
CONFIG_HW_RANDOM=m
|
||||||
# CONFIG_I2C is not set
|
# CONFIG_I2C is not set
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INITRAMFS_SOURCE=""
|
CONFIG_INITRAMFS_SOURCE=""
|
||||||
CONFIG_IRQ_CPU=y
|
CONFIG_IRQ_CPU=y
|
||||||
# CONFIG_ISDN is not set
|
# CONFIG_ISDN is not set
|
||||||
|
@ -75,6 +75,7 @@ CONFIG_HAVE_MLOCK=y
|
|||||||
CONFIG_HAVE_OPROFILE=y
|
CONFIG_HAVE_OPROFILE=y
|
||||||
CONFIG_HW_RANDOM=m
|
CONFIG_HW_RANDOM=m
|
||||||
# CONFIG_I2C is not set
|
# CONFIG_I2C is not set
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INITRAMFS_SOURCE=""
|
CONFIG_INITRAMFS_SOURCE=""
|
||||||
CONFIG_IRQ_CPU=y
|
CONFIG_IRQ_CPU=y
|
||||||
# CONFIG_ISDN is not set
|
# CONFIG_ISDN is not set
|
||||||
|
@ -94,6 +94,7 @@ CONFIG_HZ=250
|
|||||||
# CONFIG_HZ_100 is not set
|
# CONFIG_HZ_100 is not set
|
||||||
CONFIG_HZ_250=y
|
CONFIG_HZ_250=y
|
||||||
# CONFIG_I2C is not set
|
# CONFIG_I2C is not set
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INITRAMFS_SOURCE=""
|
CONFIG_INITRAMFS_SOURCE=""
|
||||||
CONFIG_IRQ_CPU=y
|
CONFIG_IRQ_CPU=y
|
||||||
CONFIG_KEXEC=y
|
CONFIG_KEXEC=y
|
||||||
|
@ -99,6 +99,7 @@ CONFIG_I2C_SIBYTE=y
|
|||||||
CONFIG_I2C=y
|
CONFIG_I2C=y
|
||||||
# CONFIG_IDE is not set
|
# CONFIG_IDE is not set
|
||||||
# CONFIG_IEEE80211 is not set
|
# CONFIG_IEEE80211 is not set
|
||||||
|
# CONFIG_IMAGE_CMDLINE_HACK is not set
|
||||||
CONFIG_INITRAMFS_ROOT_GID=0
|
CONFIG_INITRAMFS_ROOT_GID=0
|
||||||
CONFIG_INITRAMFS_ROOT_UID=0
|
CONFIG_INITRAMFS_ROOT_UID=0
|
||||||
CONFIG_INITRAMFS_SOURCE="../../root"
|
CONFIG_INITRAMFS_SOURCE="../../root"
|
||||||
|
Loading…
Reference in New Issue
Block a user