Root/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
8include $(TOPDIR)/rules.mk
9include $(INCLUDE_DIR)/kernel.mk
10
11PKG_NAME:=u-boot
12PKG_VERSION:=1.1.5
13PKG_RELEASE:=2
14
15PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
18PKG_MD5SUM:=579707c8ecbf1ab4127285d2aac2a9ee
19PKG_TARGETS:=bin
20
21include $(INCLUDE_DIR)/package.mk
22
23define Package/uboot-ifxmips
24  SECTION:=boot
25  CATEGORY:=Boot Loaders
26  DEPENDS:=@TARGET_ifxmips @BROKEN
27  TITLE:=U-Boot for Infineon MIPS boards
28  URL:=http://www.denx.de/wiki/U-Boot
29  MENU:=1
30endef
31
32define Build/Prepare
33    $(call Build/Prepare/Default)
34    cp -r $(CP_OPTS) ./files/* $(PKG_BUILD_DIR)
35    find $(PKG_BUILD_DIR) -name .svn | $(XARGS) rm -rf
36endef
37
38define Package/uboot-ifxmips/config
39    source "$(SOURCE)/Config.in"
40endef
41
42UBOOT_CONFIG:=danube
43
44UBOOT_MAKE_OPTS:=\
45    CROSS_COMPILE=$(TARGET_CROSS) \
46    CROSS_COMPILE_UCLIBC=1 \
47    COMPRESS=lzma \
48    PLATFORM_CPU=mips32r2 \
49    UBOOT_RAM_TEXT_BASE=0xA0400000
50
51A800_FIX:=
52ifeq ($(CONFIG_IFXMIPS_UBOOT_A800),y)
53A800_FIX += -DA800_SWITCH
54endif
55
56define Build/Configure
57    $(MAKE) -s -C $(PKG_BUILD_DIR) \
58        $(UBOOT_MAKE_OPTS) \
59        $(UBOOT_CONFIG)_config
60endef
61
62define Build/Compile
63    $(MAKE) -C $(PKG_BUILD_DIR) \
64        $(UBOOT_MAKE_OPTS) \
65        OWRT_FLAGS="-DTEXT_BASE=0xa0400000 ${A800_FIX}" \
66        ifx_all
67    $(CP) $(PKG_BUILD_DIR)/u-boot.srec $(PKG_BUILD_DIR)/asc.srec
68    $(PKG_BUILD_DIR)/gct \
69        $(PKG_BUILD_DIR)/danube_ref_ddr166.conf \
70        $(PKG_BUILD_DIR)/asc.srec \
71        $(PKG_BUILD_DIR)/u-boot.asc
72    $(MAKE) -C $(PKG_BUILD_DIR) \
73        $(UBOOT_MAKE_OPTS) \
74        OWRT_FLAGS="-DDANUBE_BOOT_FROM_EBU=1 -DTEXT_BASE=0xB0000000 ${A800_FIX}" \
75        clean ifx_all
76endef
77
78define Package/uboot-ifxmips/install
79    mkdir -p $(1)
80    dd if=$(PKG_BUILD_DIR)/u-boot.ifx of=$(1)/u-boot.ifx bs=64k conv=sync
81    $(CP) $(PKG_BUILD_DIR)/u-boot.asc $(1)
82endef
83
84$(eval $(call BuildPackage,uboot-ifxmips))
85

Archive Download this file



interactive