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