summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/x-load
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-bsp/x-load
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadpoky-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-bsp/x-load')
-rw-r--r--meta/recipes-bsp/x-load/files/signGP.c73
-rw-r--r--meta/recipes-bsp/x-load/signgp-native.bb14
-rw-r--r--meta/recipes-bsp/x-load/x-load-git/beagleboard/armv7-a.patch11
-rw-r--r--meta/recipes-bsp/x-load/x-load-git/beagleboard/name.patch14
-rw-r--r--meta/recipes-bsp/x-load/x-load-git/omap3evm/armv7-a.patch11
-rw-r--r--meta/recipes-bsp/x-load/x-load-git/overo/armv7-a.patch11
-rw-r--r--meta/recipes-bsp/x-load/x-load.inc42
-rw-r--r--meta/recipes-bsp/x-load/x-load_git.bb29
8 files changed, 205 insertions, 0 deletions
diff --git a/meta/recipes-bsp/x-load/files/signGP.c b/meta/recipes-bsp/x-load/files/signGP.c
new file mode 100644
index 0000000000..0e8ed07f52
--- /dev/null
+++ b/meta/recipes-bsp/x-load/files/signGP.c
@@ -0,0 +1,73 @@
1//
2// signGP.c
3// Read the x-load.bin file and write out the x-load.bin.ift file.
4// The signed image is the original pre-pended with the size of the image
5// and the load address. If not entered on command line, file name is
6// assumed to be x-load.bin in current directory and load address is
7// 0x40200800.
8
9#include <stdio.h>
10#include <stdlib.h>
11#include <fcntl.h>
12#include <sys/stat.h>
13#include <string.h>
14#include <malloc.h>
15
16
17main(int argc, char *argv[])
18{
19 int i;
20 char ifname[FILENAME_MAX], ofname[FILENAME_MAX], ch;
21 FILE *ifile, *ofile;
22 unsigned long loadaddr, len;
23 struct stat sinfo;
24
25
26 // Default to x-load.bin and 0x40200800.
27 strcpy(ifname, "x-load.bin");
28 loadaddr = 0x40200800;
29
30 if ((argc == 2) || (argc == 3))
31 strcpy(ifname, argv[1]);
32
33 if (argc == 3)
34 loadaddr = strtol(argv[2], NULL, 16);
35
36 // Form the output file name.
37 strcpy(ofname, ifname);
38 strcat(ofname, ".ift");
39
40 // Open the input file.
41 ifile = fopen(ifname, "rb");
42 if (ifile == NULL) {
43 printf("Cannot open %s\n", ifname);
44 exit(0);
45 }
46
47 // Get file length.
48 stat(ifname, &sinfo);
49 len = sinfo.st_size;
50
51 // Open the output file and write it.
52 ofile = fopen(ofname, "wb");
53 if (ofile == NULL) {
54 printf("Cannot open %s\n", ofname);
55 fclose(ifile);
56 exit(0);
57 }
58
59 // Pad 1 sector of zeroes.
60 //ch = 0x00;
61 //for (i=0; i<0x200; i++)
62 // fwrite(&ch, 1, 1, ofile);
63
64 fwrite(&len, 1, 4, ofile);
65 fwrite(&loadaddr, 1, 4, ofile);
66 for (i=0; i<len; i++) {
67 fread(&ch, 1, 1, ifile);
68 fwrite(&ch, 1, 1, ofile);
69 }
70
71 fclose(ifile);
72 fclose(ofile);
73}
diff --git a/meta/recipes-bsp/x-load/signgp-native.bb b/meta/recipes-bsp/x-load/signgp-native.bb
new file mode 100644
index 0000000000..7eabb07bce
--- /dev/null
+++ b/meta/recipes-bsp/x-load/signgp-native.bb
@@ -0,0 +1,14 @@
1LICENSE = "unknown"
2DESCRIPTION = "Tool to sign omap3 x-loader images"
3
4inherit native
5SRC_URI = "file://signGP.c"
6
7do_compile() {
8 ${CC} ${WORKDIR}/signGP.c -o signGP
9}
10
11do_install() {
12 install -d ${D}${bindir}/
13 install -m 0755 signGP ${D}${bindir}/
14}
diff --git a/meta/recipes-bsp/x-load/x-load-git/beagleboard/armv7-a.patch b/meta/recipes-bsp/x-load/x-load-git/beagleboard/armv7-a.patch
new file mode 100644
index 0000000000..3131cda6bb
--- /dev/null
+++ b/meta/recipes-bsp/x-load/x-load-git/beagleboard/armv7-a.patch
@@ -0,0 +1,11 @@
1--- git/cpu/omap3/config.mk-orig 2008-05-27 16:46:45.000000000 -0700
2+++ git/cpu/omap3/config.mk 2008-05-29 12:50:49.000000000 -0700
3@@ -23,7 +23,7 @@
4 PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \
5 -msoft-float
6
7-PLATFORM_CPPFLAGS += -march=armv7a
8+PLATFORM_CPPFLAGS += -march=armv7-a
9 # =========================================================================
10 #
11 # Supply options according to compiler version
diff --git a/meta/recipes-bsp/x-load/x-load-git/beagleboard/name.patch b/meta/recipes-bsp/x-load/x-load-git/beagleboard/name.patch
new file mode 100644
index 0000000000..98dcbae497
--- /dev/null
+++ b/meta/recipes-bsp/x-load/x-load-git/beagleboard/name.patch
@@ -0,0 +1,14 @@
1--- git/Makefile-orig 2008-07-29 22:31:03.000000000 -0700
2+++ git/Makefile 2008-07-29 22:34:36.000000000 -0700
3@@ -152,9 +152,9 @@ omap3evm_config : unconfig
4 overo_config : unconfig
5 @./mkconfig $(@:_config=) arm omap3 overo
6
7-omap3530beagle_config : unconfig
8+beagleboard_config : unconfig
9
10- @./mkconfig $(@:_config=) arm omap3 omap3530beagle
11+ @./mkconfig omap3530beagle arm omap3 omap3530beagle
12
13 #########################################################################
14
diff --git a/meta/recipes-bsp/x-load/x-load-git/omap3evm/armv7-a.patch b/meta/recipes-bsp/x-load/x-load-git/omap3evm/armv7-a.patch
new file mode 100644
index 0000000000..3131cda6bb
--- /dev/null
+++ b/meta/recipes-bsp/x-load/x-load-git/omap3evm/armv7-a.patch
@@ -0,0 +1,11 @@
1--- git/cpu/omap3/config.mk-orig 2008-05-27 16:46:45.000000000 -0700
2+++ git/cpu/omap3/config.mk 2008-05-29 12:50:49.000000000 -0700
3@@ -23,7 +23,7 @@
4 PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \
5 -msoft-float
6
7-PLATFORM_CPPFLAGS += -march=armv7a
8+PLATFORM_CPPFLAGS += -march=armv7-a
9 # =========================================================================
10 #
11 # Supply options according to compiler version
diff --git a/meta/recipes-bsp/x-load/x-load-git/overo/armv7-a.patch b/meta/recipes-bsp/x-load/x-load-git/overo/armv7-a.patch
new file mode 100644
index 0000000000..3131cda6bb
--- /dev/null
+++ b/meta/recipes-bsp/x-load/x-load-git/overo/armv7-a.patch
@@ -0,0 +1,11 @@
1--- git/cpu/omap3/config.mk-orig 2008-05-27 16:46:45.000000000 -0700
2+++ git/cpu/omap3/config.mk 2008-05-29 12:50:49.000000000 -0700
3@@ -23,7 +23,7 @@
4 PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \
5 -msoft-float
6
7-PLATFORM_CPPFLAGS += -march=armv7a
8+PLATFORM_CPPFLAGS += -march=armv7-a
9 # =========================================================================
10 #
11 # Supply options according to compiler version
diff --git a/meta/recipes-bsp/x-load/x-load.inc b/meta/recipes-bsp/x-load/x-load.inc
new file mode 100644
index 0000000000..7073b13fe7
--- /dev/null
+++ b/meta/recipes-bsp/x-load/x-load.inc
@@ -0,0 +1,42 @@
1DESCRIPTION = "x-load bootloader loader"
2SECTION = "bootloaders"
3PRIORITY = "optional"
4LICENSE = "GPL"
5
6inherit deploy
7
8DEPENDS = "signgp-native"
9
10PARALLEL_MAKE=""
11
12EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
13
14XLOAD_MACHINE ?= "${MACHINE}_config"
15
16XLOAD_IMAGE ?= "x-load-${MACHINE}-${PV}-${PR}.bin.ift"
17XLOAD_SYMLINK ?= "x-load-${MACHINE}.bin.ift"
18MLO_IMAGE ?= "MLO-${MACHINE}-${PV}-${PR}"
19MLO_SYMLINK ?= "MLO-${MACHINE}"
20
21do_compile () {
22 unset LDFLAGS
23 unset CFLAGS
24 unset CPPFLAGS
25 oe_runmake distclean
26 oe_runmake ${XLOAD_MACHINE}
27 oe_runmake
28}
29
30do_deploy () {
31 signGP ${S}/x-load.bin
32 install ${S}/x-load.bin.ift ${DEPLOYDIR}/${XLOAD_IMAGE}
33 install ${S}/x-load.bin.ift ${DEPLOYDIR}/${MLO_IMAGE}
34
35 cd ${DEPLOYDIR}
36 rm -f ${XLOAD_SYMLINK}
37 ln -sf ${XLOAD_IMAGE} ${XLOAD_SYMLINK}
38 rm -f ${MLO_SYMLINK}
39 ln -sf ${MLO_IMAGE} ${MLO_SYMLINK}
40}
41addtask deploy before do_build after do_compile
42
diff --git a/meta/recipes-bsp/x-load/x-load_git.bb b/meta/recipes-bsp/x-load/x-load_git.bb
new file mode 100644
index 0000000000..1c1ce128ae
--- /dev/null
+++ b/meta/recipes-bsp/x-load/x-load_git.bb
@@ -0,0 +1,29 @@
1require x-load.inc
2
3FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/x-load-git/${MACHINE}"
4
5SRCREV = "65ed00323f3807197a83abc75d62ed2a8d3f60de"
6
7PV = "1.42+${PR}+git${SRCREV}"
8PR="r12"
9
10SRC_URI = "git://www.sakoman.net/git/x-load-omap3.git;branch=master;protocol=git"
11
12SRC_URI_append_beagleboard = " \
13 file://name.patch;patch=1 \
14 file://armv7-a.patch;patch=1 \
15 "
16
17SRC_URI_append_omap3evm = " \
18 file://armv7-a.patch;patch=1 \
19 "
20
21SRC_URI_append_overo = " \
22 file://armv7-a.patch;patch=1 \
23 "
24
25S = "${WORKDIR}/git"
26
27PACKAGE_ARCH = "${MACHINE_ARCH}"
28
29COMPATIBLE_MACHINE = "(beagleboard|omap3evm|overo)"