forked from mer-hybris/hybris-boot
-
Notifications
You must be signed in to change notification settings - Fork 59
/
Makefile
77 lines (59 loc) · 2.53 KB
/
Makefile
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
71
72
73
74
75
76
# Build initramfs.gz and boot.img
#
# Author: Tom Swindell <[email protected]>
#
$(warning ********************************************************************************)
$(warning * You are using the non-android-build approach)
$(warning * Please don't do this.)
$(warning * Setup an android build chroot and build your img files there.)
$(warning * Thank you :D )
$(warning ********************************************************************************)
ifneq ($(MAKECMDGOALS),clean)
DEVICE=$(MAKECMDGOALS)
endif
BOOTLOGO ?= 1
NEVERBOOT ?= 0
ALWAYSDEBUG ?= 0
$(DEVICE): setup-$(DEVICE) boot.img-$(DEVICE)
setup-mako:
$(eval MKBOOTIMG_PARAMS=--cmdline 'console=ttyHSL0,115200,n8 androidboot.hardware=mako lpj=67677' \
--base 0x80200000 \
--ramdisk_offset 0x01600000 \
)
setup-grouper:
$(eval DATA_PART=/dev/mmcblk0p9)
setup-tilapia:
$(eval DATA_PART=/dev/mmcblk0p10)
setup-aries:
$(eval MKBOOTIMG_PARAMS=--cmdline 'console=null androidboot.hardware=qcom ehci-hcd.park=3' --base 0x00000000 --pagesize 2048 --kernel_offset 0x80208000 --ramdisk_offset 0x82200000 --second_offset 0x81100000 --tags_offset 0x80200100 --board '' )
$(eval DATA_PART=/dev/mmcblk0p26)
$(eval BOOTLOGO=0)
zImage-mako:
$(error Please provide the mako zImage)
zImage-aries:
$(error Please provide the aries zImage)
zImage-grouper:
(curl "http://repo.merproject.org/obs/home:/tswindell:/hw:/grouper/latest_armv7hl/armv7hl/kernel-asus-grouper-3.1.10+9.26-1.1.1.armv7hl.rpm" | rpm2cpio | cpio -idmv)
mv ./boot/zImage zImage-grouper
rm -rf ./boot ./lib
zImage-tilapia: zImage-grouper
mv zImage-grouper zImage-tilapia
boot.img-$(DEVICE): zImage-$(DEVICE) initramfs.gz-$(DEVICE)
mkbootimg --kernel ./zImage-$(DEVICE) --ramdisk ./initramfs.gz-$(DEVICE) $(MKBOOTIMG_PARAMS) --output ./boot.img-$(DEVICE)
initramfs/init: init-script
sed -e 's %DATA_PART% $(DATA_PART) g' init-script | sed -e 's %BOOTLOGO% $(BOOTLOGO) g' | sed -e 's %NEVERBOOT% $(NEVERBOOT) g' | \
sed -e 's %ALWAYSDEBUG% $(ALWAYSDEBUG) g' > initramfs/init
chmod +x initramfs/init
initramfs.gz-$(DEVICE): initramfs/bin/busybox initramfs/init initramfs/bootsplash.gz
(cd initramfs; rm -rf ./usr/share)
(cd initramfs; find . | cpio -H newc -o | gzip -9 > ../initramfs.gz-$(DEVICE))
initramfs/bin/busybox:
(cd initramfs; curl "http://repo.merproject.org/obs/home:/tswindell:/hw:/common/latest_armv7hl/armv7hl/busybox-1.21.0-1.1.2.armv7hl.rpm" | rpm2cpio | cpio -idmv)
clean:
rm ./initramfs/bin/busybox
rm ./initramfs/init
rm ./initramfs.gz-*
rm ./boot.img-*
rm ./zImage-*
all:
$(error Usage: make <device>)