Thanks for the pointers I managed to get dm-crypt and LUKS working on my custom OdroidC2 build (which has custom splash screen, different ssh password and b00st centre channel patch from RPi included).
I took the details of the package.mk of two commits you mentioned (cryptsetup and lvm2) and put them in packages/sysutils under directories cryptsetup and lvm2.
Was a bit tricky to get them included in the build. I tried messing around with OEM, but got issues with no Makefile for OdroidC2. In the end I added "cryptsetup lvm2" to dependencies PKG_DEPENDS_TARGET in packages/virtual/toolchain. But unless I removed PKG_DEPENDS_TARGET from cryptsetup and lvm2 package.mk I got caught in an infinite build loop.
Next was sorting out which parameters I needed in projects/Odroid_C2/linux/linux.aarch64.conf
Took a bit of trial and error:
CONFIG_CRYPTO_AML=y
CONFIG_DM_BUFIO=m
CONFIG_DM_BIO_PRISON=m
CONFIG_DM_PERSISTENT_DATA=m
CONFIG_DM_CRYPT=m
CONFIG_DM_SNAPSHOT=m
CONFIG_DM_THIN_PROVISIONING=m
CONFIG_DM_MIRROR=m
CONFIG_DM_RAID=m
CONFIG_BLK_DEV_DM_BUILTIN=y
CONFIG_BLK_DEV_DM=y
CONFIG_MD=y
Probably all are not needed.
The other thing I learned the hard way is do not build on anything other than Ubuntu 16 LTS. Too many issues with the build environment on later versions of Ubuntu. Oh and do not try to build using a samba share, virtualbox shared folder, of sshfs. Too many problems with soft links, hard links, and other strange stuff. In the end I just made sure my Ubuntu 16 LTS virtual box had enough disk space allocated.
I can now mount an encrypted USB drive on my OdroidC2 and play back HEVC files. Didn't even need a powered hub!
Thanks again.