blob: 74c0b493fbe297b101e115c07d07e6cbeaf31e0b (
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# This provides uEnv.txt files containing default environment.
do_compile_append() {
if [ -n "${UBOOT_CONFIG}" ]; then
unset i j k
for config in ${UBOOT_MACHINE}; do
i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
j=$(expr $j + 1);
if [ $j -eq $i ]; then
cp ${B}/${config}/common/env_common.o ${TMPDIR}/uboot.env-${config}
${OBJCOPY} -O binary -j ".rodata.default_environment" ${TMPDIR}/uboot.env-${config}
tr '\0' '\n' < ${TMPDIR}/uboot.env-${config} | sed -e '/^$/d' > ${B}/${config}/uEnv-${type}.txt
rm ${TMPDIR}/uboot.env-${config}
fi
done
unset j
done
unset i
else
cp ${B}/common/env_common.o ${TMPDIR}/uboot.env
${OBJCOPY} -O binary -j ".rodata.default_environment" ${TMPDIR}/uboot.env
tr '\0' '\n' < ${TMPDIR}/uboot.env | sed -e '/^$/d' > ${B}/uEnv.txt
rm ${TMPDIR}/uboot.env
fi
}
do_install_append() {
if [ -n "${UBOOT_CONFIG}" ]; then
for config in ${UBOOT_MACHINE}; do
i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
j=$(expr $j + 1);
if [ $j -eq $i ]; then
install -d ${D}/boot
install -m 644 ${B}/${config}/uEnv-${type}.txt ${D}/boot/uEnv-${type}-${PV}-${PR}.txt
ln -sf uEnv-${type}-${PV}-${PR}.txt ${D}/boot/uEnv-${type}.txt
ln -sf uEnv-${type}-${PV}-${PR}.txt ${D}/boot/uEnv.txt
fi
done
unset j
done
unset i
else
install -d ${D}/boot
install -m 644 ${B}/uEnv.txt ${D}/boot/uEnv-${MACHINE}-${PV}-${PR}.txt
ln -sf uEnv-${MACHINE}-${PV}-${PR}.txt ${D}/boot/uEnv.txt
fi
}
do_deploy_append() {
if [ -n "${UBOOT_CONFIG}" ]; then
for config in ${UBOOT_MACHINE}; do
i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
j=$(expr $j + 1);
if [ $j -eq $i ]; then
install -d ${DEPLOYDIR}
install -m 644 ${B}/${config}/uEnv-${type}.txt ${DEPLOYDIR}/uEnv-${type}-${PV}-${PR}.txt
ln -sf uEnv-${type}-${PV}-${PR}.txt ${DEPLOYDIR}/uEnv-${type}.txt
ln -sf uEnv-${type}-${PV}-${PR}.txt ${DEPLOYDIR}/uEnv.txt
fi
done
unset j
done
unset i
else
install -d ${DEPLOYDIR}
install -m 644 ${B}/uEnv.txt ${DEPLOYDIR}/uEnv-${MACHINE}-${PV}-${PR}.txt
ln -sf uEnv-${MACHINE}-${PV}-${PR}.txt ${DEPLOYDIR}/uEnv.txt
fi
}
|