-
Notifications
You must be signed in to change notification settings - Fork 1
Draft: Add script for final config generation from debian and GL #206
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: main
Are you sure you want to change the base?
Conversation
Example output from custom script Example output from torvalds repo |
|
|
||
| ### Volume Mount | ||
| ``` | ||
| -v package-linux:/workspace: Mounts the local package-linux directory to /workspace in the container |
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.
at least on mac with podman I need to provide the full path for package-linux
using $PWD/package-linux works when I'm in the parent dir of package-linux
|
Very nice! Just thinking out loud: Could we package the script in a container based on the debian-snapshot container to make it easier to use? It would be nice if usage was as simple as |
Yes agree, I was thinking to add that in the script itself (podman start inside the script). We will discuss and confirm this |
Not a super important requirement, but just thinking about making this nicer and easier to use: Could we write it in a way that we don't need to run this from a local checkout of the package-linux repo? We could either clone the repo as part of the script, or bake it into the image directly. I think it would be nice if I could 'just' run the container with one volume mounted for the output files and with no other pre-conditions. We can keep a 'developer' option to run it from inside the repo with more flexibility if that makes sense. |
|
|
||
| #### For AMD64 Architecture | ||
| ``` | ||
| podman run -v package-linux:/workspace ghcr.io/gardenlinux/repo-debian-snapshot:1764836249-amd64 /workspace/get_config.sh |
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 it required to use the architecture specific tag? just using latest should work too, right? it should select the right architecture based on the host machine.
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.
Yes, if we build for the same architecture then yes we do not need arch here. If we will have to build for arm64 in x86 machine then we need this specifically. Anyways I will wrap the container call to make it simple once we finalize the way we proceed. Then I will have arch as an argument and podman will start automatically
|
|
||
| cd /tmp | ||
|
|
||
| git clone https://salsa.debian.org/kernel-team/linux.git |
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.
this repo is large and a full clone is not needed here. this can be way faster if we take only the latest commit of our desired tag/branch using
git clone --depth=1 --branch=debian/6.12.43-1 https://salsa.debian.org/kernel-team/linux.gitThere 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.
compare the sizes of the cloned directories. Also it is now just a matter of seconds instead of taking almost two minutes.
$ du -sch linux
1.3G linux
1.3G total
$ du -sch linux-small
12M linux-small
12M total
|
I think we can get around all this makefiles by directly using the example usage: We might have to maintain the list of arguments for different architectures/flavours, but we could get rid of quite some complexity in the script, I think. @SujanaSubr can you confirm that this works? the nice thing is that this script even works on my mac, no dependency on debian at all. |
"debian/build/config.amd64_none_cloud-amd64" from "rules.gen" use kconfig.py , This way we do not have to consolidate the config file ourselves (which makes it less error prone) But I tried this already as discussed earlier, and the output config has difference (not only the build dependency) when compared to config from debian built image. I hope @5kt can confirm what I miss here. If we could do this then we do not need src files from linux kernel repo and the script will be minimal. |

What this PR does / why we need it:
Includes scripts
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Release note: