Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Multiple User Configs #38

Merged
merged 3 commits into from
Oct 13, 2024

Conversation

zoul0813
Copy link
Contributor

@zoul0813 zoul0813 commented Oct 10, 2024

  • support for user-defined config files
  • added default os.conf for hardware
  • added default emulator.conf for emulator
  • added ZOS_CONFIG env var support to override the default os.conf when calling make
  • updated CI to reference emulator.conf
  • make menuconfig will now copy over configs/zeal8bit.default to os.conf for backwards compatibility, and to allow for custom user defaults
  • os.conf will be used by default, if available ... otherwise configs/zeal8bit.default will be used

How configs are loaded:

  • config param is passed, use it
  • ZOS_CONFIG is set, use it
  • os.conf exists, use it
  • use configs/zeal8bit.default

When the user uses make menuconfig, if no os.conf exists, the default configs/zeal8bit.default will be copied to os.conf and then loaded - users should always be editing os.conf with menuconfig

Menuconfig also supports the config argument above, if no os.conf exists, menuconfig will copy the config argument to os.conf ... example: make menuconfig config=configs/zealemu.default will make the users os.conf a copy of the zealemu.default

* added default os.conf for hardware
* added default emulator.conf for emulator
* added ZOS_CONFIG env var support to override the default os.conf when calling `make`
* updated CI to reference emulator.conf
@zoul0813 zoul0813 changed the title * support for user-defined config files Support for Multiple User Configs Oct 10, 2024
* make menuconfig will now copy over the default os.conf for backwards compatibility and user-defined defaults
Copy link
Owner

@Zeal8bit Zeal8bit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution, I left a few comments

@echo "Executing post commands..."
@echo "Config: $(KCONFIG_CONFIG)"
@echo "Kernel Physical Address: $(CONFIG_KERNEL_PHYS_ADDRESS)"
@echo "Host FS: $(CONFIG_ENABLE_EMULATION_HOSTFS)"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a debugging log, this (currently) doesn't exist for other targets

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was intentional - though it can be removed - it’s meant to serve as a reminder of what was used

$(CC) $(ASMFLAGS) -o$(FULLBIN) -b -m -s $(LINKERFILE_BUILT) $(BUILTOBJS)
@mv $(BINDIR)/$(BIN_GENERATED) $(FULLBIN)
@echo "OS binary: $(FULLBIN)"
@echo "Executing post commands..."
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be moved right above $(POSTCMD)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also intentional, meant to keep the “info print” at the end together

Co-authored-by: Zeal 8-bit <[email protected]>
@Zeal8bit Zeal8bit merged commit 01bfd25 into Zeal8bit:main Oct 13, 2024
@Zeal8bit
Copy link
Owner

Thanks for your PR, it's merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants