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

Putting arch file into a package. #324

Merged
merged 1 commit into from
Jun 18, 2022
Merged

Conversation

Dawid33
Copy link
Contributor

@Dawid33 Dawid33 commented Jun 13, 2022

issue #77

Unfortunately, arch.zig and the kernel are dependant on each other. I couldn't think of a way to have two pacakges directly depend on each other. I made a file pluto.zig that collects and re-exports all the files in the kernel. I made packages out of arch.zig and pluto.zig. kmain.zig then imports those packges.

This works for just running the kernel but getting the tests to work will be a bigger challenge.

Copy link
Collaborator

@SamTebbs33 SamTebbs33 left a comment

Choose a reason for hiding this comment

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

I like how much cleaner this makes things.

build.zig Outdated Show resolved Hide resolved
build.zig Outdated Show resolved Hide resolved
src/kernel/arch.zig Outdated Show resolved Hide resolved
src/kernel/arch/x86/arch.zig Outdated Show resolved Hide resolved
src/kernel/arch/x86/idt.zig Outdated Show resolved Hide resolved
src/kernel/arch/x86/arch.zig Outdated Show resolved Hide resolved
test/mock/kernel/arch_mock.zig Outdated Show resolved Hide resolved
@Dawid33 Dawid33 force-pushed the arch-package branch 4 times, most recently from 3a8017a to d53c10b Compare June 15, 2022 12:44
@Dawid33 Dawid33 marked this pull request as ready for review June 15, 2022 12:47
@Dawid33
Copy link
Contributor Author

Dawid33 commented Jun 15, 2022

Sorry for the stream of force pushes, I got it working properly. I thought it wasn't possible to have circular references but it actually is :), I went off a on a tangent yesterday haha. Most of the tests are passing. Still needs some work.

Copy link
Collaborator

@SamTebbs33 SamTebbs33 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 doing this, awesome work. We like to keep merges to one commit for conciseness, so if you don't mind squashing them into one and force pushing, then I'm happy for this to be merged.

I'd like to wait a reasonable amount of time for @DrDeano to have a look as well.

Closes #77

fat32_cp.sh Outdated Show resolved Hide resolved
@Dawid33 Dawid33 force-pushed the arch-package branch 2 times, most recently from c7cb85d to f2b9df3 Compare June 15, 2022 18:14
@SamTebbs33 SamTebbs33 linked an issue Jun 15, 2022 that may be closed by this pull request
Copy link
Member

@DrDeano DrDeano left a comment

Choose a reason for hiding this comment

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

Soz for the late review. I am slow.
Two small things.
This is very nice, (Insert the nice * mouth click* meme)

src/kernel/arch/x86/syscalls.zig Show resolved Hide resolved
src/kernel/arch/x86/arch.zig Outdated Show resolved Hide resolved
Copy link
Member

@DrDeano DrDeano left a comment

Choose a reason for hiding this comment

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

🚀

@SamTebbs33 SamTebbs33 merged commit 474073a into ZystemOS:develop Jun 18, 2022
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.

Import arch file as a package
3 participants