summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/x-load
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2011-01-02 16:45:43 +0100
committerKoen Kooi <koen@dominion.thruhere.net>2011-01-02 16:45:43 +0100
commit7d39ce1743e1a58c51b35f42fb70f9e31a4c8908 (patch)
treed29507cf0c533b104617ce8333fec12289468f84 /recipes-bsp/x-load
downloadmeta-ti-7d39ce1743e1a58c51b35f42fb70f9e31a4c8908.tar.gz
BSP: rename beagleboard to TI
linux-omap 2.6.37rc: sync with OE
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-git/bb8547fcbc54ecc7a75f9ad45a31042a04d8a2ce.patch35
-rw-r--r--recipes-bsp/x-load/x-load-git/name.patch13
-rw-r--r--recipes-bsp/x-load/x-load-git/xm-mem.patch237
-rw-r--r--recipes-bsp/x-load/x-load.inc57
-rw-r--r--recipes-bsp/x-load/x-load_git.bb22
7 files changed, 491 insertions, 0 deletions
diff --git a/recipes-bsp/x-load/signgp.bb b/recipes-bsp/x-load/signgp.bb
new file mode 100644
index 00000000..8535c53a
--- /dev/null
+++ b/recipes-bsp/x-load/signgp.bb
@@ -0,0 +1,19 @@
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
new file mode 100644
index 00000000..93250640
--- /dev/null
+++ b/recipes-bsp/x-load/signgp/signGP.c
@@ -0,0 +1,108 @@
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-git/bb8547fcbc54ecc7a75f9ad45a31042a04d8a2ce.patch b/recipes-bsp/x-load/x-load-git/bb8547fcbc54ecc7a75f9ad45a31042a04d8a2ce.patch
new file mode 100644
index 00000000..d447fd0b
--- /dev/null
+++ b/recipes-bsp/x-load/x-load-git/bb8547fcbc54ecc7a75f9ad45a31042a04d8a2ce.patch
@@ -0,0 +1,35 @@
1From bb8547fcbc54ecc7a75f9ad45a31042a04d8a2ce Mon Sep 17 00:00:00 2001
2From: Laine Walker-Avina <lwalkera@ieee.org>
3Date: Tue, 13 Apr 2010 13:27:31 -0700
4Subject: [PATCH] FAT: Find the start of the first partition in a non-hardcoded way
5
6---
7 fs/fat/fat.c | 12 +++++-------
8 1 files changed, 5 insertions(+), 7 deletions(-)
9
10diff --git a/fs/fat/fat.c b/fs/fat/fat.c
11index eb754c0..c6bdb13 100644
12--- a/fs/fat/fat.c
13+++ b/fs/fat/fat.c
14@@ -145,13 +145,11 @@ fat_register_device(block_dev_desc_t *dev_desc, int part_no)
15 return -1;
16 }
17 #else
18- /* FIXME we need to determine the start block of the
19- * partition where the DOS FS resides. This can be done
20- * by using the get_partition_info routine. For this
21- * purpose the libpart must be included.
22- */
23- part_offset=63;
24- //part_offset=0;
25+ part_offset = buffer[DOS_PART_TBL_OFFSET+8] |
26+ buffer[DOS_PART_TBL_OFFSET+9] <<8 |
27+ buffer[DOS_PART_TBL_OFFSET+10]<<16 |
28+ buffer[DOS_PART_TBL_OFFSET+11]<<24;
29+
30 cur_part = 1;
31 #endif
32 }
33--
341.6.1
35
diff --git a/recipes-bsp/x-load/x-load-git/name.patch b/recipes-bsp/x-load/x-load-git/name.patch
new file mode 100644
index 00000000..1a7aa567
--- /dev/null
+++ b/recipes-bsp/x-load/x-load-git/name.patch
@@ -0,0 +1,13 @@
1--- git/Makefile-orig 2010-03-08 06:56:36.000000000 -0800
2+++ git/Makefile 2010-03-08 06:56:52.000000000 -0800
3@@ -153,8 +153,8 @@ omap3evm_config : unconfig
4 overo_config : unconfig
5 @./mkconfig $(@:_config=) arm omap3 overo
6
7-omap3530beagle_config : unconfig
8- @./mkconfig $(@:_config=) arm omap3 omap3530beagle
9+beagleboard_config : unconfig
10+ @./mkconfig omap3530beagle arm omap3 omap3530beagle
11
12 #########################################################################
13
diff --git a/recipes-bsp/x-load/x-load-git/xm-mem.patch b/recipes-bsp/x-load/x-load-git/xm-mem.patch
new file mode 100644
index 00000000..d038faf2
--- /dev/null
+++ b/recipes-bsp/x-load/x-load-git/xm-mem.patch
@@ -0,0 +1,237 @@
1From a25b926ff963a1866e26b11a4dac742564618375 Mon Sep 17 00:00:00 2001
2From: Steve Kipisz <s-kipisz2@ti.com>
3Date: Thu, 8 Jul 2010 10:30:58 -0500
4Subject: [PATCH] Support Micron or Numonyx memory
5
6* Updated Numonyx memory size.
7---
8 board/omap3530beagle/omap3530beagle.c | 56 +++++++++++++++++++++++++++-----
9 drivers/k9f1g08r0a.c | 43 +++++++++++++++++++------
10 include/asm/arch-omap3/mem.h | 43 ++++++++++++++++++++++++-
11 3 files changed, 121 insertions(+), 21 deletions(-)
12
13diff --git a/board/omap3530beagle/omap3530beagle.c b/board/omap3530beagle/omap3530beagle.c
14index eb8008e..1b3d8c7 100644
15--- a/board/omap3530beagle/omap3530beagle.c
16+++ b/board/omap3530beagle/omap3530beagle.c
17@@ -265,6 +265,32 @@ u32 wait_on_value(u32 read_bit_mask, u32 match_value, u32 read_addr, u32 bound)
18 }
19
20 #ifdef CFG_3430SDRAM_DDR
21+
22+#define MICRON_DDR 0
23+#define NUMONYX_MCP 1
24+int identify_xm_ddr()
25+{
26+ int mfr, id;
27+
28+ __raw_writel(M_NAND_GPMC_CONFIG1, GPMC_CONFIG1 + GPMC_CONFIG_CS0);
29+ __raw_writel(M_NAND_GPMC_CONFIG2, GPMC_CONFIG2 + GPMC_CONFIG_CS0);
30+ __raw_writel(M_NAND_GPMC_CONFIG3, GPMC_CONFIG3 + GPMC_CONFIG_CS0);
31+ __raw_writel(M_NAND_GPMC_CONFIG4, GPMC_CONFIG4 + GPMC_CONFIG_CS0);
32+ __raw_writel(M_NAND_GPMC_CONFIG5, GPMC_CONFIG5 + GPMC_CONFIG_CS0);
33+ __raw_writel(M_NAND_GPMC_CONFIG6, GPMC_CONFIG6 + GPMC_CONFIG_CS0);
34+
35+ /* Enable the GPMC Mapping */
36+ __raw_writel((((OMAP34XX_GPMC_CS0_SIZE & 0xF)<<8) |
37+ ((NAND_BASE_ADR>>24) & 0x3F) |
38+ (1<<6)), (GPMC_CONFIG7 + GPMC_CONFIG_CS0));
39+ delay(2000);
40+
41+ nand_readid(&mfr, &id);
42+ if (mfr == 0)
43+ return MICRON_DDR;
44+ if ((mfr == 0x20) && (id == 0xba))
45+ return NUMONYX_MCP;
46+}
47 /*********************************************************************
48 * config_3430sdram_ddr() - Init DDR on 3430SDP dev board.
49 *********************************************************************/
50@@ -279,15 +305,27 @@ void config_3430sdram_ddr(void)
51 __raw_writel(SDP_SDRC_SHARING, SDRC_SHARING);
52
53 if (beagle_revision() == REVISION_XM) {
54- __raw_writel(0x2, SDRC_CS_CFG); /* 256MB/bank */
55- __raw_writel(SDP_SDRC_MDCFG_0_DDR_XM, SDRC_MCFG_0);
56- __raw_writel(SDP_SDRC_MDCFG_0_DDR_XM, SDRC_MCFG_1);
57- __raw_writel(MICRON_V_ACTIMA_200, SDRC_ACTIM_CTRLA_0);
58- __raw_writel(MICRON_V_ACTIMB_200, SDRC_ACTIM_CTRLB_0);
59- __raw_writel(MICRON_V_ACTIMA_200, SDRC_ACTIM_CTRLA_1);
60- __raw_writel(MICRON_V_ACTIMB_200, SDRC_ACTIM_CTRLB_1);
61- __raw_writel(SDP_3430_SDRC_RFR_CTRL_200MHz, SDRC_RFR_CTRL_0);
62- __raw_writel(SDP_3430_SDRC_RFR_CTRL_200MHz, SDRC_RFR_CTRL_1);
63+ if (identify_xm_ddr() == MICRON_DDR) {
64+ __raw_writel(0x2, SDRC_CS_CFG); /* 256MB/bank */
65+ __raw_writel(SDP_SDRC_MDCFG_0_DDR_MICRON_XM, SDRC_MCFG_0);
66+ __raw_writel(SDP_SDRC_MDCFG_0_DDR_MICRON_XM, SDRC_MCFG_1);
67+ __raw_writel(MICRON_V_ACTIMA_200, SDRC_ACTIM_CTRLA_0);
68+ __raw_writel(MICRON_V_ACTIMB_200, SDRC_ACTIM_CTRLB_0);
69+ __raw_writel(MICRON_V_ACTIMA_200, SDRC_ACTIM_CTRLA_1);
70+ __raw_writel(MICRON_V_ACTIMB_200, SDRC_ACTIM_CTRLB_1);
71+ __raw_writel(SDP_3430_SDRC_RFR_CTRL_200MHz, SDRC_RFR_CTRL_0);
72+ __raw_writel(SDP_3430_SDRC_RFR_CTRL_200MHz, SDRC_RFR_CTRL_1);
73+ } else {
74+ __raw_writel(0x4, SDRC_CS_CFG); /* 512MB/bank */
75+ __raw_writel(SDP_SDRC_MDCFG_0_DDR_NUMONYX_XM, SDRC_MCFG_0);
76+ __raw_writel(SDP_SDRC_MDCFG_0_DDR_NUMONYX_XM, SDRC_MCFG_1);
77+ __raw_writel(NUMONYX_V_ACTIMA_165, SDRC_ACTIM_CTRLA_0);
78+ __raw_writel(NUMONYX_V_ACTIMB_165, SDRC_ACTIM_CTRLB_0);
79+ __raw_writel(NUMONYX_V_ACTIMA_165, SDRC_ACTIM_CTRLA_1);
80+ __raw_writel(NUMONYX_V_ACTIMB_165, SDRC_ACTIM_CTRLB_1);
81+ __raw_writel(SDP_3430_SDRC_RFR_CTRL_165MHz, SDRC_RFR_CTRL_0);
82+ __raw_writel(SDP_3430_SDRC_RFR_CTRL_165MHz, SDRC_RFR_CTRL_1);
83+ }
84 } else {
85 __raw_writel(0x1, SDRC_CS_CFG); /* 128MB/bank */
86 __raw_writel(SDP_SDRC_MDCFG_0_DDR, SDRC_MCFG_0);
87diff --git a/drivers/k9f1g08r0a.c b/drivers/k9f1g08r0a.c
88index 8968a1b..d2da804 100644
89--- a/drivers/k9f1g08r0a.c
90+++ b/drivers/k9f1g08r0a.c
91@@ -154,6 +154,29 @@ static int NanD_Address(unsigned int numbytes, unsigned long ofs)
92 return 0;
93 }
94
95+int nand_readid(int *mfr, int *id)
96+{
97+ NAND_ENABLE_CE();
98+
99+ if (NanD_Command(NAND_CMD_RESET)) {
100+ NAND_DISABLE_CE();
101+ return 1;
102+ }
103+
104+ if (NanD_Command(NAND_CMD_READID)) {
105+ NAND_DISABLE_CE();
106+ return 1;
107+ }
108+
109+ NanD_Address(ADDR_COLUMN, 0);
110+
111+ *mfr = READ_NAND(NAND_ADDR);
112+ *id = READ_NAND(NAND_ADDR);
113+
114+ NAND_DISABLE_CE();
115+ return 0;
116+}
117+
118 /* read chip mfr and id
119 * return 0 if they match board config
120 * return 1 if not
121@@ -162,23 +185,23 @@ int nand_chip()
122 {
123 int mfr, id;
124
125- NAND_ENABLE_CE();
126+ NAND_ENABLE_CE();
127
128- if (NanD_Command(NAND_CMD_RESET)) {
129- printf("Err: RESET\n");
130- NAND_DISABLE_CE();
131+ if (NanD_Command(NAND_CMD_RESET)) {
132+ printf("Err: RESET\n");
133+ NAND_DISABLE_CE();
134 return 1;
135 }
136
137- if (NanD_Command(NAND_CMD_READID)) {
138- printf("Err: READID\n");
139- NAND_DISABLE_CE();
140+ if (NanD_Command(NAND_CMD_READID)) {
141+ printf("Err: READID\n");
142+ NAND_DISABLE_CE();
143 return 1;
144- }
145+ }
146
147- NanD_Address(ADDR_COLUMN, 0);
148+ NanD_Address(ADDR_COLUMN, 0);
149
150- mfr = READ_NAND(NAND_ADDR);
151+ mfr = READ_NAND(NAND_ADDR);
152 id = READ_NAND(NAND_ADDR);
153
154 NAND_DISABLE_CE();
155diff --git a/include/asm/arch-omap3/mem.h b/include/asm/arch-omap3/mem.h
156index cba4c6f..63cdba1 100644
157--- a/include/asm/arch-omap3/mem.h
158+++ b/include/asm/arch-omap3/mem.h
159@@ -46,6 +46,7 @@ typedef enum {
160 #define MMC_NAND 4
161 #define MMC_ONENAND 5
162 #define GPMC_NONE 6
163+#define GPMC_ONENAND_TRY 7
164
165 #endif
166
167@@ -71,7 +72,8 @@ typedef enum {
168 #define SDP_SDRC_MDCFG_0_DDR (0x02582019|B_ALL) /* Infin ddr module */
169 #else
170 #define SDP_SDRC_MDCFG_0_DDR (0x02584019|B_ALL)
171-#define SDP_SDRC_MDCFG_0_DDR_XM (0x03588019|B_ALL)
172+#define SDP_SDRC_MDCFG_0_DDR_MICRON_XM (0x03588019|B_ALL)
173+#define SDP_SDRC_MDCFG_0_DDR_NUMONYX_XM (0x04590019|B_ALL)
174 #endif
175
176 #define SDP_SDRC_MR_0_DDR 0x00000032
177@@ -252,12 +254,47 @@ typedef enum {
178 (MICRON_TDPL_200 << 6) | (MICRON_TDAL_200))
179
180 #define MICRON_TWTR_200 2
181-#define MICRON_TCKE_200 1
182+#define MICRON_TCKE_200 4
183 #define MICRON_TXP_200 2
184 #define MICRON_XSR_200 23
185 #define MICRON_V_ACTIMB_200 ((MICRON_TCKE_200 << 12) | (MICRON_XSR_200 << 0)) | \
186 (MICRON_TXP_200 << 8) | (MICRON_TWTR_200 << 16)
187
188+/* NUMONYX part of IGEP0020 (165MHz optimized) 6.06ns
189+ * ACTIMA
190+ * TDAL = Twr/Tck + Trp/tck = 15/6 + 18/6 = 2.5 + 3 = 5.5 -> 6
191+ * TDPL (Twr) = 15/6 = 2.5 -> 3
192+ * TRRD = 12/6 = 2
193+ * TRCD = 22.5/6 = 3.75 -> 4
194+ * TRP = 18/6 = 3
195+ * TRAS = 42/6 = 7
196+ * TRC = 60/6 = 10
197+ * TRFC = 140/6 = 23.3 -> 24
198+ * ACTIMB
199+ * TWTR = 2
200+ * TCKE = 2
201+ * TXSR = 200/6 = 33.3 -> 34
202+ * TXP = 1.0 + 1.1 = 2.1 -> 3 ¿?
203+ */
204+#define NUMONYX_TDAL_165 6
205+#define NUMONYX_TDPL_165 3
206+#define NUMONYX_TRRD_165 2
207+#define NUMONYX_TRCD_165 4
208+#define NUMONYX_TRP_165 3
209+#define NUMONYX_TRAS_165 7
210+#define NUMONYX_TRC_165 10
211+#define NUMONYX_TRFC_165 24
212+#define NUMONYX_V_ACTIMA_165 ((NUMONYX_TRFC_165 << 27) | (NUMONYX_TRC_165 << 22) | (NUMONYX_TRAS_165 << 18) \
213+ | (NUMONYX_TRP_165 << 15) | (NUMONYX_TRCD_165 << 12) |(NUMONYX_TRRD_165 << 9) | \
214+ (NUMONYX_TDPL_165 << 6) | (NUMONYX_TDAL_165))
215+
216+#define NUMONYX_TWTR_165 2
217+#define NUMONYX_TCKE_165 2
218+#define NUMONYX_TXP_165 3
219+#define NUMONYX_XSR_165 34
220+#define NUMONYX_V_ACTIMB_165 ((NUMONYX_TCKE_165 << 12) | (NUMONYX_XSR_165 << 0)) | \
221+ (NUMONYX_TXP_165 << 8) | (NUMONYX_TWTR_165 << 16)
222+
223 /* New and compatability speed defines */
224 #if defined(PRCM_CLK_CFG2_200MHZ) || defined(PRCM_CONFIG_II) || defined(PRCM_CONFIG_5B)
225 # define L3_100MHZ /* Use with <= 100MHz SDRAM */
226@@ -276,6 +313,8 @@ typedef enum {
227 #elif defined(L3_165MHZ)
228 # define MICRON_SDRC_ACTIM_CTRLA_0 MICRON_V_ACTIMA_165
229 # define MICRON_SDRC_ACTIM_CTRLB_0 MICRON_V_ACTIMB_165
230+# define NUMONYX_SDRC_ACTIM_CTRLA_0 NUMONYX_V_ACTIMA_165
231+# define NUMONYX_SDRC_ACTIM_CTRLB_0 NUMONYX_V_ACTIMB_165
232 #endif
233
234
235--
2361.6.1
237
diff --git a/recipes-bsp/x-load/x-load.inc b/recipes-bsp/x-load/x-load.inc
new file mode 100644
index 00000000..8743243e
--- /dev/null
+++ b/recipes-bsp/x-load/x-load.inc
@@ -0,0 +1,57 @@
1DESCRIPTION = "x-load bootloader loader"
2SECTION = "bootloaders"
3PRIORITY = "optional"
4LICENSE = "GPLv2+"
5
6DEPENDS = "signgp-native"
7
8PARALLEL_MAKE=""
9
10EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
11
12XLOAD_MACHINE ?= "${MACHINE}_config"
13
14XLOAD_IMAGE ?= "x-load-${MACHINE}-${PV}-${PR}.bin.ift"
15XLOAD_SYMLINK ?= "x-load-${MACHINE}.bin.ift"
16XLOAD_USB_IMAGE ?= "x-load-usb-${MACHINE}-${PV}-${PR}.bin"
17XLOAD_USB_SYMLINK ?= "x-load-usb-${MACHINE}.bin"
18MLO_IMAGE ?= "MLO-${MACHINE}-${PV}-${PR}"
19MLO_SYMLINK ?= "MLO-${MACHINE}"
20MLO_SYMLINK_NOMACHINE ?= "MLO"
21XLOAD_LOAD_ADDRESS ?= 0x40200800
22
23do_compile () {
24 unset LDFLAGS
25 unset CFLAGS
26 unset CPPFLAGS
27 oe_runmake distclean
28 oe_runmake ${XLOAD_MACHINE}
29 oe_runmake
30}
31
32do_install () {
33 signGP ${S}/x-load.bin ${XLOAD_LOAD_ADDRESS}
34
35 install -d ${D}/boot
36 install ${S}/x-load.bin.ift ${D}/boot/${MLO_IMAGE}
37 ln -sf ${MLO_IMAGE} ${D}/boot/${MLO_SYMLINK_NOMACHINE}
38}
39
40FILES_${PN} = "/boot"
41
42do_deploy () {
43 install -d ${DEPLOY_DIR_IMAGE}
44 install ${S}/x-load.bin.ift ${DEPLOY_DIR_IMAGE}/${XLOAD_IMAGE}
45 install ${S}/x-load.bin ${DEPLOY_DIR_IMAGE}/${XLOAD_USB_IMAGE}
46 install ${S}/x-load.bin.ift ${DEPLOY_DIR_IMAGE}/${MLO_IMAGE}
47
48 cd ${DEPLOY_DIR_IMAGE}
49 rm -f ${XLOAD_SYMLINK}
50 ln -sf ${XLOAD_IMAGE} ${XLOAD_SYMLINK}
51 rm -f ${XLOAD_USB_SYMLINK}
52 ln -sf ${XLOAD_USB_IMAGE} ${XLOAD_USB_SYMLINK}
53 rm -f ${MLO_SYMLINK}
54 ln -sf ${MLO_IMAGE} ${MLO_SYMLINK}
55}
56do_deploy[dirs] = "${S}"
57addtask deploy before do_build after do_install
diff --git a/recipes-bsp/x-load/x-load_git.bb b/recipes-bsp/x-load/x-load_git.bb
new file mode 100644
index 00000000..f45bac95
--- /dev/null
+++ b/recipes-bsp/x-load/x-load_git.bb
@@ -0,0 +1,22 @@
1require x-load.inc
2
3DEFAULT_PREFERENCE_omap3-pandora = "-1"
4
5FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/x-load-git"
6
7SRCREV_pn-${PN} = "1c9276af4d6a5b7014a7630a1abeddf3b3177563"
8
9PV = "1.44+${PR}+gitr${SRCREV}"
10PR ="r16"
11PE = "1"
12
13SRC_URI = "git://gitorious.org/x-load-omap3/mainline.git;branch=master;protocol=git"
14
15SRC_URI_append_beagleboard = " \
16 file://name.patch \
17 file://bb8547fcbc54ecc7a75f9ad45a31042a04d8a2ce.patch \
18 file://xm-mem.patch \
19 "
20S = "${WORKDIR}/git"
21
22PACKAGE_ARCH = "${MACHINE_ARCH}"