Skip to content

Commit

Permalink
Implemented makefile for bao-hypervisor
Browse files Browse the repository at this point in the history
  • Loading branch information
xX7 committed Dec 2, 2022
1 parent a5c3480 commit 35b66d2
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
22 changes: 22 additions & 0 deletions bao.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
bao_src:=$(srcPath)/bao-hypervisor
bao_cfg_file:=bao_rpi4_linux_freertos
bao_cfg:=$(confPath)/$(bao_cfg_file).c
bao_cfg_repo:=$(imgPath)/build-config
bao_cfg_dest:=$(bao_cfg_repo)/$(bao_cfg_file).c
bao_image:=$(imgPath)/bao.bin

$(bao_cfg_repo):
@mkdir -p $(bao_cfg_repo)

$(bao_cfg): | $(bao_cfg_repo)
cp -L $(bao_cfg) $(bao_cfg_dest)

$(bao_image): $(bao_cfg) $(bao_src)
$(MAKE) -C $(bao_src)\
PLATFORM=$(PLATFORM)\
CONFIG_REPO=$(bao_cfg_repo)\
CONFIG=$(bao_cfg_file) CONFIG_BUILTIN=y\
CPPFLAGS=-DIMG_PATH=$(imgPath)
cp $(bao_src)/bin/$(PLATFORM)/builtin-configs/$(bao_cfg_file)/bao.bin $(bao_image)

bao: $(bao_image)
4 changes: 2 additions & 2 deletions configs/bao_rpi4_linux_freertos.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <config.h>

VM_IMAGE(linux_image, XSTR(BAO_DEMOS_WRKDIR_IMGS/linux.bin));
VM_IMAGE(freertos_image, XSTR(BAO_DEMOS_WRKDIR_IMGS/freertos.bin));
VM_IMAGE(linux_image, XSTR(IMG_PATH/linux.bin));
VM_IMAGE(freertos_image, XSTR(IMG_PATH/freertos.bin));

struct config config = {

Expand Down
1 change: 0 additions & 1 deletion linux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ $(buildroot_src):
git clone --depth 1 --branch $(buildroot_version) $(buildroot_repo)\
$(buildroot_src)


$(buildroot_image): $(linux_patches) $(linux_cfg_frag) $(buildroot_defcfg) | $(linux_src) $(buildroot_src)
$(MAKE) -C $(buildroot_src) defconfig BR2_DEFCONFIG=$(buildroot_defcfg)
$(MAKE) -C $(buildroot_src) linux-reconfigure all
Expand Down

0 comments on commit 35b66d2

Please sign in to comment.