Date: Tue, 26 Feb 2019 19:55:03 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r344605 - in head: share/man/man4 sys/conf sys/contrib/xz-embedded/freebsd sys/dev/xz sys/geom/uzip sys/mips/conf sys/modules sys/modules/geom/geom_uzip sys/modules/xz Message-ID: <201902261955.x1QJt31L029584@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Tue Feb 26 19:55:03 2019 New Revision: 344605 URL: https://svnweb.freebsd.org/changeset/base/344605 Log: Modularize xz. Embedded lzma decompression library becomes a module usable by other consumers, in addition to geom_uzip. Most important code changes are - removal of XZ_DEC_SINGLE define, we need the code to work with XZ_DEC_DYNALLOC; - xz_crc32_init() call is removed from geom_uzip, xz module handles initialization on its own. xz is no longer embedded into geom_uzip, instead the depend line for the module is provided, and corresponding kernel option is added to each MIPS kernel config file using geom_uzip. The commit also carries unrelated cleanup by removing excess "device geom_uzip" in places which were missed in r344479. Reviewed by: cem, hselasky, ray, slavash (previous versions) Sponsored by: Mellanox Technologies Differential revision: https://reviews.freebsd.org/D19266 MFC after: 3 weeks Added: head/sys/dev/xz/ head/sys/dev/xz/xz_mod.c - copied, changed from r344604, head/sys/contrib/xz-embedded/freebsd/xz_malloc.c head/sys/modules/xz/ head/sys/modules/xz/Makefile (contents, props changed) Deleted: head/sys/contrib/xz-embedded/freebsd/xz_malloc.c Modified: head/share/man/man4/geom_uzip.4 head/sys/conf/NOTES head/sys/conf/files head/sys/contrib/xz-embedded/freebsd/xz_config.h head/sys/geom/uzip/g_uzip.c head/sys/geom/uzip/g_uzip_lzma.c head/sys/mips/conf/ALFA_HORNET_UB head/sys/mips/conf/AP121 head/sys/mips/conf/AP135 head/sys/mips/conf/AP143 head/sys/mips/conf/AP91 head/sys/mips/conf/AP93 head/sys/mips/conf/AP94 head/sys/mips/conf/AP96 head/sys/mips/conf/BCM head/sys/mips/conf/CARAMBOLA2 head/sys/mips/conf/DB120 head/sys/mips/conf/DIR-655A1 head/sys/mips/conf/DIR-825B1 head/sys/mips/conf/ENH200 head/sys/mips/conf/MT7620A_FDT head/sys/mips/conf/MT7620N_FDT head/sys/mips/conf/MT7621_FDT head/sys/mips/conf/MT7628_FDT head/sys/mips/conf/ONIONOMEGA head/sys/mips/conf/PB47 head/sys/mips/conf/PB92 head/sys/mips/conf/PICOSTATION_M2HP head/sys/mips/conf/ROCKET_M2HP head/sys/mips/conf/ROUTERSTATION head/sys/mips/conf/ROUTERSTATION_MFS head/sys/mips/conf/RSPRO head/sys/mips/conf/RSPRO_MFS head/sys/mips/conf/RSPRO_STANDALONE head/sys/mips/conf/RT3050_FDT head/sys/mips/conf/RT3352_FDT head/sys/mips/conf/RT3883_FDT head/sys/mips/conf/RT5350_FDT head/sys/mips/conf/TL-ARCHERC7V2 head/sys/mips/conf/TL-WDR4300 head/sys/mips/conf/TL-WR1043NDv2 head/sys/mips/conf/TL-WR740Nv4 head/sys/mips/conf/TP-MR3040 head/sys/mips/conf/TP-WN1043ND head/sys/mips/conf/WZR-300HP head/sys/mips/conf/WZR-HPAG300H head/sys/mips/conf/std.XLP head/sys/modules/Makefile head/sys/modules/geom/geom_uzip/Makefile Modified: head/share/man/man4/geom_uzip.4 ============================================================================== --- head/share/man/man4/geom_uzip.4 Tue Feb 26 19:36:57 2019 (r344604) +++ head/share/man/man4/geom_uzip.4 Tue Feb 26 19:55:03 2019 (r344605) @@ -36,6 +36,7 @@ To compile this driver into the kernel, place the following line in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device xz" .Cd "options GEOM_UZIP" .Ed .Pp Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/conf/NOTES Tue Feb 26 19:55:03 2019 (r344605) @@ -3004,3 +3004,5 @@ device n25q # device spigen # Generic access to SPI devices from userland. # Enable legacy /dev/spigenN name aliases for /dev/spigenX.Y devices. options SPIGEN_LEGACY_CDEVNAME # legacy device names for spigen + +device xz # xz_embedded LZMA de-compression library Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/conf/files Tue Feb 26 19:55:03 2019 (r344605) @@ -636,6 +636,17 @@ contrib/ngatm/netnatm/sig/sig_unimsgcpy.c optional nga compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_verify.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" +# xz +dev/xz/xz_mod.c optional xz \ + compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" +contrib/xz-embedded/linux/lib/xz/xz_crc32.c optional xz \ + compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" +contrib/xz-embedded/linux/lib/xz/xz_dec_bcj.c optional xz \ + compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" +contrib/xz-embedded/linux/lib/xz/xz_dec_lzma2.c optional xz \ + compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" +contrib/xz-embedded/linux/lib/xz/xz_dec_stream.c optional xz \ + compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" # Zstd contrib/zstd/lib/freebsd/zstd_kmalloc.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/common/zstd_common.c optional zstdio compile-with ${ZSTD_C} @@ -3659,21 +3670,6 @@ geom/raid3/g_raid3.c optional geom_raid3 geom/raid3/g_raid3_ctl.c optional geom_raid3 geom/shsec/g_shsec.c optional geom_shsec geom/stripe/g_stripe.c optional geom_stripe -contrib/xz-embedded/freebsd/xz_malloc.c \ - optional xz_embedded | geom_uzip \ - compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" -contrib/xz-embedded/linux/lib/xz/xz_crc32.c \ - optional xz_embedded | geom_uzip \ - compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" -contrib/xz-embedded/linux/lib/xz/xz_dec_bcj.c \ - optional xz_embedded | geom_uzip \ - compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" -contrib/xz-embedded/linux/lib/xz/xz_dec_lzma2.c \ - optional xz_embedded | geom_uzip \ - compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" -contrib/xz-embedded/linux/lib/xz/xz_dec_stream.c \ - optional xz_embedded | geom_uzip \ - compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" geom/uzip/g_uzip.c optional geom_uzip geom/uzip/g_uzip_lzma.c optional geom_uzip geom/uzip/g_uzip_wrkthr.c optional geom_uzip Modified: head/sys/contrib/xz-embedded/freebsd/xz_config.h ============================================================================== --- head/sys/contrib/xz-embedded/freebsd/xz_config.h Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/contrib/xz-embedded/freebsd/xz_config.h Tue Feb 26 19:55:03 2019 (r344605) @@ -35,7 +35,6 @@ #include <contrib/xz-embedded/linux/include/linux/xz.h> #include "xz_malloc.h" -#define XZ_DEC_SINGLE 1 #define XZ_PREBOOT 1 #undef XZ_EXTERN Copied and modified: head/sys/dev/xz/xz_mod.c (from r344604, head/sys/contrib/xz-embedded/freebsd/xz_malloc.c) ============================================================================== --- head/sys/contrib/xz-embedded/freebsd/xz_malloc.c Tue Feb 26 19:36:57 2019 (r344604, copy source) +++ head/sys/dev/xz/xz_mod.c Tue Feb 26 19:55:03 2019 (r344605) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2010-2012 Aleksandr Rybalko + * Copyright (c) 2019 Mellanox Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,11 +25,16 @@ * SUCH DAMAGE. */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + #include <sys/malloc.h> #include <sys/kernel.h> +#include <sys/module.h> +#include "xz.h" #include "xz_malloc.h" -/* Wraper for XZ decompressor memmory pool */ +/* Wraper for XZ decompressor memory pool */ static MALLOC_DEFINE(XZ_DEC, "XZ_DEC", "XZ decompressor data"); @@ -47,3 +53,38 @@ xz_free(void *addr) free(addr, XZ_DEC); } + +static int +xz_module_event_handler(module_t mod, int what, void *arg) +{ + int error; + + switch (what) { + case MOD_LOAD: +#if XZ_INTERNAL_CRC32 + xz_crc32_init(); +#endif +#if XZ_INTERNAL_CRC64 + xz_crc64_init(); +#endif + error = 0; + break; + case MOD_UNLOAD: + error = 0; + break; + default: + error = EOPNOTSUPP; + break; + } + + return (error); +} + +static moduledata_t xz_moduledata = { + "xz", + xz_module_event_handler, + NULL +}; + +DECLARE_MODULE(xz, xz_moduledata, SI_SUB_INIT_IF, SI_ORDER_ANY); +MODULE_VERSION(xz, 1); Modified: head/sys/geom/uzip/g_uzip.c ============================================================================== --- head/sys/geom/uzip/g_uzip.c Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/geom/uzip/g_uzip.c Tue Feb 26 19:55:03 2019 (r344605) @@ -921,5 +921,6 @@ static struct g_class g_uzip_class = { }; DECLARE_GEOM_CLASS(g_uzip_class, g_uzip); +MODULE_DEPEND(g_uzip, xz, 1, 1, 1); MODULE_DEPEND(g_uzip, zlib, 1, 1, 1); MODULE_VERSION(geom_uzip, 0); Modified: head/sys/geom/uzip/g_uzip_lzma.c ============================================================================== --- head/sys/geom/uzip/g_uzip_lzma.c Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/geom/uzip/g_uzip_lzma.c Tue Feb 26 19:55:03 2019 (r344605) @@ -103,7 +103,6 @@ g_uzip_lzma_ctor(uint32_t blksz) struct g_uzip_lzma *lzp; lzp = malloc(sizeof(struct g_uzip_lzma), M_GEOM_UZIP, M_WAITOK); - xz_crc32_init(); lzp->s = xz_dec_init(XZ_SINGLE, 0); if (lzp->s == NULL) { goto e1; Modified: head/sys/mips/conf/ALFA_HORNET_UB ============================================================================== --- head/sys/mips/conf/ALFA_HORNET_UB Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/ALFA_HORNET_UB Tue Feb 26 19:55:03 2019 (r344605) @@ -49,7 +49,7 @@ device arswitch options AR71XX_ENV_UBOOT # uzip - to boot natively from flash -device geom_uzip +device xz options GEOM_UZIP # Used for the static uboot partition map Modified: head/sys/mips/conf/AP121 ============================================================================== --- head/sys/mips/conf/AP121 Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/AP121 Tue Feb 26 19:55:03 2019 (r344605) @@ -43,7 +43,7 @@ device arswitch options AR71XX_ENV_UBOOT # uzip - to boot natively from flash -device geom_uzip +device xz options GEOM_UZIP # Used for the static uboot partition map Modified: head/sys/mips/conf/AP135 ============================================================================== --- head/sys/mips/conf/AP135 Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/AP135 Tue Feb 26 19:55:03 2019 (r344605) @@ -46,7 +46,7 @@ device arswitch options AR71XX_ENV_UBOOT # uzip - to boot natively from flash -device geom_uzip +device xz options GEOM_UZIP # Used for the static uboot partition map Modified: head/sys/mips/conf/AP143 ============================================================================== --- head/sys/mips/conf/AP143 Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/AP143 Tue Feb 26 19:55:03 2019 (r344605) @@ -43,7 +43,7 @@ device arswitch options AR71XX_ENV_UBOOT # uzip - to boot natively from flash -device geom_uzip +device xz options GEOM_UZIP # Used for the static uboot partition map Modified: head/sys/mips/conf/AP91 ============================================================================== --- head/sys/mips/conf/AP91 Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/AP91 Tue Feb 26 19:55:03 2019 (r344605) @@ -38,7 +38,7 @@ options NO_SWAPPING # options MSDOSFS # uncompress - to boot read-only lzma natively from flash -device geom_uzip +device xz options GEOM_UZIP options ROOTDEVNAME=\"ufs:/dev/map/rootfs.uzip\" Modified: head/sys/mips/conf/AP93 ============================================================================== --- head/sys/mips/conf/AP93 Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/AP93 Tue Feb 26 19:55:03 2019 (r344605) @@ -26,7 +26,7 @@ options AR71XX_ENV_UBOOT options MSDOSFS # uncompress - to boot read-only lzma natively from flash -device geom_uzip +device xz options GEOM_UZIP options ROOTDEVNAME=\"ufs:/dev/map/rootfs.uzip\" Modified: head/sys/mips/conf/AP94 ============================================================================== --- head/sys/mips/conf/AP94 Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/AP94 Tue Feb 26 19:55:03 2019 (r344605) @@ -21,6 +21,7 @@ hints "AP94.hints" # GEOM modules device geom_redboot # to get access to the SPI flash partitions +device xz options GEOM_UZIP options ROOTDEVNAME=\"ufs:md0.uzip\" Modified: head/sys/mips/conf/AP96 ============================================================================== --- head/sys/mips/conf/AP96 Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/AP96 Tue Feb 26 19:55:03 2019 (r344605) @@ -27,7 +27,7 @@ options AR71XX_ENV_UBOOT options MSDOSFS # uncompress - to boot read-only lzma natively from flash -device geom_uzip +device xz options GEOM_UZIP options ROOTDEVNAME=\"ufs:/dev/map/rootfs.uzip\" Modified: head/sys/mips/conf/BCM ============================================================================== --- head/sys/mips/conf/BCM Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/BCM Tue Feb 26 19:55:03 2019 (r344605) @@ -39,7 +39,7 @@ options SOFTUPDATES #Enable FFS so options UFS_ACL #Support for access control lists options UFS_DIRHASH #Improve performance on big directories -device geom_uzip +device xz options GEOM_UZIP options GEOM_LABEL # Providers labelization. options ROOTDEVNAME=\"ufs:ufs/FBSD\" # assumes FW built by Modified: head/sys/mips/conf/CARAMBOLA2 ============================================================================== --- head/sys/mips/conf/CARAMBOLA2 Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/CARAMBOLA2 Tue Feb 26 19:55:03 2019 (r344605) @@ -48,7 +48,7 @@ device arswitch options AR71XX_ENV_UBOOT # uzip - to boot natively from flash -device geom_uzip +device xz options GEOM_UZIP # Used for the static uboot partition map Modified: head/sys/mips/conf/DB120 ============================================================================== --- head/sys/mips/conf/DB120 Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/DB120 Tue Feb 26 19:55:03 2019 (r344605) @@ -38,7 +38,7 @@ device arswitch options AR71XX_ENV_UBOOT # uzip - to boot natively from flash -device geom_uzip +device xz options GEOM_UZIP # Used for the static uboot partition map Modified: head/sys/mips/conf/DIR-655A1 ============================================================================== --- head/sys/mips/conf/DIR-655A1 Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/DIR-655A1 Tue Feb 26 19:55:03 2019 (r344605) @@ -41,7 +41,7 @@ device arswitch options AR71XX_ENV_UBOOT # uzip - to boot natively from flash -device geom_uzip +device xz options GEOM_UZIP # Used for the static uboot partition map Modified: head/sys/mips/conf/DIR-825B1 ============================================================================== --- head/sys/mips/conf/DIR-825B1 Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/DIR-825B1 Tue Feb 26 19:55:03 2019 (r344605) @@ -47,6 +47,7 @@ nooptions INET6 # GEOM modules device geom_map # to get access to the SPI flash partitions +device xz options GEOM_UZIP options GEOM_PART_GPT Modified: head/sys/mips/conf/ENH200 ============================================================================== --- head/sys/mips/conf/ENH200 Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/ENH200 Tue Feb 26 19:55:03 2019 (r344605) @@ -26,7 +26,7 @@ options AR71XX_ENV_UBOOT options MSDOSFS # uncompress - to boot read-only lzma natively from flash -device geom_uzip +device xz options GEOM_UZIP options ROOTDEVNAME=\"ufs:/dev/map/rootfs.uzip\" Modified: head/sys/mips/conf/MT7620A_FDT ============================================================================== --- head/sys/mips/conf/MT7620A_FDT Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/MT7620A_FDT Tue Feb 26 19:55:03 2019 (r344605) @@ -26,7 +26,7 @@ makeoptions MODULES_OVERRIDE="" options ROOTDEVNAME=\"ufs:md0.uzip\" # Support geom_uzip(4) compressed disk images -device geom_uzip +device xz options GEOM_UZIP # Support md(4) and md-based rootfs Modified: head/sys/mips/conf/MT7620N_FDT ============================================================================== --- head/sys/mips/conf/MT7620N_FDT Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/MT7620N_FDT Tue Feb 26 19:55:03 2019 (r344605) @@ -26,7 +26,7 @@ makeoptions MODULES_OVERRIDE="" options ROOTDEVNAME=\"ufs:md0.uzip\" # Support geom_uzip(4) compressed disk images -device geom_uzip +device xz options GEOM_UZIP # Support md(4) and md-based rootfs Modified: head/sys/mips/conf/MT7621_FDT ============================================================================== --- head/sys/mips/conf/MT7621_FDT Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/MT7621_FDT Tue Feb 26 19:55:03 2019 (r344605) @@ -26,7 +26,7 @@ makeoptions MODULES_OVERRIDE="" options ROOTDEVNAME=\"ufs:md0.uzip\" # Support geom_uzip(4) compressed disk images -device geom_uzip +device xz options GEOM_UZIP # Support md(4) and md-based rootfs Modified: head/sys/mips/conf/MT7628_FDT ============================================================================== --- head/sys/mips/conf/MT7628_FDT Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/MT7628_FDT Tue Feb 26 19:55:03 2019 (r344605) @@ -27,7 +27,7 @@ makeoptions MODULES_OVERRIDE="" options ROOTDEVNAME=\"ufs:md0.uzip\" # Support geom_uzip(4) compressed disk images -device geom_uzip +device xz options GEOM_UZIP # Support md(4) and md-based rootfs Modified: head/sys/mips/conf/ONIONOMEGA ============================================================================== --- head/sys/mips/conf/ONIONOMEGA Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/ONIONOMEGA Tue Feb 26 19:55:03 2019 (r344605) @@ -45,7 +45,7 @@ device arswitch options AR71XX_ENV_UBOOT # uzip - to boot natively from flash -device geom_uzip +device xz options GEOM_UZIP # Used for the static uboot partition map Modified: head/sys/mips/conf/PB47 ============================================================================== --- head/sys/mips/conf/PB47 Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/PB47 Tue Feb 26 19:55:03 2019 (r344605) @@ -32,7 +32,7 @@ options AR71XX_REALMEM=64*1024*1024 options MSDOSFS # uncompress - to boot read-only lzma natively from flash -device geom_uzip +device xz options GEOM_UZIP # Used for the static uboot partition map Modified: head/sys/mips/conf/PB92 ============================================================================== --- head/sys/mips/conf/PB92 Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/PB92 Tue Feb 26 19:55:03 2019 (r344605) @@ -55,7 +55,7 @@ options FFS #Berkeley Fast #options UFS_DIRHASH #Improve performance on big directories # Support uncompress lzma rootfs -device geom_uzip +device xz options GEOM_UZIP options ROOTDEVNAME=\"ufs:/dev/map/rootfs.uzip\" Modified: head/sys/mips/conf/PICOSTATION_M2HP ============================================================================== --- head/sys/mips/conf/PICOSTATION_M2HP Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/PICOSTATION_M2HP Tue Feb 26 19:55:03 2019 (r344605) @@ -38,7 +38,7 @@ options NO_SWAPPING # options MSDOSFS # uncompress - to boot read-only lzma natively from flash -device geom_uzip +device xz options GEOM_UZIP options ROOTDEVNAME=\"ufs:/dev/map/rootfs.uzip\" Modified: head/sys/mips/conf/ROCKET_M2HP ============================================================================== --- head/sys/mips/conf/ROCKET_M2HP Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/ROCKET_M2HP Tue Feb 26 19:55:03 2019 (r344605) @@ -38,7 +38,7 @@ options NO_SWAPPING # options MSDOSFS # uncompress - to boot read-only lzma natively from flash -device geom_uzip +device xz options GEOM_UZIP options ROOTDEVNAME=\"ufs:/dev/map/rootfs.uzip\" Modified: head/sys/mips/conf/ROUTERSTATION ============================================================================== --- head/sys/mips/conf/ROUTERSTATION Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/ROUTERSTATION Tue Feb 26 19:55:03 2019 (r344605) @@ -14,7 +14,7 @@ hints "ROUTERSTATION.hints" # GEOM modules device geom_redboot # to get access to the SPI flash partitions -device geom_uzip # compressed in-memory filesystem support +device xz options GEOM_UZIP # For DOS Modified: head/sys/mips/conf/ROUTERSTATION_MFS ============================================================================== --- head/sys/mips/conf/ROUTERSTATION_MFS Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/ROUTERSTATION_MFS Tue Feb 26 19:55:03 2019 (r344605) @@ -12,6 +12,7 @@ hints "ROUTERSTATION.hints" # GEOM modules device geom_redboot # to get access to the SPI flash partitions +device xz options GEOM_UZIP options ROOTDEVNAME=\"ufs:md0.uzip\" Modified: head/sys/mips/conf/RSPRO ============================================================================== --- head/sys/mips/conf/RSPRO Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/RSPRO Tue Feb 26 19:55:03 2019 (r344605) @@ -15,7 +15,7 @@ device pcf2123_rtc # GEOM modules device geom_redboot # to get access to the SPI flash partitions -device geom_uzip # compressed in-memory filesystem support +device xz options GEOM_UZIP # For DOS Modified: head/sys/mips/conf/RSPRO_MFS ============================================================================== --- head/sys/mips/conf/RSPRO_MFS Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/RSPRO_MFS Tue Feb 26 19:55:03 2019 (r344605) @@ -15,6 +15,7 @@ device pcf2123_rtc # GEOM modules device geom_redboot # to get access to the SPI flash partitions +device xz options GEOM_UZIP # Boot from the first MFS uzip Modified: head/sys/mips/conf/RSPRO_STANDALONE ============================================================================== --- head/sys/mips/conf/RSPRO_STANDALONE Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/RSPRO_STANDALONE Tue Feb 26 19:55:03 2019 (r344605) @@ -14,7 +14,7 @@ device pcf2123_rtc # GEOM modules device geom_redboot # to get access to the SPI flash partitions -device geom_uzip # compressed in-memory filesystem support +device xz options GEOM_UZIP # For DOS Modified: head/sys/mips/conf/RT3050_FDT ============================================================================== --- head/sys/mips/conf/RT3050_FDT Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/RT3050_FDT Tue Feb 26 19:55:03 2019 (r344605) @@ -27,7 +27,7 @@ makeoptions MODULES_OVERRIDE="" options ROOTDEVNAME=\"ufs:md0.uzip\" # Support geom_uzip(4) compressed disk images -device geom_uzip +device xz options GEOM_UZIP # Support md(4) and md-based rootfs Modified: head/sys/mips/conf/RT3352_FDT ============================================================================== --- head/sys/mips/conf/RT3352_FDT Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/RT3352_FDT Tue Feb 26 19:55:03 2019 (r344605) @@ -26,7 +26,7 @@ makeoptions MODULES_OVERRIDE="" options ROOTDEVNAME=\"ufs:md0.uzip\" # Support geom_uzip(4) compressed disk images -device geom_uzip +device xz options GEOM_UZIP # Support md(4) and md-based rootfs Modified: head/sys/mips/conf/RT3883_FDT ============================================================================== --- head/sys/mips/conf/RT3883_FDT Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/RT3883_FDT Tue Feb 26 19:55:03 2019 (r344605) @@ -27,7 +27,7 @@ makeoptions MODULES_OVERRIDE="" options ROOTDEVNAME=\"ufs:md0.uzip\" # Support geom_uzip(4) compressed disk images -device geom_uzip +device xz options GEOM_UZIP # Support md(4) and md-based rootfs Modified: head/sys/mips/conf/RT5350_FDT ============================================================================== --- head/sys/mips/conf/RT5350_FDT Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/RT5350_FDT Tue Feb 26 19:55:03 2019 (r344605) @@ -26,7 +26,7 @@ makeoptions MODULES_OVERRIDE="" options ROOTDEVNAME=\"ufs:md0.uzip\" # Support geom_uzip(4) compressed disk images -device geom_uzip +device xz options GEOM_UZIP # Support md(4) and md-based rootfs Modified: head/sys/mips/conf/TL-ARCHERC7V2 ============================================================================== --- head/sys/mips/conf/TL-ARCHERC7V2 Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/TL-ARCHERC7V2 Tue Feb 26 19:55:03 2019 (r344605) @@ -46,7 +46,7 @@ options MSDOSFS options AR71XX_ENV_UBOOT # uzip - to boot natively from flash -device geom_uzip +device xz options GEOM_UZIP # Used for the static uboot partition map Modified: head/sys/mips/conf/TL-WDR4300 ============================================================================== --- head/sys/mips/conf/TL-WDR4300 Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/TL-WDR4300 Tue Feb 26 19:55:03 2019 (r344605) @@ -39,7 +39,7 @@ options MSDOSFS options AR71XX_ENV_UBOOT # uzip - to boot natively from flash -device geom_uzip +device xz options GEOM_UZIP # Used for the static uboot partition map Modified: head/sys/mips/conf/TL-WR1043NDv2 ============================================================================== --- head/sys/mips/conf/TL-WR1043NDv2 Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/TL-WR1043NDv2 Tue Feb 26 19:55:03 2019 (r344605) @@ -34,7 +34,7 @@ options MSDOSFS options AR71XX_ENV_UBOOT # uzip - to boot natively from flash -device geom_uzip +device xz options GEOM_UZIP # Used for the static uboot partition map Modified: head/sys/mips/conf/TL-WR740Nv4 ============================================================================== --- head/sys/mips/conf/TL-WR740Nv4 Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/TL-WR740Nv4 Tue Feb 26 19:55:03 2019 (r344605) @@ -43,7 +43,7 @@ device arswitch options AR71XX_ENV_UBOOT # uzip - to boot natively from flash -device geom_uzip +device xz options GEOM_UZIP # Used for the static uboot partition map Modified: head/sys/mips/conf/TP-MR3040 ============================================================================== --- head/sys/mips/conf/TP-MR3040 Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/TP-MR3040 Tue Feb 26 19:55:03 2019 (r344605) @@ -48,7 +48,7 @@ device arswitch options AR71XX_ENV_UBOOT # uzip - to boot read-only lzma natively from flash -device geom_uzip +device xz options GEOM_UZIP options ROOTDEVNAME=\"ufs:/dev/map/rootfs.uzip\" Modified: head/sys/mips/conf/TP-WN1043ND ============================================================================== --- head/sys/mips/conf/TP-WN1043ND Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/TP-WN1043ND Tue Feb 26 19:55:03 2019 (r344605) @@ -39,7 +39,7 @@ options MSDOSFS options AR71XX_ENV_UBOOT # uncompress - to boot natively from flash -device geom_uzip +device xz options GEOM_UZIP # Used for the static uboot partition map Modified: head/sys/mips/conf/WZR-300HP ============================================================================== --- head/sys/mips/conf/WZR-300HP Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/WZR-300HP Tue Feb 26 19:55:03 2019 (r344605) @@ -26,6 +26,7 @@ options BOOTVERBOSE # GEOM modules device geom_map # to get access to the SPI flash partitions +device xz options GEOM_UZIP options ROOTDEVNAME=\"ufs:/dev/map/rootfs.uzip\" Modified: head/sys/mips/conf/WZR-HPAG300H ============================================================================== --- head/sys/mips/conf/WZR-HPAG300H Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/WZR-HPAG300H Tue Feb 26 19:55:03 2019 (r344605) @@ -25,6 +25,7 @@ options AR71XX_ENV_UBOOT options BOOTVERBOSE # GEOM modules +device xz options GEOM_UZIP device geom_map # to get access to the SPI flash partitions Modified: head/sys/mips/conf/std.XLP ============================================================================== --- head/sys/mips/conf/std.XLP Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/mips/conf/std.XLP Tue Feb 26 19:55:03 2019 (r344605) @@ -56,6 +56,7 @@ options ALT_BREAK_TO_DEBUGGER #options LOCK_DEBUG #options LOCK_PROFILING +device xz options GEOM_UZIP # Device tree Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/modules/Makefile Tue Feb 26 19:55:03 2019 (r344605) @@ -404,6 +404,7 @@ SUBDIR= \ ${_x86bios} \ ${_xe} \ xl \ + xz \ zlib .if ${MK_AUTOFS} != "no" || defined(ALL_MODULES) Modified: head/sys/modules/geom/geom_uzip/Makefile ============================================================================== --- head/sys/modules/geom/geom_uzip/Makefile Tue Feb 26 19:36:57 2019 (r344604) +++ head/sys/modules/geom/geom_uzip/Makefile Tue Feb 26 19:55:03 2019 (r344605) @@ -8,16 +8,10 @@ SRCS+= g_uzip.h g_uzip_dapi.h g_uzip_lzma.h g_uzip_zli g_uzip_wrkthr.h #CFLAGS= -g -DINVARIANT_SUPPORT -DINVARIANTS -.PATH: ${SRCTOP}/sys/contrib/xz-embedded/freebsd/ \ - ${SRCTOP}/sys/contrib/xz-embedded/linux/lib/xz/ \ - ${SRCTOP}/sys/contrib/xz-embedded/linux/include/linux/ \ - ${SRCTOP}/sys/net +.PATH: ${SRCTOP}/sys/net CFLAGS+= -I${SRCTOP}/sys/contrib/xz-embedded/freebsd \ -I${SRCTOP}/sys/contrib/xz-embedded/linux/lib/xz/ -SRCS+= xz_crc32.c xz_dec_bcj.c xz_dec_lzma2.c xz_dec_stream.c \ - xz_malloc.c -SRCS+= xz.h xz_config.h xz_lzma2.h xz_malloc.h xz_private.h xz_stream.h SRCS+= opt_geom.h .include <bsd.kmod.mk> Added: head/sys/modules/xz/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/xz/Makefile Tue Feb 26 19:55:03 2019 (r344605) @@ -0,0 +1,20 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/dev/xz +.PATH: ${SRCTOP}/sys/contrib/xz-embedded/freebsd +.PATH: ${SRCTOP}/sys/contrib/xz-embedded/linux/lib/xz + +KMOD= xz +SRCS= \ + xz_crc32.c \ + xz_dec_bcj.c \ + xz_dec_lzma2.c \ + xz_dec_stream.c \ + xz_mod.c + +CFLAGS+= \ + -I${SRCTOP}/sys/contrib/xz-embedded/freebsd \ + -I${SRCTOP}/sys/contrib/xz-embedded/linux/lib/xz \ + -I${SRCTOP}/sys/contrib/xz-embedded/linux/include/linux + +.include <bsd.kmod.mk>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902261955.x1QJt31L029584>