From: Gabor Juhos Date: Thu, 18 Oct 2012 07:23:04 +0000 (+0000) Subject: ramips: add profile and build image for the DIR-645 board X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=137f68ff98fb70f29444ac8f698a33431218477f;hp=8e0ca318d95b565620e887f182b38bd61e12104f ramips: add profile and build image for the DIR-645 board Signed-off-by: Gabor Juhos SVN-Revision: 33845 --- 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))