summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/x-load/x-load.inc
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/x-load/x-load.inc')
-rw-r--r--recipes-bsp/x-load/x-load.inc57
1 files changed, 57 insertions, 0 deletions
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