aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-utils/mb-realoc/mb-realoc.bb
blob: 22b9984432fb989256c966cd2e0fc7985bee98b7 (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
DESCRIPTION = "mb-realoc"

LICENSE = "CLOSED"

PROVIDES = "virtual/elfrealloc"

inherit deploy

FILESEXTRAPATHS:append := ":${XLNX_SCRIPTS_DIR}"
SRC_URI:append = " file://mb-realoc"

PV = "0.1"

ELF_LOAD_ADDR ?= "0"
ELF_JUMP_OFFSET ?= ""
ELF_INFILE ?= "${DEPLOY_DIR_IMAGE}/u-boot.elf"
OUTFILE_NAME ?= "u-boot-s"
B = "${WORKDIR}"

PARALLEL_MAKE=""

do_configure[noexec]="1"
do_compile[depends] = "virtual/bootloader:do_deploy"

do_compile() {
	export CROSS_COMPILE="${TARGET_PREFIX}"
	${WORKDIR}/mb-realoc -l ${ELF_LOAD_ADDR} -i ${ELF_INFILE} -o ${OUTFILE_NAME}
}

do_install[noexec] = "1"

do_deploy() {
	install -d ${DEPLOYDIR}
	install -m 0644 ${WORKDIR}/${OUTFILE_NAME}.bin ${DEPLOYDIR}/${OUTFILE_NAME}.bin
}

addtask deploy after do_compile