f8b2e5fa666ef3107f2702c3e9dfdcb500078881
[glsdk/meta-ti-glsdk.git] / recipes-bsp / x-load / x-load.inc
1 DESCRIPTION = "x-load bootloader loader"
2 SECTION = "bootloaders"
3 PRIORITY = "optional"
4 LICENSE = "GPLv2+"
6 LIC_FILES_CHKSUM = "file://common/cmd_load.c;beginline=4;endline=22;md5=14420d7cc8dfb427d17ad407ddf8dc89"
8 PARALLEL_MAKE = ""
10 EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
12 XLOAD_MACHINE ?= "${MACHINE}_config"
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
23 do_compile () {
24         unset LDFLAGS
25         unset CFLAGS
26         unset CPPFLAGS
27         oe_runmake distclean
28         oe_runmake ${XLOAD_MACHINE}
29         oe_runmake ift
30 }
32 do_install () {
33         install -d ${D}/boot
34         install ${S}/x-load.bin.ift ${D}/boot/${MLO_IMAGE}
35         ln -sf ${MLO_IMAGE} ${D}/boot/${MLO_SYMLINK_NOMACHINE} 
36 }
38 FILES_${PN} = "/boot"
40 inherit deploy
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}
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 }