Changeset 65


Ignore:
Timestamp:
Aug 8, 2010, 11:25:23 PM (8 years ago)
Author:
amain
Message:

Extend debian rootfs and prepare for second stage install using custom rcS

Location:
debwrt/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • debwrt/trunk/Makefile

    r52 r65  
    5656
    5757flash:
    58         cd $(INSTALL_DIR) && $(SCRIPT_FLASH) "$(call qstrip,$(CONFIG_FLASH_IP))" "$(TARGET_IMAGE_NAME_TRX)" || echo
     58        cd $(INSTALL_DIR) && $(SCRIPT_FLASH) "$(call qstrip,$(CONFIG_FLASH_IP))" "$(CONFIG_DEBWRT_TARGET_IMAGE_NAME_TRX)" || echo
    5959
    6060clean: config-clean openwrt/clean
  • debwrt/trunk/config/image_name.in

    r22 r65  
    1818# Filename of firmware image created by OpenWrt
    1919#
    20 config OPENWRT_TARGET_IMAGE_NAME_BIN
     20config DEBWRT_TARGET_IMAGE_NAME_BIN
    2121        string
    2222        default "openwrt-wgt634u-squashfs.bin" if TARGET_brcm47xx_WGT634U
     
    2727# TRX file is bin file + small header
    2828#
    29 config OPENWRT_TARGET_IMAGE_NAME_TRX
     29config DEBWRT_TARGET_IMAGE_NAME_TRX
    3030        string
    31         default "openwrt-brcm47xx-squashfs.trx" if TARGET_brcm47xx
     31        default "debwrt-firmware-brcm47xx-squashfs.trx" if TARGET_brcm47xx
    3232                default "unknown"
    3333
  • debwrt/trunk/debian/rootfs/debian.mk

    r62 r65  
    1717
    1818DEBIAN_ROOTFS_INCLUDE_PACKAGES:=$(call qstrip,$(CONFIG_DEBIAN_ROOTFS_INCLUDE_PACKAGES))
     19DEBWRT_EXTRA_ROOTFS_FILES_DIR:=$(TOPDIR)/debian/rootfs/files
     20DEBWRT_MODULES_ARCHIVE=$(shell ls $(INSTALL_DIR)/debwrt-modules-*.tar.gz)
     21MODULES_VERSION=$(shell echo `basename $(DEBWRT_MODULES_ARCHIVE)` | awk -F '-' '{print $$6}')
    1922
    20 debian/rootfs: debian/rootfs/bootstrap debian/rootfs/debwrt-packages
     23debian/rootfs: debian/rootfs/bootstrap debian/rootfs/debwrt-packages debian/rootfs/unpack debian/rootfs/files-install debian/rootfs/modules-install
     24        touch $@
     25
     26debian/rootfs/install: debian/rootfs
     27        if [ -d /media/DEBWRT_ROOT ]; then \
     28                sudo rm -rf /media/DEBWRT_ROOT/*; \
     29                sudo bash -c "tar cf - -C $(ROOTFS_BUILD_DIR) . | tar xf - -C /media/DEBWRT_ROOT"; \
     30        fi
     31        #touch $@
     32
     33debian/rootfs/files-install: debian/rootfs/bootstrap
     34        if [ ! -f $(ROOTFS_BUILD_DIR)/etc/init.d/rcS.debian ]; then \
     35                sudo mv -v $(ROOTFS_BUILD_DIR)/etc/init.d/rcS $(ROOTFS_BUILD_DIR)/etc/init.d/rcS.debian; \
     36        fi
     37        sudo bash -c "tar cf - -C $(DEBWRT_EXTRA_ROOTFS_FILES_DIR) . | tar -xovf - -C $(ROOTFS_BUILD_DIR)"
     38        touch $@
     39
     40debian/rootfs/modules-install: debian/rootfs/bootstrap
     41ifneq ($(DEBWRT_MODULES_ARCHIVE),)
     42        sudo tar xof $(DEBWRT_MODULES_ARCHIVE) -C $(ROOTFS_BUILD_DIR)
     43        sudo depmod -a -b $(ROOTFS_BUILD_DIR) $(MODULES_VERSION)
     44endif
    2145        touch $@
    2246
     
    2852                     $(ROOTFS_BUILD_DIR) \
    2953                     $(CONFIG_DEBIAN_BUILDENV_REPOSITORY)
     54        touch $@
     55
     56debian/rootfs/unpack: debian/rootfs/bootstrap
     57        find $(ROOTFS_BUILD_DIR) -name "*.deb" | while read deb; do \
     58                n=`basename $$deb`; \
     59                echo -n "I: Extracting $${n}..."; \
     60                sudo bash -c "ar -p "$$deb" data.tar.gz | zcat | tar -C $(ROOTFS_BUILD_DIR) -xf -"; \
     61                echo "done"; \
     62        done
    3063        touch $@
    3164
     
    4780debian/rootfs/clean:
    4881        sudo rm -rf $(ROOTFS_BUILD_DIR)
    49         rm -rf debian/rootfs/debwrt-packages
    50         rm -rf debian/rootfs/bootstrap
    51         rm -rf debian/rootfs
     82        rm -f debian/rootfs/debwrt-packages
     83        rm -f debian/rootfs/bootstrap
     84        rm -f debian/rootfs/install
     85        rm -f debian/rootfs/files-install
     86        rm -g debian/rootfs/modules-install
    5287
Note: See TracChangeset for help on using the changeset viewer.