-
Notifications
You must be signed in to change notification settings - Fork 56
resources: update gapbs to use new 24.04 images #46
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
Open
Harshil2107
wants to merge
11
commits into
gem5:stable
Choose a base branch
from
Harshil2107:add-gapbs-disk-img
base: stable
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
31a06cf
resources: update gapbs to use new 24.04 images
Harshil2107 06e16b9
resourecs: Add scripts to make arm and riscv diskimages with packer
Harshil2107 fb586ff
resources: Add real graphs to the disk
Harshil2107 a8142b6
resources: update post install to make 2nd graph work
Harshil2107 e98ff3e
Update src/gapbs/build-arm.sh
Harshil2107 b013e31
resources: update path for base image
Harshil2107 78525cb
resources: update qemu args for arm image
Harshil2107 3a77227
resources: address changes about documentation
Harshil2107 4429b9d
resources: Update build scripts to not redownload the disk image ever…
Harshil2107 36c74a7
Merge branch 'gem5:stable' into add-gapbs-disk-img
Harshil2107 b6e1604
resources: Update source to use hypercalls and readme
Harshil2107 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| disk-image-ubuntu-24-04/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| packer { | ||
| required_plugins { | ||
| qemu = { | ||
| source = "github.com/hashicorp/qemu" | ||
| version = "~> 1" | ||
| } | ||
| } | ||
| } | ||
|
|
||
| variable "image_name" { | ||
| type = string | ||
| default = "arm-ubuntu" | ||
| } | ||
|
|
||
| variable "ssh_password" { | ||
| type = string | ||
| default = "12345" | ||
| } | ||
|
|
||
| variable "ssh_username" { | ||
| type = string | ||
| default = "gem5" | ||
| } | ||
|
|
||
| source "qemu" "initialize" { | ||
| boot_command = ["<wait120>", | ||
| "gem5<enter><wait>", | ||
| "12345<enter><wait>", | ||
| "sudo mv /etc/netplan/50-cloud-init.yaml.bak /etc/netplan/50-cloud-init.yaml<enter><wait>", | ||
| "12345<enter><wait>", | ||
| "sudo netplan apply<enter><wait>", | ||
| "<wait>" | ||
| ] | ||
| cpus = "4" | ||
| disk_size = "6600" | ||
| format = "raw" | ||
| headless = "true" | ||
| disk_image = "true" | ||
| iso_checksum = "sha256:71698e2b3e424402b49f92f667a73eb372ed24cf0e1751099ee1c6c4f1944483" | ||
| iso_urls = ["./arm-ubuntu-24.04-20250515"] | ||
| memory = "8192" | ||
| output_directory = "arm-disk-image-24-04" | ||
| qemu_binary = "/usr/bin/qemu-system-aarch64" | ||
| qemuargs = [ ["-boot", "order=dc"], | ||
| ["-bios", "./files/flash0.img"], | ||
| ["-cpu", "host"], | ||
| ["-enable-kvm"], | ||
| ["-machine", "virt"], | ||
| ["-machine", "gic-version=3"], | ||
| ["-device","virtio-gpu-pci"], | ||
| ["-device", "qemu-xhci"], | ||
| ["-device","usb-kbd"], | ||
|
|
||
| ] | ||
| shutdown_command = "echo '${var.ssh_password}'|sudo -S shutdown -P now" | ||
| ssh_password = "${var.ssh_password}" | ||
| ssh_username = "${var.ssh_username}" | ||
| ssh_wait_timeout = "60m" | ||
| vm_name = "${var.image_name}" | ||
| ssh_handshake_attempts = "1000" | ||
| } | ||
|
|
||
| build { | ||
| sources = ["source.qemu.initialize"] | ||
|
|
||
| provisioner "file" { | ||
| destination = "/home/gem5/" | ||
| source = "gapbs-with-roi-annotations/gapbs" | ||
| } | ||
| provisioner "shell" { | ||
| execute_command = "echo '${var.ssh_password}' | {{ .Vars }} sudo -E -S bash '{{ .Path }}'" | ||
| scripts = ["scripts/post-installation.sh"] | ||
| expect_disconnect = true | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Copyright (c) 2024 The Regents of the University of California. | ||
| # SPDX-License-Identifier: BSD 3-Clause | ||
|
|
||
| PACKER_VERSION="1.10.0" | ||
|
|
||
| if [ ! -f ./packer ]; then | ||
| wget https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_arm64.zip; | ||
| unzip packer_${PACKER_VERSION}_linux_arm64.zip; | ||
| rm packer_${PACKER_VERSION}_linux_arm64.zip; | ||
| fi | ||
|
|
||
Harshil2107 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # make the flash0.sh file | ||
| mkdir files | ||
| cd ./files | ||
|
|
||
| dd if=/dev/zero of=flash0.img bs=1M count=64 | ||
| dd if=/usr/share/qemu-efi-aarch64/QEMU_EFI.fd of=flash0.img conv=notrunc | ||
| cd .. | ||
|
|
||
| if [ ! -f arm-ubuntu-24.04-20250515 ]; then | ||
| wget https://dist.gem5.org/dist/develop/images/arm/ubuntu-24-04/arm-ubuntu-24.04-20250515.gz | ||
| gunzip arm-ubuntu-24.04-20250515.gz | ||
| fi | ||
|
|
||
| ./packer init arm-ubuntu-24-04-gapbs.pkr.hcl | ||
| ./packer build arm-ubuntu-24-04-gapbs.pkr.hcl | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Copyright (c) 2024 The Regents of the University of California. | ||
| # SPDX-License-Identifier: BSD 3-Clause | ||
|
|
||
| PACKER_VERSION="1.10.0" | ||
|
|
||
| if [ ! -f ./packer ]; then | ||
| wget https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip; | ||
| unzip packer_${PACKER_VERSION}_linux_amd64.zip; | ||
| rm packer_${PACKER_VERSION}_linux_amd64.zip; | ||
| fi | ||
|
|
||
Harshil2107 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| if [ ! -f riscv-ubuntu-24.04-20250515.gz ]; then | ||
| wget https://dist.gem5.org/dist/develop/images/riscv/ubuntu-24-04/riscv-ubuntu-24.04-20250515.gz | ||
| gunzip riscv-ubuntu-24.04-20250515.gz; | ||
| fi | ||
|
|
||
| ./packer init riscv-ubuntu-24-04-gapbs.pkr.hcl | ||
| ./packer build riscv-ubuntu-24-04-gapbs.pkr.hcl | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Copyright (c) 2024 The Regents of the University of California. | ||
| # SPDX-License-Identifier: BSD 3-Clause | ||
|
|
||
| PACKER_VERSION="1.10.0" | ||
|
|
||
| if [ ! -f ./packer ]; then | ||
| wget https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip; | ||
| unzip packer_${PACKER_VERSION}_linux_amd64.zip; | ||
| rm packer_${PACKER_VERSION}_linux_amd64.zip; | ||
| fi | ||
|
|
||
| if [ ! -f ./x86-ubuntu-24.04-20250515 ]; then | ||
| wget https://dist.gem5.org/dist/develop/images/x86/ubuntu-24-04/x86-ubuntu-24.04-20250515.gz | ||
| gunzip x86-ubuntu-24.04-20250515.gz | ||
| fi | ||
|
|
||
|
|
||
| ./packer init x86-ubuntu-24-04-gapbs.pkr.hcl | ||
| ./packer build x86-ubuntu-24-04-gapbs.pkr.hcl |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.