fs_4k:=4k
fs_64k:=64k
fs_128k:=128k
-ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
- fs_squash:=initramfs
- fs_all:=initramfs
- fs_4k:=initramfs
- fs_64k:=initramfs
- fs_128k:=initramfs
- VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux-initramfs
-endif
define Build/Clean
$(LOADER_MAKE) clean
define Image/BuildKernel
cp $(KDIR)/vmlinux.elf $(VMLINUX).elf
cp $(KDIR)/vmlinux $(VMLINUX).bin
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ cp $(KDIR)/vmlinux-initramfs.elf $(VMLINUX)-initramfs.elf
+ cp $(KDIR)/vmlinux $(VMLINUX)-initramfs.bin
+endif
endef
$(eval $(call BuildImage))
VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux
UIMAGE:=$(IMG_PREFIX)-uImage
-ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
- VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux-initramfs
- UIMAGE:=$(IMG_PREFIX)-uImage-initramfs
-endif
define kernel_entry
-a 0x80002000 -e 0x80002000
cp $(KDIR)/vmlinux $(VMLINUX).bin
$(call CompressGzip,$(KDIR)/vmlinux,$(KDIR)/vmlinux.bin.gz)
$(call MkImage,gzip,,$(KDIR)/vmlinux.bin.gz,$(BIN_DIR)/$(UIMAGE)-gzip.bin)
+ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
+ cp $(KDIR)/vmlinux-initramfs.elf $(VMLINUX)-initramfs.elf
+ cp $(KDIR)/vmlinux $(VMLINUX)-initramfs.bin
+ $(call CompressGzip,$(KDIR)/vmlinux-initramfs,$(KDIR)/vmlinux-initramfs.bin.gz)
+ $(call MkImage,gzip,,$(KDIR)/vmlinux-initramfs.bin.gz,$(BIN_DIR)/$(UIMAGE)-initramfs-gzip.bin)
+endif
endef
$(eval $(call BuildImage))
$(OBJCOPY_SREC) $(KDIR)/vmlinux.elf $(KDIR)/vmlinux.srec
srec2bin $(KDIR)/loader.srec $(KDIR)/loader.bin
srec2bin $(KDIR)/vmlinux.srec $(KDIR)/vmlinux.bin
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ $(OBJCOPY_SREC) $(KDIR)/vmlinux-initramfs.elf \
+ $(KDIR)/vmlinux-initramfs.srec
+ srec2bin $(KDIR)/vmlinux-initramfs.srec $(KDIR)/vmlinux-initramfs.bin
+endif
endef
define align/jffs2-64k
endef
define Image/Build/Initramfs
- $(CP) $(KDIR)/vmlinux.bin $(BIN_DIR)/$(IMG_PREFIX)-initramfs.bin
+ $(CP) $(KDIR)/vmlinux-initramfs.bin $(BIN_DIR)/$(IMG_PREFIX)-initramfs.bin
endef
ifeq ($(CONFIG_AR7_TI),y)
fs_64kraw:=64kraw
fs_128k:=128k
fs_256k:=256k
-ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
- fs_squash:=initramfs
- fs_64k:=initramfs
- fs_64kraw:=initramfs
- fs_128k:=initramfs
- fs_256k:=initramfs
- VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux-initramfs
- UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs
-endif
define CompressLzma
$(STAGING_DIR_HOST)/bin/lzma e $(1) -lc1 -lp2 -pb2 $(3) $(2)
$(call MkuImage,gzip,,$(KDIR)/vmlinux.bin.gz,$(UIMAGE)-gzip.bin)
$(call MkuImage,lzma,,$(KDIR)/vmlinux.bin.lzma,$(UIMAGE)-lzma.bin)
cp $(KDIR)/loader-generic.elf $(VMLINUX)-lzma.elf
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ cp $(KDIR)/vmlinux-initramfs.elf $(VMLINUX)-initramfs.elf
+ cp $(KDIR)/vmlinux-initramfs $(VMLINUX)-initramfs.bin
+ dd if=$(KDIR)/vmlinux-initramfs.bin.lzma of=$(VMLINUX)-initramfs.lzma bs=65536 conv=sync
+ dd if=$(KDIR)/vmlinux-initramfs.bin.gz of=$(VMLINUX)-initramfs.gz bs=65536 conv=sync
+ $(call MkuImage,gzip,,$(KDIR)/vmlinux-initramfs.bin.gz,$(UIMAGE)-initramfs-gzip.bin)
+ $(call MkuImage,lzma,,$(KDIR)/vmlinux-initramfs.bin.lzma,$(UIMAGE)-initramfs-lzma.bin)
+ cp $(KDIR)/loader-generic.elf $(VMLINUX)-initramfs-lzma.elf
+endif
-mkdir -p $(KDIR_TMP)
$(call Image/Build/Initramfs)
endef
define Image/Prepare
gzip -9 -c $(KDIR)/vmlinux > $(KDIR)/vmlinux.bin.gz
$(call CompressLzma,$(KDIR)/vmlinux,$(KDIR)/vmlinux.bin.lzma)
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ gzip -9 -c $(KDIR)/vmlinux-initramfs > $(KDIR)/vmlinux-initramfs.bin.gz
+ $(call CompressLzma,$(KDIR)/vmlinux-initramfs,$(KDIR)/vmlinux-initramfs.bin.lzma)
+endif
$(call Image/BuildLoader,generic,elf)
$(call Image/Build/Profile/$(if $(CONFIG_IB),Default,$(PROFILE)),loader)
endef
endef
define Image/Build/Initramfs
- $(OBJCOPY_SREC) $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.srec
+ $(OBJCOPY_SREC) $(KDIR)/vmlinux-initramfs.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux-initramfs.srec
endef
define Image/Build
Build firmware images for ATNGW100 board
endef
+KERNELNAME:="uImage"
+
$(eval $(call BuildTarget))
endef
endif
-define Image/Prepare
- cp $(LINUX_DIR)/arch/avr32/boot/images/uImage $(KDIR)/uImage
-endef
-
define Image/BuildKernel
cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
define Image/Prepare
cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ cat $(KDIR)/vmlinux-initramfs | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux-initramfs.lzma
+endif
rm -f $(KDIR)/loader.gz
$(MAKE) -C lzma-loader \
BUILD_DIR="$(KDIR)" \
endef
define Image/Build/Initramfs
- $(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)/$(IMG_PREFIX)-initramfs.trx -f $(KDIR)/loader.gz -f $(KDIR)/vmlinux-initramfs.lzma
endef
define Image/Build/Chk
# $(call Image/Build/Chk,$(1),wnr3500U,U12H136T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1)))
$(call Image/Build/Chk,$(1),wnr3500v2,U12H127T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1)))
# $(call Image/Build/Chk,$(1),wnr3500v2_VC,U12H127T70_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1)))
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ $(call Image/Build/Initramfs)
+endif
endef
$(eval $(call BuildImage))
define Image/Build/Initramfs
# Netgear CVG834G
- $(call Image/Build/HCS,initramfs,cvg834g,a020,0001,0022,$(KDIR)/vmlinux)
+ $(call Image/Build/HCS,initramfs,cvg834g,a020,0001,0022,$(KDIR)/vmlinux-initramfs)
endef
define Image/Build
Build firmware images for Cavium Networks CNS21XX based boards.
endef
+KERNELNAME:="zImage uImage"
+
$(eval $(call BuildTarget))
define prepare_zimage
echo -en "\x$(2)\x1c\xa0\xe3\x$(3)\x10\x81\xe3" > $(KDIR)/$(call zimage_name,$(1))
- cat $(LINUX_DIR)/arch/arm/boot/zImage >> $(KDIR)/$(call zimage_name,$(1))
+ cat $(KDIR)/zImage >> $(KDIR)/$(call zimage_name,$(1))
endef
define prepare_uimage
eg. the Gateworks Laguna family
endef
-KERNELNAME:="uImage"
+KERNELNAME:="zImage uImage"
DEFAULT_PACKAGES += kmod-ath9k kmod-usb2 wpad-mini
include $(INCLUDE_DIR)/image.mk
define mkimage
- mkimage -A arm -O linux -T kernel -C none -a $(2) -e $(2) -n 'OpenWrt Linux-$(LINUX_VERSION)' -d $(LINUX_DIR)/arch/arm/boot/zImage $(KDIR)/uImage-$(1)
+ mkimage -A arm -O linux -T kernel -C none -a $(2) -e $(2) -n 'OpenWrt Linux-$(LINUX_VERSION)' -d $(KDIR)/zImage $(KDIR)/uImage-$(1)
endef
define Image/Prepare
fs_4k:=4k
fs_64k:=64k
fs_128k:=128k
-ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
- fs_squash:=initramfs
- fs_all:=initramfs
- fs_4k:=initramfs
- fs_64k:=initramfs
- fs_128k:=initramfs
- UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs
-endif
-
-
-define Image/Prepare
- cp $(LINUX_DIR)/arch/arm/boot/uImage $(KDIR)/uImage
-endef
define Image/BuildKernel
cp $(KDIR)/uImage $(UIMAGE)
+ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
+ cp $(KDIR)/uImage-initramfs $(UIMAGE)-initramfs
+endif
endef
define Image/Build/jffs2-64k
LINUX_VERSION:=3.9.4
+KERNELNAME:="zImage"
+
include $(INCLUDE_DIR)/target.mk
$(eval $(call BuildTarget))
define Image/Prepare
# WBD111: mach id 1690 (0x69a)
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
+ cat $(KDIR)/zImage >> $(KDIR)/$(IMG_PREFIX)-wbd111-zImage
# WBD222: mach id 2753 (0xAC1)
echo -en "\x0a\x1c\xa0\xe3\xc1\x10\x81\xe3" > $(KDIR)/$(IMG_PREFIX)-wbd222-zImage
- cat $(LINUX_DIR)/arch/arm/boot/zImage >> $(KDIR)/$(IMG_PREFIX)-wbd222-zImage
+ cat $(KDIR)/zImage >> $(KDIR)/$(IMG_PREFIX)-wbd222-zImage
endef
define Image/BuildKernel
$(call mkfit,$(board),0x10008000)
cp $(LINUX_DIR)/arch/arm/boot/dts/$(board).dtb $(BIN_DIR)
)
- cp $(LINUX_DIR)/arch/arm/boot/zImage $(BIN_DIR)/openwrt-$(BOARD)-zImage
+ cp $(KDIR)/zImage $(BIN_DIR)/openwrt-$(BOARD)-zImage
endef
# board-specific sysupgrade image
include $(INCLUDE_DIR)/target.mk
+KERNELNAME:="zImage"
+
$(eval $(call BuildTarget))
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
-define Image/Prepare
- cp $(LINUX_DIR)/arch/arm/boot/zImage $(KDIR)/zImage
-endef
-
define Image/BuildKernel
cp $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage
#
include $(INCLUDE_DIR)/target.mk
DEFAULT_PACKAGES += ixp4xx-microcode fconfig
+KERNELNAME:="zImage"
$(eval $(call BuildTarget))
rm -f $(TARGET_DIR)/zImage
endef
-define Image/Prepare
- cp $(LINUX_DIR)/arch/arm/boot/zImage $(KDIR)/zImage
-endef
-
define Image/BuildKernel
cp $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage
BIN_DIR=$(BIN_DIR) IMG_PREFIX="$(IMG_PREFIX)" $(TOPDIR)/scripts/arm-magic.sh
NAND_BLOCKSIZE := 2048:128k
-define Image/Prepare
- cp $(LINUX_DIR)/arch/arm/boot/uImage $(KDIR)/uImage
-endef
-
define Image/BuildKernel
# do mach-id fixup here, if needed
cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
JFFS2_BLOCKSIZE = 128k
UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage
-ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
- UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs
-endif
define Image/Build/MkuImage
mkimage -A arm -O linux -T kernel -a $(LOADADDR) -C none -e $(LOADADDR) \
endef
define Image/Build/DTB
- cp $(KDIR)/zImage $(KDIR)/zImage-$(1);
- cat $(LINUX_DIR)/arch/$(ARCH)/boot/$(1).dtb >> $(KDIR)/zImage-$(1);
- $(call Image/Build/MkuImage,$(KDIR)/zImage-$(1),$(KDIR)/uImage-$(1))
- cp $(KDIR)/uImage-$(1) $(UIMAGE)-$(1);
-endef
-
-define Image/Prepare
- cp $(LINUX_DIR)/arch/$(ARCH)/boot/zImage $(KDIR)/zImage
+ cp $(KDIR)/zImage$(2) $(KDIR)/zImage-$(1);
+ cat $(LINUX_DIR)/arch/$(ARCH)/boot/$(1).dtb >> $(KDIR)/zImage$(2)-$(1);
+ $(call Image/Build/MkuImage,$(KDIR)/zImage$(2)-$(1),$(KDIR)/uImage$(2)-$(1))
+ cp $(KDIR)/uImage$(2)-$(1) $(UIMAGE)$(2)-$(1);
endef
define Image/Build/Profile/dLAN_USB_Extender
define Image/BuildKernel
$(foreach dtb,$(TARGET_DTBS),$(call Image/Build/DTB,$(dtb)))
- $(call Image/Build/Initramfs)
+endef
+
+define Image/Build/Initramfs
+ $(foreach dtb,$(TARGET_DTBS),$(call Image/Build/DTB,$(dtb),-initramfs))
endef
define Image/Build/squashfs
$(call Image/Build/$(1))
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
$(call Image/Build/Profile/$(PROFILE),$(1))
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ $(call Image/Build/Initramfs)
+endif
endef
$(eval $(call BuildImage))
Build images for the Freescale MPC52xx based boards.
endef
+KERNELNAME:="zImage"
+
$(eval $(call BuildTarget))
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
-define Image/Prepare
- cp $(LINUX_DIR)/arch/powerpc/boot/zImage $(KDIR)/zImage
-endef
-
define Image/BuildKernel
cp $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage
endef
Build firmware images for Freescale MPC83xx based boards (eg. RouterBoard 600).
endef
+KERNELNAME:="uImage"
+
$(eval $(call BuildTarget))
define Image/BuildKernel
cp $(LINUX_DIR)/arch/powerpc/boot/dtbImage.rb600.elf $(BIN_DIR)/openwrt-$(BOARD)-rb600.elf
cp $(LINUX_DIR)/arch/powerpc/boot/dtbImage.rb333.elf $(BIN_DIR)/openwrt-$(BOARD)-rb333.elf
- cp $(LINUX_DIR)/arch/powerpc/boot/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage
+ cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage
endef
define Image/Build
endef
define Image/BuildKernel
- cp $(KDIR)/zImage $(zImage)
+ cp $(KDIR)/zImage$(IMAGE_SUFFIX) $(zImage)
$(foreach dts,$(DTS_TARGETS),
$(LINUX_DIR)/scripts/dtc/dtc -I dts -O dtb $(LINUX_DIR)/arch/powerpc/boot/dts/$(dts).dts > $(BIN_DIR)/$(IMG_PREFIX)-$(dts).fdt
)
JFFS2_BLOCKSIZE = 128k
UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage
-ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
- UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs
-endif
define Image/Build/MkuImage
mkimage -A arm -O linux -T kernel -a $(LOADADDR) -C none -e $(LOADADDR) \
endef
define Image/Build/DTB
- cp $(KDIR)/zImage $(KDIR)/zImage-$(1);
- cat $(LINUX_DIR)/arch/$(ARCH)/boot/dts/$(1).dtb >> $(KDIR)/zImage-$(1);
- $(call Image/Build/MkuImage,$(KDIR)/zImage-$(1),$(KDIR)/uImage-$(1))
- cp $(KDIR)/uImage-$(1) $(UIMAGE)-$(1);
-endef
-
-define Image/Prepare
- cp $(LINUX_DIR)/arch/$(ARCH)/boot/zImage $(KDIR)/zImage
+ cp $(KDIR)/zImage$(2) $(KDIR)/zImage$(2)-$(1);
+ cat $(LINUX_DIR)/arch/$(ARCH)/boot/dts/$(1).dtb >> $(KDIR)/zImage$(2)-$(1);
+ $(call Image/Build/MkuImage,$(KDIR)/zImage$(2)-$(1),$(KDIR)/uImage$(2)-$(1))
+ cp $(KDIR)/uImage$(2)-$(1) $(UIMAGE)$(2)-$(1);
endef
define Image/BuildKernel
$(STAGING_DIR_HOST)/bin/padjffs2 $(KDIR)/root.squashfs 128
endef
+define Image/Build/Initramfs
+ $(foreach dtb,$(TARGET_DTBS),$(call Image/Build/DTB,$(dtb),-initramfs))
+endef
+
define Image/Build
$(call Image/Build/$(1))
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ $(call Image/Build/Initramfs)
+endif
endef
$(eval $(call BuildImage))
CFLAGS:=-Os -pipe -march=armv6 -mtune=arm1136j-s -fno-caller-saves
+KERNELNAME:="zImage"
+
include $(INCLUDE_DIR)/target.mk
$(eval $(call BuildTarget))
NAND_BLOCKSIZE=2048:128k
define Image/BuildKernel
- $(CP) $(LINUX_DIR)/arch/arm/boot/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage
+ $(CP) $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage
chmod 0644 $(BIN_DIR)/$(IMG_PREFIX)-zImage
endef
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
-define Image/Prepare
- cp $(LINUX_DIR)/arch/arm/boot/uImage $(KDIR)/uImage
-endef
-
define Image/BuildKernel
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n 'Boot Image' -d boot.script $(BIN_DIR)/boot.scr
cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage
Build firmware images for AMCC/IBM PPC40x based boards.
endef
+KERNELNAME:="uImage cuImage.magicbox cuImage.openrb"
+
$(eval $(call BuildTarget))
JFFS2_BLOCKSIZE=128k 64k
define Image/Prepare
- cp $(LINUX_DIR)/arch/powerpc/boot/uImage $(KDIR)/uImage
$(LINUX_DIR)/scripts/dtc/dtc -O dtb -R 4 -S 0x20000 $(LINUX_DIR)/arch/powerpc/boot/dts/kilauea.dts > $(KDIR)/openwrt-kilauea.dtb
endef
define Image/Build/jffs2-128k
( \
- dd if=$(LINUX_DIR)/arch/powerpc/boot/uImage bs=1920k conv=sync; \
+ dd if=$(KDIR)/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)/$(IMG_PREFIX)-kilauea-jffs2.img
define Image/Build/jffs2-64k
( \
- dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.magicbox bs=1408k conv=sync; \
+ dd if=$(KDIR)/cuImage.magicbox bs=1408k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
) > $(BIN_DIR)/$(IMG_PREFIX)-magicbox-jffs2.img
( \
- dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.openrb bs=1408k conv=sync; \
+ dd if=$(KDIR)/cuImage.openrb bs=1408k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
) > $(BIN_DIR)/$(IMG_PREFIX)-openrb-jffs2.img
endef
define Image/Build/squashfs
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
( \
- dd if=$(LINUX_DIR)/arch/powerpc/boot/uImage bs=1920k conv=sync; \
+ dd if=$(KDIR)/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)/$(IMG_PREFIX)-kilauea-$(1).img
( \
- dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.magicbox bs=1408k conv=sync; \
+ dd if=$(KDIR)/cuImage.magicbox bs=1408k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
) > $(BIN_DIR)/$(IMG_PREFIX)-magicbox-$(1).img
( \
- dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.openrb bs=1408k conv=sync; \
+ dd if=$(KDIR)/cuImage.openrb bs=1408k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
) > $(BIN_DIR)/$(IMG_PREFIX)-openrb-$(1).img
endef
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
define Image/Build/Initramfs
- cp $(LINUX_DIR)/arch/powerpc/boot/cuImage.magicbox $(BIN_DIR)/openwrt-$(BOARD)-magicbox-initramfs.bin
- cp $(LINUX_DIR)/arch/powerpc/boot/cuImage.openrb $(BIN_DIR)/openwrt-$(BOARD)-openrb-initramfs.bin
+ cp $(KDIR)/cuImage.magicbox-initramfs $(BIN_DIR)/openwrt-$(BOARD)-magicbox-initramfs.bin
+ cp $(KDIR)/cuImage.openrb-initramfs $(BIN_DIR)/openwrt-$(BOARD)-openrb-initramfs.bin
endef
endif
Build firmware images for AMCC/IBM PPC44x based boards.
endef
+KERNELNAME:="uImage cuImage.taishan"
+
$(eval $(call BuildTarget))
JFFS2_BLOCKSIZE=256k
define Image/Prepare
- cp $(LINUX_DIR)/arch/powerpc/boot/cuImage.taishan $(KDIR)/uImage
$(LINUX_DIR)/scripts/dtc/dtc -O dtb -R 4 -S 0x20000 $(LINUX_DIR)/arch/powerpc/boot/dts/canyonlands.dts > $(KDIR)/openwrt-canyonlands.dtb
endef
define Image/Build/squashfs
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
( \
- dd if=$(KDIR)/uImage bs=2048k conv=sync; \
+ dd if=$(KDIR)/cuImage.taishan bs=2048k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=256k conv=sync; \
) > $(BIN_DIR)/$(IMG_PREFIX)-taishan-$(1).img
( \
- dd if=$(LINUX_DIR)/arch/powerpc/boot/uImage bs=1920k conv=sync; \
+ dd if=$(KDIR)/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)/$(IMG_PREFIX)-canyonlands-$(1).img
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
-define Image/Prepare
- cp $(LINUX_DIR)/arch/arm/boot/uImage $(KDIR)/uImage
-endef
-
define Image/BuildKernel
cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
endef
UIMAGE:=$(IMG_PREFIX)-uImage
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
-VMLINUX:=$(IMG_PREFIX)-vmlinux-initramfs
-UIMAGE:=$(IMG_PREFIX)-uImage-initramfs
define Image/Build/Initramfs
$(call Image/Build/Profile/$(PROFILE),initramfs)
endef
$(call CompressLzma,$(KDIR)/vmlinux,$(KDIR)/vmlinux.bin.lzma)
$(call MkImage,lzma,$(KDIR)/vmlinux.bin.lzma,$(KDIR)/uImage.lzma)
cp $(KDIR)/uImage.lzma $(BIN_DIR)/$(UIMAGE).bin
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ cp $(KDIR)/vmlinux-initramfs.elf $(BIN_DIR)/$(VMLINUX)-initramfs.elf
+ cp $(KDIR)/vmlinux-initramfs $(BIN_DIR)/$(VMLINUX)-initramfs.bin
+ $(call CompressLzma,$(KDIR)/vmlinux-initramfs,$(KDIR)/vmlinux-initramfs.bin.lzma)
+ $(call MkImage,lzma,$(KDIR)/vmlinux-initramfs.bin.lzma,$(KDIR)/uImage-initramfs.lzma)
+ cp $(KDIR)/uImage-initramfs.lzma $(BIN_DIR)/$(UIMAGE)-initramfs.bin
+endif
$(call Image/Build/Initramfs)
endef
endef
VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux-kernel
-ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
- VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux-initramfs
-endif
define Image/BuildKernel
$(CP) $(KDIR)/loader.elf $(VMLINUX)
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ $(CP) $(KDIR)/loader.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux-initramfs
+endif
endef
define Image/cmdline/jffs2-64k
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
define Image/Prepare
- $(STAGING_DIR_HOST)/bin/patch-cmdline $(KDIR)/vmlinux '$(strip $(call Image/cmdline/yaffs2)) '
- cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
+ $(STAGING_DIR_HOST)/bin/patch-cmdline $(KDIR)/vmlinux-initramfs '$(strip $(call Image/cmdline/yaffs2)) '
+ cat $(KDIR)/vmlinux-initramfs | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux-initramfs.lzma
$(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) clean compile
+ $(CP) $(KDIR)/loader.elf $(KDIR)/loader-initramfs.elf
endef
endif
LINUX_VERSION:=3.3.8
+KERNELNAME:=bzImage
+
include $(INCLUDE_DIR)/target.mk
$(eval $(call BuildTarget))
endef
define Image/Build/Initramfs
- $(CP) $(KDIR)/bzImage $(BIN_DIR)/$(IMG_PREFIX)-ramfs.bzImage
+ $(CP) $(KDIR)/bzImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-ramfs.bzImage
endef
define Image/Build