genode-ehmry/repos/base-foc/recipes/src/base-foc_content.inc
Stefan Kalkowski a1e70b9ba4 kernel: differentiate board-specific components
Components like kernel, core, and bootstrap that are built for a
specific board need to reside inside the same architectural dependent
build directory. For instance there are sel4, foc, and hw kernel builds
for imx6q_sabrelite and imx7d_sabre, which have to reside inside the same
arm_v7 build directory.
This commit names those components explicitely, and adapts the run-tool to it.

Fix #3316
2019-05-27 14:46:52 +02:00

42 lines
1.2 KiB
PHP

include $(GENODE_DIR)/repos/base/recipes/src/base_content.inc
RECIPE_DIR := $(REP_DIR)/recipes/src/base-foc-$(BOARD)
FROM_BASE_FOC := include/foc include/foc_native_cpu
content: $(FROM_BASE_FOC)
$(FROM_BASE_FOC):
$(mirror_from_rep_dir)
content: README
README:
cp $(RECIPE_DIR)/README $@
content: lib/import config etc
lib/import config etc:
$(mirror_from_rep_dir)
content: src/kernel/foc
src/kernel:
$(mirror_from_rep_dir)
KERNEL_PORT_DIR := $(call port_dir,$(REP_DIR)/ports/foc)
src/kernel/foc: src/kernel
cp -r $(KERNEL_PORT_DIR)/src/kernel/foc/* $@
content:
for spec in x86_32 x86_64 arm; do \
mv lib/mk/spec/$$spec/ld-foc.mk lib/mk/spec/$$spec/ld.mk; \
done;
sed -i "s/ld-foc/ld/" src/lib/ld/foc/target.mk
sed -i "s/foc_timer_drv/timer/" src/timer/foc/target.mk
sed -i "s/BOARD.*unknown/BOARD = $(BOARD)/" src/core/foc/target.mk
sed -i "s/BOARD.*unknown/BOARD = $(BOARD)/" src/kernel/foc/target.mk
sed -i "s/BOARD.*unknown/BOARD = $(BOARD)/" lib/mk/syscall-foc.inc
sed -i "s/BOARD.*unknown/BOARD = $(BOARD)/" lib/mk/kernel-foc.inc
content: enable_board_spec
enable_board_spec: etc/specs.conf
echo "SPECS += $(BOARD)" >> etc/specs.conf