forked from wh0/bookconfig
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (40 loc) · 1.42 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
KERNEL_OPTS = \
CROSS_COMPILE=arm-linux-gnueabi- \
CFLAGS="-march=armv5te -mtune=arm926ej-s" \
-j4
MIRROR = http://deb.debian.org/debian
DEBOOTSTRAP_OPTS = \
--arch armel \
--include systemd-sysv,sudo,gpiod,firmware-misc-nonfree,network-manager,wpasupplicant,libpam-systemd,udev \
--components main,contrib,non-free \
--variant minbase
SUITE = bookworm
all: boot.zip rootfs.tar.gz
boot.zip: script/uzImage.bin script/scriptcmd
rm -f $@
zip -0 $@ $^
script/uzImage.bin: zImage_w_dtb | script
mkimage -A arm -O linux -T kernel -C none -a 0x8000 -e 0x8000 -n linux-vtwm -d $< $@
zImage_w_dtb: config | kernel
$(MAKE) -C kernel ARCH=arm KCONFIG_CONFIG=../$< $(KERNEL_OPTS) zImage wm8505-ref.dtb
cat kernel/arch/arm/boot/zImage kernel/arch/arm/boot/dts/wm8505-ref.dtb >$@
config: seed | kernel
cp $< $@.tmp
$(MAKE) -C kernel ARCH=arm KCONFIG_CONFIG=../$@.tmp olddefconfig
rm -f $@.tmp.old
mv $@.tmp $@
menuconfig: config | kernel
cp $< config.next.tmp
$(MAKE) -C kernel ARCH=arm KCONFIG_CONFIG=../config.next.tmp menuconfig
rm -f config.next.tmp.old
mv config.next.tmp config.next
kernel:
git rev-parse --verify kernel || git fetch $(FETCH_KERNEL_OPTS) origin kernel:kernel
git worktree add $@ kernel
script/scriptcmd: cmd | script
mkimage -A arm -O linux -T script -C none -a 1 -e 0 -n "script image" -d $< $@
script:
mkdir -p $@
rootfs.tar.gz: buildrootfs multistrap.conf ship
fakeroot ./$< $@
.PHONY: all menuconfig