From f640c199e285c6e1c1b3b81b3112b0108f17dab5 Mon Sep 17 00:00:00 2001 From: JasonMo Date: Tue, 6 Feb 2024 23:49:27 +0800 Subject: [PATCH 1/3] CI: Add makefile rule `alldefconfig` and use it in the ci workflow, add ci event and update .gitignore --- .github/workflows/build_zeal8bitos.yml | 5 +++-- .gitignore | 2 ++ Makefile | 5 +++++ README.md | 13 ++++++++++++- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_zeal8bitos.yml b/.github/workflows/build_zeal8bitos.yml index c09a171..4c71023 100644 --- a/.github/workflows/build_zeal8bitos.yml +++ b/.github/workflows/build_zeal8bitos.yml @@ -4,6 +4,8 @@ on: push: branches: - main + tags: + - v* jobs: deploy: @@ -29,8 +31,7 @@ jobs: - name: Build Zeal 8-bit OS (zeal8bit target) shell: bash run: | - wget $CONF_SERVER/roms/config/os.conf - wget $CONF_SERVER/roms/config/osconfig.asm + make alldefconfig mv osconfig.asm include/ z88dk-z80asm make diff --git a/.gitignore b/.gitignore index baaada5..57651c1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ # Configuration and auto-generated files *.conf* include/osconfig.asm +packer/pack +target/**/include/romdisk_info_h.asm version.txt *.img diff --git a/Makefile b/Makefile index 7e0f213..51f5995 100644 --- a/Makefile +++ b/Makefile @@ -146,6 +146,11 @@ menuconfig: @echo "Converting $(KCONFIG_CONFIG) to $(OSCONFIG_ASM) ..." @$(call CONVERT_config_asm,$(KCONFIG_CONFIG), $(OSCONFIG_ASM)) +alldefconfig: + $(PYTHON) $(shell $(PYTHON) -m site --user-base)/bin/alldefconfig + @echo "Converting $(KCONFIG_CONFIG) to $(OSCONFIG_ASM) ..." + @$(call CONVERT_config_asm,$(KCONFIG_CONFIG), $(OSCONFIG_ASM)) + prepare_dirs: @mkdir -p $(BINDIR) diff --git a/README.md b/README.md index a3a55b7..dc1713d 100644 --- a/README.md +++ b/README.md @@ -116,14 +116,25 @@ For installing Z88DK, please [check out their Github project](https://github.com ## Configuring Zeal 8-bit OS After installing the dependencies listed above and cloning this repository, the first thing to do is to configure the OS. To do so, simply execute: + ``` make menuconfig ``` + From there, it is possible to configure the kernel but also the target computer's options, for example for *Zeal 8-bit computer*, it is possible to configure where the romdisk (more about this below) will be located on the ROM. All the options have default values, so, if you have nothing to modify in particular or you are not sure what you are doing, press `S` to save the current (default) configuration. The filename for the configuration will be asked, keep it as `os.conf` and press enter. -To exit the menuconfig, press `Q` key. If everything goes well, the following message will be shown: +To exit the menuconfig, press `Q` key. + +Or you can also run following command instead to use the default config: + +``` +make alldefconfig +``` + +If everything goes well, the following message will be shown: + ``` Converting os.conf to include/osconfig.asm ... ``` From 03a66b7fb7644eb277d03766eaf1d0002c57ac43 Mon Sep 17 00:00:00 2001 From: JasonMo Date: Wed, 7 Feb 2024 11:04:46 +0800 Subject: [PATCH 2/3] Makefile: let it more simple, fix useless command in ci --- .github/workflows/build_zeal8bitos.yml | 1 - Makefile | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_zeal8bitos.yml b/.github/workflows/build_zeal8bitos.yml index 4c71023..02d97a7 100644 --- a/.github/workflows/build_zeal8bitos.yml +++ b/.github/workflows/build_zeal8bitos.yml @@ -32,7 +32,6 @@ jobs: shell: bash run: | make alldefconfig - mv osconfig.asm include/ z88dk-z80asm make mv build/os_with_romdisk.img build/$(git describe --tags).img diff --git a/Makefile b/Makefile index 51f5995..7fafe8f 100644 --- a/Makefile +++ b/Makefile @@ -5,12 +5,15 @@ SHELL := /bin/bash CC=$(shell which z88dk-z80asm z88dk.z88dk-z80asm | head -1) DISASSEMBLER=$(shell which z88dk-dis z88dk.z88dk-dis | head -1) PYTHON=python3 +PYTHON_BIN=$(PYTHON) $(shell $(PYTHON) -m site --user-base)/bin export PATH := $(realpath packer)/:$(PATH) -# Menuconfig-related env variables +# Kconfig related export KCONFIG_CONFIG = os.conf export MENUCONFIG_STYLE = aquatic export OSCONFIG_ASM = include/osconfig.asm export ZOS_PATH := $(PWD) +MENUCONFIG=$(PYTHON_BIN)/menuconfig +ALLDEFCONFIG=$(PYTHON_BIN)/alldefconfig # Output related BIN=os.bin # As the first section of the OS must be RST_VECTORS, the final binary is named os_RST_VECTORS.bin @@ -142,12 +145,12 @@ define CONVERT_config_asm = endef menuconfig: - $(PYTHON) $(shell $(PYTHON) -m site --user-base)/bin/menuconfig + $(MENUCONFIG) @echo "Converting $(KCONFIG_CONFIG) to $(OSCONFIG_ASM) ..." @$(call CONVERT_config_asm,$(KCONFIG_CONFIG), $(OSCONFIG_ASM)) alldefconfig: - $(PYTHON) $(shell $(PYTHON) -m site --user-base)/bin/alldefconfig + $(ALLDEFCONFIG) @echo "Converting $(KCONFIG_CONFIG) to $(OSCONFIG_ASM) ..." @$(call CONVERT_config_asm,$(KCONFIG_CONFIG), $(OSCONFIG_ASM)) From 4527b65859c153675f42537a534fc6b2d1de940f Mon Sep 17 00:00:00 2001 From: JasonMo Date: Wed, 7 Feb 2024 21:53:11 +0800 Subject: [PATCH 3/3] Kconfig: Enable compact flash support as default --- target/zeal8bit/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/zeal8bit/Kconfig b/target/zeal8bit/Kconfig index eb89ad6..8235385 100644 --- a/target/zeal8bit/Kconfig +++ b/target/zeal8bit/Kconfig @@ -49,7 +49,7 @@ menu "Zeal 8-bit Computer configuration" config TARGET_ENABLE_COMPACTFLASH bool prompt "Enable CompactFlash driver (EXPERIMENTAL)" - default n + default y help Import the CompactFlash driver in the kernel compilation. If this option is enabled, the CompactFlash will be seen as a disk by the kernel. The address and and the initialization timeout can be configured.