8000 launcher: Print kernel cmdline on builds by alexmwu · Pull Request #268 · google/go-tpm-tools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
  • Notifications You must be signed in to change notification settings
  • Fork 74
  • < 8000 a href="/login?return_to=%2Fgoogle%2Fgo-tpm-tools" rel="nofollow" data-hydro-click="{"event_type":"authentication.click","payload":{"location_in_page":"star button","repository_id":161976966,"auth_type":"LOG_IN","originating_url":"https://github.com/google/go-tpm-tools/pull/268/files","user_id":null}}" data-hydro-click-hmac="95a0df8ad6456315d46bf6c7ecf9461753077f6c60cb5e6f2022a9daa70010a1" aria-label="You must be signed in to star a repository" data-view-component="true" class="tooltipped tooltipped-sw btn-sm btn"> Star 255

launcher: Print kernel cmdline on builds #268

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

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion launcher/image/fixup_oem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@ main() {
sed -i -e 's|,oemroot|;oemroot|g' /mnt/disks/efi/efi/boot/grub.cfg
fi

cat /mnt/disks/efi/efi/boot/grub.cfg
# Print grub.cfg's kernel command line.
grep -i '^\s*linux' /mnt/disks/efi/efi/boot/grub.cfg | \
sed -e 's|.*|[BEGIN_CS_GRUB_CMDLINE]&[END_CS_GRUB_CMDLINE]|g'

# Convert grub.cfg's kernel command line into what GRUB passes to the kernel.
grep -i '^\s*linux' /mnt/disks/efi/efi/boot/grub.cfg | \
sed -e "s|'ds=nocloud;s=/usr/share/oem/'|ds=nocloud;s=/usr/share/oem/|g" | \
sed -e 's|\\"|"|g' | \
sed -e 's|dm-mod.create="|"dm-mod.create=|g' | \
sed -e 's|.*|[BEGIN_CS_CMDLINE]&[END_CS_CMDLINE]|g'

umount /mnt/disks/efi
}
Expand Down
4 changes: 2 additions & 2 deletions launcher/image/preload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ main() {

if [[ "${IMAGE_ENV}" == "debug" ]]; then
configure_systemd_units_for_debug
append_cmdline "'confidential-space.hardened=false'"
append_cmdline "confidential-space.hardened=false"
elif [[ "${IMAGE_ENV}" == "hardened" ]]; then
configure_systemd_units_for_hardened
append_cmdline "'confidential-space.hardened=true'"
append_cmdline "confidential-space.hardened=true"
else
echo "Unknown image env: ${IMAGE_ENV}." \
"Only 'debug' and 'hardened' are supported."
Expand Down
0