Skip to content
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

resources: add scripts to make and extract arm kernel #60

Draft
wants to merge 3 commits into
base: stable
Choose a base branch
from

Conversation

Harshil2107
Copy link
Contributor

No description provided.

@Harshil2107
Copy link
Contributor Author

I am adding gem5-bridge driver based on #48

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt you need these packages

Comment on lines +36 to +38
apt source linux-image-unsigned-$(uname -r)
cd linux-6.8.0
cp /boot/config-$(uname -r) .config
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you are not applying the ubuntu patches to the kernel. You should add something like patch < linux_6.8.0-47.47. You'll have to figure out the right directory and the exact command. You may also have to unzip the diff.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to apply the patch but it looks like it is aldready applied. I also looked at the make file of the diff and the source and it looks like the changes from the diff are already in the source.

@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The 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.

@erin-le erin-le self-requested a review November 13, 2024 18:00
Copy link
Contributor

@erin-le erin-le left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this by building the disk image, then using the disk image and kernel as resources in a script that Harshil provided. It boots, so this LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants