Commit Graph

9 Commits

Author SHA1 Message Date
Marcus Schäfer
ece8a511d9
Don't trust the vmlinux symlink to be present 2018-12-10 12:34:53 +01:00
Marcus Schäfer
164c8d24d4
Refactor kernel version lookup
Check the presence of the gzip compressed kernel binary
and use it. If not present use the arbitrary kernel image
format with the known limitations.
2018-12-10 11:15:02 +01:00
Marcus Schäfer
da7984881c
More clarity on kernel version lookup
Lookup of the kernel version is done by directly reading the
kernel image via a small tool named kversion. The scope of the
tool is limited and does not work for e.g kernel images which
contains its own decompressor code. For the special cases we
defined exceptions, one was zImage. The recently added exception
for vmlinuz seemed too intrusive to me and was also not well
documented. This patch tries to clarify and get us back to
explicit and easy to read coding. Fixes #899
2018-12-10 09:46:06 +01:00
Ruediger Oertel
978c37a7ce kernel.py: also try vmlinux-version.gz in case of image-version to
get the version number
2018-12-04 16:53:10 +01:00
Marcus Schäfer
cc152d0a57
Don't lookup zImage symlink
Due to the workaround to lookup the gzip compressed variant
of a zImage to find its version, it's required to find the
full name of the zImage in order to rematch the gzip variant.
Looking at the zImage link will make this to fail because
there is no vmlinux link
2018-01-25 14:02:31 +01:00
Marcus Schäfer
7a94685217
Fixed kernel version check for zImage
kernels build as zImage contains the decompressor code
as part of the kernel image and could be therefore
compressed by any possible compression algorithm.
In this case we assume/hope that there is also a
standard gz compressed vmlinux version of the kernel
available and check this one instead of the zImage
variant. Fixes #587
2018-01-25 11:59:36 +01:00
Marcus Schäfer
c3bad3f8f2
Fixup kernel name setup in disk builder
The Kernel instance is the only correct place to ask
for the kernel name. This class has the responsibility
to know information about the selected kernel. The
additional arch based assumption on the kernel name
in the disk builder were wrong. This fixes bnc#1011936
2016-11-24 10:39:10 +01:00
Marcus Schäfer
271a5f25af Fixup code smell for kernel name list
Iterating over only one list item doesn't need a loop
2016-11-21 09:12:31 +01:00
Marcus Schäfer
39d5db9881 Fixed kernel name lookup
Complete the list of kernel names for the lookup. Normally
the kernel package provides a symlink to the actual kernel
image file. However if the link does not exist we extend the
search to a collection of names for possible kernel images.
The new list now also covers kernel names as used for arm

Along with the change this patch also provides an option to
raise an exception if the kernel lookup did not find any
kernel, which is used for the get_kernel() request in the
dracut initrd system setup where it is mandatory to find
a kernel image.

This fixes bnc#1010874
2016-11-21 09:07:50 +01:00