43 files changed:
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
override MAKE:=$(SUBMAKE)
KDIR=$(KERNEL_BUILD_DIR)
override MAKE:=$(SUBMAKE)
KDIR=$(KERNEL_BUILD_DIR)
+IMG_PREFIX:=openwrt-$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))
+
ifneq ($(CONFIG_BIG_ENDIAN),y)
JFFS2OPTS := --pad --little-endian --squash
SQUASHFS_OPTS := -le
ifneq ($(CONFIG_BIG_ENDIAN),y)
JFFS2OPTS := --pad --little-endian --squash
SQUASHFS_OPTS := -le
ifeq ($(CONFIG_TARGET_ROOTFS_TGZ),y)
define Image/mkfs/tgz
ifeq ($(CONFIG_TARGET_ROOTFS_TGZ),y)
define Image/mkfs/tgz
- $(TAR) -zcf $(BIN_DIR)/openwrt-$(BOARD)-rootfs.tgz --numeric-owner --owner=0 --group=0 -C $(TARGET_DIR)/ .
+ $(TAR) -zcf $(BIN_DIR)/$(IMG_PREFIX)-rootfs.tgz --numeric-owner --owner=0 --group=0 -C $(TARGET_DIR)/ .
endef
endif
ifeq ($(CONFIG_TARGET_ROOTFS_CPIOGZ),y)
define Image/mkfs/cpiogz
endef
endif
ifeq ($(CONFIG_TARGET_ROOTFS_CPIOGZ),y)
define Image/mkfs/cpiogz
- ( cd $(TARGET_DIR); find . | cpio -o -H newc | gzip -9 >$(BIN_DIR)/openwrt-$(BOARD)-rootfs.cpio.gz )
+ ( cd $(TARGET_DIR); find . | cpio -o -H newc | gzip -9 >$(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz )
endef
endif
ifeq ($(CONFIG_TARGET_ROOTFS_UBIFS),y)
endef
endif
ifeq ($(CONFIG_TARGET_ROOTFS_UBIFS),y)
endif
else
define Image/BuildKernel
endif
else
define Image/BuildKernel
- cp $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.elf
+ cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf
$(call Image/Build/Initramfs)
endef
endif
$(call Image/Build/Initramfs)
endef
endif
-# Copyright (C) 2006,2007 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(INCLUDE_DIR)/image.mk
LOADER_MAKE := $(NO_TRACE_MAKE) -C lzma-loader KDIR=$(KDIR)
include $(INCLUDE_DIR)/image.mk
LOADER_MAKE := $(NO_TRACE_MAKE) -C lzma-loader KDIR=$(KDIR)
-IMGNAME := $(BIN_DIR)/openwrt-$(BOARD)
JFFS2BLOCK := $(KDIR)/jffs2.block
JFFS2MARK := $(KDIR)/jffs2.mark
JFFS2BLOCK := $(KDIR)/jffs2.block
JFFS2MARK := $(KDIR)/jffs2.mark
-define imgname
-$(IMGNAME)-$(2)-$(patsubst jffs2-%,jffs2,$(1))
-endef
-
define Build/Clean
$(LOADER_MAKE) clean
endef
define Build/Clean
$(LOADER_MAKE) clean
endef
define Image/Build/LZMAKernel
$(LOADER_MAKE) TARGET_DIR=$(BIN_DIR) \
define Image/Build/LZMAKernel
$(LOADER_MAKE) TARGET_DIR=$(BIN_DIR) \
- LOADER=openwrt-$(BOARD)-$(1)-ramfs.$(2) \
+ LOADER=$(BIN_DIR)/$(IMG_PREFIX)-$(1)-ramfs.$(2) \
LOADER_DATA=$(KDIR)/vmlinux.lzma \
LZMA_TEXT_START=$(3) LZMA_STARTUP_ORG=$(4) \
CONFIG_PASS_KARGS=$(5) CONFIG_BOARD=$(6) \
LOADER_DATA=$(KDIR)/vmlinux.lzma \
LZMA_TEXT_START=$(3) LZMA_STARTUP_ORG=$(4) \
CONFIG_PASS_KARGS=$(5) CONFIG_BOARD=$(6) \
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
-n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
-d $(KDIR)/vmlinux.lzma $(KDIR)/uImage
-n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
-d $(KDIR)/vmlinux.lzma $(KDIR)/uImage
- cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage
+ cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
endef
define Image/Build/squashfs
endef
define Image/Build/squashfs
- $(call prepare_generic_squashfs,$(BIN_DIR)/openwrt-$(BOARD)-$(1).image)
+ $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(1).image)
- cat $(KDIR)/uImage $(KDIR)/root.$(1) > $(BIN_DIR)/openwrt-$(BOARD)-$(1).image
+ cat $(KDIR)/uImage $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(1).image
$(call Image/Build/$(1),$(1))
endef
$(call Image/Build/$(1),$(1))
endef
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
endef
define Image/Build/CyberTAN
endef
define Image/Build/CyberTAN
- (dd if=/dev/zero bs=16 count=1; cat $(BIN_DIR)/openwrt-$(BOARD)-$(1).bin) | \
+ (dd if=/dev/zero bs=16 count=1; cat $(BIN_DIR)/$(IMG_PREFIX)-$(1).bin) | \
$(STAGING_DIR_HOST)/bin/addpattern -p $(3) -o $(BIN_DIR)/openwrt-$(2)-$(4)-code.bin
endef
#define Image/Build/sErCoMm
$(STAGING_DIR_HOST)/bin/addpattern -p $(3) -o $(BIN_DIR)/openwrt-$(2)-$(4)-code.bin
endef
#define Image/Build/sErCoMm
-# cat sercomm/adam2.bin "$(BIN_DIR)/openwrt-$(BOARD)-$(1).bin" > "$(KDIR)/dgfw.tmp"
+# cat sercomm/adam2.bin "$(BIN_DIR)/$(IMG_PREFIX)-$(1).bin" > "$(KDIR)/dgfw.tmp"
# dd if=sercomm/$(2) of="$(KDIR)/dgfw.tmp" bs=$$$$((0x3e0000 - 80)) seek=1 conv=notrunc
# $(STAGING_DIR_HOST)/bin/dgfirmware -f -w "$(BIN_DIR)/openwrt-$(2)-$(3).img" "$(KDIR)/dgfw.tmp"
# rm -f "$(KDIR)/dgfw.tmp"
# dd if=sercomm/$(2) of="$(KDIR)/dgfw.tmp" bs=$$$$((0x3e0000 - 80)) seek=1 conv=notrunc
# $(STAGING_DIR_HOST)/bin/dgfirmware -f -w "$(BIN_DIR)/openwrt-$(2)-$(3).img" "$(KDIR)/dgfw.tmp"
# rm -f "$(KDIR)/dgfw.tmp"
- dd if=$(KDIR)/loader.bin $(call align/$(1)) > $(BIN_DIR)/openwrt-$(BOARD)-$(1).bin
- cat $(KDIR)/root.$(1) >> $(BIN_DIR)/openwrt-$(BOARD)-$(1).bin
- $(call prepare_generic_squashfs,$(BIN_DIR)/openwrt-$(BOARD)-$(1).bin)
+ dd if=$(KDIR)/loader.bin $(call align/$(1)) > $(BIN_DIR)/$(IMG_PREFIX)-$(1).bin
+ cat $(KDIR)/root.$(1) >> $(BIN_DIR)/$(IMG_PREFIX)-$(1).bin
+ $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(1).bin)
$(call Image/Build/CyberTAN,$(1),AG1B,AG1B,$(1))
$(call Image/Build/CyberTAN,$(1),AG1A,AG1A,$(1))
$(call Image/Build/CyberTAN,$(1),WA21,WA21,$(1))
$(call Image/Build/CyberTAN,$(1),AG1B,AG1B,$(1))
$(call Image/Build/CyberTAN,$(1),AG1A,AG1A,$(1))
$(call Image/Build/CyberTAN,$(1),WA21,WA21,$(1))
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
-IMGNAME:=$(BIN_DIR)/openwrt-$(BOARD)
-
-$(IMGNAME)-$(2)-$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1)))
+$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1)))
-VMLINUX:=$(IMGNAME)-vmlinux
-UIMAGE:=$(IMGNAME)-uImage
+VMLINUX:=$(IMG_PREFIX)-vmlinux
+UIMAGE:=$(IMG_PREFIX)-uImage
fs_squash:=squashfs-only
fs_all:=all
fs_4k:=4k
fs_squash:=squashfs-only
fs_all:=all
fs_4k:=4k
fs_4k:=initramfs
fs_64k:=initramfs
fs_128k:=initramfs
fs_4k:=initramfs
fs_64k:=initramfs
fs_128k:=initramfs
- VMLINUX:=$(IMGNAME)-vmlinux-initramfs
- UIMAGE:=$(IMGNAME)-uImage-initramfs
+ VMLINUX:=$(IMG_PREFIX)-vmlinux-initramfs
+ UIMAGE:=$(IMG_PREFIX)-uImage-initramfs
endif
define CompressLzma
endif
define CompressLzma
-$(STAGING_DIR_HOST)/bin/mkfwimage \
-B $(4) -v $(5).$(6).OpenWrt.$(REVISION) \
-k $(KDIR)/vmlinux-$(2).uImage \
-$(STAGING_DIR_HOST)/bin/mkfwimage \
-B $(4) -v $(5).$(6).OpenWrt.$(REVISION) \
-k $(KDIR)/vmlinux-$(2).uImage \
- -r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \
+ -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
-o $(call imgname,$(1),$(2))-factory.bin
( \
dd if=$(KDIR)/vmlinux-$(2).uImage; \
-o $(call imgname,$(1),$(2))-factory.bin
( \
dd if=$(KDIR)/vmlinux-$(2).uImage; \
- dd if=$(BIN_DIR)/openwrt-$(BOARD)-root.$(1); \
+ dd if=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1); \
) > $(call imgname,$(1),$(2))-sysupgrade.bin
endef
) > $(call imgname,$(1),$(2))-sysupgrade.bin
endef
-$(STAGING_DIR_HOST)/bin/mkfwimage \
-B $(4) -v $(5).$(6).OpenWrt.$(REVISION) \
-k $(KDIR)/vmlinux-$(2).lzma \
-$(STAGING_DIR_HOST)/bin/mkfwimage \
-B $(4) -v $(5).$(6).OpenWrt.$(REVISION) \
-k $(KDIR)/vmlinux-$(2).lzma \
- -r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \
+ -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
-o $(call imgname,$(1),$(2))-factory.bin
-sh $(TOPDIR)/scripts/combined-image.sh \
"$(KDIR)/vmlinux-$(2).lzma" \
-o $(call imgname,$(1),$(2))-factory.bin
-sh $(TOPDIR)/scripts/combined-image.sh \
"$(KDIR)/vmlinux-$(2).lzma" \
- "$(BIN_DIR)/openwrt-$(BOARD)-root.$(1)" \
+ "$(BIN_DIR)/$(IMG_PREFIX)-root.$(1)" \
$(call imgname,$(1),$(2))-sysupgrade.bin
endef
$(call imgname,$(1),$(2))-sysupgrade.bin
endef
-$(STAGING_DIR_HOST)/bin/mktplinkfw \
-B $(4) -N OpenWrt -V $(REVISION)\
-k $(KDIR)/vmlinux-$(2).bin.gz \
-$(STAGING_DIR_HOST)/bin/mktplinkfw \
-B $(4) -N OpenWrt -V $(REVISION)\
-k $(KDIR)/vmlinux-$(2).bin.gz \
- -r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \
+ -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
-o $(call imgname,$(1),$(2))-factory.bin
-$(STAGING_DIR_HOST)/bin/mktplinkfw \
-B $(4) -N OpenWrt -V $(REVISION) -s \
-k $(KDIR)/vmlinux-$(2).bin.gz \
-o $(call imgname,$(1),$(2))-factory.bin
-$(STAGING_DIR_HOST)/bin/mktplinkfw \
-B $(4) -N OpenWrt -V $(REVISION) -s \
-k $(KDIR)/vmlinux-$(2).bin.gz \
- -r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \
+ -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
-o $(call imgname,$(1),$(2))-sysupgrade.bin
endef
-o $(call imgname,$(1),$(2))-sysupgrade.bin
endef
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
dd if=$(KDIR)/root.squashfs of=$(KDIR)/root.squashfs-4k.tmp0 bs=4k conv=sync
$(call add_jffs2_mark,$(KDIR)/root.squashfs-4k.tmp0)
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
dd if=$(KDIR)/root.squashfs of=$(KDIR)/root.squashfs-4k.tmp0 bs=4k conv=sync
$(call add_jffs2_mark,$(KDIR)/root.squashfs-4k.tmp0)
- dd if=$(KDIR)/root.squashfs-4k.tmp0 of=$(IMGNAME)-root.squashfs-4k bs=4k conv=sync
- $(call add_jffs2_mark,$(IMGNAME)-root.squashfs-4k)
+ dd if=$(KDIR)/root.squashfs-4k.tmp0 of=$(IMG_PREFIX)-root.squashfs-4k bs=4k conv=sync
+ $(call add_jffs2_mark,$(IMG_PREFIX)-root.squashfs-4k)
rm -f $(KDIR)/root.squashfs-4k.tmp0
endef
rm -f $(KDIR)/root.squashfs-4k.tmp0
endef
define Image/Build
$(call Image/Build/$(1))
define Image/Build
$(call Image/Build/$(1))
- dd if=$(KDIR)/root.$(1) of=$(IMGNAME)-root.$(1) bs=128k conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
$(call Image/Build/Profile/$(PROFILE),$(1))
endef
$(call Image/Build/Profile/$(PROFILE),$(1))
endef
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
endef
define Image/BuildKernel
endef
define Image/BuildKernel
- cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage
+ cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
endef
define Image/Build
dd if=$(KDIR)/uImage of=$(KDIR)/uImage.block bs=8448 conv=sync
dd if=$(KDIR)/root.squashfs of=$(KDIR)/root.block bs=8448 conv=sync
cat $(KDIR)/uImage.block $(KDIR)/root.block > $(KDIR)/knlroot.bin
endef
define Image/Build
dd if=$(KDIR)/uImage of=$(KDIR)/uImage.block bs=8448 conv=sync
dd if=$(KDIR)/root.squashfs of=$(KDIR)/root.block bs=8448 conv=sync
cat $(KDIR)/uImage.block $(KDIR)/root.block > $(KDIR)/knlroot.bin
- $(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/openwrt-$(BOARD).trx -f $(KDIR)/dfboot.bin -f$(KDIR)/u-boot.full -f$(KDIR)/knlroot.bin
+ $(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX).trx -f $(KDIR)/dfboot.bin -f$(KDIR)/u-boot.full -f$(KDIR)/knlroot.bin
cp $(KDIR)/dfbptest.bin $(BIN_DIR)
$(call Image/Build/$(1),$(1))
endef
cp $(KDIR)/dfbptest.bin $(BIN_DIR)
$(call Image/Build/$(1),$(1))
endef
-# Copyright (C) 2006-2008 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(INCLUDE_DIR)/image.mk
define Image/BuildKernel
include $(INCLUDE_DIR)/image.mk
define Image/BuildKernel
- cp $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.elf
+ cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf
gzip -9 -c $(KDIR)/vmlinux > $(KDIR)/vmlinux.bin.gz
$(STAGING_DIR_HOST)/bin/lzma e $(KDIR)/vmlinux $(KDIR)/vmlinux.bin.l7
gzip -9 -c $(KDIR)/vmlinux > $(KDIR)/vmlinux.bin.gz
$(STAGING_DIR_HOST)/bin/lzma e $(KDIR)/vmlinux $(KDIR)/vmlinux.bin.l7
- dd if=$(KDIR)/vmlinux.bin.l7 of=$(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma bs=65536 conv=sync
- dd if=$(KDIR)/vmlinux.bin.gz of=$(BIN_DIR)/openwrt-$(BOARD)-vmlinux.gz bs=65536 conv=sync
+ dd if=$(KDIR)/vmlinux.bin.l7 of=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux.lzma bs=65536 conv=sync
+ dd if=$(KDIR)/vmlinux.bin.gz of=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux.gz bs=65536 conv=sync
endef
define Image/Build/squashfs
endef
define Image/Build/squashfs
define Image/Build
$(call Image/Build/$(1))
define Image/Build
$(call Image/Build/$(1))
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-root.$(1) bs=128k conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
-$(STAGING_DIR_HOST)/bin/mkfwimage \
-B XS2 -v XS2.ar2316.OpenWrt.$(REVISION) \
-$(STAGING_DIR_HOST)/bin/mkfwimage \
-B XS2 -v XS2.ar2316.OpenWrt.$(REVISION) \
- -k $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma \
- -r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \
- -o $(BIN_DIR)/openwrt-$(BOARD)-ubnt2-$(1).bin
+ -k $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.lzma \
+ -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
+ -o $(BIN_DIR)/$(IMG_PREFIX)-ubnt2-$(1).bin
-$(STAGING_DIR_HOST)/bin/mkfwimage \
-B XS5 -v XS5.ar2313.OpenWrt.$(REVISION) \
-$(STAGING_DIR_HOST)/bin/mkfwimage \
-B XS5 -v XS5.ar2313.OpenWrt.$(REVISION) \
- -k $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma \
- -r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \
- -o $(BIN_DIR)/openwrt-$(BOARD)-ubnt5-$(1).bin
+ -k $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.lzma \
+ -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
+ -o $(BIN_DIR)/$(IMG_PREFIX)-ubnt5-$(1).bin
-$(STAGING_DIR_HOST)/bin/mkfwimage \
-B XS2-8 -v XS2.ar2316.OpenWrt.$(REVISION) \
-$(STAGING_DIR_HOST)/bin/mkfwimage \
-B XS2-8 -v XS2.ar2316.OpenWrt.$(REVISION) \
- -k $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma \
- -r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \
- -o $(BIN_DIR)/openwrt-$(BOARD)-ubnt2-pico2-$(1).bin
+ -k $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.lzma \
+ -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
+ -o $(BIN_DIR)/$(IMG_PREFIX)-ubnt2-pico2-$(1).bin
-$(STAGING_DIR_HOST)/bin/mkmylofw -B np25g \
-p0x020000:0x130000:ah:0x80041000:linux:$(KDIR)/vmlinux.bin.gz \
-$(STAGING_DIR_HOST)/bin/mkmylofw -B np25g \
-p0x020000:0x130000:ah:0x80041000:linux:$(KDIR)/vmlinux.bin.gz \
- -p0x150000:0x2a0000:::rootfs:$(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \
- $(BIN_DIR)/openwrt-$(BOARD)-np25g-$(1).bin
+ -p0x150000:0x2a0000:::rootfs:$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
+ $(BIN_DIR)/$(IMG_PREFIX)-np25g-$(1).bin
-$(STAGING_DIR_HOST)/bin/mkmylofw -B wpe53g \
-p0x020000:0x130000:ah:0x80041000:linux:$(KDIR)/vmlinux.bin.gz \
-$(STAGING_DIR_HOST)/bin/mkmylofw -B wpe53g \
-p0x020000:0x130000:ah:0x80041000:linux:$(KDIR)/vmlinux.bin.gz \
- -p0x150000:0x2a0000:::rootfs:$(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \
- $(BIN_DIR)/openwrt-$(BOARD)-wpe53g-$(1).bin
+ -p0x150000:0x2a0000:::rootfs:$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
+ $(BIN_DIR)/$(IMG_PREFIX)-wpe53g-$(1).bin
ifeq ($(BOARD),atheros)
-sh $(TOPDIR)/scripts/combined-image.sh \
ifeq ($(BOARD),atheros)
-sh $(TOPDIR)/scripts/combined-image.sh \
- "$(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma" \
- "$(BIN_DIR)/openwrt-$(BOARD)-root.$(1)" \
- "$(BIN_DIR)/openwrt-$(BOARD)-combined.$(1).img"
+ "$(BIN_DIR)/$(IMG_PREFIX)-vmlinux.lzma" \
+ "$(BIN_DIR)/$(IMG_PREFIX)-root.$(1)" \
+ "$(BIN_DIR)/$(IMG_PREFIX)-combined.$(1).img"
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
endef
define Image/Build/Initramfs
endef
define Image/Build/Initramfs
- $(OBJCOPY_SREC) $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.srec
+ $(OBJCOPY_SREC) $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.srec
endef
define Image/Build
$(TARGET_CROSS)objcopy -O srec -I binary --adjust-vma $(FLASH_FS) $(KDIR)/root.$(1) $(KDIR)/root.$(1).srec
endef
define Image/Build
$(TARGET_CROSS)objcopy -O srec -I binary --adjust-vma $(FLASH_FS) $(KDIR)/root.$(1) $(KDIR)/root.$(1).srec
- grep -v S7 $(KDIR)/root.$(1).srec > $(BIN_DIR)/openwrt-$(BOARD)-$(1).srec
- grep -v S0 $(KDIR)/kernel.flash.srec >> $(BIN_DIR)/openwrt-$(BOARD)-$(1).srec
- $(INSTALL_BIN) $(KDIR)/kernel.flash.bin $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.bin
- $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(1).fs
- $(CP) $(KDIR)/kernel.flash.srec $(BIN_DIR)/openwrt-$(BOARD)-vmlinux-flash.srec
- $(CP) $(KDIR)/kernel.ram.srec $(BIN_DIR)/openwrt-$(BOARD)-vmlinux-ram.srec
+ grep -v S7 $(KDIR)/root.$(1).srec > $(BIN_DIR)/$(IMG_PREFIX)-$(1).srec
+ grep -v S0 $(KDIR)/kernel.flash.srec >> $(BIN_DIR)/$(IMG_PREFIX)-$(1).srec
+ $(INSTALL_BIN) $(KDIR)/kernel.flash.bin $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.bin
+ $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1).fs
+ $(CP) $(KDIR)/kernel.flash.srec $(BIN_DIR)/$(IMG_PREFIX)-vmlinux-flash.srec
+ $(CP) $(KDIR)/kernel.ram.srec $(BIN_DIR)/$(IMG_PREFIX)-vmlinux-ram.srec
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
$(call Image/Build/Initramfs)
endif
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
$(call Image/Build/Initramfs)
endif
-# Copyright (C) 2007-2008 OpenWrt.org
+# Copyright (C) 2007-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
endef
define Image/BuildKernel
endef
define Image/BuildKernel
- cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage
+ cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
$(STAGING_DIR_HOST)/bin/lzma e $(LINUX_DIR)/arch/avr32/boot/images/vmlinux.bin $(KDIR)/vmlinux.lzma
mkimage -A avr32 -O linux -T kernel -a 0x10000000 -C lzma \
$(STAGING_DIR_HOST)/bin/lzma e $(LINUX_DIR)/arch/avr32/boot/images/vmlinux.bin $(KDIR)/vmlinux.lzma
mkimage -A avr32 -O linux -T kernel -a 0x10000000 -C lzma \
-n 'OpenWrt Linux-$(LINUX_VERSION)' \
-d $(KDIR)/vmlinux.lzma $(KDIR)/uImage-lzma
-n 'OpenWrt Linux-$(LINUX_VERSION)' \
-d $(KDIR)/vmlinux.lzma $(KDIR)/uImage-lzma
- cp $(KDIR)/uImage-lzma $(BIN_DIR)/openwrt-$(BOARD)-uImage-lzma
+ cp $(KDIR)/uImage-lzma $(BIN_DIR)/$(IMG_PREFIX)-uImage-lzma
( \
dd if=$(KDIR)/uImage bs=1024k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
( \
dd if=$(KDIR)/uImage bs=1024k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
- ) > $(BIN_DIR)/openwrt-$(BOARD)-$(1).img
+ ) > $(BIN_DIR)/$(IMG_PREFIX)-$(1).img
endef
define Image/Build/jffs2-64k
( \
dd if=$(KDIR)/uImage bs=1024k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
endef
define Image/Build/jffs2-64k
( \
dd if=$(KDIR)/uImage bs=1024k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
- ) > $(BIN_DIR)/openwrt-$(BOARD)-$(1).img
+ ) > $(BIN_DIR)/$(IMG_PREFIX)-$(1).img
endef
$(eval $(call BuildImage))
endef
$(eval $(call BuildImage))
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
ifneq ($(KERNEL),2.4)
define Image/Build/wgt634u
dd if=$(KDIR)/loader.elf of=$(BIN_DIR)/openwrt-wgt634u-$(2).bin bs=131072 conv=sync
ifneq ($(KERNEL),2.4)
define Image/Build/wgt634u
dd if=$(KDIR)/loader.elf of=$(BIN_DIR)/openwrt-wgt634u-$(2).bin bs=131072 conv=sync
- cat $(BIN_DIR)/openwrt-$(BOARD)-$(1).trx >> $(BIN_DIR)/openwrt-wgt634u-$(2).bin
+ cat $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx >> $(BIN_DIR)/openwrt-wgt634u-$(2).bin
endef
endif
define Image/Build/CyberTAN
endef
endif
define Image/Build/CyberTAN
- $(STAGING_DIR_HOST)/bin/addpattern -4 -p $(3) -v v$(4) -i $(BIN_DIR)/openwrt-$(BOARD)-$(1).trx -o $(BIN_DIR)/openwrt-$(2)-$(5).bin $(if $(6),-s $(6))
+ $(STAGING_DIR_HOST)/bin/addpattern -4 -p $(3) -v v$(4) -i $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx -o $(BIN_DIR)/openwrt-$(2)-$(5).bin $(if $(6),-s $(6))
endef
define Image/Build/CyberTAN2
endef
define Image/Build/CyberTAN2
- $(STAGING_DIR_HOST)/bin/addpattern -4 -p $(3) -v v$(4) -i $(BIN_DIR)/openwrt-$(BOARD)-$(1).trx2 -o $(BIN_DIR)/openwrt-$(2)-$(5).bin $(if $(6),-s $(6))
+ $(STAGING_DIR_HOST)/bin/addpattern -4 -p $(3) -v v$(4) -i $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx2 -o $(BIN_DIR)/openwrt-$(2)-$(5).bin $(if $(6),-s $(6))
endef
define Image/Build/CyberTANHead
$(STAGING_DIR_HOST)/bin/addpattern -5 -p $(3) -v v$(4) -i /dev/null -o $(KDIR)/openwrt-$(2)-header.bin $(if $(6),-s $(6))
endef
define Image/Build/Motorola
endef
define Image/Build/CyberTANHead
$(STAGING_DIR_HOST)/bin/addpattern -5 -p $(3) -v v$(4) -i /dev/null -o $(KDIR)/openwrt-$(2)-header.bin $(if $(6),-s $(6))
endef
define Image/Build/Motorola
- $(STAGING_DIR_HOST)/bin/motorola-bin -$(3) $(BIN_DIR)/openwrt-$(BOARD)-$(1).trx $(BIN_DIR)/openwrt-$(2)-$(4).bin
+ $(STAGING_DIR_HOST)/bin/motorola-bin -$(3) $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx $(BIN_DIR)/openwrt-$(2)-$(4).bin
endef
define Image/Build/USR
endef
define Image/Build/USR
- $(STAGING_DIR_HOST)/bin/trx2usr $(BIN_DIR)/openwrt-$(BOARD)-$(1).trx $(BIN_DIR)/openwrt-$(2)-$(3).bin
+ $(STAGING_DIR_HOST)/bin/trx2usr $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx $(BIN_DIR)/openwrt-$(2)-$(3).bin
endef
define trxalign/jffs2-128k
endef
define trxalign/jffs2-128k
define Image/Build/trxV2
$(call Image/Build/CyberTANHead,$(1),$(2),$(3),$(4),$(5),$(if $(6),$(6)))
define Image/Build/trxV2
$(call Image/Build/CyberTANHead,$(1),$(2),$(3),$(4),$(5),$(if $(6),$(6)))
- $(STAGING_DIR_HOST)/bin/trx -2 -o $(BIN_DIR)/openwrt-$(BOARD)-$(1).trx2 \
+ $(STAGING_DIR_HOST)/bin/trx -2 -o $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx2 \
-f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma \
$(call trxalign/$(1),$(1),$(KDIR)/openwrt-$(2)-header.bin)
$(call Image/Build/CyberTAN2,$(1),$(2),$(3),$(4),$(5),$(if $(6),$(6)))
-f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma \
$(call trxalign/$(1),$(1),$(KDIR)/openwrt-$(2)-header.bin)
$(call Image/Build/CyberTAN2,$(1),$(2),$(3),$(4),$(5),$(if $(6),$(6)))
endef
define Image/Build/Initramfs
endef
define Image/Build/Initramfs
- $(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/openwrt-$(BOARD)-initramfs.trx -f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma
+ $(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-initramfs.trx -f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma
- $(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/openwrt-$(BOARD)-$(1).trx \
+ $(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx \
-f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma \
$(call trxalign/$(1),$(1))
$(call Image/Build/$(1),$(1))
-f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma \
$(call trxalign/$(1),$(1))
$(call Image/Build/$(1),$(1))
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-root.$(1) bs=128k conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
# Various routers
$(call Image/Build/CFE,$(1),96345GW2,6345,96345GW2-generic)
$(call Image/Build/CFE,$(1),96345GW2,6345,96348GW2-bc221,,-y 5)
# Various routers
$(call Image/Build/CFE,$(1),96345GW2,6345,96345GW2-generic)
$(call Image/Build/CFE,$(1),96345GW2,6345,96348GW2-bc221,,-y 5)
-# Copyright (C) 2009 OpenWrt.org
+# Copyright (C) 2009-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(INCLUDE_DIR)/image.mk
define Image/BuildKernel
include $(INCLUDE_DIR)/image.mk
define Image/BuildKernel
- cp $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.elf
+ cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf
endef
define Image/Build/squashfs
endef
define Image/Build/squashfs
define Image/Build
$(call Image/Build/$(1))
define Image/Build
$(call Image/Build/$(1))
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-root.$(1) bs=128k conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
endef
$(eval $(call BuildImage))
endef
$(eval $(call BuildImage))
-# Copyright (C) 2009 OpenWrt.org
+# Copyright (C) 2009-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
-R .note.gnu.build-id -S $(LINUX_DIR)/vmlinux $(KDIR)/vmlinux.bin
mkimage -A m68k -O linux -T kernel -a 0x00020000 -e 0x00020000 \
-C none -n 'M68K OpenWrt Linux-$(LINUX_VERSION)' \
-R .note.gnu.build-id -S $(LINUX_DIR)/vmlinux $(KDIR)/vmlinux.bin
mkimage -A m68k -O linux -T kernel -a 0x00020000 -e 0x00020000 \
-C none -n 'M68K OpenWrt Linux-$(LINUX_VERSION)' \
- -d $(KDIR)/vmlinux.bin $(BIN_DIR)/openwrt-$(BOARD)-uImage
+ -d $(KDIR)/vmlinux.bin $(BIN_DIR)/$(IMG_PREFIX)-uImage
-# Copyright (C) 2009 OpenWrt.org
+# Copyright (C) 2009-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
endef
define Image/Build/jffs2-64k
endef
define Image/Build/jffs2-64k
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=64k conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=64k conv=sync
endef
define Image/Build/jffs2-128k
endef
define Image/Build/jffs2-128k
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=128k conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=128k conv=sync
endef
define Image/Build/squashfs
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
endef
define Image/Build/squashfs
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=128k conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=128k conv=sync
-# Copyright (C) 2006-2009 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
define Image/BuildKernel
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
define Image/BuildKernel
- cp $(KDIR)/vmlinuz $(BIN_DIR)/openwrt-$(BOARD)-zImage
+ cp $(KDIR)/vmlinuz $(BIN_DIR)/$(IMG_PREFIX)-zImage
endef
define Image/Prepare
endef
define Image/Prepare
mkfimage $(KDIR)/vmlinuz $(KDIR)/vmlinuz.tmp
cat $(KDIR)/vmlinuz.tmp $(KDIR)/root.$(1) > $(KDIR)/fimage.$(1).tmp
dd if=$(KDIR)/fimage.$(1).tmp of=$(KDIR)/fimage.$(1) bs=$(2) conv=sync
mkfimage $(KDIR)/vmlinuz $(KDIR)/vmlinuz.tmp
cat $(KDIR)/vmlinuz.tmp $(KDIR)/root.$(1) > $(KDIR)/fimage.$(1).tmp
dd if=$(KDIR)/fimage.$(1).tmp of=$(KDIR)/fimage.$(1) bs=$(2) conv=sync
- cp $(KDIR)/fimage.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(1)-fimage
+ cp $(KDIR)/fimage.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-fimage
endef
define Image/Build/jffs2-64k
endef
define Image/Build/jffs2-64k
-# Copyright (C) 2009 OpenWrt.org
+# Copyright (C) 2009-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
define Image/Prepare
# WBD111: mach id 1690 (0x69a)
define Image/Prepare
# WBD111: mach id 1690 (0x69a)
- echo -en "\x06\x1c\xa0\xe3\x9a\x10\x81\xe3" > $(KDIR)/openwrt-$(BOARD)-wbd111-zImage
- cat $(LINUX_DIR)/arch/arm/boot/zImage >> $(KDIR)/openwrt-$(BOARD)-wbd111-zImage
+ echo -en "\x06\x1c\xa0\xe3\x9a\x10\x81\xe3" > $(KDIR)/$(IMG_PREFIX)-wbd111-zImage
+ cat $(LINUX_DIR)/arch/arm/boot/zImage >> $(KDIR)/$(IMG_PREFIX)-wbd111-zImage
endef
define Image/BuildKernel
# workaround the bootloader's bug with extra nops
endef
define Image/BuildKernel
# workaround the bootloader's bug with extra nops
- echo -en "\x00\x00\xa0\xe1\x00\x00\xa0\xe1\x00\x00\xa0\xe1\x00\x00\xa0\xe1" > $(BIN_DIR)/openwrt-$(BOARD)-wbd111-zImage
- cat $(KDIR)/openwrt-$(BOARD)-wbd111-zImage >> $(BIN_DIR)/openwrt-$(BOARD)-wbd111-zImage
+ echo -en "\x00\x00\xa0\xe1\x00\x00\xa0\xe1\x00\x00\xa0\xe1\x00\x00\xa0\xe1" > $(BIN_DIR)/$(IMG_PREFIX)-wbd111-zImage
+ cat $(KDIR)/$(IMG_PREFIX)-wbd111-zImage >> $(BIN_DIR)/$(IMG_PREFIX)-wbd111-zImage
endef
define Image/Build/jffs2-64k
endef
define Image/Build/jffs2-64k
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=64k conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=64k conv=sync
endef
define Image/Build/jffs2-128k
endef
define Image/Build/jffs2-128k
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=128k conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=128k conv=sync
endef
define Image/Build/squashfs
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
endef
define Image/Build/squashfs
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=128k conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=128k conv=sync
-$(STAGING_DIR_HOST)/bin/mkfwimage2 \
-m GEOS -f 0x30000000 -z \
-v WILI-S.WILIBOARD.v5.00.SL3512.OpenWrt.00000.000000.000000 \
-$(STAGING_DIR_HOST)/bin/mkfwimage2 \
-m GEOS -f 0x30000000 -z \
-v WILI-S.WILIBOARD.v5.00.SL3512.OpenWrt.00000.000000.000000 \
- -o $(BIN_DIR)/openwrt-$(BOARD)-wbd111-$(1).bin \
- -p Kernel:0x020000:0x100000:0:0:$(BIN_DIR)/openwrt-$(BOARD)-wbd111-zImage \
- -p Ramdisk:0x120000:0x500000:0:0:$(BIN_DIR)/openwrt-$(BOARD)-$(1).img
+ -o $(BIN_DIR)/$(IMG_PREFIX)-wbd111-$(1).bin \
+ -p Kernel:0x020000:0x100000:0:0:$(BIN_DIR)/$(IMG_PREFIX)-wbd111-zImage \
+ -p Ramdisk:0x120000:0x500000:0:0:$(BIN_DIR)/$(IMG_PREFIX)-$(1).img
endef
$(eval $(call BuildImage))
endef
$(eval $(call BuildImage))
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
JFFS2_BLOCKSIZE=124k
JFFS2OPTS += -n -s 2048
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
JFFS2_BLOCKSIZE=124k
JFFS2OPTS += -n -s 2048
-_PREFIX=openwrt-goldfish-
-
define Image/BuildKernel
$(TARGET_CROSS)objcopy -O binary -R .note -R .comment -S \
define Image/BuildKernel
$(TARGET_CROSS)objcopy -O binary -R .note -R .comment -S \
- $(LINUX_DIR)/arch/arm/boot/compressed/vmlinux $(BIN_DIR)/$(_PREFIX)kernel.bin
+ $(LINUX_DIR)/arch/arm/boot/compressed/vmlinux $(BIN_DIR)/$(IMG_PREFIX)-kernel.bin
$(if $(CONFIG_TARGET_ROOTFS_INITRAMFS), \
$(CP) $(LINUX_DIR)/usr/initramfs_data.cpio.gz, \
gzip -c < $(LINUX_DIR)/usr/initramfs_data.cpio > \
$(if $(CONFIG_TARGET_ROOTFS_INITRAMFS), \
$(CP) $(LINUX_DIR)/usr/initramfs_data.cpio.gz, \
gzip -c < $(LINUX_DIR)/usr/initramfs_data.cpio > \
- ) $(BIN_DIR)/$(_PREFIX)ramdisk.bin
+ ) $(BIN_DIR)/$(IMG_PREFIX)-ramdisk.bin
$(CP) ./run-emulator.sh $(BIN_DIR)/
endef
$(CP) ./run-emulator.sh $(BIN_DIR)/
endef
$(CP) ./ubinize.cfg $(KDIR)/
(cd $(KDIR); \
ubinize \
$(CP) ./ubinize.cfg $(KDIR)/
(cd $(KDIR); \
ubinize \
- -o $(BIN_DIR)/$(_PREFIX)$(1).img \
+ -o $(BIN_DIR)/$(IMG_PREFIX)-$(1).img \
-p 128KiB -m 2KiB -s 2KiB ubinize.cfg; \
)
nand_ecc \
-p 128KiB -m 2KiB -s 2KiB ubinize.cfg; \
)
nand_ecc \
- $(BIN_DIR)/$(_PREFIX)$(1).img \
- $(BIN_DIR)/$(_PREFIX)system.bin
+ $(BIN_DIR)/$(IMG_PREFIX)-$(1).img \
+ $(BIN_DIR)/$(IMG_PREFIX)-system.bin
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
-n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
-d $(KDIR)/vmlinux.lzma $(KDIR)/uImage
-n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
-d $(KDIR)/vmlinux.lzma $(KDIR)/uImage
- cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage
+ cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
endef
define Image/Build/squashfs
endef
define Image/Build/squashfs
- cat $(KDIR)/uImage $(KDIR)/root.$(1) > $(BIN_DIR)/openwrt-$(BOARD)-$(1).image
- $(call prepare_generic_squashfs,$(BIN_DIR)/openwrt-$(BOARD)-$(1).image)
+ cat $(KDIR)/uImage $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(1).image
+ $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(1).image)
endef
define Image/Build/jffs2-64k
dd if=$(KDIR)/uImage of=$(KDIR)/uImage.$(1) bs=64k conv=sync
endef
define Image/Build/jffs2-64k
dd if=$(KDIR)/uImage of=$(KDIR)/uImage.$(1) bs=64k conv=sync
- cat $(KDIR)/uImage.$(1) $(KDIR)/root.$(1) > $(BIN_DIR)/openwrt-$(BOARD)-$(1).image
+ cat $(KDIR)/uImage.$(1) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(1).image
endef
define Image/Build/jffs2-128k
dd if=$(KDIR)/uImage of=$(KDIR)/uImage.$(1) bs=128k conv=sync
endef
define Image/Build/jffs2-128k
dd if=$(KDIR)/uImage of=$(KDIR)/uImage.$(1) bs=128k conv=sync
- cat $(KDIR)/uImage.$(1) $(KDIR)/root.$(1) > $(BIN_DIR)/openwrt-$(BOARD)-$(1).image
+ cat $(KDIR)/uImage.$(1) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(1).image
-# Copyright (C) 2007 OpenWrt.org
+# Copyright (C) 2007-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
endef
define Image/BuildKernel
endef
define Image/BuildKernel
- cp $(KDIR)/zImage $(BIN_DIR)/openwrt-$(BOARD)-zImage
+ cp $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage
endef
define Image/Build/jffs2-64k
endef
define Image/Build/jffs2-64k
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=65536 conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=65536 conv=sync
endef
define Image/Build/jffs2-128k
endef
define Image/Build/jffs2-128k
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=131072 conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=131072 conv=sync
$(call Image/Build/slug,$(1))
endef
define Image/Build/squashfs
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
$(call Image/Build/slug,$(1))
endef
define Image/Build/squashfs
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=131072 conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=131072 conv=sync
$(call Image/Build/slug,$(1))
endef
$(call Image/Build/slug,$(1))
endef
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
BIN_DIR=$(BIN_DIR) $(TOPDIR)/scripts/slugimage.pl \
-L $(BIN_DIR)/apex/apex-$(2)-armeb.bin \
-k $(BIN_DIR)/openwrt-$(2)-zImage \
BIN_DIR=$(BIN_DIR) $(TOPDIR)/scripts/slugimage.pl \
-L $(BIN_DIR)/apex/apex-$(2)-armeb.bin \
-k $(BIN_DIR)/openwrt-$(2)-zImage \
- -r rootfs:$(BIN_DIR)/openwrt-$(BOARD)-$(1).img \
+ -r rootfs:$(BIN_DIR)/$(IMG_PREFIX)-$(1).img \
-p -o $(BIN_DIR)/openwrt-$(2)-$(1).bin
BIN_DIR=$(BIN_DIR) $(TOPDIR)/scripts/slugimage.pl \
-F -L $(BIN_DIR)/apex/apex-$(2)-16mb-armeb.bin \
-k $(BIN_DIR)/openwrt-$(2)-zImage \
-p -o $(BIN_DIR)/openwrt-$(2)-$(1).bin
BIN_DIR=$(BIN_DIR) $(TOPDIR)/scripts/slugimage.pl \
-F -L $(BIN_DIR)/apex/apex-$(2)-16mb-armeb.bin \
-k $(BIN_DIR)/openwrt-$(2)-zImage \
- -r rootfs:$(BIN_DIR)/openwrt-$(BOARD)-$(1).img \
+ -r rootfs:$(BIN_DIR)/$(IMG_PREFIX)-$(1).img \
-p -o $(BIN_DIR)/openwrt-$(2)-$(1)-16mb.bin
endef
endif
-p -o $(BIN_DIR)/openwrt-$(2)-$(1)-16mb.bin
endef
endif
endef
define Image/BuildKernel
endef
define Image/BuildKernel
- cp $(KDIR)/zImage $(BIN_DIR)/openwrt-$(BOARD)-zImage
+ cp $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage
BIN_DIR=$(BIN_DIR) $(TOPDIR)/scripts/arm-magic.sh
endef
BIN_DIR=$(BIN_DIR) $(TOPDIR)/scripts/arm-magic.sh
endef
endef
define Image/Build/jffs2-64k
endef
define Image/Build/jffs2-64k
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=65536 conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=65536 conv=sync
endef
define Image/Build/jffs2-128k
endef
define Image/Build/jffs2-128k
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=131072 conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=131072 conv=sync
$(call Image/Build/Linksys,$(1))
$(call Image/Build/Freecom,$(1),fsg3,$(1))
endef
define Image/Build/squashfs
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
$(call Image/Build/Linksys,$(1))
$(call Image/Build/Freecom,$(1),fsg3,$(1))
endef
define Image/Build/squashfs
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=131072 conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=131072 conv=sync
$(call Image/Build/Linksys,$(1),nslu2,$(1))
$(call Image/Build/Freecom,$(1),fsg3,$(1))
endef
$(call Image/Build/Linksys,$(1),nslu2,$(1))
$(call Image/Build/Freecom,$(1),fsg3,$(1))
endef
-# Copyright (C) 2009 OpenWrt.org
+# Copyright (C) 2009-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
define Image/BuildKernel
# do mach-id fixup here, if needed
define Image/BuildKernel
# do mach-id fixup here, if needed
- cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage
+ cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
( \
dd if=$(KDIR)/uImage bs=4096k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
( \
dd if=$(KDIR)/uImage bs=4096k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
- ) > $(BIN_DIR)/openwrt-$(BOARD)-$(1).img
+ ) > $(BIN_DIR)/$(IMG_PREFIX)-$(1).img
endef
define Image/Build/squashfs
endef
define Image/Build/squashfs
( \
dd if=$(KDIR)/uImage bs=4096k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
( \
dd if=$(KDIR)/uImage bs=4096k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
- ) > $(BIN_DIR)/openwrt-$(BOARD)-$(1).img
+ ) > $(BIN_DIR)/$(IMG_PREFIX)-$(1).img
endef
$(eval $(call BuildImage))
endef
$(eval $(call BuildImage))
include $(INCLUDE_DIR)/image.mk
define Image/BuildKernel
include $(INCLUDE_DIR)/image.mk
define Image/BuildKernel
- cp $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-$(SUBTARGET)-vmlinux.elf
+ cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf
endef
define Image/Build/squashfs
endef
define Image/Build/squashfs
define Image/Build
$(call Image/Build/$(1))
define Image/Build
$(call Image/Build/$(1))
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(SUBTARGET)-root.$(1) bs=128k conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
endef
$(eval $(call BuildImage))
endef
$(eval $(call BuildImage))
-# Copyright (C) 2009 OpenWrt.org
+# Copyright (C) 2009-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
endef
define Image/BuildKernel
endef
define Image/BuildKernel
- cp $(KDIR)/zImage $(BIN_DIR)/openwrt-$(BOARD)-zImage
+ cp $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage
endef
define Image/Build/ext2
endef
define Image/Build/ext2
- cp $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-ext2.img
+ cp $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-ext2.img
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
define Image/Prepare
$(LINUX_DIR)/scripts/dtc/dtc -O dtb -R 4 -S 0x20000 $(LINUX_DIR)/arch/powerpc/boot/dts/mpc8377_wlan.dts > $(BIN_DIR)/openwrt-mpc83xx-mpc8377_wlan.dtb
endef
define Image/BuildKernel
define Image/Prepare
$(LINUX_DIR)/scripts/dtc/dtc -O dtb -R 4 -S 0x20000 $(LINUX_DIR)/arch/powerpc/boot/dts/mpc8377_wlan.dts > $(BIN_DIR)/openwrt-mpc83xx-mpc8377_wlan.dtb
endef
define Image/BuildKernel
- cp $(LINUX_DIR)/arch/powerpc/boot/dtbImage.rb600.elf $(BIN_DIR)/openwrt-$(BOARD)-rb600.elf
- cp $(LINUX_DIR)/arch/powerpc/boot/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage
+ cp $(LINUX_DIR)/arch/powerpc/boot/dtbImage.rb600.elf $(BIN_DIR)/$(IMG_PREFIX)-rb600.elf
+ cp $(LINUX_DIR)/arch/powerpc/boot/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
( \
dd if=$(LINUX_DIR)/arch/powerpc/boot/uImage bs=3072k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=256k conv=sync; \
( \
dd if=$(LINUX_DIR)/arch/powerpc/boot/uImage bs=3072k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=256k conv=sync; \
- ) > $(BIN_DIR)/openwrt-$(BOARD)-mpc8377_wlan-$(1).img
+ ) > $(BIN_DIR)/$(IMG_PREFIX)-mpc8377_wlan-$(1).img
endef
$(eval $(call BuildImage))
endef
$(eval $(call BuildImage))
+#
+# Copyright (C) 2010 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
define Image/BuildKernel
mkdir -p $(BIN_DIR)
define Image/BuildKernel
mkdir -p $(BIN_DIR)
- cp $(KDIR)/vmlinuz $(BIN_DIR)/openwrt-$(BOARD)-zImage
+ cp $(KDIR)/vmlinuz $(BIN_DIR)/$(IMG_PREFIX)-zImage
endef
define Image/Prepare
endef
define Image/Prepare
define Image/Build/squashfs
define Image/Build/squashfs
- $(call prepare_generic_squashfs,$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-root.$(1))
+ $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-root.$(1))
endef
$(eval $(call BuildImage))
endef
$(eval $(call BuildImage))
-# Copyright (C) 2009 OpenWrt.org
+# Copyright (C) 2009-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
define Image/BuildKernel
# Workaround pre-SDK-1.9.0 u-boot versions not handling the .notes section
define Image/BuildKernel
# Workaround pre-SDK-1.9.0 u-boot versions not handling the .notes section
- $(TARGET_CROSS)strip -R .notes $(KDIR)/vmlinux.elf -o $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.elf
+ $(TARGET_CROSS)strip -R .notes $(KDIR)/vmlinux.elf -o $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf
$(STAGING_DIR_HOST)/bin/lzma e $(KDIR)/vmlinux $(KDIR)/vmlinux.bin.l7
$(STAGING_DIR_HOST)/bin/lzma e $(KDIR)/vmlinux $(KDIR)/vmlinux.bin.l7
- dd if=$(KDIR)/vmlinux.bin.l7 of=$(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma bs=65536 conv=sync
+ dd if=$(KDIR)/vmlinux.bin.l7 of=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux.lzma bs=65536 conv=sync
endef
define Image/Build/squashfs
endef
define Image/Build/squashfs
define Image/Build
$(call Image/Build/$(1))
define Image/Build
$(call Image/Build/$(1))
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-root.$(1) bs=128k conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
endef
$(eval $(call BuildImage))
endef
$(eval $(call BuildImage))
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
JFFS2_BLOCKSIZE=128k
JFFS2OPTS += --little-endian --pagesize=0x800 --no-cleanmarkers --pad
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
JFFS2_BLOCKSIZE=128k
JFFS2OPTS += --little-endian --pagesize=0x800 --no-cleanmarkers --pad
define Image/BuildKernel
$(TARGET_CROSS)objcopy -O binary -R .note -R .comment -S $(LINUX_DIR)/arch/arm/boot/compressed/vmlinux linux.bin
mkimage -A arm -O linux -T kernel -C none -a 80008000 -e 80008000 -n "OpenWRT Kernel Image beagleboard" -d linux.bin uImage
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n 'uImage.bin+mmc2' -d ../files/boot-mmc.cmd boot.scr
define Image/BuildKernel
$(TARGET_CROSS)objcopy -O binary -R .note -R .comment -S $(LINUX_DIR)/arch/arm/boot/compressed/vmlinux linux.bin
mkimage -A arm -O linux -T kernel -C none -a 80008000 -e 80008000 -n "OpenWRT Kernel Image beagleboard" -d linux.bin uImage
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n 'uImage.bin+mmc2' -d ../files/boot-mmc.cmd boot.scr
- mv uImage $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-uImage
+ mv uImage $(BIN_DIR)/$(IMG_PREFIX)-$(KERNEL)-uImage
mv boot.scr $(BIN_DIR)/boot.scr
rm linux.bin
endef
define Image/Build/squashfs
mv boot.scr $(BIN_DIR)/boot.scr
rm linux.bin
endef
define Image/Build/squashfs
- $(call prepare_generic_squashfs,$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-root.$(1))
+ $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(KERNEL)-root.$(1))
- $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-root.$(1)
- PADDING="true" PATH="$(TARGET_PATH)" ./gen_image.sh $(BIN_DIR)/openwrt-$(BOARD)-$(1).image 4 $(KDIR)/root.bootscript 240 $(KDIR)/root.$(1)
+ $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(KERNEL)-root.$(1)
+ PADDING="true" PATH="$(TARGET_PATH)" ./gen_image.sh $(BIN_DIR)/$(IMG_PREFIX)-$(1).image 4 $(KDIR)/root.bootscript 240 $(KDIR)/root.$(1)
$(call Image/Build/$(1),$(1))
endef
$(call Image/Build/$(1),$(1))
endef
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
( \
dd if=$(KDIR)/uImage bs=1024k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
( \
dd if=$(KDIR)/uImage bs=1024k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
- ) > $(BIN_DIR)/openwrt-$(BOARD)-$(1).img
+ ) > $(BIN_DIR)/$(IMG_PREFIX)-$(1).img
endef
$(eval $(call BuildImage))
endef
$(eval $(call BuildImage))
-# Copyright (C) 2008-2009 OpenWrt.org
+# Copyright (C) 2008-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
endef
define Image/BuildKernel
endef
define Image/BuildKernel
- cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage
+ cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
endef
define Image/Build/ext2
endef
define Image/Build/ext2
- cp $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-ext2.img
+ cp $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-ext2.img
endef
define Image/Build/jffs2-128k
endef
define Image/Build/jffs2-128k
dd if=$(LINUX_DIR)/arch/powerpc/boot/uImage bs=1920k conv=sync; \
dd if=$(KDIR)/openwrt-kilauea.dtb bs=128k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
dd if=$(LINUX_DIR)/arch/powerpc/boot/uImage bs=1920k conv=sync; \
dd if=$(KDIR)/openwrt-kilauea.dtb bs=128k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
- ) > $(BIN_DIR)/openwrt-$(BOARD)-kilauea-jffs2.img
+ ) > $(BIN_DIR)/$(IMG_PREFIX)-kilauea-jffs2.img
endef
define Image/Build/jffs2-64k
( \
dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.magicbox bs=1280k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
endef
define Image/Build/jffs2-64k
( \
dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.magicbox bs=1280k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
- ) > $(BIN_DIR)/openwrt-$(BOARD)-magicbox-jffs2.img
+ ) > $(BIN_DIR)/$(IMG_PREFIX)-magicbox-jffs2.img
( \
dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.openrb bs=1280k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
( \
dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.openrb bs=1280k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
- ) > $(BIN_DIR)/openwrt-$(BOARD)-openrb-jffs2.img
+ ) > $(BIN_DIR)/$(IMG_PREFIX)-openrb-jffs2.img
endef
define Image/Build/squashfs
endef
define Image/Build/squashfs
dd if=$(LINUX_DIR)/arch/powerpc/boot/uImage bs=1920k conv=sync; \
dd if=$(KDIR)/openwrt-kilauea.dtb bs=128k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
dd if=$(LINUX_DIR)/arch/powerpc/boot/uImage bs=1920k conv=sync; \
dd if=$(KDIR)/openwrt-kilauea.dtb bs=128k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
- ) > $(BIN_DIR)/openwrt-$(BOARD)-kilauea-$(1).img
+ ) > $(BIN_DIR)/$(IMG_PREFIX)-kilauea-$(1).img
( \
dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.magicbox bs=1280k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
( \
dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.magicbox bs=1280k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
- ) > $(BIN_DIR)/openwrt-$(BOARD)-magicbox-$(1).img
+ ) > $(BIN_DIR)/$(IMG_PREFIX)-magicbox-$(1).img
( \
dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.openrb bs=1280k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
( \
dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.openrb bs=1280k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
- ) > $(BIN_DIR)/openwrt-$(BOARD)-openrb-$(1).img
+ ) > $(BIN_DIR)/$(IMG_PREFIX)-openrb-$(1).img
endef
$(eval $(call BuildImage))
endef
$(eval $(call BuildImage))
-# Copyright (C) 2007-2009 OpenWrt.org
+# Copyright (C) 2007-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
endef
define Image/BuildKernel
endef
define Image/BuildKernel
- cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage
+ cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
( \
dd if=$(KDIR)/uImage bs=2048k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=256k conv=sync; \
( \
dd if=$(KDIR)/uImage bs=2048k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=256k conv=sync; \
- ) > $(BIN_DIR)/openwrt-$(BOARD)-jffs2.img
+ ) > $(BIN_DIR)/$(IMG_PREFIX)-jffs2.img
endef
define Image/Build/squashfs
endef
define Image/Build/squashfs
( \
dd if=$(KDIR)/uImage bs=2048k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=256k conv=sync; \
( \
dd if=$(KDIR)/uImage bs=2048k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=256k conv=sync; \
- ) > $(BIN_DIR)/openwrt-$(BOARD)-taishan-$(1).img
+ ) > $(BIN_DIR)/$(IMG_PREFIX)-taishan-$(1).img
( \
dd if=$(LINUX_DIR)/arch/powerpc/boot/uImage bs=1920k conv=sync; \
dd if=$(KDIR)/openwrt-canyonlands.dtb bs=128k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=256k conv=sync; \
( \
dd if=$(LINUX_DIR)/arch/powerpc/boot/uImage bs=1920k conv=sync; \
dd if=$(KDIR)/openwrt-canyonlands.dtb bs=128k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=256k conv=sync; \
- ) > $(BIN_DIR)/openwrt-$(BOARD)-canyonlands-$(1).img
+ ) > $(BIN_DIR)/$(IMG_PREFIX)-canyonlands-$(1).img
endef
$(eval $(call BuildImage))
endef
$(eval $(call BuildImage))
-# Copyright (C) 2007 OpenWrt.org
+# Copyright (C) 2007-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
define Image/BuildKernel
mkdir -p $(BIN_DIR)
cp $(KDIR)/image $(BIN_DIR)/otheros.bld
define Image/BuildKernel
mkdir -p $(BIN_DIR)
cp $(KDIR)/image $(BIN_DIR)/otheros.bld
- cp $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.elf
- cp $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.elf $(TARGET_DIR)
+ cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf
+ cp $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf $(TARGET_DIR)
endef
$(eval $(call BuildImage))
endef
$(eval $(call BuildImage))
endef
define Image/BuildKernel
endef
define Image/BuildKernel
- cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage
+ cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
endef
define Image/Build/jffs2-64k
endef
define Image/Build/jffs2-64k
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=64k conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=64k conv=sync
endef
define Image/Build/jffs2-128k
endef
define Image/Build/jffs2-128k
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=128k conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=128k conv=sync
endef
define Image/Build/squashfs
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
endef
define Image/Build/squashfs
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=128k conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=128k conv=sync
endef
$(eval $(call BuildImage))
endef
$(eval $(call BuildImage))
-# Copyright (C) 2007 OpenWrt.org
+# Copyright (C) 2007-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
define Image/BuildKernel
mkdir -p $(BIN_DIR)
define Image/BuildKernel
mkdir -p $(BIN_DIR)
- cp $(KDIR)/zImage $(BIN_DIR)/openwrt-$(BOARD)-zImage
- cp $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.elf
+ cp $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage
+ cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf
endef
$(eval $(call BuildImage))
endef
$(eval $(call BuildImage))
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
-IMGNAME:=$(BIN_DIR)/openwrt-$(BOARD)
-
-$(IMGNAME)-$(2)-$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1)))
+$($BIN_DIR)/$(IMG_PREFIX)-$(2)-$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1)))
-VMLINUX:=$(IMGNAME)-vmlinux
-UIMAGE:=$(IMGNAME)-uImage
+VMLINUX:=$(IMG_PREFIX)-vmlinux
+UIMAGE:=$(IMG_PREFIX)-uImage
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
- VMLINUX:=$(IMGNAME)-vmlinux-initramfs
- UIMAGE:=$(IMGNAME)-uImage-initramfs
+ VMLINUX:=$(IMG_PREFIX)-vmlinux-initramfs
+ UIMAGE:=$(IMG_PREFIX)-uImage-initramfs
endif
ifeq ($(CONFIG_RALINK_RT305X),y)
endif
ifeq ($(CONFIG_RALINK_RT305X),y)
endef
define Image/BuildKernel
endef
define Image/BuildKernel
- cp $(KDIR)/vmlinux.elf $(VMLINUX).elf
- cp $(KDIR)/vmlinux $(VMLINUX).bin
+ cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(VMLINUX).elf
+ cp $(KDIR)/vmlinux $(BIN_DIR)/$(VMLINUX).bin
$(call CompressLzma,$(KDIR)/vmlinux,$(KDIR)/vmlinux.bin.lzma)
$(call MkImage,lzma,$(KDIR)/vmlinux.bin.lzma,$(KDIR)/uImage.lzma)
$(call CompressLzma,$(KDIR)/vmlinux,$(KDIR)/vmlinux.bin.lzma)
$(call MkImage,lzma,$(KDIR)/vmlinux.bin.lzma,$(KDIR)/uImage.lzma)
- cp $(KDIR)/uImage.lzma $(UIMAGE).bin
+ cp $(KDIR)/uImage.lzma $(BIN_DIR)/$(UIMAGE).bin
endef
define BuildFirmware/Generic
endef
define BuildFirmware/Generic
define Image/Build
$(call Image/Build/$(1))
define Image/Build
$(call Image/Build/$(1))
- dd if=$(KDIR)/root.$(1) of=$(IMGNAME)-root.$(1) bs=128k conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
$(call Image/Build/Profile/$(PROFILE),$(1))
endef
$(call Image/Build/Profile/$(PROFILE),$(1))
endef
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
-include $(INCLUDE_DIR)/kernel.mk
LOADADDR = 0x81000000 # RAM start + 16M
KERNEL_ENTRY = 0x80101000
LOADADDR = 0x81000000 # RAM start + 16M
KERNEL_ENTRY = 0x80101000
endef
define Image/BuildKernel
endef
define Image/BuildKernel
- $(CP) $(KDIR)/loader.elf $(BIN_DIR)/openwrt-$(BOARD)-vmlinux
+ $(CP) $(KDIR)/loader.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux
endef
define Image/cmdline/jffs2-64k
endef
define Image/cmdline/jffs2-64k
- $(CP) $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-$(1).kernel
- $(STAGING_DIR_HOST)/bin/patch-cmdline $(BIN_DIR)/openwrt-$(BOARD)-$(1).kernel '$(strip $(call Image/cmdline/$(1))) '
- ./gen_image.sh $(BIN_DIR)/openwrt-$(BOARD)-$(1).bin 4 $(BIN_DIR)/openwrt-$(BOARD)-$(1).kernel $(CONFIG_TARGET_ROOTFS_FSPART) $(KDIR)/root.$(1)
+ $(CP) $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel
+ $(STAGING_DIR_HOST)/bin/patch-cmdline $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel '$(strip $(call Image/cmdline/$(1))) '
+ ./gen_image.sh $(BIN_DIR)/$(IMG_PREFIX)-$(1).bin 4 $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel $(CONFIG_TARGET_ROOTFS_FSPART) $(KDIR)/root.$(1)
endef
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
endef
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
$(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) clean compile
endef
define Image/BuildKernel
$(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) clean compile
endef
define Image/BuildKernel
- $(CP) $(KDIR)/loader.elf $(BIN_DIR)/openwrt-$(BOARD)-vmlinux
+ $(CP) $(KDIR)/loader.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux
-# Copyright (C) 2006-2009 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
define Image/Build/ar525w
cp $(KDIR)/bzImage $(KDIR)/bzImage.tmp
$(SCRIPT_DIR)/pad_image $(1) $(KDIR)/bzImage.tmp $(KDIR)/root.$(1) 32
define Image/Build/ar525w
cp $(KDIR)/bzImage $(KDIR)/bzImage.tmp
$(SCRIPT_DIR)/pad_image $(1) $(KDIR)/bzImage.tmp $(KDIR)/root.$(1) 32
- $(STAGING_DIR_HOST)/bin/airlink -b 1 $(KDIR)/bzImage.tmp $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(1)-$(2).img
- $(STAGING_DIR_HOST)/bin/airlink -e -b 1 $(KDIR)/bzImage.tmp $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(1)-$(2)-web.img
+ $(STAGING_DIR_HOST)/bin/airlink -b 1 $(KDIR)/bzImage.tmp $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-$(2).img
+ $(STAGING_DIR_HOST)/bin/airlink -e -b 1 $(KDIR)/bzImage.tmp $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-$(2)-web.img
endef
define Image/Build/sitecom
endef
define Image/Build/sitecom
$(SCRIPT_DIR)/pad_image $(1) $(KDIR)/bzImage.tmp $(KDIR)/root.$(1) 32790
$(TOPDIR)/target/linux/rdc/image/mkimg_sitecom.pl $(KDIR)/bzImage.tmp > $(KDIR)/tmp.img
cat $(KDIR)/root.$(1) >> $(KDIR)/tmp.img
$(SCRIPT_DIR)/pad_image $(1) $(KDIR)/bzImage.tmp $(KDIR)/root.$(1) 32790
$(TOPDIR)/target/linux/rdc/image/mkimg_sitecom.pl $(KDIR)/bzImage.tmp > $(KDIR)/tmp.img
cat $(KDIR)/root.$(1) >> $(KDIR)/tmp.img
- cp $(KDIR)/tmp.img $(BIN_DIR)/openwrt-$(BOARD)-$(1)-$(2).img
+ cp $(KDIR)/tmp.img $(BIN_DIR)/$(IMG_PREFIX)-$(1)-$(2).img
rm $(KDIR)/tmp.img $(KDIR)/bzImage.tmp
endef
define Image/Build/bifferboard
$(TOPDIR)/target/linux/rdc/image/mkimg_bifferboard.py $(KDIR)/bzImage $(KDIR)/root.$(1) $(KDIR)/tmp.img
rm $(KDIR)/tmp.img $(KDIR)/bzImage.tmp
endef
define Image/Build/bifferboard
$(TOPDIR)/target/linux/rdc/image/mkimg_bifferboard.py $(KDIR)/bzImage $(KDIR)/root.$(1) $(KDIR)/tmp.img
- $(CP) $(KDIR)/tmp.img $(BIN_DIR)/openwrt-$(BOARD)-$(1)-$(2).img
+ $(CP) $(KDIR)/tmp.img $(BIN_DIR)/$(IMG_PREFIX)-$(1)-$(2).img
endef
define Image/Build/Initramfs
endef
define Image/Build/Initramfs
- $(CP) $(KDIR)/bzImage $(BIN_DIR)/openwrt-$(BOARD)-ramfs.bzImage
+ $(CP) $(KDIR)/bzImage $(BIN_DIR)/$(IMG_PREFIX)-ramfs.bzImage
- $(CP) $(KDIR)/bzImage $(BIN_DIR)/openwrt-$(BOARD).bzImage
+ $(CP) $(KDIR)/bzImage $(BIN_DIR)/$(IMG_PREFIX).bzImage
$(call Image/Build/$(PROFILE),$(1),$(PROFILE),$(patsubst jffs2-%k,%,$(1)))
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
$(call Image/Build/Initramfs)
$(call Image/Build/$(PROFILE),$(1),$(PROFILE),$(patsubst jffs2-%k,%,$(1)))
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
$(call Image/Build/Initramfs)
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
JFFS2_BLOCKSIZE=128k
JFFS2OPTS += --little-endian --pagesize=0x800 --no-cleanmarkers --pad
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
JFFS2_BLOCKSIZE=128k
JFFS2OPTS += --little-endian --pagesize=0x800 --no-cleanmarkers --pad
#:mkfs.jffs2 -x lzo --root=/data/moko/build/tmp/rootfs --faketime --output=/data/moko/build/tmp/deploy/glibc/images/fic-gta01/OpenMoko-openmoko-devel-image-glibc-P1-August-Snapshot-20070829-fic-gta01.rootfs.jffs2 --little-endian --eraseblock=0x4000 --pad -n
#:mkfs.jffs2 -x lzo --root=/data/moko/build/tmp/rootfs --faketime --output=/data/moko/build/tmp/deploy/glibc/images/fic-gta01/OpenMoko-openmoko-devel-image-glibc-P1-August-Snapshot-20070829-fic-gta01.rootfs.jffs2 --little-endian --eraseblock=0x4000 --pad -n
$(TARGET_CROSS)objcopy -O binary -R .note -R .comment -S $(LINUX_DIR)/arch/arm/boot/compressed/vmlinux linux.bin
mkimage -A arm -O linux -T kernel -C none -a 30008000 -e 30008000 -n "Openmoko Kernel Image Freerunner (Neo1973(GTA02))" -d linux.bin uImage
$(TARGET_CROSS)objcopy -O binary -R .note -R .comment -S $(LINUX_DIR)/arch/arm/boot/compressed/vmlinux linux.bin
mkimage -A arm -O linux -T kernel -C none -a 30008000 -e 30008000 -n "Openmoko Kernel Image Freerunner (Neo1973(GTA02))" -d linux.bin uImage
- cp uImage $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-uImage
+ cp uImage $(BIN_DIR)/$(IMG_PREFIX)-$(KERNEL)-uImage
endef
define Image/Build/squashfs
endef
define Image/Build/squashfs
- $(call prepare_generic_squashfs,$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-root.$(1))
+ $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-root.$(1))
- $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-root.$(1)
+ $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-root.$(1)
$(call Image/Build/$(1),$(1))
endef
$(call Image/Build/$(1),$(1))
endef
-# Copyright (C) 2007-2009 OpenWrt.org
+# Copyright (C) 2007-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(INCLUDE_DIR)/image.mk
define Image/BuildKernel
include $(INCLUDE_DIR)/image.mk
define Image/BuildKernel
- cp $(LINUX_DIR)/vmlinux $(BIN_DIR)/openwrt-$(BOARD)-vmlinux
+ cp $(LINUX_DIR)/vmlinux $(BIN_DIR)/$(IMG_PREFIX)-vmlinux
- dd if=$(KDIR)/vmlinux of=$(KDIR)/openwrt-$(BOARD)-vmlinux bs=64k conv=sync
+ dd if=$(KDIR)/vmlinux of=$(KDIR)/$(IMG_PREFIX)-vmlinux bs=64k conv=sync
mkimage -A mips -O linux -T kernel -a 0x80100000 -C none -e \
0x80100000 \
-n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
mkimage -A mips -O linux -T kernel -a 0x80100000 -C none -e \
0x80100000 \
-n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
- -d $(KDIR)/openwrt-$(BOARD)-vmlinux $(BIN_DIR)/openwrt-$(BOARD)-uImage
+ -d $(KDIR)/$(IMG_PREFIX)-vmlinux $(BIN_DIR)/$(IMG_PREFIX)-uImage
endef
define Image/Build/jffs2-64k
endef
define Image/Build/jffs2-64k
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=65536 conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=65536 conv=sync
endef
define Image/Build/jffs2-128k
endef
define Image/Build/jffs2-128k
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=131072 conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=131072 conv=sync
$(call Image/Build/slug,$(1))
endef
define Image/Build/squashfs
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
$(call Image/Build/slug,$(1))
endef
define Image/Build/squashfs
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=131072 conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=131072 conv=sync
endef
$(eval $(call BuildImage))
endef
$(eval $(call BuildImage))
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
- cp $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(1).img
- cp $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-vmlinux
+ cp $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1).img
+ cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux
endef
$(eval $(call BuildImage))
endef
$(eval $(call BuildImage))
-e 's#@TERMINAL_CONFIG@#$(strip $(GRUB_TERMINAL_CONFIG))#g' \
-e 's#@CMDLINE@#$(strip $(call Image/cmdline/$(1)) $(BOOTOPTS) $(GRUB_CONSOLE_CMDLINE))#g' \
./menu.lst > $(KDIR)/root.grub/boot/grub/menu.lst
-e 's#@TERMINAL_CONFIG@#$(strip $(GRUB_TERMINAL_CONFIG))#g' \
-e 's#@CMDLINE@#$(strip $(call Image/cmdline/$(1)) $(BOOTOPTS) $(GRUB_CONSOLE_CMDLINE))#g' \
./menu.lst > $(KDIR)/root.grub/boot/grub/menu.lst
- PADDING="$(CONFIG_X86_GRUB_IMAGES_PAD)" PATH="$(TARGET_PATH)" ./gen_image_x86.sh $(BIN_DIR)/openwrt-$(BOARD)-$(1).image $(CONFIG_X86_GRUB_KERNELPART) $(KDIR)/root.grub $(CONFIG_TARGET_ROOTFS_FSPART) $(KDIR)/root.$(1)
+ PADDING="$(CONFIG_X86_GRUB_IMAGES_PAD)" PATH="$(TARGET_PATH)" ./gen_image_x86.sh $(BIN_DIR)/$(IMG_PREFIX)-$(1).image $(CONFIG_X86_GRUB_KERNELPART) $(KDIR)/root.grub $(CONFIG_TARGET_ROOTFS_FSPART) $(KDIR)/root.$(1)
$(call Image/Build/grub/$(1))
endef
$(call Image/Build/grub/$(1))
endef
endef
else
define Image/Build/grub
endef
else
define Image/Build/grub
- PADDING="$(CONFIG_X86_GRUB_IMAGES_PAD)" PATH="$(TARGET_PATH)" NOGRUB=1 ./gen_image_x86.sh $(BIN_DIR)/openwrt-$(BOARD)-$(1).image $(CONFIG_X86_GRUB_KERNELPART) "" $(CONFIG_TARGET_ROOTFS_FSPART) $(KDIR)/root.$(1)
+ PADDING="$(CONFIG_X86_GRUB_IMAGES_PAD)" PATH="$(TARGET_PATH)" NOGRUB=1 ./gen_image_x86.sh $(BIN_DIR)/$(IMG_PREFIX)-$(1).image $(CONFIG_X86_GRUB_KERNELPART) "" $(CONFIG_TARGET_ROOTFS_FSPART) $(KDIR)/root.$(1)
define Image/Build/vdi
# left here because the image builder doesnt need these
ifeq ($(1),ext2)
define Image/Build/vdi
# left here because the image builder doesnt need these
ifeq ($(1),ext2)
- rm $(BIN_DIR)/openwrt-$(BOARD)-ext2.vdi || true
- VBoxManage convertfromraw -format VDI $(BIN_DIR)/openwrt-$(BOARD)-ext2.image $(BIN_DIR)/openwrt-$(BOARD)-ext2.vdi
+ rm $(BIN_DIR)/$(IMG_PREFIX)-ext2.vdi || true
+ VBoxManage convertfromraw -format VDI $(BIN_DIR)/$(IMG_PREFIX)-ext2.image $(BIN_DIR)/$(IMG_PREFIX)-ext2.vdi
define Image/Build/vmdk
# left here because the image builder doesnt need these
ifeq ($(1),ext2)
define Image/Build/vmdk
# left here because the image builder doesnt need these
ifeq ($(1),ext2)
- rm $(BIN_DIR)/openwrt-$(BOARD)-ext2.vmdk || true
- qemu-img convert -f raw $(BIN_DIR)/openwrt-$(BOARD)-ext2.image \
- -O vmdk $(BIN_DIR)/openwrt-$(BOARD)-ext2.vmdk
+ rm $(BIN_DIR)/$(IMG_PREFIX)-ext2.vmdk || true
+ qemu-img convert -f raw $(BIN_DIR)/$(IMG_PREFIX)-ext2.image \
+ -O vmdk $(BIN_DIR)/$(IMG_PREFIX)-ext2.vmdk
$(CP) $(KDIR)/bzImage $(KDIR)/root.bootscript/boot/vmlinuz
sed -e 's#@CMDLINE@#$(strip $(call Image/cmdline/$(1))) $(BOOTOPTS)#g' \
./olpc.fth > $(KDIR)/root.bootscript/boot/olpc.fth
$(CP) $(KDIR)/bzImage $(KDIR)/root.bootscript/boot/vmlinuz
sed -e 's#@CMDLINE@#$(strip $(call Image/cmdline/$(1))) $(BOOTOPTS)#g' \
./olpc.fth > $(KDIR)/root.bootscript/boot/olpc.fth
- PADDING="$(CONFIG_OLPC_BOOTSCRIPT_IMAGES_PAD)" PATH="$(TARGET_PATH)" ./gen_image_olpc.sh $(BIN_DIR)/openwrt-$(BOARD)-$(1).image $(CONFIG_OLPC_BOOTSCRIPT_KERNELPART) $(KDIR)/root.bootscript $(CONFIG_TARGET_ROOTFS_FSPART) $(KDIR)/root.$(1)
+ PADDING="$(CONFIG_OLPC_BOOTSCRIPT_IMAGES_PAD)" PATH="$(TARGET_PATH)" ./gen_image_olpc.sh $(BIN_DIR)/$(IMG_PREFIX)-$(1).image $(CONFIG_OLPC_BOOTSCRIPT_KERNELPART) $(KDIR)/root.bootscript $(CONFIG_TARGET_ROOTFS_FSPART) $(KDIR)/root.$(1)
endef
define Image/BuildKernel
endef
define Image/BuildKernel
- $(CP) $(KDIR)/bzImage $(BIN_DIR)/openwrt-$(BOARD)-vmlinuz
+ $(CP) $(KDIR)/bzImage $(BIN_DIR)/$(IMG_PREFIX)-vmlinuz
$(call Image/Build/vdi,$(1))
$(call Image/Build/vmdk,$(1))
endif
$(call Image/Build/vdi,$(1))
$(call Image/Build/vmdk,$(1))
endif
- $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(1).fs
- $(CP) $(KDIR)/bzImage $(BIN_DIR)/openwrt-$(BOARD)-vmlinuz
+ $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1).fs
+ $(CP) $(KDIR)/bzImage $(BIN_DIR)/$(IMG_PREFIX)-vmlinuz
- gzip -f9 $(BIN_DIR)/openwrt-$(BOARD)-$(1).image
+ gzip -f9 $(BIN_DIR)/$(IMG_PREFIX)-$(1).image
-# Copyright (C) 2009 OpenWrt.org
+# Copyright (C) 2009-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
endif
define Image/BuildKernel
endif
define Image/BuildKernel
- cp $(KDIR)/linux-$(LINUX_VERSION)/arch/mips/boot/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage.bin
+ cp $(LINUX_DIR)/arch/mips/boot/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage.bin
endef
define Image/Build/squashfs
endef
define Image/Build/squashfs
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(SUBTARGET)-root.$(1) bs=128k conv=sync
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
endef
$(eval $(call BuildImage))
endef
$(eval $(call BuildImage))