linux-ti-staging: add recipe for tracking TI latest staging tree
[glsdk/meta-ti-glsdk.git] / recipes-bsp / x-load / x-load.inc
1 DESCRIPTION = "x-load bootloader loader"
2 SECTION = "bootloaders"
3 LICENSE = "GPLv2+"
5 LIC_FILES_CHKSUM = "file://common/cmd_load.c;beginline=4;endline=22;md5=14420d7cc8dfb427d17ad407ddf8dc89"
7 PARALLEL_MAKE = ""
9 EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} CONFIG_HEADER=${CONFIG_HEADER}"
11 XLOAD_MACHINE ?= "${MACHINE}_config"
13 XLOAD_IMAGE ?= "x-load-${MACHINE}-${PV}-${PR}.bin.ift"
14 XLOAD_SYMLINK ?= "x-load-${MACHINE}.bin.ift"
15 XLOAD_USB_IMAGE ?= "x-load-usb-${MACHINE}-${PV}-${PR}.bin"
16 XLOAD_USB_SYMLINK ?= "x-load-usb-${MACHINE}.bin"
17 MLO_IMAGE ?= "MLO-${MACHINE}-${PV}-${PR}"
18 MLO_SYMLINK ?= "MLO-${MACHINE}"
19 MLO_SYMLINK_NOMACHINE ?= "MLO"
20 XLOAD_LOAD_ADDRESS ?= "0x40200800"
22 do_compile () {
23         unset LDFLAGS
24         unset CFLAGS
25         unset CPPFLAGS
26         oe_runmake distclean
27         oe_runmake ${XLOAD_MACHINE}
28         oe_runmake ift
29 }
31 do_install () {
32         install -d ${D}/boot
33         install ${S}/x-load.bin.ift ${D}/boot/${MLO_IMAGE}
34         ln -sf ${MLO_IMAGE} ${D}/boot/${MLO_SYMLINK_NOMACHINE} 
35 }
37 FILES_${PN} = "/boot"
39 inherit deploy
41 addtask deploy before do_package after do_install
43 do_deploy () {
44         install -d ${DEPLOY_DIR_IMAGE}
45         install ${S}/x-load.bin.ift ${DEPLOY_DIR_IMAGE}/${XLOAD_IMAGE}
46         install ${S}/x-load.bin ${DEPLOY_DIR_IMAGE}/${XLOAD_USB_IMAGE}  
47         install ${S}/x-load.bin.ift ${DEPLOY_DIR_IMAGE}/${MLO_IMAGE}
49         cd ${DEPLOY_DIR_IMAGE}
50         rm -f ${XLOAD_SYMLINK}
51         ln -sf ${XLOAD_IMAGE} ${XLOAD_SYMLINK}
52         rm -f ${XLOAD_USB_SYMLINK}
53         ln -sf ${XLOAD_USB_IMAGE} ${XLOAD_USB_SYMLINK}  
54         rm -f ${MLO_SYMLINK}
55         ln -sf ${MLO_IMAGE} ${MLO_SYMLINK}
56         rm -f ${MLO_SYMLINK_NOMACHINE}
57         ln -sf ${MLO_IMAGE} ${MLO_SYMLINK_NOMACHINE}
58 }