[package] make mmc-over-gpio pins configurable in menuconfig (#6933)
[openwrt.git] / package / uboot-ifxmips / Makefile
1 #
2 # Copyright (C) 2008 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 PKG_VERSION:=1.1.5
13 PKG_RELEASE:=2
14
15 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(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:=579707c8ecbf1ab4127285d2aac2a9ee
19 PKG_TARGETS:=bin
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/uboot-ifxmips
24 SECTION:=boot
25 CATEGORY:=Boot Loaders
26 DEPENDS:=@TARGET_ifxmips
27 TITLE:=U-Boot for Infineon MIPS boards
28 URL:=http://www.denx.de/wiki/UBoot/WebHome
29 endef
30
31 define Build/Prepare
32 $(call Build/Prepare/Default)
33 cp -r $(CP_OPTS) ./files/* $(PKG_BUILD_DIR)
34 find $(PKG_BUILD_DIR) -name .svn | $(XARGS) rm -rf
35 endef
36
37 define Package/uboot-ifxmips/config
38 source "$(SOURCE)/Config.in"
39 endef
40
41 UBOOT_CONFIG:=danube
42
43 UBOOT_MAKE_OPTS:=\
44 CROSS_COMPILE=$(TARGET_CROSS) \
45 CROSS_COMPILE_UCLIBC=1 \
46 COMPRESS=lzma \
47 PLATFORM_CPU=mips32r2 \
48 UBOOT_RAM_TEXT_BASE=0xA0400000
49
50 A800_FIX:=
51 ifeq ($(CONFIG_IFXMIPS_UBOOT_A800),y)
52 A800_FIX += -DA800_SWITCH
53 endif
54
55 define Build/Configure
56 $(MAKE) -s -C $(PKG_BUILD_DIR) \
57 $(UBOOT_MAKE_OPTS) \
58 $(UBOOT_CONFIG)_config
59 endef
60
61 define Build/Compile
62 $(MAKE) -C $(PKG_BUILD_DIR) \
63 $(UBOOT_MAKE_OPTS) \
64 OWRT_FLAGS="-DTEXT_BASE=0xa0400000 ${A800_FIX}" \
65 ifx_all
66 $(CP) $(PKG_BUILD_DIR)/u-boot.srec $(PKG_BUILD_DIR)/asc.srec
67 $(PKG_BUILD_DIR)/gct \
68 $(PKG_BUILD_DIR)/danube_ref_ddr166.conf \
69 $(PKG_BUILD_DIR)/asc.srec \
70 $(PKG_BUILD_DIR)/u-boot.asc
71 $(MAKE) -C $(PKG_BUILD_DIR) \
72 $(UBOOT_MAKE_OPTS) \
73 OWRT_FLAGS="-DDANUBE_BOOT_FROM_EBU=1 -DTEXT_BASE=0xB0000000 ${A800_FIX}" \
74 clean ifx_all
75 endef
76
77 define Package/uboot-ifxmips/install
78 mkdir -p $(1)
79 dd if=$(PKG_BUILD_DIR)/u-boot.ifx of=$(1)/u-boot.ifx bs=64k conv=sync
80 $(CP) $(PKG_BUILD_DIR)/u-boot.asc $(1)
81 endef
82
83 $(eval $(call BuildPackage,uboot-ifxmips))
This page took 0.049476 seconds and 5 git commands to generate.