Changeset 3331

Show
Ignore:
Timestamp:
07/23/07 18:24:37 (1 year ago)
Author:
tg
Message:

make instprep.sh superfluous -> let the stuff create its own /dev/ nodes at boot

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/freewrt/package/base-files/Makefile

    r3288 r3331  
    1010PKG_NAME:=              base-files 
    1111PKG_VERSION:=           1.1 
    12 PKG_RELEASE:=           19 
     12PKG_RELEASE:=           20 
    1313WRKDIST=                ${WRKDIR}/base-files 
    1414NO_DISTFILES:=          1 
  • trunk/freewrt/package/base-files/files/etc/preinit

    r3235 r3331  
    1 #!/bin/sh 
     1#!/bin/mksh 
    22export PATH=/bin:/sbin:/usr/bin:/usr/sbin 
    33 
    4 failsafe() { 
     4mount -nt proc proc /proc 
     5if [[ ! -e /dev/null ]]; then 
     6        mount -no remount,rw / 
     7        # values hard-coded for Linux 
     8        mknod -m 0666 /dev/null c 1 3 
     9        mknod -m 0666 /dev/tty c 5 0 
     10        mknod -m 0622 /dev/console c 5 1 
     11        # switch to the real console (if possible) 
     12        exec 0<>/dev/console >&0 2>&0 
     13        print Notice: opened initial console now. 
     14        # do the deed 
     15        [[ -e /dev/MAKEDEV ]] && mksh /dev/MAKEDEV all 
     16fi 
     17 
     18function failsafe { 
    519        netmsg 192.168.1.255 "Entering Failsafe!" 
    620        telnetd 
     
    822} 
    923 
    10 mount proc /proc -t proc 
    1124[ -f /etc/preinit.arch ] && . /etc/preinit.arch 
    1225[ -f /proc/diag/led/power ] && echo 1 > /proc/diag/led/power 
  • trunk/freewrt/target/image/balls.mk

    r3328 r3331  
    66 
    77INITRAMFS=      ${FWRT_PREFIX}-${DEVICE}-${BOARD}-${KERNEL}-${FS}.cpio.gz 
     8ROOTFSTARBALL=  ${FWRT_PREFIX}-${DEVICE}-${BOARD}-${KERNEL}-${FS}.tar.gz 
    89 
    910ifeq (${FS},initramfs) 
     
    1314endif 
    1415 
    15 ${BIN_DIR}/${INITRAMFS}: 
    16         cd ${KDIR}/root; if [[ -e instprep.sh ]]; then \ 
    17                 ${MBSH} instprep.sh; \ 
    18                 rm -f instprep.sh; \ 
    19         fi; find . | sed -n '/^\.\//s///p' | sort | \ 
     16${BIN_DIR}/${INITRAMFS}: ${KDIR}/root 
     17        cd ${KDIR}/root; find . | sed -n '/^\.\//s///p' | sort | \ 
    2018            ${LBIN_DIR}/cpio -oC512 -Mdist -Hsv4crc | gzip -n9 >$@ 
     19 
     20${BIN_DIR}/${ROOTFSTARBALL}: ${KDIR}/root 
     21        cd ${KDIR}/root; find . | sed -n '/^\.\//s///p' | sort | \ 
     22            ${LBIN_DIR}/cpio -oC512 -Mdist -Hustar | gzip -n9 >$@ 
  • trunk/freewrt/target/image/brcm/Makefile

    r3328 r3331  
    66 
    77include $(TOPDIR)/rules.mk 
     8include ../balls.mk 
    89 
    910KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) 
     
    1112ifeq ($(FS),nfs) 
    1213INSTPREPSCRIPT = instprep.sh 
    13 ROOTFSTARBALL = $(FWRT_PREFIX)-$(DEVICE)-$(BOARD)-$(KERNEL)-$(FS).tar.gz 
    1414NFS_DOC_URL = https://www.freewrt.org/trac/wiki/Documentation/Filesystems/NFS 
    1515 
     
    2727 
    2828$(KDIR)/root: install-prepare kernel-install 
    29  
    30 $(BIN_DIR)/$(ROOTFSTARBALL): $(KDIR)/root 
    31         (cd $(KDIR)/root ; tar cf - * | gzip -9 > $(BIN_DIR)/$(ROOTFSTARBALL)) 
    3229 
    3330install: $(BIN_DIR)/$(ROOTFSTARBALL) 
     
    225222endif 
    226223 
    227 ifneq ($(strip ${FWRT_LINUX_2_6}),) 
    228 include ../initramfs.mk 
    229 endif 
    230224include ${TOPDIR}/target/image/common.mk 
  • trunk/freewrt/target/image/common.mk

    r3329 r3331  
    6161                li=$$inode; \ 
    6262        done 
    63         chmod 4111 ${KDIR}/root/bin/busybox 
     63        chmod 4511 ${KDIR}/root/bin/busybox 
    6464        chmod 1777 ${KDIR}/root/tmp 
    6565        # Ok, we can flash _that_ now. 
  • trunk/freewrt/target/image/rb/Makefile

    r3328 r3331  
    66 
    77include $(TOPDIR)/rules.mk 
     8include ../balls.mk 
    89 
    910KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) 
    1011 
    1112INSTPREPSCRIPT = instprep.sh 
    12 ROOTFSTARBALL = $(FWRT_PREFIX)-$(DEVICE)-$(BOARD)-$(KERNEL)-$(FS).tar.gz 
    1313NFS_DOC_URL = https://www.freewrt.org/trac/wiki/Documentation/Filesystems/NFS 
    1414CF_DOC_URL = https://www.freewrt.org/trac/wiki/Documentation/Filesystems/CompactFlash 
     
    2323        install -m 0755 $(BUILD_DIR)/linux/vmlinux $(KDIR)/root/kernel 
    2424 
    25 install-prepare_DEPS+=  instprep-script install-prepare 
     25ifeq ($(strip ${FWRT_TARGET_NOKERNEL})$(strip ${FWRT_TARGET_ROOTFS_INITRAMFS}),) 
     26install-prepare_DEPS+=  instprep-script 
     27endif 
     28install-prepare_DEPS+=  install-prepare 
    2629ifeq ($(strip ${FWRT_TARGET_NOKERNEL})$(strip ${FWRT_TARGET_ROOTFS_INITRAMFS}),) 
    2730install-prepare_DEPS+=  kernel-install 
     
    3235 
    3336$(KDIR)/root: install-prepare kernel-install 
    34  
    35 $(BIN_DIR)/$(ROOTFSTARBALL): $(KDIR)/root 
    36         (cd $(KDIR)/root ; tar cf - * | gzip -9 > $(BIN_DIR)/$(ROOTFSTARBALL)) 
    3737 
    3838ifeq ($(FS),nfs) 
     
    9292endif 
    9393 
    94 ifneq ($(strip ${FWRT_LINUX_2_6}),) 
    95 include ../initramfs.mk 
    96 endif 
    9794include ${TOPDIR}/target/image/common.mk 
  • trunk/freewrt/target/image/x86/Makefile

    r3328 r3331  
    66 
    77include $(TOPDIR)/rules.mk 
     8include ../balls.mk 
    89 
    910KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) 
    1011 
    1112INSTPREPSCRIPT = instprep.sh 
    12 ROOTFSTARBALL = $(FWRT_PREFIX)-$(DEVICE)-$(BOARD)-$(KERNEL)-$(FS).tar.gz 
    1313CF_DOC_URL = https://www.freewrt.org/trac/wiki/Documentation/Filesystems/CompactFlash 
    1414 
     
    2828 
    2929$(KDIR)/root: install-prepare kernel-install 
    30  
    31 $(BIN_DIR)/$(ROOTFSTARBALL): $(KDIR)/root instprep-script 
    32         (cd $(KDIR)/root ; tar cf - * | gzip -9 > $(BIN_DIR)/$(ROOTFSTARBALL)) 
    3330 
    3431ifeq ($(FS),ext2-cf) 
     
    5047endif 
    5148 
    52 ifneq ($(strip ${FWRT_LINUX_2_6}),) 
    53 include ../initramfs.mk 
    54 endif 
    5549include ${TOPDIR}/target/image/common.mk 
  • trunk/freewrt/target/linux/brcm-2.4/asus-wl500g/files/etc/preinit.arch

    r2883 r3331  
    44 
    55dd if=/dev/console of=/dev/null bs=1 count=0 >/dev/null 2>&1 || \ 
    6     exec <>/dev/pty/m0 >&0 2>&0 
     6    exec 0<>/dev/pty/m0 >&0 2>&0 
    77insmod diag