Commit Graph

11 Commits

Author SHA1 Message Date
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
George McCollister 749d7771ce kernel-fitimage: Add x86 support
For x86, bzImage must be built instead of zImage.

Include setup.bin (which is required to boot the kernel) in the fitimage
and always use a load/boot address of 0x00090000.

For details see:
http://git.denx.de/?p=u-boot.git;a=blob;f=doc/uImage.FIT/x86-fit-boot.txt

(From OE-Core rev: 1a65d11d4b8f056fdf22c31a92d1e58dec6d89f6)

Signed-off-by: George McCollister <george.mccollister@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-10 10:46:33 +01:00
George McCollister ec755d2524 kernel-fitimage: add initramfs support
If INITRAMFS_IMAGE is set, build an additional fitImage containing the
initramfs. Copy the additional fitImage and the source (*.its) file, used
to create it to DEPLOYDIR. The fitImage containing the initramfs must be
built before do_deploy and after do_install to avoid circular dependencies.

UBOOT_RD_LOADADDRESS - Specifies the load address used by u-boot for the
                       initramfs.
UBOOT_RD_ENTRYPOINT  - Specifies the entry point used by u-boot for the
                       initramfs.

(From OE-Core rev: b406a89935f148779569fa3770776e009dd51f13)

Signed-off-by: George McCollister <george.mccollister@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-10 10:46:33 +01:00
Andrew Bradford 3153bd381c kernel-fitimage.bbclass: do_assemble_fitimage(): cd to $B
Prior to assembling the fitimage, ensure that $B is the cwd due to
bitbake commit 67a7b8b021badc17d8fdf447c250e79d291e75f7 "build: don't
use $B as the default cwd for functions".

Without this change, do_assemble_fitimage() fails like:

Log data follows:
| DEBUG: Executing shell function do_assemble_fitimage
| arm-ka-linux-gnueabi-objcopy: 'vmlinux': No such file
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_assemble_fitimage

(From OE-Core rev: 42d50e8f5f3a98e50a0f50473ebc83dc6347b634)

Signed-off-by: Andrew Bradford <andrew.bradford@kodakalaris.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-10 10:46:33 +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
Marek Vasut d3a2da45b6 kernel: fitimage: Repair misuse of shell test command
The kernel fitImage must be amended with signature if and only if
UBOOT_SIGN_ENABLE = 1 . In the current case, the UBOOT_SIGN_ENABLE
could be either 0 (default) or 1 , which test -n always correctly
interprets as non-empty string, thus always true. This does not
match the logic above though, so replace the test with check which
passes only for UBOOT_SIGN_ENABLE = 1 .

(From OE-Core rev: 158cbd737f9f6c2de756506caf919a0a3d0a05b9)

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Yannick Gicquel <yannick.gicquel@iot.bzh>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-20 10:20:54 +01:00
Yannick Gicquel f088e693b2 kernel: fitimage: basic support for fitimage signature
This is an initial support of fitImage signature to enable U-Boot verified
boot. This feature is implemented by adding a signature tag to the
configuration section of the generated fit-image.its file.

When a UBOOT_SIGN_ENABLE variable is set to "1", the signature procedure is
activated and performs a second call to mkimage to sign the fitImage file and
to include the public key in the deployed U-Boot device tree blob. (This
implementation depends on the use of CONFIG_OF_SEPARATE in U-Boot.)

As the U-Boot device tree blob is appended in the deploy dir, a dependency
on 'u-boot:do_deploy' is added when the feature is activated.

(From OE-Core rev: 38d675f568ed67505896f20dd9738ce80feece08)

Signed-off-by: Yannick Gicquel <yannick.gicquel@iot.bzh>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06 10:31:14 +01:00
Yannick Gicquel cb565d5b40 kernel: fitimage: support device tree compiler options
This introduces a new variable to set the device tree compiler options while
calling mkimage ('-D' option). By default, this variable is not set but it can
be defined in a configuration file, as following example:

UBOOT_MKIMAGE_DTCOPTS = "-I dts -O dtb -p 2000"

(From OE-Core rev: 9a3f541da305c75418c2eec75ade902717a01b69)

Signed-off-by: Yannick Gicquel <yannick.gicquel@iot.bzh>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06 10:31:13 +01:00
Marek Vasut 9d2d1ae5a9 kernel: fitimage: Fix do_deploy taskhash mismatch
The kernel_do_deploy_append() uses DATETIME variable , so the taskhash
of the kernel_do_deploy() function changes if fitImage is used. The
buildsystem will complain accordingly:

ERROR: linux-yocto-4.4.3+gitAUTOINC+bcc6509084_1a72cec834-r0 do_deploy: Taskhash mismatch 49a5899a6895dcebd311dcb59870f370 verses 37c8dd3aae44134492a876f21c1b641b for /Yocto/poky/meta/recipes-kernel/linux/linux-yocto_4.4.bb.do_deploy
ERROR: Taskhash mismatch 49a5899a6895dcebd311dcb59870f370 verses 37c8dd3aae44134492a876f21c1b641b for /Yocto/poky/meta/recipes-kernel/linux/linux-yocto_4.4.bb.do_deploy

Fix this by excluding the DATETIME variable from the checksum.

(From OE-Core rev: 42ed25f693a4898f517c9ffc7920e5d994ac692d)

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-18 16:28:21 +01:00
Richard Purdie 3341f3fbee classes: Fix do_rootfs references
After the separation of do_rootfs, some rootfs references need changing
to image_complete.

(From OE-Core rev: 59a5f596ca29b1eb8283706e3c60fbb39f9c2c23)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-11 23:26:29 +00:00
Marek Vasut a33a567644 kernel: Add basic fitImage support
This patch adds support for generating a kernel fitImage, which is
a a successor to the uImage format. Unlike uImage, which could only
contain the kernel image itself, the fitImage can contain all kinds
of artifacts, like the kernel image, device tree blobs, initramfs
images, binary firmwares etc. Furthermore, the fitImage supports
different kinds of checksums, not only CRC32 like the uImage did.
Last, but not least, fitImage supports signatures such that either
the whole image or it's parts can be signed and then in turn can
be verified by the bootloader.

So far we only add support for wrapping the kernel image and DTB
into the fitImage. The fitImage uses the sha1 checksum, which is
the default.

(From OE-Core rev: d92664278cfd0fdb455f78f73f2c44a9ee1716e4)

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