-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile.android
63 lines (47 loc) · 2.19 KB
/
Makefile.android
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
# REMEMBER: if you are missing any systemwide libs try the 32-bit
# version first
ANDROID_DTS_TREE="$(SOURCES_DIR)/kernel-android-git/arch/arm/boot/dts/zynq-zc702-xylon-hdmi.dts"
ANDROID_DTB_TREE="$(RESOURCES_DIR)/android-devtree.dtb"
kernel-android-git-repo="git://git.iveia.com/scm/xilinx/android/kernel/zynq.git"
GIT_PROJECTS += kernel-android
.PHONY: kernel-android-build
kernel-android-build: $(RESOURCES_DIR) kernel-android $(RESOURCES_DIR)/android-zImage $(ANDROID_DTB_TREE)
$(RESOURCES_DIR)/android-zImage: gnu-tools
cd $(SOURCES_DIR)/kernel-android-git; \
$(MAKE) ARCH=arm CROSS_COMPILE=$(GNU_TOOLS_PREFIX) xilinx_android_defconfig; \
$(MAKE) ARCH=arm CROSS_COMPILE=$(GNU_TOOLS_PREFIX) zImage
cp $(SOURCES_DIR)/kernel-android-git/arch/arm/boot/zImage $(RESOURCES_DIR)/android-zImage
$(ANDROID_DTB_TREE):
$(SOURCES_DIR)/kernel-android-git/scripts/dtc/dtc -I dts -O dtb -o $(ANDROID_DTB_TREE) $(ANDROID_DTS_TREE)
REPO="$(TOOLS_DIR)/repo"
PATH:=$(TOOLS_DIR):$(PATH)
REPO_URL=http://commondatastorage.googleapis.com/git-repo-downloads/repo # "https://dl-ssl.google.com/dl/googlesource/git-repo/repo"
# Java stuff
JAVA_HOME:=/opt/java6/
PATH:=$(JAVA_HOME)/bin/:$(PATH)
ANDROID_ROOT_IMG="$(RESOURCES_DIR)/android-root.img"
ANDROID_MANIFEST="git://git.iveia.com/scm/xilinx/android/platform/manifest.git"
ANDROID_BRANCH="android-zynq-1.0"
ANDROID_SOURCE=$(SOURCES_DIR)/android-platform-repo/
$(ANDROID_SOURCE): $(REPO)
[ -d $(ANDROID_SOURCE) ] || mkdir $(ANDROID_SOURCE)
cd $(ANDROID_SOURCE); \
$(REPO) init -u $(ANDROID_MANIFEST) -b $(ANDROID_BRANCH) && $(REPO) sync
purge-android-platform:
rm -rf $(ANDROID_SOURCE)
.PHONY: android-build
android-build: $(ANDROID_ROOT_IMG)
CFLAGS += -pedantic
export CFLAGS
# Will probably have to remove srec from repo
$(ANDROID_ROOT_IMG): $(ANDROID_SOURCE)
cd $(ANDROID_SOURCE); \
. build/envsetup.sh && lunch generic-eng && $(MAKE) LOCAL_CFLAGS=-fpermissive
mv $(DATA_DIR)/Makefile.zynq $(ANDROID_SOURCE)
cd $(ANDROID_SOURCE) && $(MAKE) -f Makefile.zynq
cp $(ANDROID_SOURCE)/root.img $(ANDROID_ROOT_IMG)
android-clean:
cd $(ANDROID_SOURCE); \
. build/envsetup.sh && lunch generic-eng && $(MAKE) clean
.PHONY: android-all
android-all: kernel-android-build android-build