forked from neg/BakkaLinux
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (35 loc) · 1.08 KB
/
Makefile
File metadata and controls
43 lines (35 loc) · 1.08 KB
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
.PHONY: all clean
all: vmlinuz initramfs.cpio.gz
initramfs.cpio.gz: initramfs.cpio
gzip -f initramfs.cpio
initramfs.cpio: rootfs
cd rootfs && ln -s sbin/init init
cd rootfs && find . | cpio --owner 0:0 -H newc -o > ../initramfs.cpio
rootfs: busybox/busybox linux/arch/x86/boot/bzImage
rm -fr rootfs
mkdir -p rootfs/bin rootfs/dev rootfs/etc rootfs/mnt \
rootfs/proc rootfs/tmp rootfs/sys rootfs/root
$(MAKE) -C busybox install CONFIG_PREFIX=../rootfs
$(MAKE) -C linux modules_install INSTALL_MOD_PATH=../rootfs
cp -r skel/* rootfs
vmlinuz: linux/arch/x86/boot/bzImage
cp linux/arch/x86/boot/bzImage ../vmlinuz
System.map: linux/arch/x86/boot/bzImage
cp linux/System.map ../
linux/arch/x86/boot/bzImage: linux/.config
$(MAKE) -C linux bzImage
$(MAKE) -C linux modules
linux/.config:
$(MAKE) -C linux defconfig
busybox/busybox: busybox/.config
$(MAKE) -C busybox
busybox/.config:
$(MAKE) -C busybox defconfig
echo "CONFIG_STATIC=y" >> busybox/.config
clean:
$(MAKE) -C busybox clean
$(MAKE) -C linux clean
rm -f vmlinuz
rm -f System.map
rm -f initramfs.cpio.gz
rm -fr rootfs