This repository has been archived by the owner on Jan 31, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
uBoot.mk
71 lines (53 loc) · 2.03 KB
/
uBoot.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#########################################################################
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# The Free Software Foundation; version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# Copyright @ 2008 Astfin <[email protected]>
# Primary Authors: [email protected], [email protected]
#
# Supported products: ip04, ip08
#
#########################################################################
include rules.mk
PRODUCT=ip08
CPU_FLAGS=CPU_400
MEM_FLAGS=SDRAM_64MB_SLOW
UCONFIG=$(PRODUCT)
UBOOT_DIRNAME=u-boot-1.1.5-bf1
UBOOT_DIR=$(BUILD_DIR)/$(UBOOT_DIRNAME)
UBOOT_SOURCE=u-boot-1.1.5-bf1-061210.tar.bz2
UBOOT_SITE=http://blackfin.uclinux.org/gf/download/frsrelease/330/2208/
UBOOT_UNZIP=bzcat
PATCHNAME=uBoot-$(PRODUCT)
TARGET_DIR=$(UBOOT_DIR)/images
$(DL_DIR)/$(UBOOT_SOURCE):
mkdir -p $(DL_DIR)
$(WGET) -P $(DL_DIR) $(UBOOT_SITE)/$(UBOOT_SOURCE)
uBoot-source: $(DL_DIR)/$(UBOOT_SOURCE)
$(UBOOT_DIR)/.unpacked: $(DL_DIR)/$(UBOOT_SOURCE)
mkdir -p $(BUILD_DIR)
$(UBOOT_UNZIP) $(DL_DIR)/$(UBOOT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
$(PATCH_KERNEL) $(UBOOT_DIR) patch $(PATCHNAME).patch
# Brute-force disable git versioning
rm -f $(UBOOT_DIR)/tools/setlocalversion
touch $(UBOOT_DIR)/.unpacked
$(UBOOT_DIR)/.configured: $(UBOOT_DIR)/.unpacked
$(MAKE) -C $(UBOOT_DIR) UBOOT_FLAGS="$(MEM_FLAGS)" UBOOT_FLAGS2="$(CPU_FLAGS)" $(UCONFIG)_config
touch $(UBOOT_DIR)/.configured
uBoot: $(UBOOT_DIR)/.configured
$(MAKE) -C $(UBOOT_DIR)
cd $(UBOOT_DIR)/tools/bin2ldr; ./runme.sh
uBoot-configure: $(UBOOT_DIR)/.configured
uBoot-clean:
rm -f $(UBOOT_DIR)/.configured
$(MAKE) -C $(UBOOT_DIR) clean
uBoot-config: $(UBOOT_DIR)/.configured
$(MAKE) -C $(UBOOT_DIR) menuconfig
uBoot-dirclean:
rm -rf $(UBOOT_DIR)
all: uBoot