Changeset 903


Ignore:
Timestamp:
Jan 15, 2017, 7:02:56 PM (3 months ago)
Author:
amain
Message:

native: octeon erlite install

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile

    r902 r903  
    3838ifeq ($(CONFIG_DEBWRT_FIRMWARE_NATIVE),y)
    3939        include arch/octeon/erlite/arch.mk
     40        include arch/octeon/erlite/arch-deliver.mk
    4041else
    4142        include openwrt/openwrt.mk
  • trunk/arch/octeon/erlite/arch.mk

    r902 r903  
    2525
    2626URL                      := http://mirror.debwrt.net
    27 VERSION                  := e100.v1.9.1.4939093
    28 FIRMWARE                 := ER-$(VERSION).tar
    29 GPL                      := GPL.ER-$(VERSION).tar.bz2
     27UBNT_VERSION             := e100.v1.9.1.4939093
     28FIRMWARE                 := ER-$(UBNT_VERSION).tar
     29GPL                      := GPL.ER-$(UBNT_VERSION).tar.bz2
    3030URL_FIRMWARE             := $(URL)/$(FIRMWARE)
    3131URL_GPL                  := $(URL)/$(GPL)
     
    6262                 openwrt/build/binutils \
    6363                 openwrt/build/gcc \
    64                  openwrt/build/kernel
     64                 openwrt/build/kernel \
     65                 openwrt/build/kernel-install
    6566        touch $@
    6667
     
    6869        @echo "Make parallelization: $(subst -j,,$(PJOBS))"
    6970        mkdir -p openwrt/build # hack
     71        mkdir -p $(SRC_DIR)/build/binutils
    7072        mkdir -p $(SRC_DIR)/cross
    7173        sudo chroot $(DEBIAN_BUILD_DIR) \
     
    7981        @echo "Make parallelization: $(subst -j,,$(PJOBS))"
    8082        mkdir -p openwrt/build # hack
     83        mkdir -p $(SRC_DIR)/build/gcc
    8184        mkdir -p $(SRC_DIR)/cross
    8285        sudo chroot $(DEBIAN_BUILD_DIR) \
    8386             bash -c "cd /usr/src/erlite/build/gcc; \
    8487                      ../../extract/gcc-$(GCC_VERSION)/configure --prefix=/usr/src/erlite/cross --target mips64-octeon-linux-gnu --enable-languages=c --disable-multilib"
     88        sudo chroot $(DEBIAN_BUILD_DIR) make $(PJOBS) -C /usr/src/erlite/build/gcc all-gcc
    8589        sudo patch -p0 -d $(SRC_DIR_GCC) <arch/octeon/erlite/patches/gcc-install.patch
    86         sudo chroot $(DEBIAN_BUILD_DIR) make $(PJOBS) -C /usr/src/erlite/build/gcc all-gcc
    8790        sudo chroot $(DEBIAN_BUILD_DIR) make $(PJOBS) -C /usr/src/erlite/build/gcc install-gcc
    8891        touch $@
     
    9194        @echo "Make parallelization: $(subst -j,,$(PJOBS))"
    9295        mkdir -p openwrt/build # hack
    93         mkdir -p $(SRC_DIR)/install
    9496        if [ ! -e $(SRC_DIR_KERNEL)/.config.org ]; \
    9597        then \
     
    9799        fi
    98100        cp .config $(SRC_DIR_KERNEL)/.config.debwrt
     101        echo 'CONFIG_LOCALVERSION="-DebWrt"' >>$(SRC_DIR_KERNEL)/.config.debwrt
    99102        sudo chroot $(DEBIAN_BUILD_DIR) \
    100103             bash -c "cd /usr/src/erlite/kernel; \
     
    106109             bash -c "export PATH=/usr/src/erlite/cross/bin:$${PATH}; \
    107110                      make ARCH=mips $(PJOBS) -C /usr/src/erlite/kernel"
     111        touch $@
     112
     113openwrt/build/kernel-install: openwrt/build/kernel
     114        @echo "Make parallelization: $(subst -j,,$(PJOBS))"
     115        sudo rm -rf $(SRC_DIR)/install
     116        mkdir -p $(SRC_DIR)/install
     117        sudo chroot $(DEBIAN_BUILD_DIR) \
     118             bash -c "export PATH=/usr/src/erlite/cross/bin:$${PATH}; \
     119                      make ARCH=mips INSTALL_HDR_PATH=/usr/src/erlite/install $(PJOBS) -C /usr/src/erlite/kernel headers_install"
    108120        sudo chroot $(DEBIAN_BUILD_DIR) \
    109121             bash -c "export PATH=/usr/src/erlite/cross/bin:$${PATH}; \
    110122                      make ARCH=mips INSTALL_MOD_PATH=/usr/src/erlite/install $(PJOBS) -C /usr/src/erlite/kernel modules_install"
     123        sudo chroot $(DEBIAN_BUILD_DIR) \
     124             bash -c "export PATH=/usr/src/erlite/cross/bin:$${PATH}; \
     125                      { \
     126                          echo -n OPENWRT_LINUX_VERSION=; \
     127                          make -s ARCH=mips -C /usr/src/erlite/kernel kernelversion; \
     128                          echo -n OPENWRT_LINUX_UNAME_VERSION=; \
     129                          make -s ARCH=mips -C /usr/src/erlite/kernel kernelrelease; \
     130                      } >/usr/src/erlite/install/version.info"
    111131        sudo chroot $(DEBIAN_BUILD_DIR) cp /usr/src/erlite/kernel/vmlinux /usr/src/erlite/install/vmlinux.64
    112132        touch $@
     
    167187        touch $@
    168188
    169 openwrt/clean: openwrt/deliver/clean
    170         #-$(SCRIPT_CLEAN_EXEC) $(MAKE) -C $(OPENWRT_BUILD_DIR) clean V=$(V)
     189openwrt/clean:
     190        sudo chroot $(DEBIAN_BUILD_DIR) \
     191             bash -c "export PATH=/usr/src/erlite/cross/bin:$${PATH}; \
     192                      make ARCH=mips $(PJOBS) -C /usr/src/erlite/kernel clean" \
     193             || true
     194        rm -rf $(SRC_DIR)/install
    171195        rm -f openwrt/all
    172         rm -f openwrt/build
    173         rm -f openwrt/deliver
    174 
    175 openwrt/dirclean: openwrt/deliver/clean
    176         #-$(SCRIPT_CLEAN_EXEC) $(MAKE) -C $(OPENWRT_BUILD_DIR) dirclean V=$(V)
    177         rm -f openwrt/all
    178         rm -f openwrt/build
    179         rm -f openwrt/deliver
    180 
    181 openwrt/distclean: openwrt/deliver/clean
    182         #-$(SCRIPT_CLEAN_EXEC) $(MAKE) -C $(OPENWRT_BUILD_DIR) distclean V=$(V)
    183         rm -f openwrt/all
    184         rm -f openwrt/build
    185         rm -f openwrt/deliver
    186 
    187 #openwrt/full-clean: openwrt/deliver/clean
    188 openwrt/full-clean:
    189         rm -rf $(SRC_DIR)
     196        rm -f openwrt/build/kernel
     197
     198openwrt/dirclean: openwrt/clean openwrt/deliver/clean
     199        sudo rm -rf $(SRC_DIR_BUILD)
     200        rm -f openwrt/build/binutils
     201        rm -f openwrt/build/gcc
     202
     203openwrt/distclean: | openwrt/dirclean openwrt/deliver/clean
     204        sudo rm -rf $(SRC_DIR)
    190205        rm -f openwrt/download
    191206        rm -f openwrt/extract
    192         rm -f openwrt/all
    193         rm -f openwrt/build
    194         rm -f openwrt/deliver
    195207        rm -f openwrt/patch
    196208        rm -f openwrt/prepare
    197209
    198 .PHONY: openwrt/patches/uninstall \
    199         openwrt/clean
    200 
     210openwrt/full-clean: openwrt/distclean
     211
     212.PHONY: openwrt/clean
     213
  • trunk/rules/debwrt.mk

    r902 r903  
    5454LINUX_VERSION:=$(call qstrip,$(CONFIG_DEBWRT_KERNEL_VERSION))
    5555
     56ifeq ($(OPENWRT_LINUX_VERSION),)
     57    OPENWRT_LINUX_VERSION = $(OPENWRT_LINUX_UNAME_VERSION)
     58endif
     59
    5660# (Git) project selection
    5761PROJECT:=$(call qstrip,$(CONFIG_PROJECT))
     
    102106
    103107# Image file containing OpenWrt kernel modules
    104 MODULES_TAR_GZ=debwrt-modules-$(TARGET_ARCH)-$(TARGET)-$(SUB_TARGET)-$(OPENWRT_LINUX_UNAME_VERSION)-$(DEBWRT_VERSION).tar.gz
     108MODULES_TAR_GZ=debwrt-modules-$(TARGET_ARCH)-$(TARGET)-$(SUB_TARGET)-$(OPENWRT_LINUX_VERSION)-$(DEBWRT_VERSION).tar.gz
    105109
    106110# Image file containing OpenWrt kernel headers
    107 HEADERS_TAR_GZ=debwrt-headers-$(TARGET_ARCH)-$(TARGET)-$(SUB_TARGET)-$(OPENWRT_LINUX_UNAME_VERSION)-$(DEBWRT_VERSION).tar.gz
     111HEADERS_TAR_GZ=debwrt-headers-$(TARGET_ARCH)-$(TARGET)-$(SUB_TARGET)-$(OPENWRT_LINUX_VERSION)-$(DEBWRT_VERSION).tar.gz
    108112
    109113# Filename of DebWrt firmware image
    110 TARGET_IMAGE_NAME_BIN=debwrt-firmware-$(TARGET)-$(SUB_TARGET)-$(OPENWRT_LINUX_UNAME_VERSION)-$(DEBWRT_VERSION).bin
    111 TARGET_IMAGE_NAME_TRX=debwrt-firmware-$(TARGET)-$(SUB_TARGET)-$(OPENWRT_LINUX_UNAME_VERSION)-$(DEBWRT_VERSION).trx
     114TARGET_IMAGE_NAME_BIN=debwrt-firmware-$(TARGET)-$(SUB_TARGET)-$(OPENWRT_LINUX_VERSION)-$(DEBWRT_VERSION).bin
     115TARGET_IMAGE_NAME_TRX=debwrt-firmware-$(TARGET)-$(SUB_TARGET)-$(OPENWRT_LINUX_VERSION)-$(DEBWRT_VERSION).trx
     116TARGET_IMAGE_NAME_64=debwrt-firmware-$(TARGET)-$(SUB_TARGET)-$(OPENWRT_LINUX_VERSION)-$(DEBWRT_VERSION).64
    112117
    113118# OpenWrt patches directory
Note: See TracChangeset for help on using the changeset viewer.