aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/cns3xxx/image/Makefile
Commit message (Expand)AuthorAgeFilesLines
* cns3xxx: eliminate hardcoded kernel/rootfs partition splitFelix Fietkau2016-09-191-16/+13
* cns3xxx: remove obsolete jffs2 image build codeFelix Fietkau2016-07-201-16/+0
* cns3xxx: use common image prefixJo-Philipp Wich2015-05-271-3/+3
* cns3xxx: remove bogus image added in r38703Felix Fietkau2014-11-261-4/+0
* cns3xxx: fix building initramfs and non-initramfs togetherFelix Fietkau2014-08-011-1/+1
* cns3xxx: fix initramfs buildFelix Fietkau2014-07-311-0/+4
* add uImage image buildImre Kaloz2013-11-101-26/+16
* targets: prepare for supporting normal and initramfs imagesFlorian Fainelli2013-06-271-1/+1
* generate single images for tftp flashing as well as sysupgrade images for boa...Imre Kaloz2012-11-111-12/+33
* cns3xxx: add sysupgrade supportFelix Fietkau2012-10-071-4/+15
* cns3xxx: build images for the old boot loader and the new one (default to the...Felix Fietkau2012-09-191-2/+8
* add support for the Gateworks Laguna family (Cavium Networks Econa CNS3xxx)Imre Kaloz2010-07-211-0/+35
0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#
# Copyright (C) 2010-2012 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

define Image/Prepare
	mkimage -A arm -O linux -T kernel -C none -a 0x20008000 -e 0x20008000 -n '$(VERSION_DIST) Linux-$(LINUX_VERSION)' -d $(KDIR)/zImage $(KDIR)/uImage
endef

LEGACY_NOR_KERNEL_SIZE = 2048k
LEGACY_SPI_KERNEL_SIZE = 1536k

# Build sysupgrade image
define BuildFirmware/Legacy
	dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(1)-sysupgrade.bin \
		of=$(KDIR)/uImage.pad bs=$(3) count=1
	dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(1)-sysupgrade.bin \
		of=$(KDIR)/root.$(1).pad bs=$(3) skip=1
	sh $(TOPDIR)/scripts/combined-image.sh \
		$(KDIR)/uImage.pad \
		$(KDIR)/root.$(1).pad \
		$(BIN_DIR)/$(IMG_PREFIX)-$(1)-$(2)-legacy-sysupgrade.bin
endef

define Image/BuildKernel/Initramfs
	mkimage -A arm -O linux -T kernel -C none -a 0x20008000 -e 0x20008000 -n '$(VERSION_DIST) Linux-$(LINUX_VERSION)' -d $(KDIR)/zImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-initramfs-uImage
endef

define Image/Build
	cat $(KDIR)/uImage $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(1)-sysupgrade.bin
	$(call Image/Build/$(1),$(1))
	$(call BuildFirmware/Legacy,$(1),laguna_spi,$(LEGACY_SPI_KERNEL_SIZE))
	$(call BuildFirmware/Legacy,$(1),laguna_nor,$(LEGACY_NOR_KERNEL_SIZE))
endef

define Image/Build/squashfs
	$(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(1)-sysupgrade.bin)
endef

$(eval $(call BuildImage))