-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add generic image #20
base: main
Are you sure you want to change the base?
Conversation
This image can be used as reference "generic" image for any architectures supported by debian. Boot on PC (x86 or x86_64) is supported thanks to grub, extra tweaking might be needed to boot other architectures on virtual machines. For the record, this is inspired from recipes I wrote for emilia pinball. Change-Id: I709a456f196df337c3f368f03416defe6aadcb0b Forwarded: go-debos#20 Signed-off-by: Philippe Coval <[email protected]>
af2abc0
to
efbc822
Compare
Review welcome cc: @sjoerdsimons |
generic/debimage-generic.yaml
Outdated
{{if eq $architecture "i386" "amd64"}} | ||
grub-pc, | ||
{{end}} | ||
{{if eq $suite "buster" "stable"}} |
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.
Why are you checking the suite? On other suites the kernel name is different?
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
generic/debimage-generic.yaml
Outdated
linux-image-{{$architecture}} | ||
{{end}} | ||
{{else}} | ||
linux-image-generic |
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.
There is no such kernel.
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.
It's a virtual package introduced around 5.10.0 see
apt-cache show linux-image-amd64 | grep generic
Provides: linux-image-generic, linux-latest-modules-5.10.0-3-amd64, virtualbox-guest-modules, wireguard-modules (= 1.0.0)
Precisely with this change:
https://salsa.debian.org/kernel-team/linux/-/commit/59aeb16cb8bf39ed4e9693a9badb3ce6c38b43e3
generic/debimage-generic.yaml
Outdated
linux-image-686 | ||
{{else}} | ||
linux-image-{{$architecture}} | ||
{{end}} |
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.
I would move that to the top and make a kernel
variable like in https://github.com/go-debos/debos-recipes/blob/master/rpi64/debimage-rpi64.yaml#L52
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.
You could use
{{- $kernel := or .kernel (printf "linux-image-%s" $architecture) -}}
{{if eq $architecture "i386"}}
{{ $kernel = or .kernel "linux-image-686" }}
{{end}}
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.
ok
- action: apt | ||
packages: [ | ||
{{if eq $architecture "i386" "amd64"}} | ||
grub-pc, |
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.
Please add support for EFI machines
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.
maybe this one will be enough
#21 (review)
generic/debimage-generic.yaml
Outdated
- action: run | ||
chroot: true | ||
description: Set hostname | ||
command: echo "{{$architecture}}" > /etc/hostname |
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.
I think that it's a very bad idea to set hostname to arch.
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.
because this would break genericity ? I could use "debian" or just suite name
I opened a PR for a generic EFI image: #21 |
This image can be used as reference "generic" image for any architectures supported by debian. Boot on PC (x86 or x86_64) is supported thanks to grub, extra tweaking might be needed to boot other architectures on virtual machines. For the record, this is inspired from recipes I wrote for emilia pinball. Change-Id: I709a456f196df337c3f368f03416defe6aadcb0b Forwarded: go-debos#20 Signed-off-by: Philippe Coval <[email protected]>
efbc822
to
0409307
Compare
This image can be used as reference "generic" image
for any architectures supported by debian.
Boot on PC (x86 or x86_64) is supported thanks to grub,
extra tweaking might be needed to boot other architectures
on virtual machines.
For the record, this is inspired from recipes
I wrote for emilia pinball.
Change-Id: I709a456f196df337c3f368f03416defe6aadcb0b
Signed-off-by: Philippe Coval [email protected]