diff options
| author | Andrei Gherzan <andrei@gherzan.ro> | 2014-01-20 22:39:13 +0200 |
|---|---|---|
| committer | Andrei Gherzan <andrei@gherzan.ro> | 2014-02-09 03:05:14 +0200 |
| commit | 833e61aa5c0e6d8069f05be4a3315f79bf2d69fd (patch) | |
| tree | 7898df36c9be3ef53b9d5727796ac746964fdf5f | |
| parent | 34047964fe7d60d0f026d4b3ce91459e32d469f4 (diff) | |
| download | meta-raspberrypi-833e61aa5c0e6d8069f05be4a3315f79bf2d69fd.tar.gz | |
rpi-mkimage: Integrate package
Tool needed to convert bootable images in kernel.img files which can be loaded
by rpi bootloader.
Change-Id: I0088707be5d31d77def1087f51e3f8cc886d19db
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
| -rw-r--r-- | recipes-bsp/rpi-mkimage/rpi-mkimage/License | 25 | ||||
| -rw-r--r-- | recipes-bsp/rpi-mkimage/rpi-mkimage/open-files-relative-to-script.patch | 17 | ||||
| -rw-r--r-- | recipes-bsp/rpi-mkimage/rpi-mkimage_git.bb | 22 |
3 files changed, 64 insertions, 0 deletions
diff --git a/recipes-bsp/rpi-mkimage/rpi-mkimage/License b/recipes-bsp/rpi-mkimage/rpi-mkimage/License new file mode 100644 index 0000000..2582681 --- /dev/null +++ b/recipes-bsp/rpi-mkimage/rpi-mkimage/License | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | Copyright (c) 2012, Broadcom Europe Ltd | ||
| 2 | All rights reserved. | ||
| 3 | |||
| 4 | Redistribution and use in source and binary forms, with or without | ||
| 5 | modification, are permitted provided that the following conditions are met: | ||
| 6 | * Redistributions of source code must retain the above copyright | ||
| 7 | notice, this list of conditions and the following disclaimer. | ||
| 8 | * Redistributions in binary form must reproduce the above copyright | ||
| 9 | notice, this list of conditions and the following disclaimer in the | ||
| 10 | documentation and/or other materials provided with the distribution. | ||
| 11 | * Neither the name of the copyright holder nor the | ||
| 12 | names of its contributors may be used to endorse or promote products | ||
| 13 | derived from this software without specific prior written permission. | ||
| 14 | |||
| 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
| 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
| 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
| 18 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY | ||
| 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
| 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
| 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
| 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 25 | |||
diff --git a/recipes-bsp/rpi-mkimage/rpi-mkimage/open-files-relative-to-script.patch b/recipes-bsp/rpi-mkimage/rpi-mkimage/open-files-relative-to-script.patch new file mode 100644 index 0000000..fa9e88b --- /dev/null +++ b/recipes-bsp/rpi-mkimage/rpi-mkimage/open-files-relative-to-script.patch | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | When using open, use path relative to imagetool-uncompressed.py | ||
| 2 | |||
| 3 | Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> | ||
| 4 | |||
| 5 | Index: git/mkimage/imagetool-uncompressed.py | ||
| 6 | =================================================================== | ||
| 7 | --- a/mkimage/imagetool-uncompressed.py | ||
| 8 | +++ b/mkimage/imagetool-uncompressed.py | ||
| 9 | @@ -18,7 +18,7 @@ re_line = re.compile(r"0x(?P<value>[0-9a | ||
| 10 | mem = [0 for i in range(32768)] | ||
| 11 | |||
| 12 | def load_to_mem(name, addr): | ||
| 13 | - f = open(name) | ||
| 14 | + f = open(os.path.dirname(__file__) + '/' + name) | ||
| 15 | |||
| 16 | for l in f.readlines(): | ||
| 17 | m = re_line.match(l) | ||
diff --git a/recipes-bsp/rpi-mkimage/rpi-mkimage_git.bb b/recipes-bsp/rpi-mkimage/rpi-mkimage_git.bb new file mode 100644 index 0000000..24da7a0 --- /dev/null +++ b/recipes-bsp/rpi-mkimage/rpi-mkimage_git.bb | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | SUMMARY = "RaspberryPi tool to produce kernel.img" | ||
| 2 | LICENSE = "Broadcom" | ||
| 3 | LIC_FILES_CHKSUM = "file://${WORKDIR}/License;md5=957f6640d5e2d2acfce73a36a56cb32f" | ||
| 4 | SECTION = "bootloader" | ||
| 5 | |||
| 6 | DEPENDS = "python" | ||
| 7 | |||
| 8 | SRCREV = "330c72c2412f75a32932c4d9b51c9c678bce4180" | ||
| 9 | SRC_URI = " \ | ||
| 10 | git://github.com/raspberrypi/tools.git;branch=master;protocol=git \ | ||
| 11 | file://License \ | ||
| 12 | file://open-files-relative-to-script.patch \ | ||
| 13 | " | ||
| 14 | |||
| 15 | S = "${WORKDIR}/git" | ||
| 16 | |||
| 17 | do_install () { | ||
| 18 | install -d ${D}${libexecdir} | ||
| 19 | cp ./mkimage/* ${D}${libexecdir} | ||
| 20 | } | ||
| 21 | |||
| 22 | BBCLASSEXTEND = "native" | ||
