Skip to content

Commit

Permalink
Merge pull request #24 from JasonMo1/ci
Browse files Browse the repository at this point in the history
ci: Add makefile rule `alldefconfig` and use it in the ci workflow
  • Loading branch information
Zeal8bit authored Feb 7, 2024
2 parents 9e18d21 + 4527b65 commit f1fc7e3
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_zeal8bitos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- main
tags:
- v*

jobs:
deploy:
Expand All @@ -29,9 +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
mv osconfig.asm include/
make alldefconfig
z88dk-z80asm
make
mv build/os_with_romdisk.img build/$(git describe --tags).img
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Configuration and auto-generated files
*.conf*
include/osconfig.asm
packer/pack
target/**/include/romdisk_info_h.asm
version.txt
*.img

Expand Down
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -142,7 +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:
$(ALLDEFCONFIG)
@echo "Converting $(KCONFIG_CONFIG) to $(OSCONFIG_ASM) ..."
@$(call CONVERT_config_asm,$(KCONFIG_CONFIG), $(OSCONFIG_ASM))

Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ...
```
Expand Down
2 changes: 1 addition & 1 deletion target/zeal8bit/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit f1fc7e3

Please sign in to comment.