Skip to content

Instantly share code, notes, and snippets.

@cveilleux
Created May 15, 2020 11:50
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save cveilleux/54961ccc41071e8aee8c19b69fcba78f to your computer and use it in GitHub Desktop.
OpenZFS 0.8.4 Yocto recipe
SUMMARY = "ZFS"
DESCRIPTION="ZFS"
HOMEPAGE = "https://zfsonlinux.org/"
LICENSE = "CDDL"
LIC_FILES_CHKSUM = "file://LICENSE;md5=7087caaf1dc8a2856585619f4a787faa"
SRC_URI = "https://github.com/openzfs/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
SRC_URI[md5sum] = "f0c203c59c4fcd44187a64758707469f"
SRC_URI[sha256sum] = "2b988f5777976f09d08083f6bebf6e67219c4c4c183c1f33033fb7e5e5eacafb"
S = "${WORKDIR}/zfs-${PV}/"
inherit module kernel-module-split autotools autotools-brokensep
DEPENDS = "virtual/kernel zlib util-linux libtirpc openssl"
PACKAGES += "zfs-tools"
EXTRA_OECONF_append = " --with-linux=${STAGING_KERNEL_DIR} --with-linux-obj=${STAGING_KERNEL_BUILDDIR} --disable-pyzfs --enable-systemd --disable-sysvinit --without-dracutdir "
MODULE_NAME = "zfs"
PKG_${PN} = "kernel-module-${MODULE_NAME}"
do_install_append () {
rm -rf ${D}/etc/sudoers.d
rm -rf ${D}/usr/share/initramfs-tools
rm -rf ${D}/usr/share/zfs
}
FILES_zfs-tools += "${sysconfdir}/zfs/* \
${sysconfdir}/default/* \
${libexecdir}/zfs/* \
${bindir}/* \
${sbindir}/* \
${libdir}/udev/* \
${base_libdir}/udev/* \
${base_sbindir}/* \
${libdir}/*"
FILES_${PN}-dev += "${prefix}/src/zfs-${PV}/* ${prefix}/src/spl-${PV}/* "
@windelbouwman
Copy link

Thanks for this! I made some modifications, the result is located here:

https://gist.github.com/windelbouwman/1e3deb742c0a5ae399f876ca2eb1b0f1

@ChrisPasda
Copy link

Hello Guys and thank you for creating this recipe !
Im very new to yocto and zfs. How can i use this recipe to build my image with zfs?

Thank you very much in advance and best regards,

Chris

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment