openap-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[openap-cvs] : openap-main/rootskel Makefile,1.1,1.2 README,1.1,1.2


From: David Kimdon <address@hidden>
Subject: [openap-cvs] : openap-main/rootskel Makefile,1.1,1.2 README,1.1,1.2
Date: Tue, 06 Aug 2002 18:32:53 -0400

Update of /cvsroot/openap/openap-main/rootskel
In directory subversions:/tmp/cvs-serv7819

Modified Files:
        Makefile README 
Log Message:
remove device file creation, this now lives in a vendor/board specific area.
Actually it would be nice to create the devices that we know we need but there
isn't a standard way to create them.

add EXTRA_TARGETS variable, this is for targets included in config/foo/rules.mk




Index: Makefile
===================================================================
RCS file: /cvsroot/openap/openap-main/rootskel/Makefile,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Makefile    6 Aug 2002 19:28:04 -0000       1.1
+++ Makefile    6 Aug 2002 22:32:51 -0000       1.2
@@ -1,10 +1,8 @@
-LN_S=ln -sf
-
-BASEDIRS=proc var etc bin sbin etc/init.d
-
 all clean:
 
-install: basefiles runlevels
+install: basefiles runlevels $(EXTRA_TARGETS)
+
+BASEDIRS=proc var etc bin sbin etc/init.d tmp
 
 basefiles:
        @echo "Creating base directories."
@@ -19,106 +17,50 @@
                cp -dp root/$$file $(DESTDIR)/$$file; \
        done
 
-# Configuration files add to the rcS_FILES variable a path like
-# 'config/wl11000/S40networking'.  We process that string in the
-# obvious way to create symlinks on the target.
-
 rcS_FILES=rootskel/root/etc/init.d/S20mount.sh
 rc0_FILES=rootskel/root/etc/init.d/S20umount.sh
 
+# Configuration files add to the rc[S|0|1]_FILES variables a path like
+# 'config/wl11000/S40networking'.  Here we process that string in the
+# obvious way to create symlinks on the target.
+
+
+# FIXME - These three chunks should be combined into one since it
+# is mostly a copy and paste job
 runlevels:
-       $(INSTALL) -d $(DESTDIR)/etc/rcS.d
+       @echo "Installing rc scripts :"
+       @$(INSTALL) -d $(DESTDIR)/etc/rcS.d
        @set -e; \
        for file in $(rcS_FILES) ; do \
            pathname=`echo $$file | sed -e 's|/[^/]\{3\}\([^/]*\)$$|/\1|'`; \
            $(INSTALL) $(TOPDIR)/$$pathname $(DESTDIR)/etc/init.d/; \
-           $(LN_S) ../init.d/`basename $$pathname` \
+           rm -f $(DESTDIR)/etc/rcS.d/`basename $$file`; \
+           ln -s ../init.d/`basename $$pathname` \
                $(DESTDIR)/etc/rcS.d/`basename $$file`; \
            echo "    /etc/rcS.d/`basename $$file` ->  ../init.d/`basename 
$$pathname` "; \
        done
        
-       $(INSTALL) -d $(DESTDIR)/etc/rc0.d
+       @$(INSTALL) -d $(DESTDIR)/etc/rc0.d
        @set -e; \
        for file in $(rc0_FILES) ; do \
            pathname=`echo $$file | sed -e 's|/[^/]\{3\}\([^/]*\)$$|/\1|'`; \
            $(INSTALL) $(TOPDIR)/$$pathname $(DESTDIR)/etc/init.d/; \
-           $(LN_S) ../init.d/`basename $$pathname` \
+           rm -f $(DESTDIR)/etc/rc0.d/`basename $$file`; \
+           ln -s ../init.d/`basename $$pathname` \
                $(DESTDIR)/etc/rc0.d/`basename $$file`; \
-           echo "/etc/rc0.d/`basename $$file` ->  ../init.d/`basename 
$$pathname` "; \
+           echo "    /etc/rc0.d/`basename $$file` ->  ../init.d/`basename 
$$pathname` "; \
+       done
+       
+       @$(INSTALL) -d $(DESTDIR)/etc/rc1.d
+       @set -e; \
+       for file in $(rc1_FILES) ; do \
+           pathname=`echo $$file | sed -e 's|/[^/]\{3\}\([^/]*\)$$|/\1|'`; \
+           $(INSTALL) $(TOPDIR)/$$pathname $(DESTDIR)/etc/init.d/; \
+           rm -f $(DESTDIR)/etc/rc1.d/`basename $$file`; \
+           ln -s ../init.d/`basename $$pathname` \
+               $(DESTDIR)/etc/rc1.d/`basename $$file`; \
+           echo "    /etc/rc1.d/`basename $$file` ->  ../init.d/`basename 
$$pathname` "; \
        done
 
-
-# FIXME : there should be a better way of creating these devices, possible
-# using metafiles
-devices:
-       mkdir -p $(DESTDIR)/dev/
-       $(MKNOD) $(DESTDIR)/dev/console c 5 1
-       $(MKNOD) $(DESTDIR)/dev/initctl p
-       $(MKNOD) $(DESTDIR)/dev/kmem    c 1 2
-       $(MKNOD) $(DESTDIR)/dev/loop0   b 7 0
-       $(MKNOD) $(DESTDIR)/dev/loop1   b 7 1
-       $(MKNOD) $(DESTDIR)/dev/mem     c 1 1
-       $(MKNOD) $(DESTDIR)/dev/null    c 1 3
-       $(MKNOD) $(DESTDIR)/dev/port    c 1 4
-       $(MKNOD) $(DESTDIR)/dev/ptmx    c 5 2
-       ln -s    ram0                     $(DESTDIR)/dev/ram
-       $(MKNOD) $(DESTDIR)/dev/ram0    b 1 0
-       ln -s    ram0                     $(DESTDIR)/dev/ramdisk 
-       $(MKNOD) $(DESTDIR)/dev/random  c 1 8
-       ln -s    ../proc/self/fd/2        $(DESTDIR)/dev/stderr 
-       ln -s    ../proc/self/fd/0        $(DESTDIR)/dev/stdin
-       ln -s    ../proc/self/fd/1        $(DESTDIR)/dev/stdout 
-       $(MKNOD) $(DESTDIR)/dev/tty     c 5 0
-       $(MKNOD) $(DESTDIR)/dev/tty0    c 4 0
-       $(MKNOD) $(DESTDIR)/dev/ttyS0   c 4 64
-       $(MKNOD) $(DESTDIR)/dev/urandom c 1 9
-       $(MKNOD) $(DESTDIR)/dev/zero    c 1 5
-       $(MKNOD) $(DESTDIR)/dev/watchdog c 10 130
-
-       $(MKNOD) $(DESTDIR)/dev/mtd0 c 90 0
-       $(MKNOD) $(DESTDIR)/dev/mtdblock0 b 31 0
-
-       # tty/pty's used by telnetd
-       let i=0; \
-       while [ $$i -lt 4 ] ; do\
-               $(MKNOD) $(DESTDIR)/dev/ptyp$$i c 2 $$i ;\
-               $(MKNOD) $(DESTDIR)/dev/ttyp$$i c 3 $$i ;\
-               let i=$$i+1;\
-       done
-
-       address@hidden a+r $(DESTDIR)/dev 1>/dev/null 2>/dev/null
-
-       # set a link from /etc/mtab to /proc/mtab
-       ln -s ../proc/mounts $(DESTDIR)/etc/mtab
-
-       # link /tmp to /var/tmp so we don't have to mount another ramfs
-       ln -s /var/tmp $(DESTDIR)/tmp
-       # link /etc/var to /var/etc/var so we don't have to mount another ramfs
-       ln -s /var/etc/rw  $(DESTDIR)/etc/rw
-       ln -s /var/etc/rw/resolv.conf  $(DESTDIR)/etc/resolv.conf
-
-       # set the runlevels
-
-       # init 1 - nothing running mode (upgrades)
-       mkdir -p $(DESTDIR)/etc/rc1.d
-       mkdir -p $(DESTDIR)/etc/rc3.d
-ifeq ($(CONFIG_AP_BRIDGE),y)
-       ln -s ../init.d/bridge $(DESTDIR)/etc/rc1.d/K60bridge
-       ln -s ../init.d/bridge $(DESTDIR)/etc/rc3.d/S30bridge
-       ln -s ../init.d/tcpip.bridge $(DESTDIR)/etc/rc3.d/S40tcpip
-       ln -s ../init.d/tcpip.bridge $(DESTDIR)/etc/rc1.d/K50tcpip
-endif
-ifeq ($(CONFIG_AP_ROUTER),y)
-       ln -s ../init.d/tcpip.router $(DESTDIR)/etc/rc3.d/S40tcpip
-       ln -s ../init.d/tcpip.router $(DESTDIR)/etc/rc1.d/K50tcpip
-endif
-       ln -s ../init.d/wireless $(DESTDIR)/etc/rc1.d/K70wireless
-       ln -s ../init.d/configfs $(DESTDIR)/etc/rc1.d/K80configfs
-
-       # init 3 - normal run mode
-       ln -s ../init.d/configfs $(DESTDIR)/etc/rc3.d/S10configfs
-       ln -s ../init.d/wireless $(DESTDIR)/etc/rc3.d/S20wireless
-
-       ln -s /var/syslogd.socket $(DESTDIR)/dev/log
 
 include $(TOPDIR)/make/rules.mk

Index: README
===================================================================
RCS file: /cvsroot/openap/openap-main/rootskel/README,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- README      6 Aug 2002 19:28:04 -0000       1.1
+++ README      6 Aug 2002 22:32:51 -0000       1.2
@@ -1,4 +1,4 @@
-* Board/Vendor Extentions
+* Board/Vendor Extensions
 
 The 'rootskel' module provides a framework for installing files into
 /etc/init.d/ and creating the accompanying symlink.  Board/Vendor
@@ -10,6 +10,11 @@
 install it into /etc/init.d/networking and create a S40networking ->
 ../init.d/networking link in /etc/rcS.d.
 
+Any targets you want to run that are specific to your application should be
+placed in the EXTRA_TARGETS variable.  These targets will be called once
+everything is complete.
+
+
 * General Discussion
 
 All initialization scripts are in /etc/init.d/.  Symbolic links in
@@ -19,10 +24,12 @@
 Currently defined runlevels:
 
 S - startup - These scripts are run once when the system first boots.
-These scripts are responsible for mounting filesystems, configuring
+These scripts are responsible for mounting file systems, configuring
 network interfaces and initializing any other hardware.
 
 0 - halt the system - These scripts will be run when the system is
 going down.  These scripts should gracefully stop services and save
 state as necessary.
 
+1 - single user mode - In this runlevel the system stops all 
+unnecessary services.  This can be used to free RAM.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]