Skip to content

Conversation

@ChinYikMing
Copy link
Collaborator

@ChinYikMing ChinYikMing commented Jan 10, 2026

Summary by cubic

Add Doom and Quake to the Buildroot image so they compile, install, and run out of the box with bundled shareware assets.

  • New Features

    • Added doom_riscv and quake as submodules under tests/system/br_pkgs.
    • Enabled BR2_PACKAGE_DOOM and BR2_PACKAGE_QUAKE in Buildroot config.
    • Extended build-linux-image.sh to auto-create Buildroot packages, cross-compile, and install /usr/bin/doom and /usr/bin/quake. Copies DOOM1.WAD and Quake id1/ assets into /root.
    • Patched Doom Makefile to remove nano.specs and static linking, and renamed output to doom.
    • Generated Quake build via CMake with the rv32emu toolchain.
  • Migration

    • Run: git submodule update --init --recursive before building.
    • Ensure network access; the build script downloads DOOM1.WAD and Quake shareware assets automatically.

Written for commit b4df540. Summary will update on new commits.

@ChinYikMing ChinYikMing marked this pull request as draft January 10, 2026 07:34
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 5 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="tools/build-linux-image.sh">

<violation number="1" location="tools/build-linux-image.sh:76">
P1: When `artifact` is empty (as it is for RTC packages called without the 5th argument), this line becomes `cp -a $(@D)/ $(TARGET_DIR)/root`, which copies the entire build directory to `/root`. This should be conditional on artifact being non-empty.</violation>

<violation number="2" location="tools/build-linux-image.sh:139">
P2: Using HTTP instead of HTTPS for downloading files is a security risk. Consider using `https://` if the server supports it, or verify the file integrity with a checksum after download.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

define ${pkg_name^^}_INSTALL_TARGET_CMDS
\$(INSTALL) -D -m 0755 \$(@D)/${pkg_name} \$(TARGET_DIR)/usr/bin
\$(INSTALL) -D -m 0755 \$(@D)/${output_bin_prefix}/${pkg_name} \$(TARGET_DIR)/usr/bin
cp -a \$(@D)/${artifact} \$(TARGET_DIR)/root
Copy link

@cubic-dev-ai cubic-dev-ai bot Jan 10, 2026

Choose a reason for hiding this comment

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

P1: When artifact is empty (as it is for RTC packages called without the 5th argument), this line becomes cp -a $(@D)/ $(TARGET_DIR)/root, which copies the entire build directory to /root. This should be conditional on artifact being non-empty.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At tools/build-linux-image.sh, line 76:

<comment>When `artifact` is empty (as it is for RTC packages called without the 5th argument), this line becomes `cp -a $(@D)/ $(TARGET_DIR)/root`, which copies the entire build directory to `/root`. This should be conditional on artifact being non-empty.</comment>

<file context>
@@ -56,11 +68,12 @@ ${pkg_name^^}_SITE = package/${pkg_name}/src
 define ${pkg_name^^}_INSTALL_TARGET_CMDS
-	\$(INSTALL) -D -m 0755 \$(@D)/${pkg_name} \$(TARGET_DIR)/usr/bin
+	\$(INSTALL) -D -m 0755 \$(@D)/${output_bin_prefix}/${pkg_name} \$(TARGET_DIR)/usr/bin
+	cp -a \$(@D)/${artifact} \$(TARGET_DIR)/root
 endef
 
</file context>
Fix with Cubic

--referer="https://www.doomworld.com/" \
--show-progress \
--continue \
http://www.doomworld.com/3ddownloads/ports/shareware_doom_iwad.zip
Copy link

@cubic-dev-ai cubic-dev-ai bot Jan 10, 2026

Choose a reason for hiding this comment

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

P2: Using HTTP instead of HTTPS for downloading files is a security risk. Consider using https:// if the server supports it, or verify the file integrity with a checksum after download.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At tools/build-linux-image.sh, line 139:

<comment>Using HTTP instead of HTTPS for downloading files is a security risk. Consider using `https://` if the server supports it, or verify the file integrity with a checksum after download.</comment>

<file context>
@@ -96,14 +109,73 @@ function update_br_pkg_config()
+            --referer="https://www.doomworld.com/" \
+            --show-progress \
+            --continue \
+            http://www.doomworld.com/3ddownloads/ports/shareware_doom_iwad.zip
+        unzip -d ${SRC_DIR}/buildroot/package/${pkg_name}/src shareware_doom_iwad.zip
+    fi
</file context>
Suggested change
http://www.doomworld.com/3ddownloads/ports/shareware_doom_iwad.zip
https://www.doomworld.com/3ddownloads/ports/shareware_doom_iwad.zip
Fix with Cubic

@jserv jserv added this to the release-2026.1 milestone Jan 11, 2026
When building guestOS's rootfs.cpio from scratch, the buildroot will be
patched with Doom[1] and Quake[2] by do_patch_doom and do_patch_quake
functions.

[1] https://github.com/sysprog21/doom_riscv
[2] https://github.com/sysprog21/quake-embedded/
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