2 # Copyright (C) 2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
9 include $(INCLUDE_DIR
)/kernel.mk
15 PKG_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
17 PKG_SOURCE_URL
:=ftp
://ftp.denx.de
/pub
/u-boot
18 PKG_MD5SUM
:=7f29b9f6da44d6e46e988e7561fd1d5f
21 include $(INCLUDE_DIR
)/package.mk
29 define uboot
/omap4_panda
30 TITLE
:=U-Boot for the Pandaboard
35 define Package
/uboot
/template
36 define Package
/uboot-omap4-
$(1)
38 CATEGORY
:=Boot Loaders
39 DEPENDS
:=@TARGET_omap4
41 URL
:=http
://www.denx.de
/wiki
/U-Boot
46 define BuildUbootPackage
47 $(eval
$(uboot
/Default
))
49 $(call Package
/uboot
/template
,$(1),$(TITLE
))
54 $(eval
$(call uboot
/$(BUILD_VARIANT
)))
55 UBOOT_CONFIG
:=$(if
$(CONFIG
),$(CONFIG
),$(BUILD_VARIANT
))
56 UBOOT_IMAGE
:=$(if
$(IMAGE
),$(IMAGE
),openwrt-
$(BOARD
)-$(BUILD_VARIANT
)-u-boot.bin
)
60 $(call Build
/Prepare
/Default
)
61 # $(CP) ./files/* $(PKG_BUILD_DIR)
62 find
$(PKG_BUILD_DIR
) -name .svn |
$(XARGS
) rm -rf
65 define Build
/Configure
66 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
67 $(UBOOT_CONFIG
)_config
71 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
72 CROSS_COMPILE
=$(TARGET_CROSS
)
75 define Package
/uboot
/install/template
76 define Package
/uboot-omap4-
$(1)/install
78 $(CP
) $(PKG_BUILD_DIR
)/MLO
$(BIN_DIR
)/MLO-
$(BOARD
)
79 $(CP
) $(PKG_BUILD_DIR
)/u-boot.img
$(BIN_DIR
)/$(2)
83 $(foreach u
,$(UBOOTS
), \
84 $(eval
$(call Package
/uboot
/install/template
,$(u
),openwrt-
$(BOARD
)-$(u
)-u-boot.img
)) \
87 $(foreach u
,$(UBOOTS
), \
88 $(eval
$(call BuildUbootPackage
,$(u
))) \
89 $(eval
$(call BuildPackage
,uboot-omap4-
$(u
))) \