-
Notifications
You must be signed in to change notification settings - Fork 1
Development #137
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
Development #137
Conversation
Caution Review failedThe pull request is closed. WalkthroughShifts CI to a Meson-first dual Meson/CMake build, centralizes compiler/linker flags in CMake, adds a Meson silent_build option to suppress warnings, removes several Meson feature toggles, and updates README and CI artifact paths to use meson-build outputs. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor GitHubActions as GitHub Actions
participant Runner as CI Runner
participant Meson as Meson Build
participant CMake as CMake/Ninja Build
participant Analyzer as Artifact Analyzer
participant Uploader as Artifact Uploader
GitHubActions->>Runner: trigger CI/CD Pipeline
Runner->>Meson: meson setup + build -> meson-build/
Runner->>CMake: cmake -G Ninja + ninja -> cmake-build/ (then clean)
alt success
Runner->>Analyzer: run binaries & checks from meson-build/
Analyzer-->>Runner: sizes, ISO bootability, file checks
Runner->>Uploader: upload artifacts from meson-build/
else failure
Analyzer-->>Runner: report failures
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🧪 Early access (Sonnet 4.5): enabledWe are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience. Note:
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (1)
README.md (1)
1-1
: Consider hyphenation consistency.The title uses "ring 0" (with space) while line 23 uses "ring-0" (hyphenated). For technical accuracy and consistency, consider using "ring-0" throughout, as it's a compound modifier describing the kernel's privilege level.
-# [VoidFrame] - a ring 0 kernel 💫 +# [VoidFrame] - a ring-0 kernel 💫
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
.github/workflows/main.yaml
(2 hunks)CMakeLists.txt
(3 hunks)README.md
(2 hunks)meson.build
(2 hunks)meson_options.txt
(1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📚 Learning: 2025-09-19T11:55:43.328Z
Learnt from: assembler-0
PR: assembler-0/VoidFrame#132
File: arch/x86_64/syscall/Syscall.c:12-19
Timestamp: 2025-09-19T11:55:43.328Z
Learning: In the VoidFrame kernel project, assembler-0 is implementing basic POSIX-compliant syscalls in ring 0 without user/kernel memory protection, prioritizing getting basic functionality working before adding full security features.
Applied to files:
README.md
📚 Learning: 2025-08-12T01:43:39.847Z
Learnt from: assembler-0
PR: assembler-0/VoidFrame#72
File: arch/x86_64/syscall/SyscallEntry.asm:24-30
Timestamp: 2025-08-12T01:43:39.847Z
Learning: User prefers to defer syscall implementation complexity until next year and is considering making a ring 0 kernel instead of continuing with user-mode syscall approach in the VoidFrame kernel project.
Applied to files:
README.md
📚 Learning: 2025-08-31T07:06:37.003Z
Learnt from: assembler-0
PR: assembler-0/VoidFrame#101
File: kernel/etc/Shell.c:829-837
Timestamp: 2025-08-31T07:06:37.003Z
Learning: assembler-0 is working on optimizing ramfs performance in VoidFrame kernel and wants to implement proper filesystem characteristics like faster lookups, better memory management, and advanced features like copy-on-write and caching.
Applied to files:
README.md
📚 Learning: 2025-08-12T03:19:52.873Z
Learnt from: assembler-0
PR: assembler-0/VoidFrame#73
File: kernel/elf/ELFloader.c:0-0
Timestamp: 2025-08-12T03:19:52.873Z
Learning: User assembler-0 has successfully implemented UEFI boot support for VoidFrame kernel. The VBE framebuffer implementation is fully UEFI-compatible using Multiboot2 framebuffer tags and direct memory-mapped access, requiring no kernel code changes - only bootloader configuration updates.
Applied to files:
README.md
📚 Learning: 2025-08-12T03:19:52.873Z
Learnt from: assembler-0
PR: assembler-0/VoidFrame#73
File: kernel/elf/ELFloader.c:0-0
Timestamp: 2025-08-12T03:19:52.873Z
Learning: VoidFrame kernel now has complete UEFI boot support with hybrid BIOS/UEFI ISO creation capability. The existing VBE framebuffer implementation requires no changes as it uses Multiboot2 framebuffer tags and direct memory-mapped access, making it inherently UEFI-compatible. Build process: ninja + ./scripts/build_hybrid_iso.sh creates dual-platform bootable ISO.
Applied to files:
README.md
🪛 markdownlint-cli2 (0.18.1)
README.md
43-43: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (10)
meson.build (2)
41-45
: LGTM - Build options section added correctly.The new "Build Options" section is well-structured and follows the existing pattern. However, this depends on fixing the typo in meson_options.txt (line 37:
slient_build
→silent_build
).
68-70
: LGTM - Warning suppression implementation is correct.The conditional addition of the
-w
flag whensilent_build
is enabled is a straightforward and effective approach to suppress compiler warnings during silent builds..github/workflows/main.yaml (3)
36-45
: Verify the purpose of the CMake build step.The workflow builds with both Meson and CMake but only uses Meson artifacts for testing and upload. The CMake build directory is immediately deleted after building. This suggests CMake is being used purely for build validation.
If the intent is to verify that both build systems work, consider adding a comment explaining this. If CMake artifacts should also be tested or uploaded, the current implementation discards them.
Can you clarify the purpose of the dual-build approach? Should we:
- Keep it as-is (CMake build validation only)
- Also test/upload CMake artifacts
- Add a comment explaining the validation purpose
49-69
: LGTM - Artifact analysis correctly updated.All paths have been consistently updated to reference
meson-build/
instead of the oldbuild/
directory. The validation checks are comprehensive and appropriate.
71-78
: LGTM - Upload step correctly targets Meson artifacts.The artifact upload configuration properly references the Meson build outputs, consistent with the earlier changes in the workflow.
README.md (1)
46-69
: LGTM - Quickstart sections are comprehensive and well-structured.The addition of parallel build flags (
ninja -j$(nproc)
) and the complete setup sequences for both Meson and CMake are excellent improvements. The structure is clear and easy to follow.CMakeLists.txt (4)
44-46
: LGTM - Flag propagation is well-structured.The centralized C_FLAGS variable is properly propagated to CMAKE_C_FLAGS, CMAKE_CXX_FLAGS, and CMAKE_ASM_NASM_FLAGS. This approach improves maintainability and consistency across different compiler frontends.
268-271
: LGTM - Conditional object inclusion is correct.The conditional addition of extra object files using
target_sources()
is the proper CMake approach and correctly respects the EXCLUDE_EXTRA_OBJECTS option.
273-285
: LGTM - Linker configuration modernized correctly.The use of
LINK_DEPENDS
andtarget_link_options()
is the modern CMake approach for configuring linker behavior. This is more explicit and maintainable than the previous approach.
290-303
: LGTM - ISO creation modernized with CMake commands.Using
${CMAKE_COMMAND} -E
for directory creation and file copying improves portability and is the recommended CMake approach. The addition ofVERBATIM
ensures proper argument handling.
set(C_FLAGS " -m64 -O2 -fno-omit-frame-pointer -finline-functions -foptimize-sibling-calls -nostdinc -nostdlib -fno-builtin -ffreestanding -mno-red-zone -mserialize -fPIE -fPIC -mcmodel=kernel -fcf-protection=full -fvisibility=hidden") | ||
|
||
if(SILENT_BUILD) | ||
string(APPEND C_FLAGS " -w") | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical: SILENT_BUILD option is undefined.
The code references SILENT_BUILD
at line 32, but this option is never defined with option()
. This will cause the conditional to always evaluate as false. If silent build support is intended for CMake (mirroring the Meson implementation), you need to add the option definition.
Add the option definition in the Build Configuration section (after line 25):
option(STACK_PROTECTION "Enable stack protection" ON)
+option(SILENT_BUILD "Suppress compiler warnings" OFF)
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
set(C_FLAGS " -m64 -O2 -fno-omit-frame-pointer -finline-functions -foptimize-sibling-calls -nostdinc -nostdlib -fno-builtin -ffreestanding -mno-red-zone -mserialize -fPIE -fPIC -mcmodel=kernel -fcf-protection=full -fvisibility=hidden") | |
if(SILENT_BUILD) | |
string(APPEND C_FLAGS " -w") | |
endif() | |
# Build Configuration | |
option(STACK_PROTECTION "Enable stack protection" ON) | |
option(SILENT_BUILD "Suppress compiler warnings" OFF) |
🤖 Prompt for AI Agents
In CMakeLists.txt around lines 30-34, the SILENT_BUILD variable is referenced
but never defined; add an option() declaration (insert after line 25 in the
Build Configuration section) such as declaring option(SILENT_BUILD "Suppress
build output (silent build)" OFF) so CMake exposes the flag and the
if(SILENT_BUILD) conditional works as intended; ensure default is OFF and
provide a short help string.
## Prerequisites (development) | ||
- x64-compatible cpu (used: Intel i3-12100F) | ||
- POSIX-compliant OS (SysV ABI) (used: Arch Linux 6.16.9-arch1-1) | ||
- meson >= 1.4.0 (used: meson 1.9.1) | ||
- cmake >= 3.20 (used: cmake 4.1.1) | ||
- ninja >= 1.11 (used: ninja 1.21.1) | ||
- clang/++ >= 18.0.0 (used: 20.1.8) | ||
- nasm >= 2.16 (used: 2.16.03) | ||
- qemu >= 7.0.0 (used: 10.1.0) | ||
- mkfs.fat | ||
- mkfs.ext2 | ||
- grub-mkrescue | ||
- grub-mkrescue (used: 2:2.12.r359.g19c698d12-1) | ||
- Note: depending on your distro, grub-mkrescue may require xorriso and mtools packages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix indentation for better markdown rendering.
The note under grub-mkrescue has incorrect indentation (4 spaces instead of 2), which may cause rendering issues in some markdown parsers.
Apply this diff to fix the indentation:
- grub-mkrescue (used: 2:2.12.r359.g19c698d12-1)
- - Note: depending on your distro, grub-mkrescue may require xorriso and mtools packages.
+ - Note: depending on your distro, grub-mkrescue may require xorriso and mtools packages.
Based on static analysis hints.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
## Prerequisites (development) | |
- x64-compatible cpu (used: Intel i3-12100F) | |
- POSIX-compliant OS (SysV ABI) (used: Arch Linux 6.16.9-arch1-1) | |
- meson >= 1.4.0 (used: meson 1.9.1) | |
- cmake >= 3.20 (used: cmake 4.1.1) | |
- ninja >= 1.11 (used: ninja 1.21.1) | |
- clang/++ >= 18.0.0 (used: 20.1.8) | |
- nasm >= 2.16 (used: 2.16.03) | |
- qemu >= 7.0.0 (used: 10.1.0) | |
- mkfs.fat | |
- mkfs.ext2 | |
- grub-mkrescue | |
- grub-mkrescue (used: 2:2.12.r359.g19c698d12-1) | |
- Note: depending on your distro, grub-mkrescue may require xorriso and mtools packages. | |
## Prerequisites (development) | |
- x64-compatible cpu (used: Intel i3-12100F) | |
- POSIX-compliant OS (SysV ABI) (used: Arch Linux 6.16.9-arch1-1) | |
- meson >= 1.4.0 (used: meson 1.9.1) | |
- cmake >= 3.20 (used: cmake 4.1.1) | |
- ninja >= 1.11 (used: ninja 1.21.1) | |
- clang/++ >= 18.0.0 (used: 20.1.8) | |
- nasm >= 2.16 (used: 2.16.03) | |
- qemu >= 7.0.0 (used: 10.1.0) | |
- mkfs.fat | |
- mkfs.ext2 | |
- grub-mkrescue (used: 2:2.12.r359.g19c698d12-1) | |
- Note: depending on your distro, grub-mkrescue may require xorriso and mtools packages. |
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
43-43: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
🤖 Prompt for AI Agents
In README.md around lines 31 to 43, the "Note: depending on your distro..." line
is indented 4 spaces which breaks list nesting in some Markdown parsers; reduce
its indentation to 2 spaces so it is properly treated as a sub-bullet under the
"grub-mkrescue" list item (align the "Note:" line with two leading spaces and
keep the hyphen/indentation consistent with the surrounding list).
Summary by CodeRabbit
New Features
Documentation
Chores
Refactor