Commit Graph

12 Commits

Author SHA1 Message Date
André Draszik 1e69586439 kernel-uimage: optimise UBOOT_ENTRYSYMBOL support
This is the remaining local change to a fix similar to
commit e0b4f018d1c2 ("kernel-uimage.bbclass: Fix up
generation of uImage from vmlinux"):

Make awk exit on match to save a few CPU cycles so as
to make this similar to kernel-fitimage.bbclass

(From OE-Core rev: d60b3d02949ba318e30627131fd38f74c74cf590)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(cherry picked from commit 614e8be7a89a2f2113fa40b11e7a05b9e8155f6a)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:47 +00:00
Nathan Rossi 8deaf6612a kernel-uimage.bbclass: Fix up generation of uImage from vmlinux
Fix up the generation of uImage from vmlinux when KEEPUIMAGE != 'yes'.
This fixes up the working directory that do_uboot_mkimage is run from,
such that it is run from the ${B} directory to access built artefacts.

Simplify the logic in the task so that the parse step either adds the
task or not if the conditions are met. This reduces the need for the
task to run in cases when it is not used. The task is also changed to
depend on the kernel_link_images task as arch/<arch>/boot/* is not
available until after kernel_link_images in certain cases (e.g.
vmlinux/uImage only KERNEL_IMAGETYPES).

Fix up the use of ${S}/vmlinux when pulling the entry symbols
address so that it accesses the vmlinux in ${B}.

(From OE-Core rev: 60f0e4b18c7d77d7be2b22573b7d0c7ad3d0832f)

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(cherry picked from commit e0b4f018d1c2a65e66c81e5be1da8894e9a6c132)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:47 +00:00
Mylène Josserand 04f3423a2a meta: classes: Add building dir to uImage creation
On the do_uboot_mkimage task from kernel-uimage.bbclass, in case
KEEPUIMAGE is different than the default "yes" value, the uboot-mkimage
command fails because the path of the created uImage does not exist.

On this task, we are under the BUILDDIR so there is no folder arch/<ARCH>/boot.
Add the ${B} (for kernel build directory) as prefix to this folder fixes the problem.

(From OE-Core rev: e5a6ee0d0655827d06a6030380277ee61a6db0ef)

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-13 10:54:10 +01:00
Robert P. J. Day f5187871ce classes: Replace "if test" file tests with POSIX file tests
In entire meta/classes/ directory, replace shell tests of the form
"if test -? ..." with POSIX tests of the form "if [ -? ...

(From OE-Core rev: 78928016f4cf38cf6751cb089200bf950d07ae93)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-27 11:08:34 +01:00
Joshua Lock c4e2c59088 meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Search made with the following regex: getVar ?\(( ?[^,()]*), True\)

(From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16 10:23:23 +00:00
Kai Kang 4858c6b728 kernel-uimage.bbclass: indeed update var KERNEL_IMAGETYPE_FOR_MAKE
The replace() method of the python string class doesn't replace
in-place, then the var KERNEL_IMAGETYPE_FOR_MAKE doesn't be updated as
design.

(From OE-Core rev: 392fc3cd276d5029314c7158245bc65dd82279cd)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-26 08:56:30 +01:00
He Zhe 0437a59e3c kernel: Add KERNEL_IMAGETYPES to build multi types kernel at one time
Add KERNEL_IMAGETYPES to support building packaging and installing
multi types of kernel images, such as zImage uImage, at one time.

KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE work as before.

(From OE-Core rev: 849b67b2e4820564b5e5c9bd4bb293c44351c5f3)

Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-30 15:58:11 +01:00
Richard Purdie 01d07f328f kernel-uimage: Fix python indentation
Use spaces, not tabs for python functions.

(From OE-Core rev: 96ed92aded49fc47c7e407d36ba4f03dafee28cd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-21 22:26:33 +01:00
Ruslan Bilovol 4e0d9d1b8f kernel-uimage: change target image to vmlinux
Commit e69525: "kernel: Build uImage only when really
needed" hardcoded target kernel image to zImage for
case if uImage is generated by OpenEmbedded buildsystem.

However not all kernel architectures support zImage
target, for example AArch64 doesn't, so building of
kernel is failing on this step.

So instead of building zImage target that may not
exist for many architectures, build vmlinux target
that exists for all architectures.

Since kernel-uboot.bbclass uses vmlinux anyway for
creating image, there is no side effect on this change.

(From OE-Core rev: ac5d4d42a5903cbcafd7247c282df1cb98f79f08)

Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-29 07:58:43 +01:00
Marek Vasut 1604ca299b kernel: Build uImage only when really needed
Build the uImage file using the kernel build system only when
it is really required, which is only in case KEEPUIMAGE == yes.
Otherwise, just build zImage, since the Yocto build system will
handle the uImage generation for us.

(From OE-Core rev: e6952593d810636f26af541b12126848483e619a)

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Koen Kooi <koen@dominion.thruhere.net>
Cc: Paul Eggleton <paul.eggleton@linux.intel.com>
Cc: Ross Burton <ross.burton@intel.com>
Cc: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-26 10:57:52 +01:00
Marek Vasut bb68c7c9f0 kernel: Separate out uboot_prep_kimage
Separate the function which prepares the kernel for packing into
uImage into separate class, so this function can be reused by the
fitImage class.

(From OE-Core rev: 2d1f700ad098c942834524891ccc90e3a391a09f)

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Koen Kooi <koen@dominion.thruhere.net>
Cc: Paul Eggleton <paul.eggleton@linux.intel.com>
Cc: Ross Burton <ross.burton@intel.com>
Cc: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-26 10:57:51 +01:00
Marek Vasut 7f131b8863 kernel: Pull uImage generation into separate class
Pull the uImage image format generation from kernel.bbclass into
a separate kernel-uimage.bbclass. Introduce new KERNEL_CLASSES
variable, which allows registration of additional classes which
implement new kernel image types. The default value of is to
register kernel-uimage to preserve the original behavior.

(From OE-Core rev: 086536ac84fcc9350802c09166f600becd52a1f8)

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Koen Kooi <koen@dominion.thruhere.net>
Cc: Paul Eggleton <paul.eggleton@linux.intel.com>
Cc: Ross Burton <ross.burton@intel.com>
Cc: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-26 10:57:51 +01:00