summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/x-load
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2011-01-08 09:38:59 +0100
committerKoen Kooi <koen@dominion.thruhere.net>2011-01-08 09:38:59 +0100
commit5718e78856aed90c8db5f49f699712d6ed4a4db8 (patch)
tree7aa8d94809f170fb9a0959f66f835a4fc79b53a5 /recipes-bsp/x-load
parent99c94141d7f460aaf4ed4fffac8920e5955716d8 (diff)
downloadmeta-ti-5718e78856aed90c8db5f49f699712d6ed4a4db8.tar.gz
xload: remove signgp dep and add license checksum
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'recipes-bsp/x-load')
-rw-r--r--recipes-bsp/x-load/signgp.bb19
-rw-r--r--recipes-bsp/x-load/signgp/signGP.c108
-rw-r--r--recipes-bsp/x-load/x-load.inc8
3 files changed, 3 insertions, 132 deletions
diff --git a/recipes-bsp/x-load/signgp.bb b/recipes-bsp/x-load/signgp.bb
deleted file mode 100644
index 8535c53a..00000000
--- a/recipes-bsp/x-load/signgp.bb
+++ /dev/null
@@ -1,19 +0,0 @@
1LICENSE = "NewBSD"
2DESCRIPTION = "Tool to sign omap3 x-loader images"
3
4PR = "r4"
5
6SRC_URI = "file://signGP.c"
7
8do_compile() {
9 ${CC} ${CFLAGS} ${LDFLAGS} ${WORKDIR}/signGP.c -o signGP
10}
11
12do_install() {
13 install -d ${D}${bindir}
14 install -m 0755 signGP ${D}${bindir}
15}
16
17NATIVE_INSTALL_WORKS = "1"
18
19BBCLASSEXTEND = "native nativesdk"
diff --git a/recipes-bsp/x-load/signgp/signGP.c b/recipes-bsp/x-load/signgp/signGP.c
deleted file mode 100644
index 93250640..00000000
--- a/recipes-bsp/x-load/signgp/signGP.c
+++ /dev/null
@@ -1,108 +0,0 @@
1/*
2 * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
3 *
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the
15 * distribution.
16 *
17 * Neither the name of Texas Instruments Incorporated nor the names of
18 * its contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 *
33*/
34
35
36//
37// signGP.c
38// Read the x-load.bin file and write out the x-load.bin.ift file.
39// The signed image is the original pre-pended with the size of the image
40// and the load address. If not entered on command line, file name is
41// assumed to be x-load.bin in current directory and load address is
42// 0x40200800.
43
44#include <stdio.h>
45#include <stdlib.h>
46#include <fcntl.h>
47#include <sys/stat.h>
48#include <string.h>
49#include <malloc.h>
50
51
52main(int argc, char *argv[])
53{
54 int i;
55 char ifname[FILENAME_MAX], ofname[FILENAME_MAX], ch;
56 FILE *ifile, *ofile;
57 unsigned long loadaddr, len;
58 struct stat sinfo;
59
60
61 // Default to x-load.bin and 0x40200800.
62 strcpy(ifname, "x-load.bin");
63 loadaddr = 0x40200800;
64
65 if ((argc == 2) || (argc == 3))
66 strcpy(ifname, argv[1]);
67
68 if (argc == 3)
69 loadaddr = strtol(argv[2], NULL, 16);
70
71 // Form the output file name.
72 strcpy(ofname, ifname);
73 strcat(ofname, ".ift");
74
75 // Open the input file.
76 ifile = fopen(ifname, "rb");
77 if (ifile == NULL) {
78 printf("Cannot open %s\n", ifname);
79 exit(0);
80 }
81
82 // Get file length.
83 stat(ifname, &sinfo);
84 len = sinfo.st_size;
85
86 // Open the output file and write it.
87 ofile = fopen(ofname, "wb");
88 if (ofile == NULL) {
89 printf("Cannot open %s\n", ofname);
90 fclose(ifile);
91 exit(0);
92 }
93
94 // Pad 1 sector of zeroes.
95 //ch = 0x00;
96 //for (i=0; i<0x200; i++)
97 // fwrite(&ch, 1, 1, ofile);
98
99 fwrite(&len, 1, 4, ofile);
100 fwrite(&loadaddr, 1, 4, ofile);
101 for (i=0; i<len; i++) {
102 fread(&ch, 1, 1, ifile);
103 fwrite(&ch, 1, 1, ofile);
104 }
105
106 fclose(ifile);
107 fclose(ofile);
108}
diff --git a/recipes-bsp/x-load/x-load.inc b/recipes-bsp/x-load/x-load.inc
index 8743243e..b2b02770 100644
--- a/recipes-bsp/x-load/x-load.inc
+++ b/recipes-bsp/x-load/x-load.inc
@@ -3,9 +3,9 @@ SECTION = "bootloaders"
3PRIORITY = "optional" 3PRIORITY = "optional"
4LICENSE = "GPLv2+" 4LICENSE = "GPLv2+"
5 5
6DEPENDS = "signgp-native" 6LIC_FILES_CHKSUM = "file://common/cmd_load.c;beginline=4;endline=22;md5=14420d7cc8dfb427d17ad407ddf8dc89"
7 7
8PARALLEL_MAKE="" 8PARALLEL_MAKE = ""
9 9
10EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}" 10EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
11 11
@@ -26,12 +26,10 @@ do_compile () {
26 unset CPPFLAGS 26 unset CPPFLAGS
27 oe_runmake distclean 27 oe_runmake distclean
28 oe_runmake ${XLOAD_MACHINE} 28 oe_runmake ${XLOAD_MACHINE}
29 oe_runmake 29 oe_runmake ift
30} 30}
31 31
32do_install () { 32do_install () {
33 signGP ${S}/x-load.bin ${XLOAD_LOAD_ADDRESS}
34
35 install -d ${D}/boot 33 install -d ${D}/boot
36 install ${S}/x-load.bin.ift ${D}/boot/${MLO_IMAGE} 34 install ${S}/x-load.bin.ift ${D}/boot/${MLO_IMAGE}
37 ln -sf ${MLO_IMAGE} ${D}/boot/${MLO_SYMLINK_NOMACHINE} 35 ln -sf ${MLO_IMAGE} ${D}/boot/${MLO_SYMLINK_NOMACHINE}