diff options
-rw-r--r-- | mk/build.mk | 5 | ||||
-rw-r--r-- | package/base-files/Makefile | 2 | ||||
-rw-r--r-- | package/base-files/src/etc/init.d/boot | 5 | ||||
-rwxr-xr-x | package/base-files/src/etc/init.d/rcS | 3 | ||||
-rw-r--r-- | package/base-files/src/etc/profile | 2 | ||||
-rw-r--r-- | package/base-files/src/etc/rc.shutdown | 2 | ||||
-rwxr-xr-x | package/base-files/src/init | 7 | ||||
-rw-r--r-- | target/Makefile | 6 | ||||
-rw-r--r-- | target/arm/Makefile | 6 | ||||
-rw-r--r-- | target/arm/sys-available/qemu-armhf | 2 | ||||
-rw-r--r-- | target/config/Config.in | 33 | ||||
-rw-r--r-- | target/config/Config.in.arch.default | 4 | ||||
-rw-r--r-- | target/linux/patches/3.10.33/startup.patch | 32 | ||||
-rw-r--r-- | target/linux/patches/3.11.10/startup.patch | 32 | ||||
-rw-r--r-- | target/linux/patches/3.12.13/startup.patch | 32 | ||||
-rw-r--r-- | target/linux/patches/3.13.6/startup.patch | 25 | ||||
-rw-r--r-- | target/linux/patches/3.4.82/startup.patch | 30 |
17 files changed, 169 insertions, 59 deletions
diff --git a/mk/build.mk b/mk/build.mk index 0c2360bc4..e35f29d22 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -510,11 +510,12 @@ test-framework: $(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then touch .exit; exit 1;fi; \ tabi=$$(grep ^ADK_TARGET_ABI= .config|cut -d \" -f 2);\ if [ -z $$tabi ];then abi="";else abi=_$$tabi;fi; \ + if [ $$arch = "armhf" ];then qarch=arm; else qarch=$$arch;fi; \ if [ -d root ];then rm -rf root;fi; \ - cp -a root_qemu_$${arch}_$${libc}$${abi} root; \ + cp -a root_qemu_$${qarch}_$${libc}$${abi} root; \ mkdir -p $(TOPDIR)/firmware/qemu/$$arch; \ tar cJvf $(TOPDIR)/firmware/qemu/$$arch/root.tar.xz root; \ - cp $(TOPDIR)/firmware/qemu_$${arch}_$${libc}$${abi}/qemu-$${arch}-archive-kernel \ + cp $(TOPDIR)/firmware/qemu_$${qarch}_$${libc}$${abi}/qemu-$${qarch}-archive-kernel \ $(TOPDIR)/firmware/qemu/$$arch/kernel; \ rm .config; \ done; \ diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 89b9414d9..11fb4f507 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/mk/rootfs.mk PKG_NAME:= base-files PKG_VERSION:= 1.0 -PKG_RELEASE:= 71 +PKG_RELEASE:= 72 PKG_SECTION:= base PKG_DESCR:= basic files and scripts PKG_BUILDDEP:= pkgconf-host file-host diff --git a/package/base-files/src/etc/init.d/boot b/package/base-files/src/etc/init.d/boot index fc2f79ac2..f52e8dc78 100644 --- a/package/base-files/src/etc/init.d/boot +++ b/package/base-files/src/etc/init.d/boot @@ -4,6 +4,10 @@ . /etc/functions.sh +if [ -f /proc/sys/kernel/printk ];then + echo 0 > /proc/sys/kernel/printk +fi + # remount /dev with smaller size mount -o remount,nosuid,size=128k,mode=0755 -t tmpfs mdev /dev @@ -15,7 +19,6 @@ mount -o remount,nosuid,nodev,mode=1777,size=${size}k -t tmpfs tmpfs /tmp # start mdev dynamic device node management echo >/dev/mdev.seq echo "/sbin/mdev" >/proc/sys/kernel/hotplug -mdev -s # seed some random cat /etc/.rnd >/dev/urandom 2>&1 diff --git a/package/base-files/src/etc/init.d/rcS b/package/base-files/src/etc/init.d/rcS index ef3a52a31..e27bc9eb5 100755 --- a/package/base-files/src/etc/init.d/rcS +++ b/package/base-files/src/etc/init.d/rcS @@ -3,6 +3,7 @@ if [ -f /proc/sys/kernel/printk ];then echo 0 > /proc/sys/kernel/printk fi +ln -s /proc/self/fd/2 /dev/stderr echo "System initialization ..." export PATH=/bin:/sbin:/usr/bin:/usr/sbin { @@ -11,4 +12,4 @@ export PATH=/bin:/sbin:/usr/bin:/usr/sbin while read line; do sh ${line%%:*} autostart done -} | logger -s -p 6 -t '' +} |tee /dev/stderr |logger -p 6 -t '' diff --git a/package/base-files/src/etc/profile b/package/base-files/src/etc/profile index ce425b54c..eb3015d46 100644 --- a/package/base-files/src/etc/profile +++ b/package/base-files/src/etc/profile @@ -12,3 +12,5 @@ cat /etc/banner 2>&- alias l='ls -lF' alias la='ls -A' alias ll='ls -alF' +alias ro='mount -o remount,ro /' +alias rw='mount -o remount,rw /' diff --git a/package/base-files/src/etc/rc.shutdown b/package/base-files/src/etc/rc.shutdown deleted file mode 100644 index 5a1a0aa78..000000000 --- a/package/base-files/src/etc/rc.shutdown +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -# add code for shutdown routine diff --git a/package/base-files/src/init b/package/base-files/src/init deleted file mode 100755 index a27548217..000000000 --- a/package/base-files/src/init +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# devtmpfs does not get automounted for initramfs -/bin/mount -t devtmpfs devtmpfs /dev -exec 0</dev/console -exec 1>/dev/console -exec 2>/dev/console -exec /sbin/init $* diff --git a/target/Makefile b/target/Makefile index 1e091d3dc..313a616a1 100644 --- a/target/Makefile +++ b/target/Makefile @@ -53,7 +53,7 @@ config-prepare: $(TOPDIR)/.config while IFS='=' read symbol value; do \ sed -i -e "/^# $$symbol/d" ${BUILD_DIR}/.kernelconfig.board; \ done;) - @sed -i -e 's#^\(CONFIG_.*CMDLINE="\)\(.*\)"#\1\2 init=/sbin/init"#' \ + @sed -i -e 's#^\(CONFIG_.*CMDLINE="\)\(.*\)"#\1\2 ro"#' \ ${BUILD_DIR}/.kernelconfig.board @sed -i -e 's#^\(CONFIG_.*CMDLINE="\)\(.*\)"#\1\2 ${FS_CMDLINE}"#' \ ${BUILD_DIR}/.kernelconfig.board @@ -61,6 +61,10 @@ ifneq ($(ADK_TARGET_CMDLINE),) @sed -i -e 's#^\(CONFIG_.*CMDLINE="\)\(.*\)"#\1\2 ${ADK_TARGET_CMDLINE}"#' \ ${BUILD_DIR}/.kernelconfig.board endif +ifeq ($(ADK_TARGET_QEMU_WITH_GRAPHIC),y) + @sed -i -e 's#^\(CONFIG_.*CMDLINE="\)\(.*\)"#\1\2 console=tty0"#' \ + ${BUILD_DIR}/.kernelconfig.board +endif ifneq ($(ADK_PACKAGE_CRYPTINIT_ROOT),) @sed -i -e 's#^\(CONFIG_.*CMDLINE="\)\(.*\)"#\1\2 ${ADK_PACKAGE_CMDLINE}"#' \ ${BUILD_DIR}/.kernelconfig.board diff --git a/target/arm/Makefile b/target/arm/Makefile index e2194f1d3..77148e261 100644 --- a/target/arm/Makefile +++ b/target/arm/Makefile @@ -61,7 +61,7 @@ ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y) @echo "Use following command to install it on SD card:" @echo "sudo ./scripts/install-rpi.sh /dev/sdb $(FW_DIR)/$(ROOTFSTARBALL)" endif -ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM),y) +ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM)$(ADK_TARGET_SYSTEM_QEMU_ARMHF),y) @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL) @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}' @echo "Use following command to create a QEMU Image:" @@ -75,7 +75,7 @@ imageinstall: $(FW_DIR)/$(INITRAMFS) @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL) @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}' @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}' -ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM),y) +ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM)$(ADK_TARGET_SYSTEM_QEMU_ARMHF),y) ifeq ($(ADK_TARGET_QEMU_WITH_VIRTIO),y) @echo 'qemu-system-arm -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -drive file=qemu-${CPU_ARCH}.img,if=virtio,index=0 -net nic,model=virtio -net user' else @@ -88,7 +88,7 @@ ifeq ($(ADK_TARGET_FS),initramfs-piggyback) imageinstall: createinitramfs @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL) @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}' -ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM),y) +ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM)$(ADK_TARGET_SYSTEM_QEMU_ARMHF),y) @echo "Start qemu with following command line:" @echo 'qemu-system-arm -M $(MACH) -nographic $(NET) -kernel $(FW_DIR)/$(TARGET_KERNEL)' endif diff --git a/target/arm/sys-available/qemu-armhf b/target/arm/sys-available/qemu-armhf index 798391b8c..85cc9c00f 100644 --- a/target/arm/sys-available/qemu-armhf +++ b/target/arm/sys-available/qemu-armhf @@ -1,7 +1,7 @@ config ADK_TARGET_SYSTEM_QEMU_ARMHF bool "Qemu Emulator (hard-float)" select ADK_arm - select ADK_qemu_arm + select ADK_qemu_armhf select ADK_little select ADK_hard_float select ADK_eabihf diff --git a/target/config/Config.in b/target/config/Config.in index a917f6a3c..d2d5b6671 100644 --- a/target/config/Config.in +++ b/target/config/Config.in @@ -561,7 +561,6 @@ config ADK_TARGET_CPU_ARCH default "mips" if ADK_LINUX_MIPS && ADK_big default "mipsel" if ADK_LINUX_MIPS && ADK_little default "arm" if ADK_LINUX_ARM && ADK_little - default "armeb" if ADK_LINUX_ARM && ADK_big default "sparc" if ADK_LINUX_SPARC default "sparc64" if ADK_LINUX_SPARC64 default "sh4" if ADK_LINUX_SH && ADK_little @@ -615,28 +614,27 @@ config ADK_TARGET_CFLAGS config ADK_TARGET_CMDLINE string default "dwc_otg.fiq_split_enable=1" if ADK_TARGET_SYSTEM_RASPBERRY_PI - default "console=tty0" if ADK_TARGET_SYSTEM_LEMOTE_YEELONG default "console=ttymxc0,115200" if ADK_TARGET_SYSTEM_CUBOX_I + default "console=tty0" if ADK_TARGET_SYSTEM_LEMOTE_YEELONG + default "console=ttyS0,115200 console=tty0" if ADK_TARGET_SYSTEM_IBM_X40 + default "console=ttyS0,115200 console=tty0 fbcon=rotate:1" if ADK_TARGET_SYSTEM_SHARP_ZAURUS default "console=ttyS0,9600" if ADK_TARGET_SYSTEM_FON_FON2100 default "console=ttyS0,38400" if ADK_TARGET_SYSTEM_PCENGINES_WRAP default "console=ttyS0,115200 console=tty0 geodewdt.nowayout=1" if ADK_TARGET_SYSTEM_PCENGINES_ALIX1C - default "console=ttyS0,115200 console=tty0" if ADK_TARGET_SYSTEM_IBM_X40 - default "console=ttyS0,115200 console=tty0" if ADK_TARGET_SYSTEM_INTEL_ATOM - default "console=ttyS0,115200 console=tty0" if ADK_TARGET_SYSTEM_QEMU_I686 - default "console=ttyS0,115200 console=tty0" if ADK_TARGET_SYSTEM_QEMU_X86_64 - default "console=ttyS0,115200 console=tty0" if ADK_TARGET_SYSTEM_QEMU_SPARC64 - default "console=ttyS0,9600 console=tty0" if ADK_TARGET_SYSTEM_QEMU_PPC - default "console=hvc0 console=tty0" if ADK_TARGET_SYSTEM_QEMU_PPC64 - default "console=ttyUL0" if ADK_TARGET_QEMU_MICROBLAZE_MODEL_S3ADSP1800 - default "console=ttyS0,115200" if ADK_TARGET_QEMU_MICROBLAZE_MODEL_ML605 default "console=ttyS0,115200 console=tty0" if ADK_TARGET_SYSTEM_VBOX_I686 - default "console=ttyS0,115200 console=tty0" if ADK_TARGET_QEMU_ARM_MODEL_SPITZ - default "console=ttyAMA0 console=tty0" if ADK_TARGET_QEMU_ARM_MODEL_VERSATILEPB - default "console=ttyAMA0 console=tty0" if ADK_TARGET_QEMU_ARM_MODEL_VEXPRESS_A9 - default "console=ttyS0,115200 console=tty0 fbcon=rotate:1" if ADK_TARGET_SYSTEM_SHARP_ZAURUS - default "console=ttySC1 console=tty0" if ADK_TARGET_SYSTEM_QEMU_SH4 - default "console=ttySC1 console=tty0" if ADK_TARGET_SYSTEM_QEMU_SH4EB default "console=tty0" if ADK_TARGET_SYSTEM_ARANYM_M68K + default "console=ttyS0,115200" if ADK_TARGET_SYSTEM_QEMU_I686 + default "console=ttyS0,115200" if ADK_TARGET_SYSTEM_QEMU_X86_64 + default "console=ttyS0,115200" if ADK_TARGET_SYSTEM_QEMU_SPARC64 + default "console=ttyS0,9600" if ADK_TARGET_SYSTEM_QEMU_PPC + default "console=hvc0" if ADK_TARGET_SYSTEM_QEMU_PPC64 + default "console=ttyUL0" if ADK_TARGET_QEMU_MICROBLAZE_MODEL_S3ADSP1800 + default "console=ttyS0,115200" if ADK_TARGET_QEMU_MICROBLAZE_MODEL_ML605 + default "console=ttyS0,115200" if ADK_TARGET_QEMU_ARM_MODEL_SPITZ + default "console=ttyAMA0" if ADK_TARGET_QEMU_ARM_MODEL_VERSATILEPB + default "console=ttyAMA0" if ADK_TARGET_QEMU_ARM_MODEL_VEXPRESS_A9 + default "console=ttySC1" if ADK_TARGET_SYSTEM_QEMU_SH4 + default "console=ttySC1" if ADK_TARGET_SYSTEM_QEMU_SH4EB default "console=ttyS0,115200" if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D13 default "console=ttyS0,115200" if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D2 default "" @@ -770,6 +768,7 @@ config ADK_TARGET_ROOTFS_INITRAMFS ADK_LINUX_NATIVE depends on !ADK_HARDWARE_VBOX depends on !ADK_TARGET_SYSTEM_RASPBERRY_PI + select ADK_KERNEL_BLK_DEV_INITRD select ADK_KERNEL_BLK_DEV_RAM if ADK_TARGET_SYSTEM_ARANYM_M68K help create an read-only initramfs system. diff --git a/target/config/Config.in.arch.default b/target/config/Config.in.arch.default index 43d1e5399..90401de3d 100644 --- a/target/config/Config.in.arch.default +++ b/target/config/Config.in.arch.default @@ -1,7 +1,4 @@ # target architectures -config ADK_native - bool - config ADK_arm bool @@ -48,5 +45,4 @@ config ADK_TARGET_ARCH default "sh" if ADK_sh default "x86" if ADK_x86 default "x86_64" if ADK_x86_64 - default "native" if ADK_native diff --git a/target/linux/patches/3.10.33/startup.patch b/target/linux/patches/3.10.33/startup.patch index 4dccae8c1..3ebc5db1e 100644 --- a/target/linux/patches/3.10.33/startup.patch +++ b/target/linux/patches/3.10.33/startup.patch @@ -1,12 +1,34 @@ -diff -Nur linux-3.7.3.orig/init/main.c linux-3.7.3/init/main.c ---- linux-3.7.3.orig/init/main.c 2013-01-17 17:47:40.000000000 +0100 -+++ linux-3.7.3/init/main.c 2013-01-19 15:08:13.000000000 +0100 -@@ -879,6 +880,8 @@ +diff -Nur linux-3.10.33.orig/init/initramfs.c linux-3.10.33/init/initramfs.c +--- linux-3.10.33.orig/init/initramfs.c 2014-03-07 06:58:45.000000000 +0100 ++++ linux-3.10.33/init/initramfs.c 2014-03-15 18:32:07.240436750 +0100 +@@ -622,6 +622,9 @@ + */ + load_default_modules(); + } ++#ifdef CONFIG_DEVTMPFS_MOUNT ++ devtmpfs_mount("dev"); ++#endif + return 0; + } + rootfs_initcall(populate_rootfs); +diff -Nur linux-3.10.33.orig/init/main.c linux-3.10.33/init/main.c +--- linux-3.10.33.orig/init/main.c 2014-03-07 06:58:45.000000000 +0100 ++++ linux-3.10.33/init/main.c 2014-03-15 18:32:07.240436750 +0100 +@@ -885,6 +885,8 @@ if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) - printk(KERN_WARNING "Warning: unable to open an initial console.\n"); + pr_err("Warning: unable to open an initial console.\n"); + printk(KERN_WARNING "Starting Linux (built with OpenADK).\n"); + (void) sys_dup(0); (void) sys_dup(0); /* +@@ -893,7 +895,7 @@ + */ + + if (!ramdisk_execute_command) +- ramdisk_execute_command = "/init"; ++ ramdisk_execute_command = "/sbin/init"; + + if (sys_access((const char __user *) ramdisk_execute_command, 0) != 0) { + ramdisk_execute_command = NULL; diff --git a/target/linux/patches/3.11.10/startup.patch b/target/linux/patches/3.11.10/startup.patch index 4dccae8c1..e7285873d 100644 --- a/target/linux/patches/3.11.10/startup.patch +++ b/target/linux/patches/3.11.10/startup.patch @@ -1,12 +1,34 @@ -diff -Nur linux-3.7.3.orig/init/main.c linux-3.7.3/init/main.c ---- linux-3.7.3.orig/init/main.c 2013-01-17 17:47:40.000000000 +0100 -+++ linux-3.7.3/init/main.c 2013-01-19 15:08:13.000000000 +0100 -@@ -879,6 +880,8 @@ +diff -Nur linux-3.11.10.orig/init/initramfs.c linux-3.11.10/init/initramfs.c +--- linux-3.11.10.orig/init/initramfs.c 2013-11-29 19:42:37.000000000 +0100 ++++ linux-3.11.10/init/initramfs.c 2014-03-15 18:42:01.586249887 +0100 +@@ -622,6 +622,9 @@ + */ + load_default_modules(); + } ++#ifdef CONFIG_DEVTMPFS_MOUNT ++ devtmpfs_mount("dev"); ++#endif + return 0; + } + rootfs_initcall(populate_rootfs); +diff -Nur linux-3.11.10.orig/init/main.c linux-3.11.10/init/main.c +--- linux-3.11.10.orig/init/main.c 2013-11-29 19:42:37.000000000 +0100 ++++ linux-3.11.10/init/main.c 2014-03-15 18:42:01.590249897 +0100 +@@ -886,6 +886,8 @@ if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) - printk(KERN_WARNING "Warning: unable to open an initial console.\n"); + pr_err("Warning: unable to open an initial console.\n"); + printk(KERN_WARNING "Starting Linux (built with OpenADK).\n"); + (void) sys_dup(0); (void) sys_dup(0); /* +@@ -894,7 +896,7 @@ + */ + + if (!ramdisk_execute_command) +- ramdisk_execute_command = "/init"; ++ ramdisk_execute_command = "/sbin/init"; + + if (sys_access((const char __user *) ramdisk_execute_command, 0) != 0) { + ramdisk_execute_command = NULL; diff --git a/target/linux/patches/3.12.13/startup.patch b/target/linux/patches/3.12.13/startup.patch index 4dccae8c1..4cd477da1 100644 --- a/target/linux/patches/3.12.13/startup.patch +++ b/target/linux/patches/3.12.13/startup.patch @@ -1,12 +1,34 @@ -diff -Nur linux-3.7.3.orig/init/main.c linux-3.7.3/init/main.c ---- linux-3.7.3.orig/init/main.c 2013-01-17 17:47:40.000000000 +0100 -+++ linux-3.7.3/init/main.c 2013-01-19 15:08:13.000000000 +0100 -@@ -879,6 +880,8 @@ +diff -Nur linux-3.12.13.orig/init/initramfs.c linux-3.12.13/init/initramfs.c +--- linux-3.12.13.orig/init/initramfs.c 2014-02-22 22:32:50.000000000 +0100 ++++ linux-3.12.13/init/initramfs.c 2014-03-15 18:09:39.040618589 +0100 +@@ -622,6 +622,9 @@ + */ + load_default_modules(); + } ++#ifdef CONFIG_DEVTMPFS_MOUNT ++ devtmpfs_mount("dev"); ++#endif + return 0; + } + rootfs_initcall(populate_rootfs); +diff -Nur linux-3.12.13.orig/init/main.c linux-3.12.13/init/main.c +--- linux-3.12.13.orig/init/main.c 2014-02-22 22:32:50.000000000 +0100 ++++ linux-3.12.13/init/main.c 2014-03-15 18:09:39.044618600 +0100 +@@ -888,6 +888,8 @@ if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) - printk(KERN_WARNING "Warning: unable to open an initial console.\n"); + pr_err("Warning: unable to open an initial console.\n"); + printk(KERN_WARNING "Starting Linux (built with OpenADK).\n"); + (void) sys_dup(0); (void) sys_dup(0); /* +@@ -896,7 +898,7 @@ + */ + + if (!ramdisk_execute_command) +- ramdisk_execute_command = "/init"; ++ ramdisk_execute_command = "/sbin/init"; + + if (sys_access((const char __user *) ramdisk_execute_command, 0) != 0) { + ramdisk_execute_command = NULL; diff --git a/target/linux/patches/3.13.6/startup.patch b/target/linux/patches/3.13.6/startup.patch index be4ea469d..d396b75e4 100644 --- a/target/linux/patches/3.13.6/startup.patch +++ b/target/linux/patches/3.13.6/startup.patch @@ -10,3 +10,28 @@ diff -Nur linux-3.13.3.orig/init/main.c linux-3.13.3/init/main.c (void) sys_dup(0); (void) sys_dup(0); /* +diff -Nur linux-3.13.6.orig/init/initramfs.c linux-3.13.6/init/initramfs.c +--- linux-3.13.6.orig/init/initramfs.c 2014-03-07 07:07:02.000000000 +0100 ++++ linux-3.13.6/init/initramfs.c 2014-03-15 12:11:31.882731916 +0100 +@@ -622,6 +622,9 @@ + */ + load_default_modules(); + } ++#ifdef CONFIG_DEVTMPFS_MOUNT ++ devtmpfs_mount("dev"); ++#endif + return 0; + } + rootfs_initcall(populate_rootfs); +diff -Nur linux-3.13.6.orig/init/main.c linux-3.13.6/init/main.c +--- linux-3.13.6.orig/init/main.c 2014-03-07 07:07:02.000000000 +0100 ++++ linux-3.13.6/init/main.c 2014-03-15 12:13:16.459024452 +0100 +@@ -924,7 +924,7 @@ + */ + + if (!ramdisk_execute_command) +- ramdisk_execute_command = "/init"; ++ ramdisk_execute_command = "/sbin/init"; + + if (sys_access((const char __user *) ramdisk_execute_command, 0) != 0) { + ramdisk_execute_command = NULL; diff --git a/target/linux/patches/3.4.82/startup.patch b/target/linux/patches/3.4.82/startup.patch index 4f47eddcb..c26430bcb 100644 --- a/target/linux/patches/3.4.82/startup.patch +++ b/target/linux/patches/3.4.82/startup.patch @@ -1,7 +1,20 @@ -diff -Nur linux-2.6.34.orig/init/main.c linux-2.6.34/init/main.c ---- linux-2.6.34.orig/init/main.c 2010-05-16 23:17:36.000000000 +0200 -+++ linux-2.6.34/init/main.c 2010-05-20 20:13:26.321613615 +0200 -@@ -889,6 +890,8 @@ +diff -Nur linux-3.4.82.orig/init/initramfs.c linux-3.4.82/init/initramfs.c +--- linux-3.4.82.orig/init/initramfs.c 2014-02-22 19:33:35.000000000 +0100 ++++ linux-3.4.82/init/initramfs.c 2014-03-15 18:46:22.674928245 +0100 +@@ -606,6 +606,9 @@ + free_initrd(); + #endif + } ++#ifdef CONFIG_DEVTMPFS_MOUNT ++ devtmpfs_mount("dev"); ++#endif + return 0; + } + rootfs_initcall(populate_rootfs); +diff -Nur linux-3.4.82.orig/init/main.c linux-3.4.82/init/main.c +--- linux-3.4.82.orig/init/main.c 2014-02-22 19:33:35.000000000 +0100 ++++ linux-3.4.82/init/main.c 2014-03-15 18:46:22.674928245 +0100 +@@ -873,6 +873,8 @@ if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) printk(KERN_WARNING "Warning: unable to open an initial console.\n"); @@ -10,3 +23,12 @@ diff -Nur linux-2.6.34.orig/init/main.c linux-2.6.34/init/main.c (void) sys_dup(0); (void) sys_dup(0); /* +@@ -881,7 +883,7 @@ + */ + + if (!ramdisk_execute_command) +- ramdisk_execute_command = "/init"; ++ ramdisk_execute_command = "/sbin/init"; + + if (sys_access((const char __user *) ramdisk_execute_command, 0) != 0) { + ramdisk_execute_command = NULL; |