Skip to content
This repository
Newer
Older
100644 222 lines (178 sloc) 6.583 kb
0f51ea4b »
2011-08-04 Initial "build system"
1 # To support gonk's build/envsetup.sh
2 SHELL = bash
3
3d78dcee »
2011-08-12 Touch up makefile a bit
4 -include .config.mk
0f51ea4b »
2011-08-04 Initial "build system"
5
3d78dcee »
2011-08-12 Touch up makefile a bit
6 .DEFAULT: build
89c68763 »
2011-08-10 add qemu and galaxy s2 kernels
7
ff495bd2 »
2011-10-05 Export env. ANDROID_SDK_PLATFORM and MAKE_FLAGS to gecko configuration.
8 MAKE_FLAGS ?= -j16
572039cc »
2011-10-18 Config kernel for Android emulator with goldfish_armv7_defconfig.
9 GONK_MAKE_FLAGS ?=
89c68763 »
2011-08-10 add qemu and galaxy s2 kernels
10
d2cd070a »
2011-08-18 Makefile hackery for Galaxy S II, and fix broken -jN
11 HEIMDALL ?= heimdall
e524ff84 »
2011-08-12 Merge
12 TOOLCHAIN_HOST = linux-x86
3d78dcee »
2011-08-12 Touch up makefile a bit
13 TOOLCHAIN_PATH = ./glue/gonk/prebuilt/$(TOOLCHAIN_HOST)/toolchain/arm-eabi-4.4.3/bin
14 KERNEL_PATH = ./boot/kernel-android-$(KERNEL)
89c68763 »
2011-08-10 add qemu and galaxy s2 kernels
15
3d78dcee »
2011-08-12 Touch up makefile a bit
16 GONK_PATH = $(abspath glue/gonk)
5b7b0e86 »
2011-10-07 Build Gecko for ARMv7 instead of ARMv5
17 GONK_TARGET ?= full_$(GONK)-eng
0f51ea4b »
2011-08-04 Initial "build system"
18
19 define GONK_CMD # $(call GONK_CMD,cmd)
3d78dcee »
2011-08-12 Touch up makefile a bit
20 cd $(GONK_PATH) && \
0f51ea4b »
2011-08-04 Initial "build system"
21 . build/envsetup.sh && \
3d78dcee »
2011-08-12 Touch up makefile a bit
22 lunch $(GONK_TARGET) && \
0f51ea4b »
2011-08-04 Initial "build system"
23 $(1)
24 endef
25
ff495bd2 »
2011-10-05 Export env. ANDROID_SDK_PLATFORM and MAKE_FLAGS to gecko configuration.
26 ANDROID_SDK_PLATFORM ?= android-13
263d23ca »
2011-10-05 Add config-qemu make target for Android emulator
27 GECKO_CONFIGURE_ARGS ?=
3d12fe0d »
2011-10-26 Add support for B2G widget backend
28 WIDGET_BACKEND ?= android
ff495bd2 »
2011-10-05 Export env. ANDROID_SDK_PLATFORM and MAKE_FLAGS to gecko configuration.
29
949b8ec3 »
2011-08-05 Add temporary target to manually install gecko. Installing it as a sy…
30 # Developers can use this to define convenience rules and set global variabls
31 # XXX for now, this is where to put ANDROID_SDK and ANDROID_NDK macros
32 -include local.mk
33
75d0e6e3 »
2011-08-05 |make sync && make flash| gets code, builds, and flashes attached nex…
34 .PHONY: build
a26b3867 »
2011-10-11 Temporarily remove the kernel from the default target
35 build: gonk gecko
0f51ea4b »
2011-08-04 Initial "build system"
36
3d12fe0d »
2011-10-26 Add support for B2G widget backend
37 ifeq (android,$(WIDGET_BACKEND))
949b8ec3 »
2011-08-05 Add temporary target to manually install gecko. Installing it as a sy…
38 ifndef ANDROID_SDK
39 $(error Sorry, you need to set ANDROID_SDK in your environment to point at the top-level of the SDK install. For now.)
40 endif
41
42 ifndef ANDROID_NDK
43 $(error Sorry, you need to set ANDROID_NDK in your environment to point at the top-level of the NDK install. For now.)
44 endif
3d12fe0d »
2011-10-26 Add support for B2G widget backend
45 endif
0f51ea4b »
2011-08-04 Initial "build system"
46
75d0e6e3 »
2011-08-05 |make sync && make flash| gets code, builds, and flashes attached nex…
47 .PHONY: gecko
949b8ec3 »
2011-08-05 Add temporary target to manually install gecko. Installing it as a sy…
48 # XXX Hard-coded for prof-android target. It would also be nice if
49 # client.mk understood the |package| target.
50 gecko:
51 @export ANDROID_SDK=$(ANDROID_SDK) && \
ff495bd2 »
2011-10-05 Export env. ANDROID_SDK_PLATFORM and MAKE_FLAGS to gecko configuration.
52 export ANDROID_SDK_PLATFORM=$(ANDROID_SDK_PLATFORM) && \
949b8ec3 »
2011-08-05 Add temporary target to manually install gecko. Installing it as a sy…
53 export ANDROID_NDK=$(ANDROID_NDK) && \
68299fc9 »
2011-09-29 Update version code every time gecko is built
54 export ANDROID_VERSION_CODE=`date +%Y%m%d%H%M%S` && \
ff495bd2 »
2011-10-05 Export env. ANDROID_SDK_PLATFORM and MAKE_FLAGS to gecko configuration.
55 export MAKE_FLAGS=$(MAKE_FLAGS) && \
263d23ca »
2011-10-05 Add config-qemu make target for Android emulator
56 export CONFIGURE_ARGS="$(GECKO_CONFIGURE_ARGS)" && \
d2cd070a »
2011-08-18 Makefile hackery for Galaxy S II, and fix broken -jN
57 make -C gecko -f client.mk -s $(MAKE_FLAGS) && \
949b8ec3 »
2011-08-05 Add temporary target to manually install gecko. Installing it as a sy…
58 make -C gecko/objdir-prof-android package
0f51ea4b »
2011-08-04 Initial "build system"
59
75d0e6e3 »
2011-08-05 |make sync && make flash| gets code, builds, and flashes attached nex…
60 .PHONY: gonk
3d12fe0d »
2011-10-26 Add support for B2G widget backend
61 gonk: gecko-$(WIDGET_BACKEND)-hack gaia-hack
572039cc »
2011-10-18 Config kernel for Android emulator with goldfish_armv7_defconfig.
62 @$(call GONK_CMD,make $(MAKE_FLAGS) $(GONK_MAKE_FLAGS))
0f51ea4b »
2011-08-04 Initial "build system"
63
75d0e6e3 »
2011-08-05 |make sync && make flash| gets code, builds, and flashes attached nex…
64 .PHONY: kernel
0f51ea4b »
2011-08-04 Initial "build system"
65 # XXX Hard-coded for nexuss4g target
66 # XXX Hard-coded for gonk tool support
75d0e6e3 »
2011-08-05 |make sync && make flash| gets code, builds, and flashes attached nex…
67 kernel:
d2cd070a »
2011-08-18 Makefile hackery for Galaxy S II, and fix broken -jN
68 @PATH="$$PATH:$(abspath $(TOOLCHAIN_PATH))" make -C $(KERNEL_PATH) $(MAKE_FLAGS) ARCH=arm CROSS_COMPILE=arm-eabi-
0f51ea4b »
2011-08-04 Initial "build system"
69
75d0e6e3 »
2011-08-05 |make sync && make flash| gets code, builds, and flashes attached nex…
70 .PHONY: clean
0f51ea4b »
2011-08-04 Initial "build system"
71 clean: clean-gecko clean-gonk clean-kernel
72
75d0e6e3 »
2011-08-05 |make sync && make flash| gets code, builds, and flashes attached nex…
73 .PHONY: clean-gecko
0f51ea4b »
2011-08-04 Initial "build system"
74 clean-gecko:
75 rm -rf gecko/objdir-prof-android
76
75d0e6e3 »
2011-08-05 |make sync && make flash| gets code, builds, and flashes attached nex…
77 .PHONY: clean-gonk
0f51ea4b »
2011-08-04 Initial "build system"
78 clean-gonk:
79 @$(call GONK_CMD,make clean)
80
75d0e6e3 »
2011-08-05 |make sync && make flash| gets code, builds, and flashes attached nex…
81 .PHONY: clean-kernel
0f51ea4b »
2011-08-04 Initial "build system"
82 clean-kernel:
89c68763 »
2011-08-10 add qemu and galaxy s2 kernels
83 @PATH="$$PATH:$(abspath $(TOOLCHAIN_PATH))" make -C $(KERNEL_PATH) ARCH=arm CROSS_COMPILE=arm-eabi- clean
84
85 .PHONY: config-galaxy-s2
3d12fe0d »
2011-10-26 Add support for B2G widget backend
86 config-galaxy-s2: config-gecko-$(WIDGET_BACKEND)
d2cd070a »
2011-08-18 Makefile hackery for Galaxy S II, and fix broken -jN
87 @echo "KERNEL = galaxy-s2" > .config.mk && \
88 echo "GONK = galaxys2" >> .config.mk && \
89 cp -p config/kernel-galaxy-s2 boot/kernel-android-galaxy-s2/.config && \
90 cd $(GONK_PATH)/device/samsung/galaxys2/ && \
91 echo Extracting binary blobs from device, which should be plugged in! ... && \
92 ./extract-files.sh && \
93 echo OK
0f51ea4b »
2011-08-04 Initial "build system"
94
3d12fe0d »
2011-10-26 Add support for B2G widget backend
95 .PHONY: config-gecko-android
96 config-gecko-android:
97 @cp -p config/gecko-prof-android gecko/mozconfig
98
99 .PHONY: config-gecko-b2g
100 config-gecko-b2g:
101 @cp -p config/gecko-prof-b2g gecko/mozconfig
0f51ea4b »
2011-08-04 Initial "build system"
102
92e391b1 »
2011-08-05 More fixes, and configure vendor blobs
103 define INSTALL_NEXUS_S_BLOB # $(call INSTALL_BLOB,vendor,id)
104 wget https://dl.google.com/dl/android/aosp/$(1)-crespo4g-grj90-$(2).tgz && \
105 tar zxvf $(1)-crespo4g-grj90-$(2).tgz && \
106 ./extract-$(1)-crespo4g.sh && \
107 rm $(1)-crespo4g-grj90-$(2).tgz extract-$(1)-crespo4g.sh
108 endef
109
75d0e6e3 »
2011-08-05 |make sync && make flash| gets code, builds, and flashes attached nex…
110 .PHONY: config-nexuss4g
0f51ea4b »
2011-08-04 Initial "build system"
111 # XXX Hard-coded for nexuss4g target
3d12fe0d »
2011-10-26 Add support for B2G widget backend
112 config-nexuss4g: config-gecko-android
3d78dcee »
2011-08-12 Touch up makefile a bit
113 @echo "KERNEL = samsung" > .config.mk && \
114 echo "GONK = crespo4g" >> .config.mk && \
115 cp -p config/kernel-nexuss4g boot/kernel-android-samsung/.config && \
116 cd $(GONK_PATH) && \
92e391b1 »
2011-08-05 More fixes, and configure vendor blobs
117 $(call INSTALL_NEXUS_S_BLOB,broadcom,c4ec9a38) && \
118 $(call INSTALL_NEXUS_S_BLOB,imgtec,a8e2ce86) && \
119 $(call INSTALL_NEXUS_S_BLOB,nxp,9abcae18) && \
120 $(call INSTALL_NEXUS_S_BLOB,samsung,9474e48f) && \
3d78dcee »
2011-08-12 Touch up makefile a bit
121 make -C $(CURDIR) nexuss4g-postconfig
122
123 .PHONY: nexuss4g-postconfig
124 nexuss4g-postconfig:
92e391b1 »
2011-08-05 More fixes, and configure vendor blobs
125 $(call GONK_CMD,make signapk && vendor/samsung/crespo4g/reassemble-apks.sh)
0f51ea4b »
2011-08-04 Initial "build system"
126
263d23ca »
2011-10-05 Add config-qemu make target for Android emulator
127 .PHONY: config-qemu
128 config-qemu: config-gecko-gonk
129 @echo "KERNEL = qemu" > .config.mk && \
5b7b0e86 »
2011-10-07 Build Gecko for ARMv7 instead of ARMv5
130 echo "GONK = generic" >> .config.mk && \
131 echo "GONK_TARGET = generic-eng" >> .config.mk && \
4077da2a »
2011-10-18 Build gonk with ARMv7 for QEmu
132 echo "GONK_MAKE_FLAGS = TARGET_ARCH_VARIANT=armv7-a" >> .config.mk && \
572039cc »
2011-10-18 Config kernel for Android emulator with goldfish_armv7_defconfig.
133 make -C boot/kernel-android-qemu ARCH=arm goldfish_armv7_defconfig && \
134 ( [ -e $(GONK_PATH)/device/qemu ] || \
135 mkdir $(GONK_PATH)/device/qemu ) && \
263d23ca »
2011-10-05 Add config-qemu make target for Android emulator
136 echo OK
137
75d0e6e3 »
2011-08-05 |make sync && make flash| gets code, builds, and flashes attached nex…
138 .PHONY: flash
d2cd070a »
2011-08-18 Makefile hackery for Galaxy S II, and fix broken -jN
139 # XXX Using target-specific targets for the time being. fastboot is
140 # great, but the sgs2 doesn't support it. Eventually we should find a
141 # lowest-common-denominator solution.
142 flash: flash-$(GONK)
143
144 .PHONY: flash-crespo4g
145 flash-crespo4g: image
75d0e6e3 »
2011-08-05 |make sync && make flash| gets code, builds, and flashes attached nex…
146 @$(call GONK_CMD,adb reboot bootloader && fastboot flashall -w)
0f51ea4b »
2011-08-04 Initial "build system"
147
d2cd070a »
2011-08-18 Makefile hackery for Galaxy S II, and fix broken -jN
148 .PHONY: flash-galaxys2
149 flash-galaxys2: image
150 @adb reboot download && \
151 sleep 20 && \
152 $(HEIMDALL) flash --factoryfs $(GONK_PATH)/out/target/product/galaxys2/system.img
153
75d0e6e3 »
2011-08-05 |make sync && make flash| gets code, builds, and flashes attached nex…
154 .PHONY: bootimg-hack
572039cc »
2011-10-18 Config kernel for Android emulator with goldfish_armv7_defconfig.
155 bootimg-hack: kernel-$(KERNEL)
156
157 .PHONY: kernel-samsung
158 kernel-samsung:
3d78dcee »
2011-08-12 Touch up makefile a bit
159 cp -p boot/kernel-android-samsung/arch/arm/boot/zImage $(GONK_PATH)/device/samsung/crespo/kernel && \
160 cp -p boot/kernel-android-samsung/drivers/net/wireless/bcm4329/bcm4329.ko $(GONK_PATH)/device/samsung/crespo/bcm4329.ko
572039cc »
2011-10-18 Config kernel for Android emulator with goldfish_armv7_defconfig.
161
162 .PHONY: kernel-qemu
163 kernel-qemu:
164 cp -p boot/kernel-android-qemu/arch/arm/boot/zImage \
165 $(GONK_PATH)/device/qemu/kernel
166
167 kernel-%:
168 @
949b8ec3 »
2011-08-05 Add temporary target to manually install gecko. Installing it as a sy…
169
8e7bcf90 »
2011-09-23 Build B2G.apk into system.img
170 OUT_DIR := $(GONK_PATH)/out/target/product/$(GONK)/system
171 APP_OUT_DIR := $(OUT_DIR)/app
949b8ec3 »
2011-08-05 Add temporary target to manually install gecko. Installing it as a sy…
172
173 $(APP_OUT_DIR):
174 mkdir -p $(APP_OUT_DIR)
175
3d12fe0d »
2011-10-26 Add support for B2G widget backend
176 .PHONY: gecko-android-hack
177 gecko-android-hack: gecko
8e7bcf90 »
2011-09-23 Build B2G.apk into system.img
178 mkdir -p $(APP_OUT_DIR)
179 cp -p gecko/objdir-prof-android/dist/b2g-*.apk $(APP_OUT_DIR)/B2G.apk
180 unzip -jo gecko/objdir-prof-android/dist/b2g-*.apk lib/armeabi-v7a/libmozutils.so -d $(OUT_DIR)/lib
1fa7c9ba »
2011-10-11 Make missing img files non-fatal
181 find glue/gonk/out -iname "*.img" | xargs rm -f
949b8ec3 »
2011-08-05 Add temporary target to manually install gecko. Installing it as a sy…
182
3d12fe0d »
2011-10-26 Add support for B2G widget backend
183 .PHONY: gecko-b2g-hack
184 gecko-b2g-hack: gecko
185 rm -rf $(OUT_DIR)/b2g
186 ( cd $(OUT_DIR) && \
187 tar xvfz $(PWD)/gecko/objdir-prof-android/dist/b2g-*.tar.gz )
188 find glue/gonk/out -iname "*.img" | xargs rm -f
189
190
c5694fa2 »
2011-09-26 Build gaia into system image
191 .PHONY: gaia-hack
192 gaia-hack: gaia
193 rm -rf $(OUT_DIR)/home
194 mkdir -p $(OUT_DIR)/home
195 cp -r gaia/* $(OUT_DIR)/home
196
949b8ec3 »
2011-08-05 Add temporary target to manually install gecko. Installing it as a sy…
197 .PHONY: install-gecko
198 install-gecko: gecko
0e808549 »
2011-08-22 Use b2g "htmlrunner" trampoline by default
199 @adb install -r gecko/objdir-prof-android/dist/b2g-*.apk && \
2b1e066e »
2011-08-05 Boot-to-gecko now working. Update gecko submodule and install-gecko t…
200 adb reboot
75d0e6e3 »
2011-08-05 |make sync && make flash| gets code, builds, and flashes attached nex…
201
249f5156 »
2011-09-21 Add |make install-gaia| target and INSTALL instructions for it
202 # The sad hacks keep piling up... We can't set this up to be
203 # installed as part of the data partition because we can't flash that
204 # on the sgs2.
205 .PHONY: install-gaia
206 install-gaia:
207 @for i in `ls gaia`; do adb push gaia/$$i /data/local/$$i; done
208
75d0e6e3 »
2011-08-05 |make sync && make flash| gets code, builds, and flashes attached nex…
209 .PHONY: image
0f51ea4b »
2011-08-04 Initial "build system"
210 image: build
75d0e6e3 »
2011-08-05 |make sync && make flash| gets code, builds, and flashes attached nex…
211 @echo XXX stop overwriting the prebuilt nexuss4g kernel
0f51ea4b »
2011-08-04 Initial "build system"
212
d6de929d »
2011-08-05 Add install guide and unlock-bootloader target.
213 .PHONY: unlock-bootloader
17b6d610 »
2011-08-24 Fix inconsistency with INSTALL instructions
214 unlock-bootloader:
d6de929d »
2011-08-05 Add install guide and unlock-bootloader target.
215 @$(call GONK_CMD,adb reboot bootloader && fastboot oem unlock)
216
75d0e6e3 »
2011-08-05 |make sync && make flash| gets code, builds, and flashes attached nex…
217 .PHONY: sync
0f51ea4b »
2011-08-04 Initial "build system"
218 sync:
219 git pull
150b06e6 »
2011-10-25 Do |git pull| before |git submodule sync| in |make sync|.
220 git submodule sync
221 git submodule update --init
Something went wrong with that request. Please try again.