aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile19
-rw-r--r--conf.py4
-rwxr-xr-xscripts/confmk.py3
3 files changed, 18 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 2747982..4b36d1c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
-.PHONY: all help parse_kconfig write_config build run test clean clean_linux clean_buildroot mlinux mbuildroot
+.PHONY: all help parse_kconfig write_config build run test clean clean_linux clean_buildroot mlinux mbuildroot deflinux
-include .conf.mk
+-include .conf.mk
all: parse_kconfig write_config
@@ -33,10 +33,10 @@ mlinux:
deflinux:
ARCH=$(SRCARCH) $(MAKE) -C linux defconfig
-test: build/initram.gz
+test: $(INITRAM)
@ #TODO
-run: kconfig_parser write_config build/initram.gz
+run: kconfig_parser write_config $(INITRAM)
scripts/main_loop.py
evaluate:
@@ -64,11 +64,14 @@ parse_kconfig:
write_config:
@$(MAKE) -C scripts/write_config/
-build:
- mkdir $@
+%:
+ mkdir -p $@
-build/initram.gz: scripts/buildroot/.config build
+$(BUILDROOT_INITRAM): scripts/buildroot/.config
@$(MAKE) -C scripts/buildroot
- mv scripts/buildroot/output/images/rootfs.cpio.gz
+
+$(INITRAM): $(BUILDROOT_INITRAM) $${@D}
+ mv $^ $@
scripts/buildroot/.config: mbuildroot
+ @
diff --git a/conf.py b/conf.py
index 90f2b12..7d4874b 100644
--- a/conf.py
+++ b/conf.py
@@ -23,6 +23,7 @@ dot_confmk = pf('.conf.mk')
linux_sources = pf('linux')
linux_kconfig_head = 'Kconfig'
linux_dot_config = linux_sources + '/.config'
+linux_image = linux_sources + '/arch/' + ARCH + '/boot/bzImage'
build_folder = pf('build/')
phase_file = build_folder + '/phase'
@@ -35,6 +36,9 @@ dot_config_back_file = build_folder + '/dot_config_back'
solution_file = build_folder + '/solution'
iteration_file = build_folder + '/iteration'
+buildroot_initram = pf('scripts/buildroot/output/images/rootfs.cpio.gz')
+initram = build_folder + '/initram.gz'
+
# Programs paths
parse_kconfig = checkXf(pf('scripts/parse_kconfig/parse'), 'You must build programs first.')
write_config = checkXf(pf('scripts/write_config/write'), 'You must build programs first.')
diff --git a/scripts/confmk.py b/scripts/confmk.py
index ef27543..a508d39 100755
--- a/scripts/confmk.py
+++ b/scripts/confmk.py
@@ -12,6 +12,9 @@ def gen_confmk():
with open(conf.dot_confmk, 'w') as f:
f.write("# This file is generated. Please don't edit this file.\n")
f.write("SRCARCH := " + conf.SRCARCH + "\n")
+ f.write("\n")
+ f.write("BUILDROOT_INITRAM := " + conf.buildroot_initram + "\n")
+ f.write("INITRAM := " + conf.initram + "\n")
#################################################################################