parent
c90793463c
commit
4c659f618c
@ -1,13 +0,0 @@ |
||||
|
||||
define image_template |
||||
|
||||
$(BIN_DIR)/openwrt-$(3)-$(2)-$(1).trx: |
||||
$$(call $(1)_template,$(BUILD_DIR)/linux-$(2)-$(3))
|
||||
|
||||
ifeq ($(BR2_LINUX_$(4)),y) |
||||
install: $(BIN_DIR)/openwrt-$(3)-$(2)-$(1).trx |
||||
endif |
||||
|
||||
endef |
||||
|
||||
$(eval $(foreach fs,$(FILESYSTEMS),$(call image_template,$(fs),2.4,brcm,2_4_BRCM))) |
@ -0,0 +1,24 @@ |
||||
include $(TOPDIR)/rules.mk |
||||
|
||||
ifeq ($(BOARD),) |
||||
BOARD:=brcm
|
||||
endif |
||||
|
||||
KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
|
||||
|
||||
ifeq ($(BR2_TARGET_ROOTFS_JFFS2),y) |
||||
include ./jffs2.mk |
||||
endif |
||||
|
||||
ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS_LZMA),y) |
||||
include ./squashfs.mk |
||||
endif |
||||
|
||||
prepare: |
||||
$(MAKE) -C $(BOARD) prepare
|
||||
compile: |
||||
$(MAKE) -C $(BOARD) compile
|
||||
install: |
||||
rebuild: clean prepare compile install |
||||
clean: |
||||
|
@ -0,0 +1,47 @@ |
||||
include $(TOPDIR)/rules.mk |
||||
|
||||
KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-brcm
|
||||
|
||||
lzma-loader-clean: |
||||
$(MAKE) -C lzma-loader clean
|
||||
|
||||
lzma-loader-prepare: |
||||
$(MAKE) -C lzma-loader prepare
|
||||
|
||||
lzma-loader-compile: lzma-loader-prepare |
||||
$(MAKE) -C lzma-loader compile
|
||||
|
||||
$(KDIR)/vmlinux.lzma: $(KDIR)/vmlinux |
||||
cat $^ | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $@ || (rm -f $@ && false)
|
||||
|
||||
$(BIN_DIR)/openwrt-brcm-$(KERNEL)-$(FS).trx: $(KDIR)/vmlinux.lzma |
||||
$(STAGING_DIR)/bin/trx -o $@ $(BUILD_DIR)/loader.gz $(KDIR)/vmlinux.lzma $(KDIR)/root.$(FS)
|
||||
|
||||
ifeq ($(KERNEL),2.4) |
||||
FSNAME:=$(patsubst jffs2-%,jffs2,$(FS))
|
||||
|
||||
ifneq ($(FS),jffs2-8MB) |
||||
$(BIN_DIR)/openwrt-wrt54g-$(FSNAME).bin: $(BIN_DIR)/openwrt-brcm-$(KERNEL)-$(FS).trx |
||||
$(STAGING_DIR)/bin/addpattern -2 -i $< -o $@ -g
|
||||
$(SED) "1s,^W54S,W54G," $@
|
||||
|
||||
install: $(BIN_DIR)/openwrt-wrt54g-$(FSNAME).bin |
||||
endif |
||||
|
||||
ifneq ($(FS),jffs2-4MB) |
||||
$(BIN_DIR)/openwrt-wrt54gs-$(FSNAME).bin: $(BIN_DIR)/openwrt-brcm-$(KERNEL)-$(FS).trx |
||||
$(STAGING_DIR)/bin/addpattern -2 -i $< -o $@ -g
|
||||
|
||||
install: $(BIN_DIR)/openwrt-wrt54gs-$(FSNAME).bin |
||||
endif |
||||
|
||||
$(BIN_DIR)/openwrt-motorola-$(FS).bin: $(BIN_DIR)/openwrt-brcm-$(KERNEL)-$(FS).trx |
||||
$(STAGING_DIR)/bin/motorola-bin $< $@
|
||||
install: $(BIN_DIR)/openwrt-motorola-$(FS).bin |
||||
endif |
||||
|
||||
clean: lzma-loader-clean |
||||
prepare: lzma-loader-prepare |
||||
compile: lzma-loader-compile |
||||
install: $(BIN_DIR)/openwrt-brcm-$(KERNEL)-$(FS).trx |
||||
|
@ -0,0 +1,30 @@ |
||||
JFFS2OPTS := --pad --little-endian --squash
|
||||
#JFFS2OPTS += -Xlzo -msize -Xlzari
|
||||
|
||||
jffs2-prepare: |
||||
$(MAKE) -C jffs2 prepare
|
||||
|
||||
jffs2-compile: |
||||
$(MAKE) -C jffs2 compile
|
||||
|
||||
jffs2-clean: |
||||
$(MAKE) -C jffs2 clean
|
||||
rm -f $(KDIR)/root.jffs2*
|
||||
|
||||
$(KDIR)/root.jffs2-4MB: |
||||
@rm -rf $(KDIR)/root/jffs
|
||||
$(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x10000 -o $@ -d $(KDIR)/root
|
||||
|
||||
$(KDIR)/root.jffs2-8MB: |
||||
@rm -rf $(KDIR)/root/jffs
|
||||
$(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x20000 -o $@ -d $(KDIR)/root
|
||||
|
||||
jffs2-install: $(KDIR)/root.jffs2-4MB $(KDIR)/root.jffs2-8MB |
||||
$(MAKE) -C $(BOARD) install KERNEL="$(KERNEL)" FS="jffs2-4MB"
|
||||
$(MAKE) -C $(BOARD) install KERNEL="$(KERNEL)" FS="jffs2-8MB"
|
||||
|
||||
prepare: jffs2-prepare |
||||
compile: jffs2-compile |
||||
install: jffs2-install |
||||
clean: jffs2-clean |
||||
|
@ -0,0 +1,19 @@ |
||||
squashfs-prepare: |
||||
$(MAKE) -C squashfs prepare
|
||||
|
||||
squashfs-compile: |
||||
$(MAKE) -C squashfs compile
|
||||
|
||||
squashfs-clean: |
||||
$(MAKE) -C squashfs clean
|
||||
rm -f $(KDIR)/root.squashfs
|
||||
|
||||
$(KDIR)/root.squashfs: |
||||
@mkdir -p $(KDIR)/root/jffs
|
||||
$(STAGING_DIR)/bin/mksquashfs-lzma $(KDIR)/root $@ -noappend -root-owned -le
|
||||
|
||||
prepare: squashfs-prepare |
||||
compile: squashfs-compile |
||||
install: $(KDIR)/root.squashfs |
||||
$(MAKE) -C $(BOARD) install KERNEL="$(KERNEL)" FS="squashfs"
|
||||
|
Loading…
Reference in new issue