diff options
Diffstat (limited to 'recipes-bsp/x-load/x-load.inc')
-rw-r--r-- | recipes-bsp/x-load/x-load.inc | 57 |
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 @@ | |||
1 | DESCRIPTION = "x-load bootloader loader" | ||
2 | SECTION = "bootloaders" | ||
3 | PRIORITY = "optional" | ||
4 | LICENSE = "GPLv2+" | ||
5 | |||
6 | DEPENDS = "signgp-native" | ||
7 | |||
8 | PARALLEL_MAKE="" | ||
9 | |||
10 | EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}" | ||
11 | |||
12 | XLOAD_MACHINE ?= "${MACHINE}_config" | ||
13 | |||
14 | XLOAD_IMAGE ?= "x-load-${MACHINE}-${PV}-${PR}.bin.ift" | ||
15 | XLOAD_SYMLINK ?= "x-load-${MACHINE}.bin.ift" | ||
16 | XLOAD_USB_IMAGE ?= "x-load-usb-${MACHINE}-${PV}-${PR}.bin" | ||
17 | XLOAD_USB_SYMLINK ?= "x-load-usb-${MACHINE}.bin" | ||
18 | MLO_IMAGE ?= "MLO-${MACHINE}-${PV}-${PR}" | ||
19 | MLO_SYMLINK ?= "MLO-${MACHINE}" | ||
20 | MLO_SYMLINK_NOMACHINE ?= "MLO" | ||
21 | XLOAD_LOAD_ADDRESS ?= 0x40200800 | ||
22 | |||
23 | do_compile () { | ||
24 | unset LDFLAGS | ||
25 | unset CFLAGS | ||
26 | unset CPPFLAGS | ||
27 | oe_runmake distclean | ||
28 | oe_runmake ${XLOAD_MACHINE} | ||
29 | oe_runmake | ||
30 | } | ||
31 | |||
32 | do_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 | |||
40 | FILES_${PN} = "/boot" | ||
41 | |||
42 | do_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 | } | ||
56 | do_deploy[dirs] = "${S}" | ||
57 | addtask deploy before do_build after do_install | ||