]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/altboot/files/spitz/altboot-menu/20-bootCF
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / altboot / files / spitz / altboot-menu / 20-bootCF
1 # !/bin/sh
2 #
3 # Copyright Matthias Hentges (c) 2005
4 #
5 # License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the GPL)
6
7 # FXIME: boot CF on spitz (hdb??)
8 exit 0
9
10 M_TITLE="Boot CF card"
11
12 die() {
13         echo "ERROR: $1" >/dev/tty0
14         exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1
15 }
16
17 # This function is activated by init.altboot by calling this script with the "run" option
18 run_module() {
19         
20         test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!"
21         
22         echo -n "Mounting rootfs rw..." >/dev/tty0
23         mount -o remount,rw / >/dev/tty0 2>&1 && echo ok  >/dev/tty0|| die "mount -o remount,rw / failed"
24
25         echo -n "Generating device files..." >/dev/tty0
26         /etc/init.d/devices start && echo ok  >/dev/tty0|| die "FAILED"
27
28                 
29         echo -n "Mounting /proc..." >/dev/tty0
30         mount /proc >/dev/tty0 2>&1 && echo ok  >/dev/tty0|| die "mount /proc failed!"
31                 
32         /etc/init.d/pcmcia start || die "/etc/init.d/pcmcia/start failed!"
33                 
34         echo ""
35
36         # Give the SD and CF mounting some time. This is a must for SD                  
37         sleep 2
38         
39         # Check for a real fs and loop-images.
40         check_target "$CF_MOUNTPOINT"
41                 
42 }
43
44
45 case "$1" in
46 title)  echo "$M_TITLE";;
47 run)    run_module "$2";;
48 esac
49