summaryrefslogtreecommitdiff
path: root/i/pc104/initrd/conf
diff options
context:
space:
mode:
authordufourj2006-01-16 21:47:12 +0000
committerdufourj2006-01-16 21:47:12 +0000
commit144fba14de1f73fb7f8ce38639f05b795c8af141 (patch)
tree2159ee6d058da4f3c88d94c9accf3f013041f1a9 /i/pc104/initrd/conf
parentfffdf9f5a7918070577ff6a96f083e957c2cf377 (diff)
PC104 :
- modifications mineurs pour les scripts du mode autonome ; - début du script d'update en autonome ; - correction du problème de dhcp en autonome ; - problème de ctrl-c ; - SD Card sux à mort !!
Diffstat (limited to 'i/pc104/initrd/conf')
-rw-r--r--i/pc104/initrd/conf/busybox/config10
-rw-r--r--i/pc104/initrd/conf/fstab6
-rwxr-xr-xi/pc104/initrd/conf/linuxrc11
-rwxr-xr-xi/pc104/initrd/conf/udhcpc.script3
-rwxr-xr-xi/pc104/initrd/conf/update_initrd.sh33
5 files changed, 51 insertions, 12 deletions
diff --git a/i/pc104/initrd/conf/busybox/config b/i/pc104/initrd/conf/busybox/config
index 3a798b4..8aeee0f 100644
--- a/i/pc104/initrd/conf/busybox/config
+++ b/i/pc104/initrd/conf/busybox/config
@@ -155,7 +155,7 @@ CONFIG_TEST=y
# CONFIG_TR is not set
# CONFIG_FEATURE_TR_CLASSES is not set
# CONFIG_FEATURE_TR_EQUIV is not set
-# CONFIG_TRUE is not set
+CONFIG_TRUE=y
# CONFIG_TTY is not set
# CONFIG_UNAME is not set
# CONFIG_UNIQ is not set
@@ -434,7 +434,7 @@ CONFIG_FEATURE_FANCY_PING=y
CONFIG_UDHCPC=y
# CONFIG_DUMPLEASES is not set
# CONFIG_FEATURE_UDHCP_SYSLOG is not set
-CONFIG_FEATURE_UDHCP_DEBUG=y
+# CONFIG_FEATURE_UDHCP_DEBUG is not set
# CONFIG_ZCIP is not set
#
@@ -451,8 +451,8 @@ CONFIG_FEATURE_UDHCP_DEBUG=y
# CONFIG_FEATURE_PS_WIDE is not set
# CONFIG_RENICE is not set
# CONFIG_BB_SYSCTL is not set
-# CONFIG_TOP is not set
-# CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE is not set
+CONFIG_TOP=y
+CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
# CONFIG_UPTIME is not set
#
@@ -476,7 +476,7 @@ CONFIG_ASH_JOB_CONTROL=y
# CONFIG_ASH_MATH_SUPPORT_64 is not set
# CONFIG_ASH_GETOPTS is not set
# CONFIG_ASH_CMDCMD is not set
-CONFIG_ASH_BUILTIN_ECHO=y
+# CONFIG_ASH_BUILTIN_ECHO is not set
# CONFIG_ASH_MAIL is not set
# CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set
# CONFIG_ASH_RANDOM_SUPPORT is not set
diff --git a/i/pc104/initrd/conf/fstab b/i/pc104/initrd/conf/fstab
index df2712b..929b4c7 100644
--- a/i/pc104/initrd/conf/fstab
+++ b/i/pc104/initrd/conf/fstab
@@ -1,5 +1,5 @@
# /etc/fstab: static file system information.
#
-# <file system> <mount point> <type> <options> <dump> <pass>
-proc /proc proc defaults 0 0
-
+# <file system> <mount point> <type> <options> <dump> <pass>
+proc /proc proc defaults 0 0
+/dev/hda1 /mnt/localsys ext2 defaults,ro 0 0
diff --git a/i/pc104/initrd/conf/linuxrc b/i/pc104/initrd/conf/linuxrc
index 7b1e789..6ddf919 100755
--- a/i/pc104/initrd/conf/linuxrc
+++ b/i/pc104/initrd/conf/linuxrc
@@ -10,11 +10,14 @@ mount /proc
echo -ne "\007"
#done
+# Launch update script in background
+./etc/update_initrd.sh &
+
# TODO Export variables (LD...)
# Launch the program
# . /robot/start.sh
#
-while true
-do
- /bin/sh
-done
+#while true
+#do
+# /bin/sh
+#done
diff --git a/i/pc104/initrd/conf/udhcpc.script b/i/pc104/initrd/conf/udhcpc.script
new file mode 100755
index 0000000..6008ffa
--- /dev/null
+++ b/i/pc104/initrd/conf/udhcpc.script
@@ -0,0 +1,3 @@
+#!/bin/sh
+# Configure network
+/sbin/ifconfig $interface $ip
diff --git a/i/pc104/initrd/conf/update_initrd.sh b/i/pc104/initrd/conf/update_initrd.sh
new file mode 100755
index 0000000..b06057c
--- /dev/null
+++ b/i/pc104/initrd/conf/update_initrd.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+# The purpose of this script is to provide a system to update the PC104 in
+# autonomous mode via the network.
+# It is called by the linuxrc and should not be called by hand.
+
+# PATH is not correctly set...
+PATH=$PATH:/usr/sbin/
+# Bring eth0 up
+ifconfig eth0 up
+# Get the configuration of the network via dhcp
+udhcpc -i eth0 -s /etc/udhcpc.script
+# Wait here for a connection. I do not know if it is a feature or a bug, but
+# when nc receive a connection, it is end here.
+nc -l -p 1234
+
+# Mount the real system
+mount /mnt/localsys
+# Pivot root to the new_root.
+# XXX It is a good idea to pivot_root ? Chroot is better ?
+cd /mnt/localsys
+pivot_root . old_root
+exec chroot . sh <dev/console >dev/console 2>&1
+# This part sux : what's about the old process ?
+# Kill them ?
+umount /old_root
+# We should call all the script
+# TODO : find a better way to call it.
+/etc/init.d/mountvirtfs start
+/etc/init.d/mountall.sh start
+/etc/init.d/networking start
+/etc/init.d/ssh start
+# XXX And for the end ?
+# The FS has enough errors so do it well ! Umount everything !