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

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

adding httpd - failsafe patch
flash write routine is not functional yet
add configuration (board & dram)

File size: 2.2 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
12PKG_VERSION:=2009.11.1
13PKG_MD5SUM:=6086421c9e2f3a0d0dbc5f706b551dbc
14PKG_RELEASE:=1
15
16PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
17PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
18PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
19PKG_TARGETS:=bin
20
21include $(INCLUDE_DIR)/package.mk
22
23define Package/uboot-lantiq
24  SECTION:=boot
25  CATEGORY:=Boot Loaders
26  DEPENDS:=@TARGET_ifxmips
27  TITLE:=U-Boot for Lantiq reference boards
28  URL:=http://www.denx.de/wiki/U-Boot
29endef
30
31define Build/Prepare
32        $(PKG_UNPACK)
33        cp -r $(CP_OPTS) $(FILES_DIR)/* $(PKG_BUILD_DIR)/
34        $(Build/Patch)
35        find $(PKG_BUILD_DIR) -name .svn | $(XARGS) rm -rf
36endef
37
38UBOOT_CONFIG:=$(call qstrip,$(CONFIG_UBOOT_CONFIG))
39UBOOT_DDR_CONFIG:=$(call qstrip,$(CONFIG_UBOOT_DDR_CONFIG))
40
41UBOOT_MAKE_OPTS:= \
42        CROSS_COMPILE=$(TARGET_CROSS) \
43        ENDIANNESS= \
44        V=1
45
46define Package/uboot-lantiq/config
47        menu "configuration"
48                source "$(SOURCE)/Config.in"
49        endmenu
50endef
51
52define Build/Configure/Target
53        $(MAKE) -s -C $(PKG_BUILD_DIR) \
54                $(UBOOT_MAKE_OPTS) \
55                O=$(PKG_BUILD_DIR)/$(1) \
56                $(1)_config
57endef
58
59define Build/Configure
60        $(call Build/Configure/Target,$(UBOOT_CONFIG))
61ifeq ($(CONFIG_UBOOT_RAMBOOT),y)
62        $(call Build/Configure/Target,$(UBOOT_CONFIG)_ramboot)
63endif
64endef
65
66define Build/Compile/Target
67        $(MAKE) -s -C $(PKG_BUILD_DIR) \
68                $(UBOOT_MAKE_OPTS) \
69                O=$(PKG_BUILD_DIR)/$(1) \
70                all
71endef
72
73define Build/Compile
74        $(call Build/Compile/Target,$(UBOOT_CONFIG))
75ifeq ($(CONFIG_UBOOT_RAMBOOT),y)
76        $(call Build/Compile/Target,$(UBOOT_CONFIG)_ramboot)
77endif
78endef
79
80define Package/uboot-lantiq/install
81        mkdir -p $(1)/$(UBOOT_CONFIG)
82        dd \
83                if=$(PKG_BUILD_DIR)/$(UBOOT_CONFIG)/u-boot.bin \
84                of=$(1)/$(UBOOT_CONFIG)/u-boot.bin \
85                bs=64k conv=sync
86ifeq ($(CONFIG_UBOOT_RAMBOOT),y)
87        if [ -e $(UBOOT_CONFIG).conf ]; then \
88                perl ./gct \
89                        $(UBOOT_DDR_CONFIG) \
90                        $(PKG_BUILD_DIR)/$(UBOOT_CONFIG)_ramboot/u-boot.srec \
91                        $(1)/$(UBOOT_CONFIG)/u-boot.asc; \
92        fi
93endif
94endef
95
96$(eval $(call BuildPackage,uboot-lantiq))
Note: See TracBrowser for help on using the repository browser.