-
Notifications
You must be signed in to change notification settings - Fork 143
/
Copy pathtegra-storage-layout-base_%.bbappend
36 lines (32 loc) · 1.27 KB
/
tegra-storage-layout-base_%.bbappend
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
DEPENDS:append = " tegra-helper-scripts-native"
PATH =. "${STAGING_BINDIR_NATIVE}/tegra-flash:"
mender_flash_layout_adjust() {
local file=$1
mv ${D}${datadir}/l4t-storage-layout/$file ${WORKDIR}/$file
nvflashxmlparse -v --rewrite-contents-from=${WORKDIR}/UDA.xml \
--output=${D}${datadir}/l4t-storage-layout/$file \
${WORKDIR}/$file
}
do_install:append() {
cat <<EOF >${WORKDIR}/UDA.xml
<partition_layout>
<device>
<partition name="UDA">
<filename> DATAFILE </filename>
</partition>
</device>
</partition_layout>
EOF
mender_flash_layout_adjust "${PARTITION_LAYOUT_TEMPLATE}"
mender_flash_layout_adjust "${PARTITION_LAYOUT_EXTERNAL}"
}
do_install:append:tegra194() {
# Remove invalid start locations from upstream L4T partition layout files that
# prevents the Mender data partition to use remaining space.
sed -i -e 's#<start_location> 0x708400000 </start_location>##g' \
-e 's#<start_location> 0x710800000 </start_location>##g' \
${D}${datadir}/l4t-storage-layout/${PARTITION_LAYOUT_TEMPLATE}
sed -i -e 's#<start_location> 0x708400000 </start_location>##g' \
-e 's#<start_location> 0x710800000 </start_location>##g' \
${D}${datadir}/l4t-storage-layout/${PARTITION_LAYOUT_EXTERNAL}
}