فهرست منبع

reworking startup using devtmpfs

After this change it is not needed to create
console, tty and null device nodes for nfsroot boot.
Waldemar Brodkorb 15 سال پیش
والد
کامیت
0d9e15f433

+ 0 - 1
package/asterisk/Makefile

@@ -24,7 +24,6 @@ PKG_SITES:=		http://downloads.asterisk.org/pub/telephony/asterisk/releases/
 
 PKG_TARGET_DEPENDS:=	!foxboard
 
-#PKG_DEPENDS_MAIN:=		asterisk
 PKG_DESCR_CHAN_MGCP:=		Media Gateway Control Protocol implementation
 PKG_DESCR_CHAN_SKINNY:=		Skinny Client Control Protocol implementation
 PKG_DESCR_CHAN_IAX2:=		Support for the Inter Asterisk Protocol

+ 3 - 2
package/base-files/extra/init

@@ -1,5 +1,5 @@
 #!/bin/sh
-echo "Starting system ..."
+echo "System initialization ..."
 export PATH=/bin:/sbin:/usr/bin:/usr/sbin
 mount -nt proc proc /proc
 mount -o nosuid,nodev,noexec -t sysfs sysfs /sys
@@ -11,7 +11,6 @@ mount -o nosuid,nodev,noexec -t sysfs sysfs /sys
 mount -o nosuid,size=128k,mode=0755 -t tmpfs mdev /dev
 mkdir /dev/pts /dev/shm
 mount -o nosuid,noexec -t devpts devpts /dev/pts
-exec 0<>/dev/console >&0 2>&0
 echo >/dev/mdev.seq
 echo "/sbin/mdev" >/proc/sys/kernel/hotplug
 mdev -s
@@ -19,4 +18,6 @@ mount -o remount,rw /
 cat /etc/.rnd >/dev/urandom 2>&1
 [ -f /etc/fstab ] && mount -a
 [ -x /sbin/cfgfs ] && { cfgfs setup; mount -o remount,ro /;}
+echo "Starting system init ..."
+exec 0<>/dev/console >&0 2>&0
 exec /sbin/init

+ 1 - 1
package/busybox/Makefile

@@ -56,11 +56,11 @@ else
 	$(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \
 	    IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) install $(MAKE_TRACE)
 endif
+	$(CP) $(WRKINST)/* $(IDIR_BUSYBOX)/
 ifeq ($(ADK_DEBUG),y)
 	${INSTALL_BIN} $(WRKBUILD)/busybox_unstripped \
 		$(IDIR_BUSYBOX)/bin/busybox
 endif
-	$(CP) $(WRKINST)/* $(IDIR_BUSYBOX)/
 
 fake:	$(TOPDIR)/.busyboxcfg do-configure do-install
 

+ 9 - 9
target/linux/patches/2.6.32/startup.patch

@@ -1,16 +1,16 @@
-diff -Nur linux-2.6.30.5.orig/init/main.c linux-2.6.30.5/init/main.c
---- linux-2.6.30.5.orig/init/main.c	2009-08-16 23:19:38.000000000 +0200
-+++ linux-2.6.30.5/init/main.c	2009-08-22 20:26:39.000000000 +0200
-@@ -811,7 +811,7 @@
- 	numa_default_policy();
- 
+diff -Nur linux-2.6.32.orig/init/main.c linux-2.6.32/init/main.c
+--- linux-2.6.32.orig/init/main.c	2009-12-03 04:51:21.000000000 +0100
++++ linux-2.6.32/init/main.c	2010-01-31 11:01:41.154334301 +0100
+@@ -814,6 +814,8 @@
  	if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
--		printk(KERN_WARNING "Warning: unable to open an initial console.\n");
-+		printk(KERN_WARNING "Starting Linux (build with OpenADK).\n");
+ 		printk(KERN_WARNING "Warning: unable to open an initial console.\n");
  
++	printk(KERN_WARNING "Starting Linux (build with OpenADK).\n");
++
  	(void) sys_dup(0);
  	(void) sys_dup(0);
-@@ -835,6 +835,7 @@
+ 
+@@ -836,6 +838,7 @@
  		printk(KERN_WARNING "Failed to execute %s.  Attempting "
  					"defaults...\n", execute_command);
  	}

+ 0 - 1
target/rb532/Makefile

@@ -26,7 +26,6 @@ imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
 	@echo
 	@echo 'The kernel file is: ${BIN_DIR}/${ADK_TARGET}-${FS}-kernel'
 	@echo 'The nfs root tarball is: ${BIN_DIR}/${ROOTFSTARBALL}'
-	@echo 'Do not forget to create device nodes for console,null and tty in your nfsroot'
 	@echo 'Login as user root with password linux123 via ssh or console'
 endif
 

+ 3 - 5
target/rb532/kernel.config

@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.32
-# Sat Jan 30 21:07:56 2010
+# Sat Jan 30 22:33:23 2010
 #
 CONFIG_MIPS=y
 
@@ -378,7 +378,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # Generic Driver Options
 #
 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-# CONFIG_DEVTMPFS is not set
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
 # CONFIG_STANDALONE is not set
 # CONFIG_PREVENT_FIRMWARE_BUILD is not set
 # CONFIG_FW_LOADER is not set
@@ -412,9 +413,6 @@ CONFIG_MTD_BLOCK=y
 #
 # CONFIG_MTD_CFI is not set
 # CONFIG_MTD_JEDECPROBE is not set
-# CONFIG_MTD_CFI_NOSWAP is not set
-# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
 CONFIG_MTD_MAP_BANK_WIDTH_1=y
 CONFIG_MTD_MAP_BANK_WIDTH_2=y
 CONFIG_MTD_MAP_BANK_WIDTH_4=y