source: trunk/package/uboot-lantiq/Makefile @ 25273

Last change on this file since 25273 was 25273, checked in by blogic, 5 years ago

[uboot-lantiq]

  • rework the arcadyan sku support
  • adds a few new boards and switches
File size: 4.7 KB
Line 
1#
2# Copyright (C) 2010 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9include $(INCLUDE_DIR)/kernel.mk
10
11PKG_NAME:=u-boot
12
13PKG_VERSION:=2010.03
14PKG_MD5SUM:=2bf5ebf497dddc52440b1ea386cc1332
15PKG_RELEASE:=1
16
17PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
18PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
19PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
20PKG_TARGETS:=bin
21
22include $(INCLUDE_DIR)/package.mk
23
24ifeq ($(DUMP),)
25  STAMP_CONFIGURED:=$(PKG_BUILD_DIR)/$(BUILD_VARIANT)/.configured
26  STAMP_BUILT:=$(PKG_BUILD_DIR)/$(BUILD_VARIANT)/.built
27endif
28
29define Package/uboot-lantiq-template
30  SECTION:=boot
31  CATEGORY:=Boot Loaders
32  DEPENDS:=@TARGET_lantiq
33  URL:=http://www.denx.de/wiki/U-Boot
34  VARIANT:=$(1)
35  TITLE:=$(1) ($(2))
36  MAINTAINER:=John Crispin <blogic@openwrt.org>
37endef
38
39#Lantiq
40Package/uboot-lantiq-easy50712_DDR166M=$(call Package/uboot-lantiq-template,easy50712_DDR166M,NOR)
41Package/uboot-lantiq-easy50712_DDR166M_ramboot=$(call Package/uboot-lantiq-template,easy50712_DDR166M_ramboot,RAM)
42Package/uboot-lantiq-easy50812_DDR166M=$(call Package/uboot-lantiq-template,easy50812_DDR166M,NOR)
43Package/uboot-lantiq-easy50812_DDR166M_ramboot=$(call Package/uboot-lantiq-template,easy50812_DDR166M_ramboot,RAM)
44
45DDR_CONFIG_easy50712_DDR166M_ramboot:=easy50712_DDR166M
46DDR_CONFIG_easy50812_DDR166M_ramboot:=easy50812
47
48#Arcadyan
49Package/uboot-lantiq-arv4518=$(call Package/uboot-lantiq-template,arv4518,NOR)
50Package/uboot-lantiq-arv4518_ramboot=$(call Package/uboot-lantiq-template,arv4518_ramboot,RAM)
51Package/uboot-lantiq-arv4518_brnboot=$(call Package/uboot-lantiq-template,arv4518_brnboot,BRN)
52Package/uboot-lantiq-arv452C=$(call Package/uboot-lantiq-template,arv452C,NOR)
53Package/uboot-lantiq-arv452C_ramboot=$(call Package/uboot-lantiq-template,arv452C_ramboot,RAM)
54Package/uboot-lantiq-arv452C_brnboot=$(call Package/uboot-lantiq-template,arv452C_brnboot,BRN)
55Package/uboot-lantiq-arv752DPW=$(call Package/uboot-lantiq-template,arv752DPW,NOR)
56Package/uboot-lantiq-arv752DPW_ramboot=$(call Package/uboot-lantiq-template,arv752DPW_ramboot,RAM)
57Package/uboot-lantiq-arv752DPW_brnboot=$(call Package/uboot-lantiq-template,arv752DPW_brnboot,BRN)
58Package/uboot-lantiq-arv752DPW22=$(call Package/uboot-lantiq-template,arv752DPW22,NOR)
59Package/uboot-lantiq-arv752DPW22_ramboot=$(call Package/uboot-lantiq-template,arv752DPW22_ramboot,RAM)
60Package/uboot-lantiq-arv752DPW22_brnboot=$(call Package/uboot-lantiq-template,arv752DPW22_brnboot,BRN)
61
62DDR_CONFIG_arv4518_ramboot:=arcadyan_psc166
63DDR_CONFIG_arv452C_ramboot:=arcadyan_psc166
64DDR_CONFIG_arv752DPW_ramboot:=arcadyan_psc166
65DDR_CONFIG_arv752DPW22_ramboot:=arcadyan_psc166
66
67define Build/Prepare
68        $(PKG_UNPACK)
69        cp -r $(CP_OPTS) $(FILES_DIR)/* $(PKG_BUILD_DIR)/
70        $(Build/Patch)
71        find $(PKG_BUILD_DIR) -name .svn | $(XARGS) rm -rf
72endef
73
74UBOOT_MAKE_OPTS:= \
75        CROSS_COMPILE=$(TARGET_CROSS) \
76        ENDIANNESS= \
77        V=1
78
79define Build/Configure/Target
80        $(MAKE) -s -C $(PKG_BUILD_DIR) \
81                $(UBOOT_MAKE_OPTS) \
82                O=$(PKG_BUILD_DIR)/$(BUILD_VARIANT) \
83                $(1)_config
84endef
85
86define Build/Configure
87        $(call Build/Configure/Target,$(BUILD_VARIANT))
88endef
89
90define Build/Compile/Target
91        $(MAKE) -s -C $(PKG_BUILD_DIR) \
92                $(UBOOT_MAKE_OPTS) \
93                O=$(PKG_BUILD_DIR)/$(1) \
94                all
95endef
96
97define Build/Compile
98        $(call Build/Compile/Target,$(BUILD_VARIANT))
99endef
100
101define Package/uboot-lantiq-$(BUILD_VARIANT)/install
102        mkdir -p $(1)
103        dd \
104                if=$(PKG_BUILD_DIR)/$(BUILD_VARIANT)/u-boot.bin \
105                of=$(1)/u-boot.bin \
106                bs=64k conv=sync
107ifneq ($(findstring ramboot,$(BUILD_VARIANT)),)
108        if [ -e $(DDR_CONFIG_$(BUILD_VARIANT)).conf ]; then \
109                perl ./gct \
110                        $(DDR_CONFIG_$(BUILD_VARIANT)).conf \
111                        $(PKG_BUILD_DIR)/$(BUILD_VARIANT)/u-boot.srec \
112                        $(1)/u-boot.asc; \
113        fi
114endif
115endef
116
117$(eval $(call BuildPackage,uboot-lantiq-easy50712_DDR166M))
118$(eval $(call BuildPackage,uboot-lantiq-easy50712_DDR166M_ramboot))
119$(eval $(call BuildPackage,uboot-lantiq-easy50812_DDR166M))
120$(eval $(call BuildPackage,uboot-lantiq-easy50812_DDR166M_ramboot))
121$(eval $(call BuildPackage,uboot-lantiq-arv4518))
122$(eval $(call BuildPackage,uboot-lantiq-arv4518_brnboot))
123$(eval $(call BuildPackage,uboot-lantiq-arv4518_ramboot))
124$(eval $(call BuildPackage,uboot-lantiq-arv452C))
125$(eval $(call BuildPackage,uboot-lantiq-arv452C_brnboot))
126$(eval $(call BuildPackage,uboot-lantiq-arv452C_ramboot))
127$(eval $(call BuildPackage,uboot-lantiq-arv752DPW))
128$(eval $(call BuildPackage,uboot-lantiq-arv752DPW_brnboot))
129$(eval $(call BuildPackage,uboot-lantiq-arv752DPW_ramboot))
130$(eval $(call BuildPackage,uboot-lantiq-arv752DPW22))
131$(eval $(call BuildPackage,uboot-lantiq-arv752DPW22_brnboot))
132$(eval $(call BuildPackage,uboot-lantiq-arv752DPW22_ramboot))
133
Note: See TracBrowser for help on using the repository browser.