mpc85xx: add profile and build image for the TL-WDR4900 v1 board
Now that the ethernet switch is working, create firmware images to make impatient users happy. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 36051
This commit is contained in:
		| @@ -7,8 +7,26 @@ | |||||||
| include $(TOPDIR)/rules.mk | include $(TOPDIR)/rules.mk | ||||||
| include $(INCLUDE_DIR)/image.mk | include $(INCLUDE_DIR)/image.mk | ||||||
|  |  | ||||||
| DTS_TARGETS = mpc8548cds_32b p1010rdb | define imgname | ||||||
| BOOT_IMAGES:=zImage | $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1))) | ||||||
|  | endef | ||||||
|  |  | ||||||
|  | define sysupname | ||||||
|  | $(call imgname,$(1),$(2))-sysupgrade.bin | ||||||
|  | endef | ||||||
|  |  | ||||||
|  | define factoryname | ||||||
|  | $(call imgname,$(1),$(2))-factory.bin | ||||||
|  | endef | ||||||
|  |  | ||||||
|  | ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) | ||||||
|  |   IMAGE_SUFFIX=-initramfs | ||||||
|  | endif | ||||||
|  |  | ||||||
|  | zImage:=$(BIN_DIR)/$(IMG_PREFIX)-zImage$(IMAGE_SUFFIX) | ||||||
|  |  | ||||||
|  | DTS_TARGETS = mpc8548cds_32b p1010rdb tl-wdr4900-v1 | ||||||
|  | BOOT_IMAGES:=zImage cuImage.tl-wdr4900-v1 | ||||||
|  |  | ||||||
| define Image/Prepare | define Image/Prepare | ||||||
| 	$(foreach image,$(BOOT_IMAGES), | 	$(foreach image,$(BOOT_IMAGES), | ||||||
| @@ -17,12 +35,33 @@ define Image/Prepare | |||||||
| endef | endef | ||||||
|  |  | ||||||
| define Image/BuildKernel | define Image/BuildKernel | ||||||
| 	cp $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage | 	cp $(KDIR)/zImage $(zImage) | ||||||
| 	$(foreach dts,$(DTS_TARGETS), | 	$(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 | 		$(LINUX_DIR)/scripts/dtc/dtc -I dts -O dtb $(LINUX_DIR)/arch/powerpc/boot/dts/$(dts).dts > $(BIN_DIR)/$(IMG_PREFIX)-$(dts).fdt | ||||||
| 	) | 	) | ||||||
| endef | endef | ||||||
|  |  | ||||||
|  | define Image/Build/TPLINK | ||||||
|  | 	-$(STAGING_DIR_HOST)/bin/mktplinkfw \ | ||||||
|  | 		-H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) $(7) \ | ||||||
|  | 		-k $(KDIR)/$(3) \ | ||||||
|  | 		-r $(KDIR)/root.$(1) \ | ||||||
|  | 		-o $(call factoryname,$(1),$(2)) | ||||||
|  | 	-$(STAGING_DIR_HOST)/bin/mktplinkfw \ | ||||||
|  | 		-H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) $(7) -s \ | ||||||
|  | 		-k $(KDIR)/$(3) \ | ||||||
|  | 		-r $(KDIR)/root.$(1) \ | ||||||
|  | 		-o $(call sysupname,$(1),$(2)) | ||||||
|  | endef | ||||||
|  |  | ||||||
|  | define Image/Build/Profile/TLWDR4900 | ||||||
|  | 	$(call Image/Build/TPLINK,$(1),tl-wdr4900-v1,cuImage.tl-wdr4900-v1,0x49000001,1,16Mppc) | ||||||
|  | endef | ||||||
|  |  | ||||||
|  | define Image/Build/Profile/Default | ||||||
|  | 	$(call Image/Build/Profile/TLWDR4900,$(1)) | ||||||
|  | endef | ||||||
|  |  | ||||||
| define Image/Build/ext2 | define Image/Build/ext2 | ||||||
| 	cp $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-ext2.img | 	cp $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-ext2.img | ||||||
| endef | endef | ||||||
| @@ -32,8 +71,11 @@ define Image/Build/squashfs | |||||||
| 	cp $(KDIR)/root.squashfs $(BIN_DIR)/$(IMG_PREFIX)-root.squashfs | 	cp $(KDIR)/root.squashfs $(BIN_DIR)/$(IMG_PREFIX)-root.squashfs | ||||||
| endef | endef | ||||||
|  |  | ||||||
|  | PROFILE ?= Default | ||||||
|  |  | ||||||
| define Image/Build | define Image/Build | ||||||
| 	$(call Image/Build/$(1),$(1)) | 	$(call Image/Build/$(1),$(1)) | ||||||
|  | 	$(call Image/Build/Profile/$(PROFILE),$(1)) | ||||||
| endef | endef | ||||||
|  |  | ||||||
| $(eval $(call BuildImage)) | $(eval $(call BuildImage)) | ||||||
|   | |||||||
							
								
								
									
										18
									
								
								target/linux/mpc85xx/profiles/tp-link.mk
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								target/linux/mpc85xx/profiles/tp-link.mk
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | |||||||
|  | # | ||||||
|  | # Copyright (C) 2013 OpenWrt.org | ||||||
|  | # | ||||||
|  | # This is free software, licensed under the GNU General Public License v2. | ||||||
|  | # See /LICENSE for more information. | ||||||
|  | # | ||||||
|  |  | ||||||
|  | define Profile/TLWDR4900 | ||||||
|  | 	NAME:=TP-Link TL-WDR4900 | ||||||
|  | 	PACKAGES:=\ | ||||||
|  | 		kmod-usb-core kmod-usb2 kmod-usb2-fsl \ | ||||||
|  | 		kmod-ath9k kmod-wpad | ||||||
|  | endef | ||||||
|  |  | ||||||
|  | define Profile/TLWDR4900/Description | ||||||
|  | 	Package set optimized for the TP-Link TL-WDR4900. | ||||||
|  | endef | ||||||
|  | $(eval $(call Profile,TLWDR4900)) | ||||||
		Reference in New Issue
	
	Block a user
	 Gabor Juhos
					Gabor Juhos