Changeset 1973a80 in freewrt


Ignore:
Timestamp:
Jul 23, 2007, 6:24:37 PM (18 years ago)
Author:
Thorsten Glaser <tg@…>
Children:
744f4a4
Parents:
dafde95
Message:

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

git-svn-id: svn://www.freewrt.org/trunk/freewrt@3331 afb5a338-a214-0410-bd46-81f09a774fd1

Files:
4 added
7 edited
1 moved

Legend:

Unmodified
Added
Removed
  • package/base-files/Makefile

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

    rdafde95 r1973a80  
    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
  • target/image/balls.mk

    rdafde95 r1973a80  
    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 >$@
  • target/image/brcm/Makefile

    rdafde95 r1973a80  
    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
  • target/image/common.mk

    rdafde95 r1973a80  
    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.
  • target/image/rb/Makefile

    rdafde95 r1973a80  
    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
  • target/image/x86/Makefile

    rdafde95 r1973a80  
    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
  • target/linux/brcm-2.4/asus-wl500g/files/etc/preinit.arch

    rdafde95 r1973a80  
    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
Note: See TracChangeset for help on using the changeset viewer.