-
Notifications
You must be signed in to change notification settings - Fork 135
Patch Doom and Quake to Buildroot #698
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
base: master
Are you sure you want to change the base?
Conversation
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.
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 |
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.
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>
| --referer="https://www.doomworld.com/" \ | ||
| --show-progress \ | ||
| --continue \ | ||
| http://www.doomworld.com/3ddownloads/ports/shareware_doom_iwad.zip |
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.
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>
| http://www.doomworld.com/3ddownloads/ports/shareware_doom_iwad.zip | |
| https://www.doomworld.com/3ddownloads/ports/shareware_doom_iwad.zip |
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/
e0eae09 to
b4df540
Compare
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
Migration
Written for commit b4df540. Summary will update on new commits.