Changeset 3328

Show
Ignore:
Timestamp:
07/23/07 17:27:07 (1 year ago)
Author:
tg
Message:

make initramfs available for all architectures with linux 2.6,
except that device node creation doesn't work right now

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/freewrt/mk/build.mk

    r3327 r3328  
    4343world: $(DISTDIR) $(BUILD_DIR) $(PACKAGE_DIR) ${TOPDIR}/.cfg/FWRT_HAVE_DOT_CONFIG 
    4444        BASH='${BASH}' ${MBSH} ${TOPDIR}/scripts/scan-pkgs.sh 
    45 ifneq ($(strip ${FWRT_TARGET_NOKERNEL})$(strip ${FWRT_TARGET_ROOTFS_INITRAMFS}),) 
     45ifneq ($(strip ${FWRT_TARGET_NOKERNEL}),) 
    4646ifeq ($(strip ${FWRT_PACKAGE_BASE_FILES}),m) 
    4747        $(MAKE) -f mk/build.mk tools/install toolchain/install target/config-prepare package/compile package_index 
     
    4949        $(MAKE) -f mk/build.mk tools/install toolchain/install target/config-prepare package/compile package_index root_clean package/install 
    5050endif 
     51else ifneq ($(strip ${FWRT_TARGET_ROOTFS_INITRAMFS}),) 
     52        $(MAKE) -f mk/build.mk tools/install toolchain/install target/config-prepare package/compile root_clean package/install target/install 
    5153else ifeq ($(strip ${FWRT_PACKAGE_BASE_FILES}),m) 
    5254        $(MAKE) -f mk/build.mk tools/install toolchain/install target/config-prepare target/compile package/compile 
  • trunk/freewrt/mk/kernel-build.mk

    r3082 r3328  
    9696endif 
    9797 
     98noinstall: 
     99        rm -rf ${LINUX_BUILD_DIR}/root* 
     100        cd ${BUILD_DIR} && pax -rw -pe root ${LINUX_BUILD_DIR}/ 
     101        printf '%s\n%s\n' 'dest root /' \ 
     102            'option offline_root $(LINUX_BUILD_DIR)/root' \ 
     103            >$(LINUX_BUILD_DIR)/ipkg.conf 
     104 
    98105clean: 
    99106        rm -rf $(LINUX_BUILD_DIR) 
  • trunk/freewrt/mk/targets.mk

    r3051 r3328  
    2929        $(MAKE) -C $(2)-$(1) BOARD="$(2)" DEVICE="$(3)" install 
    3030 
     31$(1)/$(2)/$(3)-noinstall: 
     32        @$(TRACE) target/linux/$(2)-$(1)-noinstall 
     33        $(MAKE) -C $(2)-$(1) BOARD="$(2)" DEVICE="$(3)" noinstall 
     34 
    3135ifeq ($(FWRT_LINUX_$(4)),y) 
    3236clean: $(1)/$(2)/$(3)-clean 
     
    3438compile: $(1)/$(2)/$(3)-compile 
    3539install: $(1)/$(2)/$(3)-install 
     40noinstall: $(1)/$(2)/$(3)-noinstall 
    3641endif 
    3742 
  • trunk/freewrt/scripts/instprep.sh

    r3153 r3328  
    2222        fi 
    2323} 
     24 
    2425help_quit() { # () 
    2526        echo "Usage:" 
     
    3132} 
    3233 
    33 [ $# -gt 0 ] && { echo "Too many arguments!"; help_quit;} 
    34 [ "$ID" -ne 0 ] && { echo "You need to be root to run me!"; help_quit;} 
     34if [ $# -gt 0 ]; then 
     35        echo "Too many arguments!" 
     36        help_quit 
     37fi 
     38 
     39case $ID:$MYTARGET in 
     40*:initramfs) ;; 
     410:*) ;; 
     42*) 
     43        echo "You need to be root to run me!" 
     44        help_quit 
     45        ;; 
     46esac 
    3547 
    3648# go to a defined place 
     
    3850 
    3951case $MYTARGET in 
    40 ext2-cf|nfs
     52ext2-cf|nfs|initramfs
    4153        echo "creating device nodes" 
    4254        makenode 0666 dev/null c 1 3 
     
    7385esac 
    7486 
    75 echo "recursively fixing ownership" 
    76 chown -R 0:0 * 
     87case $MYTARGET in 
     88initramfs) ;; 
     89*) 
     90        echo "recursively fixing ownership" 
     91        chown -R 0:0 * 
     92        ;; 
     93esac 
    7794 
    7895echo "fixing /tmp permissions" 
    79 chmod 1777 tmp/ 
     96chmod 1777 tmp 
    8097 
    8198echo "setting busybox setuid" 
     
    83100 
    84101exit 0 
    85  
  • trunk/freewrt/target/Config.in

    r3234 r3328  
    271271config FWRT_TARGET_ROOTFS_INITRAMFS 
    272272        bool "initramfs image (cpio archive)" 
    273         depends on FWRT_LINUX_2_6_X86_CRYPTOTOKEN 
     273        depends on FWRT_LINUX_2_6_X86_CRYPTOTOKEN || \ 
     274            (FWRT_DEVEL && FWRT_LINUX_2_6) 
    274275        help 
    275276          create a initramfs only. 
  • trunk/freewrt/target/Makefile

    r3324 r3328  
    4040prepare: linux-prepare 
    4141compile: linux-compile 
     42ifneq ($(strip ${FWRT_TARGET_NOKERNEL})$(strip ${FWRT_TARGET_ROOTFS_INITRAMFS}),) 
     43install: image_clean linux-noinstall image_install 
     44else 
    4245install: image_clean linux-install image_install 
     46endif 
    4347clean: linux-clean image_clean 
    4448 
     
    6266        $(TRACE) target/$(patsubst %-install,%,$@)-install 
    6367        $(MAKE) -C $(patsubst %-install,%,$@) install 
     68%-noinstall: 
     69        $(TRACE) target/$(patsubst %-noinstall,%,$@)-noinstall 
     70        $(MAKE) -C $(patsubst %-noinstall,%,$@) noinstall 
  • trunk/freewrt/target/image/brcm/Makefile

    r2762 r3328  
    225225endif 
    226226 
     227ifneq ($(strip ${FWRT_LINUX_2_6}),) 
     228include ../initramfs.mk 
     229endif 
    227230include ${TOPDIR}/target/image/common.mk 
  • trunk/freewrt/target/image/common.mk

    r2322 r3328  
    77install-prepare_DEPS?= 
    88 
    9 install-prepare: ${install-prepare_DEPS} install-prepare-mi-pre \ 
    10     install-prepare-md install-prepare-mi-post 
     9install-prepare: install-prepare-dirs ${install-prepare_DEPS} \ 
     10    install-prepare-mi-pre install-prepare-md install-prepare-mi-post 
     11 
     12install-prepare-dirs: 
     13        mkdir -p ${KDIR}/root 
    1114 
    1215install-prepare-mi-pre: 
  • trunk/freewrt/target/image/rb/Makefile

    r2832 r3328  
    2323        install -m 0755 $(BUILD_DIR)/linux/vmlinux $(KDIR)/root/kernel 
    2424 
    25 install-prepare_DEPS=   instprep-script kernel-install 
     25install-prepare_DEPS+=  instprep-script install-prepare 
     26ifeq ($(strip ${FWRT_TARGET_NOKERNEL})$(strip ${FWRT_TARGET_ROOTFS_INITRAMFS}),) 
     27install-prepare_DEPS+=  kernel-install 
     28endif 
    2629 
    2730install-prepare-md: 
     
    8992endif 
    9093 
     94ifneq ($(strip ${FWRT_LINUX_2_6}),) 
     95include ../initramfs.mk 
     96endif 
    9197include ${TOPDIR}/target/image/common.mk 
  • trunk/freewrt/target/image/x86/Makefile

    r2571 r3328  
    1111INSTPREPSCRIPT = instprep.sh 
    1212ROOTFSTARBALL = $(FWRT_PREFIX)-$(DEVICE)-$(BOARD)-$(KERNEL)-$(FS).tar.gz 
    13 INITRAMFS = $(FWRT_PREFIX)-$(DEVICE)-$(BOARD)-$(KERNEL)-$(FS).gz 
    1413CF_DOC_URL = https://www.freewrt.org/trac/wiki/Documentation/Filesystems/CompactFlash 
    1514 
     
    1918        install -m 0755 $(TOPDIR)/scripts/$(INSTPREPSCRIPT) $(KDIR)/root/instprep.sh 
    2019        $(SED) 's/@@TARGET_FS@@/$(FS)/' $(KDIR)/root/instprep.sh 
    21          
     20 
    2221kernel-install: 
    2322        cp $(LINUX_DIR)/arch/i386/boot/bzImage $(KDIR)/root/kernel 
     
    3231$(BIN_DIR)/$(ROOTFSTARBALL): $(KDIR)/root instprep-script 
    3332        (cd $(KDIR)/root ; tar cf - * | gzip -9 > $(BIN_DIR)/$(ROOTFSTARBALL)) 
    34  
    35 $(BIN_DIR)/$(INITRAMFS): $(KDIR)/root 
    36         (cd $(KDIR)/root ; find . | cpio -o -H newc | gzip > $(BIN_DIR)/$(INITRAMFS)) 
    37  
    38 ifeq ($(FS),initramfs) 
    39 install: $(BIN_DIR)/$(INITRAMFS) 
    40         @echo  
    41         @echo "The initramfs is: $(BIN_DIR)/$(INITRAMFS)" 
    42 endif 
    4333 
    4434ifeq ($(FS),ext2-cf) 
     
    6050endif 
    6151 
     52ifneq ($(strip ${FWRT_LINUX_2_6}),) 
     53include ../initramfs.mk 
     54endif 
    6255include ${TOPDIR}/target/image/common.mk 
  • trunk/freewrt/target/linux/Makefile

    r2504 r3328  
    1111include $(TOPDIR)/mk/targets.mk 
    1212 
    13 .PHONY: clean prepare compile install 
     13.PHONY: clean prepare compile install noinstall 
    1414 
    1515clean: 
     
    1717compile: 
    1818install: 
     19noinstall: