diff options
author | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-10-18 07:23:04 +0000 |
---|---|---|
committer | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-10-18 07:23:04 +0000 |
commit | c8bc7ec6c5040ab2b9accf20aa65b1595e764d12 (patch) | |
tree | 38c9bea967ce29792e6825e108abba0bcd6980a2 /target/linux/ramips | |
parent | 2ab0fbc9de6365d066857cf0b53da22275dbf356 (diff) |
ramips: add profile and build image for the DIR-645 board
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33845 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ramips')
-rw-r--r-- | target/linux/ramips/image/Makefile | 45 | ||||
-rw-r--r-- | target/linux/ramips/rt3883/profiles/d-link.mk | 16 |
2 files changed, 61 insertions, 0 deletions
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index f8c7806875..d8e8298833 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -287,6 +287,46 @@ define BuildFirmware/RTN10PLUS $(call BuildFirmware/Generic,$(1),$(2),board=$(3) $(call mkmtd/phys,$(mtdlayout_rtn10plus)),$(mtd_rtn10plus_kernel_part_size),$(mtd_rtn10plus_rootfs_part_size)) endef +define BuildFirmware/Seama + $(call PatchKernelLzma,$(2),$(3)) + if [ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.lzma"` -gt $(4) ]; then \ + echo "Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big"; \ + else if [ `stat -c%s $(KDIR)/root.$(1)` -gt $(5) ]; then \ + echo "Warning: $(KDIR)/root.$(1) is too big"; \ + else \ + ( \ + dd if=$(KDIR)/vmlinux-$(2).bin.lzma bs=$(4) count=1 conv=sync; \ + ) > $(KDIR)/vmlinux-$(2).tmp; \ + $(STAGING_DIR_HOST)/bin/seama \ + -i $(KDIR)/vmlinux-$(2).tmp \ + -m "dev=/dev/mtdblock/2" -m "type=firmware"; \ + ( \ + dd if=$(KDIR)/vmlinux-$(2).tmp.seama; \ + dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \ + ) > $(call imgname,$(1),$(2))-sysupgrade.bin; \ + ( \ + dd if=$(KDIR)/vmlinux-$(2).bin.lzma bs=$(4) count=1 conv=sync; \ + dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \ + ) > $(KDIR)/vmlinux-$(2).tmp; \ + $(STAGING_DIR_HOST)/bin/seama \ + -i $(KDIR)/vmlinux-$(2).tmp \ + -m "dev=/dev/mtdblock/2" -m "type=firmware"; \ + $(STAGING_DIR_HOST)/bin/seama \ + -s $(call imgname,$(1),$(2))-factory.bin \ + -m "signature=$(6)" \ + -i $(KDIR)/vmlinux-$(2).tmp.seama; \ + fi; fi +endef + +mtdlayout_dir645a1=192k(u-boot)ro,16k(u-boot-env)ro,16k(factory)ro,32k(nvram)ro,64k(devdata)ro,896k(kernel),6976k(rootfs),7872k@0x50000(firmware) +define BuildFirmware/DIR645 + $(call BuildFirmware/Seama,$(1),$(2),$(call mkcmdline,$(3),$(4),$(5)) $(call mkmtd/$(6),$(mtdlayout_dir645a1)),917440,7143424,$(7)) +endef + +define BuildFirmware/DIR645/initramfs + $(call BuildFirmware/Generic/initramfs,$(1),$(2),$(call mkcmdline,$(3),$(4),$(5)) $(call mkmtd/$(6),$(mtdlayout_dir645a1))) +endef + define BuildFirmware/W306R_4M $(call BuildFirmware/w306r,$(1),$(2),$(call mkcmdline,$(3),$(4),$(5)) $(call mkmtd/$(6),$(mtdlayout_4M)),917504,2949120) endef @@ -579,12 +619,17 @@ endif # # RT3662/RT3883 Profiles # +define Image/Build/Profile/DIR645 + $(call Image/Build/Template/$(fs_squash)/$(1),DIR645,dir-645,DIR-645,ttyS1,57600,spi,wrgn39_dlob.hans_dir645) +endef + define Image/Build/Profile/RTN56U $(call Image/Build/Template/$(fs_squash)/$(1),GENERIC_8M,rt-n56u,RT-N56U,ttyS1,57600,phys) endef ifeq ($(CONFIG_RALINK_RT3883),y) define Image/Build/Profile/Default + $(call Image/Build/Profile/DIR645,$(1)) $(call Image/Build/Profile/RTN56U,$(1)) endef endif diff --git a/target/linux/ramips/rt3883/profiles/d-link.mk b/target/linux/ramips/rt3883/profiles/d-link.mk new file mode 100644 index 0000000000..1a45105a06 --- /dev/null +++ b/target/linux/ramips/rt3883/profiles/d-link.mk @@ -0,0 +1,16 @@ +# +# Copyright (C) 2012 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/DIR645 + NAME:=D-Link DIR-645 + PACKAGES:=kmod-usb-core kmod-usb-ohci kmod-usb-usb2 swconfig +endef + +define Profile/DIR645/Description + Package set compatible with the D-Link DIR-645 board. +endef +$(eval $(call Profile,DIR645)) |