6
by Scott Moser
add initial makefile |
1 |
ARCH = i386 |
2 |
TOP_D = $(shell pwd) |
|
3 |
BR_D = $(TOP_D)/buildroot |
|
4 |
OUT_D = $(TOP_D)/output/$(ARCH) |
|
5 |
BR_OUT_D = $(OUT_D)/buildroot |
|
6 |
CONF_D = $(TOP_D)/conf |
|
7 |
DL_D = $(TOP_D)/download |
|
8
by Scott Moser
use BR2_ROOTFS_SKELETON_CUSTOM_PATH to specify a skeleton dir |
8 |
SKEL_D = $(OUT_D)/skeleton |
6
by Scott Moser
add initial makefile |
9 |
|
10 |
DISK_IMG = $(OUT_D)/disk.img |
|
11 |
PART_IMG = $(OUT_D)/part.img |
|
12 |
TAR_IMG = $(OUT_D)/rootfs.tar |
|
13 |
BR_TAR_IMG = $(BR_OUT_D)/images/rootfs.tar |
|
14 |
||
8
by Scott Moser
use BR2_ROOTFS_SKELETON_CUSTOM_PATH to specify a skeleton dir |
15 |
BR_MAKE = cd $(BR_D) && make O=$(BR_OUT_D) BR2_DL_DIR=$(DL_D) \ |
13
by Scott Moser
disable use of BR2_ROOTFS_SKELETON_DEFAULT, using custom copy script instead |
16 |
BUSYBOX_CONFIG_FILE=$(BR_OUT_D)/busybox.config |
8
by Scott Moser
use BR2_ROOTFS_SKELETON_CUSTOM_PATH to specify a skeleton dir |
17 |
|
18 |
BR_DEPS = $(BR_D) $(BR_OUT_D)/busybox.config $(BR_OUT_D)/.config $(SKEL_D)/.dir |
|
6
by Scott Moser
add initial makefile |
19 |
|
20 |
all: $(TAR_IMG) |
|
21 |
||
8
by Scott Moser
use BR2_ROOTFS_SKELETON_CUSTOM_PATH to specify a skeleton dir |
22 |
debug: |
23 |
@echo "BR_DEPS: $(BR_DEPS)" |
|
24 |
@echo "BR_MAKE: $(BR_MAKE)" |
|
25 |
@echo "BR_OUT_D: $(BR_OUT_D)" |
|
26 |
||
6
by Scott Moser
add initial makefile |
27 |
source: br_source minicloud_source |
28 |
||
29 |
br_source: $(BR_DEPS) $(OUT_D)/.source.$(ARCH) |
|
30 |
minicloud_source: $(DL_D)/.dir |
|
31 |
@echo hi world |
|
32 |
# here we would download the Ubuntu kernel
|
|
33 |
||
34 |
$(BR_D): |
|
35 |
@[ -d "$(BR_D)" ] || { echo "You Must download BUILDROOT, extract it, and symlink to $(BR_D)"; exit 1; } |
|
36 |
||
37 |
$(OUT_D)/.source.$(ARCH): |
|
38 |
$(BR_MAKE) source |
|
39 |
||
40 |
$(BR_OUT_D)/busybox.config: $(CONF_D)/busybox.config $(BR_OUT_D)/.dir |
|
41 |
cp $(CONF_D)/busybox.config $@ |
|
28
by Scott Moser
commit i386 built buildroot inittab (ie, stock from current config) |
42 |
for s in configured built target_installed; do rm -f $(BR_OUT_D)/build/busybox-1.18.5/.stamp_$$s; done |
6
by Scott Moser
add initial makefile |
43 |
|
8
by Scott Moser
use BR2_ROOTFS_SKELETON_CUSTOM_PATH to specify a skeleton dir |
44 |
$(BR_OUT_D)/.config: $(CONF_D)/buildroot-$(ARCH).config $(BR_OUT_D)/.dir |
6
by Scott Moser
add initial makefile |
45 |
cp $(CONF_D)/buildroot-$(ARCH).config $@ |
46 |
||
47 |
$(TAR_IMG): $(BR_TAR_IMG) |
|
48 |
cp $(BR_TAR_IMG) $(TAR_IMG) |
|
49 |
||
50 |
$(BR_TAR_IMG): $(BR_DEPS) |
|
51 |
$(BR_MAKE) |
|
52 |
||
8
by Scott Moser
use BR2_ROOTFS_SKELETON_CUSTOM_PATH to specify a skeleton dir |
53 |
$(SKEL_D)/.dir: |
54 |
# copy BR_D/fs/skeleton, then sync src/ over the
|
|
55 |
# top of that.
|
|
56 |
# depends on $(BR_D)/fs/skeleton (somehow)
|
|
12
by Scott Moser
add a 'br-%' rule for 'br-menuconfig' or the like |
57 |
[ -d $(SKEL_D) ] || mkdir -p $(SKEL_D) |
58 |
rsync -a $(BR_D)/fs/skeleton/ $(SKEL_D)/ --delete |
|
59 |
rsync -a $(TOP_D)/src/ $(SKEL_D)/ |
|
60 |
touch $(SKEL_D)/.dir |
|
61 |
||
107
by Scott Moser
Makefile: add better 'br-menuconfig' rule that copies config back |
62 |
br-menuconfig: $(BR_OUT_D)/.config |
63 |
$(BR_MAKE) $* menuconfig |
|
64 |
cp $(BR_OUT_D)/.config $(CONF_D)/buildroot-$(ARCH).config |
|
138
by Scott Moser
add a br-busybox-menuconfig command |
65 |
|
66 |
br-busybox-menuconfig: $(BR_OUT_D)/busybox.config |
|
67 |
$(BR_MAKE) $* busybox-menuconfig |
|
68 |
cp $(BR_OUT_D)/build/busybox-1.18.5/.config $(CONF_D)/busybox.config |
|
69 |
||
12
by Scott Moser
add a 'br-%' rule for 'br-menuconfig' or the like |
70 |
br-%: |
71 |
$(BR_MAKE) $* |
|
8
by Scott Moser
use BR2_ROOTFS_SKELETON_CUSTOM_PATH to specify a skeleton dir |
72 |
|
6
by Scott Moser
add initial makefile |
73 |
%/.dir: |
74 |
mkdir -p $* && touch $@ |