[package] uhttpd: fix segmentation fault triggered by invalid header line
[openwrt.git] / package / uboot-lantiq / Makefile
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
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=u-boot
12
13 PKG_VERSION:=2010.03
14 PKG_MD5SUM:=2bf5ebf497dddc52440b1ea386cc1332
15 PKG_RELEASE:=1
16
17 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
19 PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
20 PKG_TARGETS:=bin
21
22 include $(INCLUDE_DIR)/package.mk
23
24 ifeq ($(DUMP),)
25 STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell grep '^CONFIG_UBOOT_' $(TOPDIR)/.config | md5s)
26 endif
27
28 define Package/uboot-lantiq
29 SECTION:=boot
30 CATEGORY:=Boot Loaders
31 DEPENDS:=@TARGET_ifxmips
32 TITLE:=U-Boot for Lantiq reference boards
33 URL:=http://www.denx.de/wiki/U-Boot
34 MENU:=1
35 endef
36
37 define Build/Prepare
38 $(PKG_UNPACK)
39 cp -r $(CP_OPTS) $(FILES_DIR)/* $(PKG_BUILD_DIR)/
40 $(Build/Patch)
41 find $(PKG_BUILD_DIR) -name .svn | $(XARGS) rm -rf
42 endef
43
44 UBOOT_TARGET:=$(call qstrip,$(CONFIG_UBOOT_TARGET))
45 UBOOT_RAMBOOT_DDR_CONFIG:=$(call qstrip,$(CONFIG_UBOOT_RAMBOOT_DDR_CONFIG))
46
47 UBOOT_MAKE_OPTS:= \
48 CROSS_COMPILE=$(TARGET_CROSS) \
49 ENDIANNESS= \
50 V=1
51
52 define Package/uboot-lantiq/config
53 source "$(SOURCE)/Config.in"
54 endef
55
56 define Build/Configure/Target
57 $(MAKE) -s -C $(PKG_BUILD_DIR) \
58 $(UBOOT_MAKE_OPTS) \
59 O=$(PKG_BUILD_DIR)/$(1) \
60 $(1)_config
61 endef
62
63 define Build/Configure
64 $(call Build/Configure/Target,$(UBOOT_TARGET))
65 ifeq ($(CONFIG_UBOOT_RAMBOOT),y)
66 $(call Build/Configure/Target,$(UBOOT_TARGET)_ramboot)
67 endif
68 endef
69
70 define Build/Compile/Target
71 $(MAKE) -s -C $(PKG_BUILD_DIR) \
72 $(UBOOT_MAKE_OPTS) \
73 O=$(PKG_BUILD_DIR)/$(1) \
74 all
75 endef
76
77 define Build/Compile
78 $(call Build/Compile/Target,$(UBOOT_TARGET))
79 ifeq ($(CONFIG_UBOOT_RAMBOOT),y)
80 $(call Build/Compile/Target,$(UBOOT_TARGET)_ramboot)
81 endif
82 endef
83
84 define Package/uboot-lantiq/install
85 mkdir -p $(1)/$(UBOOT_TARGET)
86 dd \
87 if=$(PKG_BUILD_DIR)/$(UBOOT_TARGET)/u-boot.bin \
88 of=$(1)/$(UBOOT_TARGET)/u-boot.bin \
89 bs=64k conv=sync
90 ifeq ($(CONFIG_UBOOT_RAMBOOT),y)
91 if [ -e $(UBOOT_RAMBOOT_DDR_CONFIG) ]; then \
92 perl ./gct \
93 $(UBOOT_RAMBOOT_DDR_CONFIG) \
94 $(PKG_BUILD_DIR)/$(UBOOT_TARGET)_ramboot/u-boot.srec \
95 $(1)/$(UBOOT_TARGET)/u-boot.asc; \
96 fi
97 endif
98 endef
99
100 $(eval $(call BuildPackage,uboot-lantiq))
This page took 0.047202 seconds and 5 git commands to generate.