blob: 8743243e9ad76eeab7cd95193b6e6cd737d44ec3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
DESCRIPTION = "x-load bootloader loader"
SECTION = "bootloaders"
PRIORITY = "optional"
LICENSE = "GPLv2+"
DEPENDS = "signgp-native"
PARALLEL_MAKE=""
EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
XLOAD_MACHINE ?= "${MACHINE}_config"
XLOAD_IMAGE ?= "x-load-${MACHINE}-${PV}-${PR}.bin.ift"
XLOAD_SYMLINK ?= "x-load-${MACHINE}.bin.ift"
XLOAD_USB_IMAGE ?= "x-load-usb-${MACHINE}-${PV}-${PR}.bin"
XLOAD_USB_SYMLINK ?= "x-load-usb-${MACHINE}.bin"
MLO_IMAGE ?= "MLO-${MACHINE}-${PV}-${PR}"
MLO_SYMLINK ?= "MLO-${MACHINE}"
MLO_SYMLINK_NOMACHINE ?= "MLO"
XLOAD_LOAD_ADDRESS ?= 0x40200800
do_compile () {
unset LDFLAGS
unset CFLAGS
unset CPPFLAGS
oe_runmake distclean
oe_runmake ${XLOAD_MACHINE}
oe_runmake
}
do_install () {
signGP ${S}/x-load.bin ${XLOAD_LOAD_ADDRESS}
install -d ${D}/boot
install ${S}/x-load.bin.ift ${D}/boot/${MLO_IMAGE}
ln -sf ${MLO_IMAGE} ${D}/boot/${MLO_SYMLINK_NOMACHINE}
}
FILES_${PN} = "/boot"
do_deploy () {
install -d ${DEPLOY_DIR_IMAGE}
install ${S}/x-load.bin.ift ${DEPLOY_DIR_IMAGE}/${XLOAD_IMAGE}
install ${S}/x-load.bin ${DEPLOY_DIR_IMAGE}/${XLOAD_USB_IMAGE}
install ${S}/x-load.bin.ift ${DEPLOY_DIR_IMAGE}/${MLO_IMAGE}
cd ${DEPLOY_DIR_IMAGE}
rm -f ${XLOAD_SYMLINK}
ln -sf ${XLOAD_IMAGE} ${XLOAD_SYMLINK}
rm -f ${XLOAD_USB_SYMLINK}
ln -sf ${XLOAD_USB_IMAGE} ${XLOAD_USB_SYMLINK}
rm -f ${MLO_SYMLINK}
ln -sf ${MLO_IMAGE} ${MLO_SYMLINK}
}
do_deploy[dirs] = "${S}"
addtask deploy before do_build after do_install
|