Browse Source

image-rauc-slot-rescue: support sysmobts

For the sysmobts we need custom ubi volume layout, so we need to
override IMAGE_CMD_ubi().

Signed-off-by: Jan Luebbe <jluebbe@debian.org>
neels/inmarsat
Jan Luebbe 6 years ago
committed by Holger Hans Peter Freyther
parent
commit
e1aa1be647
  1. 43
      recipes-core/images/image-rauc-slot-rescue.bb

43
recipes-core/images/image-rauc-slot-rescue.bb

@ -6,13 +6,48 @@ IMAGE_LINGUAS = ""
LICENSE = "MIT"
IMAGE_FSTYPES = "cpio.xz"
# COMPRESS_CMD_xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_THREADS} --check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}.rootfs.${type} > ${IMAGE_NAME}.rootfs.${type}.xz"
inherit core-image
require recipes-apps/images/image-manifest.inc
# cpio config
XZ_COMPRESSION_LEVEL = "-e -9 --lzma2=dict=512KiB"
XZ_THREADS = "-T 0"
XZ_INTEGRITY_CHECK = "crc32"
inherit core-image
require recipes-apps/images/image-manifest.inc
# ubifs config (override IMAGE_CMD_ubi to create custome volumes)
MKUBIFS_ARGS = "-m 2048 -e 129024 -c 384 -x zlib"
UBINIZE_ARGS = "-m 2048 -p 128KiB -s 512"
IMAGE_CMD_ubi () {
echo \[rescue\] > ubinize.cfg
echo mode=ubi >> ubinize.cfg
echo image=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs >> ubinize.cfg
echo vol_id=0 >> ubinize.cfg
echo vol_size=32MiB >> ubinize.cfg
echo vol_type=dynamic >> ubinize.cfg
echo vol_name=rescue >> ubinize.cfg
echo \[system0\] >> ubinize.cfg
echo mode=ubi >> ubinize.cfg
echo vol_id=1 >> ubinize.cfg
echo vol_size=32MiB >> ubinize.cfg
echo vol_type=dynamic >> ubinize.cfg
echo vol_name=system0 >> ubinize.cfg
echo \[system1\] >> ubinize.cfg
echo mode=ubi >> ubinize.cfg
echo vol_id=2 >> ubinize.cfg
echo vol_size=32MiB >> ubinize.cfg
echo vol_type=dynamic >> ubinize.cfg
echo vol_name=system1 >> ubinize.cfg
echo \[data\] >> ubinize.cfg
echo mode=ubi >> ubinize.cfg
echo vol_id=3 >> ubinize.cfg
echo vol_size=4MiB >> ubinize.cfg
echo vol_type=dynamic >> ubinize.cfg
echo vol_name=data >> ubinize.cfg
echo vol_flags=autoresize >> ubinize.cfg
mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS} && ubinize -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubi ${UBINIZE_ARGS} ubinize.cfg
}
IMAGE_FSTYPES_sysmocom-idu = "cpio.xz"
IMAGE_FSTYPES_sysmobts-v2 = "ubi"
BAD_RECOMMENDATIONS += "busybox-syslog"
Loading…
Cancel
Save