-
Notifications
You must be signed in to change notification settings - Fork 53
resources: add scripts to make and extract arm kernel #60
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
18
commits into
gem5:stable
Choose a base branch
from
Harshil2107:make-arm-kernel
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 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
970f97c
resources: add scripts to make and extract arm kernel
Harshil2107 c85807e
resources: update scripts to build the kernel
Harshil2107 22d3fe2
resources: update disk size to 50gb
Harshil2107 d8d4d3c
resources: Update building kernel and modules on host
Harshil2107 d9573fb
resources: clean up post install script
Harshil2107 c4ace1d
resources: add docker files to make kernel for ubuntu 22.04 image
Harshil2107 b497d6f
resources: Update docker files to make and kerenl and modules on build
Harshil2107 9678f1a
resources: Update and clean up documentation to refer to the new dock…
Harshil2107 6f6a870
resources: Update documentation
Harshil2107 67d061b
resources: add link to new documentation to BUILDING.md
Harshil2107 606cb28
resoruces: update dockerfile to remove chmod
Harshil2107 327a0b4
resources: revert size changes
Harshil2107 78e7a39
resources: Update size of images
Harshil2107 0f63a99
resources: clean up comments
Harshil2107 4624ee3
resources: update documentation
Harshil2107 0bd904d
resources: Update documentation
Harshil2107 b2a721b
resources: update dockerfiles to copy artifact to host during build
Harshil2107 a1a2b99
resources: Add bash script to make dockerfile
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
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
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 |
---|---|---|
|
@@ -18,12 +18,26 @@ apt-get install -y build-essential | |
echo "Installing serial service for autologin after systemd" | ||
mv /home/gem5/[email protected] /lib/systemd/system/ | ||
|
||
# Make sure the headers are installed to extract the kernel that DKMS | ||
# packages will be built against. | ||
sudo apt -y install "linux-headers-$(uname -r)" "linux-modules-extra-$(uname -r)" | ||
|
||
echo "Extracting linux kernel $(uname -r) to /home/gem5/vmlinux-x86-ubuntu" | ||
sudo bash -c "/usr/src/linux-headers-$(uname -r)/scripts/extract-vmlinux /boot/vmlinuz-$(uname -r) > /home/gem5/vmlinux-x86-ubuntu" | ||
apt-get update | ||
apt-get install -y fakeroot build-essential crash kexec-tools makedumpfile kernel-wedge | ||
# Fixing the sources.list file to include deb-src: https://askubuntu.com/questions/1512042/ubuntu-24-04-getting-error-you-must-put-some-deb-src-uris-in-your-sources-list | ||
sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources | ||
|
||
apt update | ||
|
||
apt-get -y build-dep linux | ||
apt-get -y install git-core libncurses5 libncurses5-dev libelf-dev asciidoc binutils-dev | ||
apt-get -y install libssl-dev | ||
apt -y install flex bison | ||
apt -y install zstd | ||
|
||
mkdir my-arm-kernel | ||
cd my-arm-kernel | ||
apt source linux-image-unsigned-$(uname -r) | ||
cd linux-6.8.0 | ||
cp /boot/config-$(uname -r) .config | ||
Harshil2107 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
make olddefconfig | ||
make -j$(nproc) | ||
|
||
echo "Installing the gem5 init script in /sbin" | ||
mv /home/gem5/gem5_init.sh /sbin | ||
|
@@ -47,21 +61,29 @@ if [ -z "$ISA" ]; then | |
fi | ||
|
||
# Just get the files we need | ||
git clone https://github.com/gem5/gem5.git --depth=1 --filter=blob:none --no-checkout --sparse --single-branch --branch=stable | ||
git clone https://github.com/nkrim/gem5.git --depth=1 --filter=blob:none --no-checkout --sparse --single-branch --branch=gem5-bridge | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assume this is just a placeholder, but don't forget to fix this. |
||
pushd gem5 | ||
# Checkout just the files we need | ||
git sparse-checkout add util/m5 | ||
git sparse-checkout add util/gem5_bridge | ||
git sparse-checkout add include | ||
git checkout | ||
# Install the headers globally so that other benchmarks can use them | ||
cp -r include/gem5 /usr/local/include/\ | ||
cp -r include/gem5 /usr/local/include/ | ||
|
||
# Build the library and binary | ||
pushd util/m5 | ||
scons build/${ISA}/out/m5 | ||
cp build/${ISA}/out/m5 /usr/local/bin/ | ||
cp build/${ISA}/out/libm5.a /usr/local/lib/ | ||
popd # util/m5 | ||
|
||
# Build and insert the gem5-bridge driver | ||
pushd util/gem5_bridge | ||
make build install | ||
depmod --quick | ||
popd | ||
|
||
popd # gem5 | ||
|
||
# rename the m5 binary to gem5-bridge | ||
|
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.