-
Notifications
You must be signed in to change notification settings - Fork 53
Update disk image source to addhypercall
and gem5bridge-driver
#69
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: stable
Are you sure you want to change the base?
Changes from all commits
8459cdf
e6c5228
fa35116
c6e44ec
ef1b6ef
0f24310
c4bd6eb
bfb74f1
17e8740
c2b0f3b
ec7c7b6
6edc682
695c7dd
05d7bce
f26c38b
819ed59
2e2224c
f480e52
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
[Service] | ||
ExecStart= | ||
ExecStart=-/sbin/agetty --autologin gem5 --keep-baud 115200,38400,9600 %I $TERM | ||
Harshil2107 marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
FROM ubuntu:22.04 AS stage1 | ||
|
||
# Install necessary packages for kernel build | ||
RUN apt update && apt install -y \ | ||
build-essential \ | ||
libncurses-dev \ | ||
bison \ | ||
flex \ | ||
libssl-dev \ | ||
libelf-dev \ | ||
bc \ | ||
wget \ | ||
git \ | ||
kmod \ | ||
apt-src \ | ||
vim \ | ||
curl \ | ||
file | ||
|
||
RUN sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list | ||
RUN apt update | ||
RUN mkdir /workspace | ||
RUN cd /workspace && apt source linux-image-unsigned-5.15.0-25-generic | ||
|
||
RUN cd /workspace/linux-5.15.0 && \ | ||
cd scripts && \ | ||
chmod +x pahole-version.sh && \ | ||
cd .. && \ | ||
make defconfig && \ | ||
make -j $(nproc) && \ | ||
make INSTALL_MOD_PATH=/workspace/output modules_install | ||
|
||
RUN git clone https://github.com/gem5/gem5.git --depth=1 --filter=blob:none --no-checkout --sparse --single-branch --branch=release-staging-v24-1-1-0 && \ | ||
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. Once |
||
cd gem5 && \ | ||
git sparse-checkout add util/m5 && \ | ||
git sparse-checkout add util/gem5_bridge && \ | ||
git sparse-checkout add include && \ | ||
git checkout | ||
|
||
RUN cd gem5/util/gem5_bridge && \ | ||
make KMAKEDIR=/workspace/linux-5.15.0 INSTALL_MOD_PATH=/workspace/output build install | ||
|
||
RUN cd /workspace/output/lib/modules/5.15.168 && \ | ||
rm -rf build source | ||
|
||
FROM scratch AS export-stage | ||
COPY --from=stage1 /workspace/output/lib/modules . | ||
COPY --from=stage1 workspace/linux-5.15.0/vmlinux . |
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,14 @@ | ||||||||||||||||
#!/bin/bash | ||||||||||||||||
|
||||||||||||||||
# Copyright (c) 2025 The Regents of the University of California. | ||||||||||||||||
# SPDX-License-Identifier: BSD 3-Clause | ||||||||||||||||
|
||||||||||||||||
DOCKERFILE="Dockerfile" | ||||||||||||||||
OUTPUT="my-arm-5.15.168-kernel" | ||||||||||||||||
|
||||||||||||||||
# Build the Docker image | ||||||||||||||||
DOCKER_BUILDKIT=1 docker build --no-cache \ | ||||||||||||||||
--file "$DOCKERFILE" \ | ||||||||||||||||
--output "$OUTPUT" . | ||||||||||||||||
|
||||||||||||||||
echo "Build completed for $1: Output directory is $OUTPUT" | ||||||||||||||||
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. Right now, this message is printed even if the build fails. It would be nice if a different message could be printed for a failure, but it's not high priority. 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.
Suggested change
This message could be modified to print different messages based on build failure/success. I haven't tested this code snippet, so please test it if you want to incorporate it into the script |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Start from Ubuntu 24.04 base image | ||
FROM ubuntu:24.04 AS stage1 | ||
|
||
# Install necessary packages for kernel and module build | ||
RUN apt update && apt install -y \ | ||
build-essential \ | ||
libncurses-dev \ | ||
bison \ | ||
flex \ | ||
libssl-dev \ | ||
libelf-dev \ | ||
bc \ | ||
wget \ | ||
git \ | ||
kmod | ||
|
||
|
||
RUN sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources | ||
RUN apt update | ||
RUN mkdir /workspace | ||
RUN cd /workspace && apt source linux-image-unsigned-6.8.0-47-generic | ||
|
||
RUN cd /workspace/linux-6.8.0 && \ | ||
make defconfig && \ | ||
make -j $(nproc) && \ | ||
make INSTALL_MOD_PATH=/workspace/output modules_install | ||
|
||
RUN git clone https://github.com/gem5/gem5.git --depth=1 --filter=blob:none --no-checkout --sparse --single-branch --branch=release-staging-v24-1-1-0 && \ | ||
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. Once |
||
cd gem5 && \ | ||
git sparse-checkout add util/m5 && \ | ||
git sparse-checkout add util/gem5_bridge && \ | ||
git sparse-checkout add include && \ | ||
git checkout | ||
|
||
RUN cd gem5/util/gem5_bridge && \ | ||
make KMAKEDIR=/workspace/linux-6.8.0 INSTALL_MOD_PATH=/workspace/output build install | ||
|
||
RUN cd /workspace/output/lib/modules/6.8.12 && \ | ||
rm -rf build | ||
|
||
FROM scratch AS export-stage | ||
COPY --from=stage1 /workspace/output/lib/modules . | ||
COPY --from=stage1 /workspace/linux-6.8.0/vmlinux . |
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,14 @@ | ||||||||||||||||
#!/bin/bash | ||||||||||||||||
|
||||||||||||||||
# Copyright (c) 2025 The Regents of the University of California. | ||||||||||||||||
# SPDX-License-Identifier: BSD 3-Clause | ||||||||||||||||
|
||||||||||||||||
DOCKERFILE="./Dockerfile" | ||||||||||||||||
OUTPUT="my-arm-6.8.12-kernel" | ||||||||||||||||
|
||||||||||||||||
# Build the Docker image | ||||||||||||||||
DOCKER_BUILDKIT=1 docker build --no-cache \ | ||||||||||||||||
--file "$DOCKERFILE" \ | ||||||||||||||||
--output "$OUTPUT" . | ||||||||||||||||
|
||||||||||||||||
echo "Build completed for $1: Output directory is $OUTPUT" | ||||||||||||||||
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. Right now, this message is printed even if the build fails. It would be nice if a different message could be printed for a failure, but it's not high priority. 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.
Suggested change
This message could be modified to print different messages based on build failure/success. I haven't tested this code snippet, so please test it if you want to incorporate it into the script |
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.
Is this rename meant to be in the final version?