summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrei Gherzan <andrei@gherzan.ro>2014-01-20 22:39:13 +0200
committerAndrei Gherzan <andrei@gherzan.ro>2014-02-09 03:05:14 +0200
commit833e61aa5c0e6d8069f05be4a3315f79bf2d69fd (patch)
tree7898df36c9be3ef53b9d5727796ac746964fdf5f
parent34047964fe7d60d0f026d4b3ce91459e32d469f4 (diff)
downloadmeta-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/License25
-rw-r--r--recipes-bsp/rpi-mkimage/rpi-mkimage/open-files-relative-to-script.patch17
-rw-r--r--recipes-bsp/rpi-mkimage/rpi-mkimage_git.bb22
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 @@
1Copyright (c) 2012, Broadcom Europe Ltd
2All rights reserved.
3
4Redistribution and use in source and binary forms, with or without
5modification, 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
15THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
19DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22ON 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
24SOFTWARE, 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 @@
1When using open, use path relative to imagetool-uncompressed.py
2
3Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
4
5Index: 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 @@
1SUMMARY = "RaspberryPi tool to produce kernel.img"
2LICENSE = "Broadcom"
3LIC_FILES_CHKSUM = "file://${WORKDIR}/License;md5=957f6640d5e2d2acfce73a36a56cb32f"
4SECTION = "bootloader"
5
6DEPENDS = "python"
7
8SRCREV = "330c72c2412f75a32932c4d9b51c9c678bce4180"
9SRC_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
15S = "${WORKDIR}/git"
16
17do_install () {
18 install -d ${D}${libexecdir}
19 cp ./mkimage/* ${D}${libexecdir}
20}
21
22BBCLASSEXTEND = "native"