Browse Source

images_types_sysmo: Add a new bbclass for creating different ubi images

For the sysmoBTS we want to include a kernel volume inside the UBI as
a fallback in case the mounting of the main kernel is failing. We still
need to modify the boot command of the bootloader to look at this UBI
and to modify the kernel to include the tun/tap modules so the kernel
will be capable of opening a OpenVPN connection.

Currently one needs to write INHERIT += images_types_sysmo into the
conf/local.conf and add ubi-sysmo to the IMAGE_FSTYPES variable.
hfreyther/master-next
Holger Hans Peter Freyther 9 years ago
parent
commit
e89d7ce77d
  1. 20
      classes/images_types_sysmo.bbclass

20
classes/images_types_sysmo.bbclass

@ -0,0 +1,20 @@
# I add another image type for the sysmoBTS family
UBI_VOLNAME ?= "${MACHINE}-rootfs"
IMAGE_CMD_ubi-sysmo () {
echo \[kernel\] >> ubinize_sysmo.cfg
echo mode=ubi >> ubinize_sysmo.cfg
echo image=${DEPLOY_DIR_IMAGE}/uImage-${MACHINE}.bin >> ubinize_sysmo.cfg
echo vol_id=0 >> ubinize_sysmo.cfg
echo vol_type=static >> ubinize_sysmo.cfg
echo vol_name=${MACHINE}-backup-kernel >> ubinize_sysmo.cfg
echo \[ubifs\] >> ubinize_sysmo.cfg
echo mode=ubi >> ubinize_sysmo.cfg
echo image=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs-sysmo >> ubinize_sysmo.cfg
echo vol_id=1 >> ubinize_sysmo.cfg
echo vol_type=dynamic >> ubinize_sysmo.cfg
echo vol_name=${UBI_VOLNAME} >> ubinize_sysmo.cfg
echo vol_flags=autoresize >> ubinize_sysmo.cfg
mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs-sysmo ${MKUBIFS_ARGS} && ubinize -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubi-sysmo ${UBINIZE_ARGS} ubinize_sysmo.cfg
}
Loading…
Cancel
Save