diff --git a/bao.mk b/bao.mk new file mode 100644 index 0000000..044db6d --- /dev/null +++ b/bao.mk @@ -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) \ No newline at end of file diff --git a/configs/bao_rpi4_linux_freertos.c b/configs/bao_rpi4_linux_freertos.c index 69a90a6..194f31e 100644 --- a/configs/bao_rpi4_linux_freertos.c +++ b/configs/bao_rpi4_linux_freertos.c @@ -1,7 +1,7 @@ #include -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 = { diff --git a/linux.mk b/linux.mk index 6faffea..bebabb4 100644 --- a/linux.mk +++ b/linux.mk @@ -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