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

Last change on this file since 20756 was 20756, checked in by ralph, 6 years ago

[uboot-lantiq] update to version 2010.3
httpd-failsafe: removed warnings, cleanup html pages
httpd-failsafe: kicking in if boot command fails
httpd-failsafe: support of ctrl-c
httpd-failsafe: fixed ether addr

thanks to Stas

File size: 2.3 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:=$(strip $(STAMP_CONFIGURED))_$(shell grep '^CONFIG_UBOOT_' $(TOPDIR)/.config | md5s)
26endif
27
28define 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
34endef
35
36define Build/Prepare
37        $(PKG_UNPACK)
38        cp -r $(CP_OPTS) $(FILES_DIR)/* $(PKG_BUILD_DIR)/
39        $(Build/Patch)
40        find $(PKG_BUILD_DIR) -name .svn | $(XARGS) rm -rf
41endef
42
43UBOOT_TARGET:=$(call qstrip,$(CONFIG_UBOOT_TARGET))
44UBOOT_RAMBOOT_DDR_CONFIG:=$(call qstrip,$(CONFIG_UBOOT_RAMBOOT_DDR_CONFIG))
45
46UBOOT_MAKE_OPTS:= \
47        CROSS_COMPILE=$(TARGET_CROSS) \
48        ENDIANNESS= \
49        V=1
50
51define Package/uboot-lantiq/config
52        source "$(SOURCE)/Config.in"
53endef
54
55define Build/Configure/Target
56        $(MAKE) -s -C $(PKG_BUILD_DIR) \
57                $(UBOOT_MAKE_OPTS) \
58                O=$(PKG_BUILD_DIR)/$(1) \
59                $(1)_config
60endef
61
62define Build/Configure
63        $(call Build/Configure/Target,$(UBOOT_TARGET))
64ifeq ($(CONFIG_UBOOT_RAMBOOT),y)
65        $(call Build/Configure/Target,$(UBOOT_TARGET)_ramboot)
66endif
67endef
68
69define Build/Compile/Target
70        $(MAKE) -s -C $(PKG_BUILD_DIR) \
71                $(UBOOT_MAKE_OPTS) \
72                O=$(PKG_BUILD_DIR)/$(1) \
73                all
74endef
75
76define Build/Compile
77        $(call Build/Compile/Target,$(UBOOT_TARGET))
78ifeq ($(CONFIG_UBOOT_RAMBOOT),y)
79        $(call Build/Compile/Target,$(UBOOT_TARGET)_ramboot)
80endif
81endef
82
83define Package/uboot-lantiq/install
84        mkdir -p $(1)/$(UBOOT_TARGET)
85        dd \
86                if=$(PKG_BUILD_DIR)/$(UBOOT_TARGET)/u-boot.bin \
87                of=$(1)/$(UBOOT_TARGET)/u-boot.bin \
88                bs=64k conv=sync
89ifeq ($(CONFIG_UBOOT_RAMBOOT),y)
90        if [ -e $(UBOOT_RAMBOOT_DDR_CONFIG) ]; then \
91                perl ./gct \
92                        $(UBOOT_RAMBOOT_DDR_CONFIG) \
93                        $(PKG_BUILD_DIR)/$(UBOOT_TARGET)_ramboot/u-boot.srec \
94                        $(1)/$(UBOOT_TARGET)/u-boot.asc; \
95        fi
96endif
97endef
98
99$(eval $(call BuildPackage,uboot-lantiq))
Note: See TracBrowser for help on using the repository browser.