#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef CONFIG_COMPAT #include #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #if defined(CONFIG_X86_64) #define BOOTSTRAP_DIRECTMAP_END (1UL << 32) /* 4GB */ #define maddr_to_bootstrap_virt(m) maddr_to_virt(m) #else #define BOOTSTRAP_DIRECTMAP_END (1UL << 30) /* 1GB */ #define maddr_to_bootstrap_virt(m) ((void *)(long)(m)) #endif extern void generic_apic_probe(void); extern void numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn); extern u16 boot_edid_caps; extern u8 boot_edid_info[128]; extern struct boot_video_info boot_vid_info; /* * opt_xenheap_megabytes: Size of Xen heap in megabytes, excluding the * page_info table and allocation bitmap. */ static unsigned int opt_xenheap_megabytes = XENHEAP_DEFAULT_MB; #if defined(CONFIG_X86_64) integer_param("xenheap_megabytes", opt_xenheap_megabytes); #endif /* opt_nosmp: If true, secondary processors are ignored. */ static int opt_nosmp = 0; boolean_param("nosmp", opt_nosmp); /* maxcpus: maximum number of CPUs to activate. */ static unsigned int max_cpus = NR_CPUS; integer_param("maxcpus", max_cpus); /* opt_watchdog: If true, run a watchdog NMI on each processor. */ static int opt_watchdog = 0; boolean_param("watchdog", opt_watchdog); /* **** Linux config option: propagated to domain0. */ /* "acpi=off": Sisables both ACPI table parsing and interpreter. */ /* "acpi=force": Override the disable blacklist. */ /* "acpi=strict": Disables out-of-spec workarounds. */ /* "acpi=ht": Limit ACPI just to boot-time to enable HT. */ /* "acpi=noirq": Disables ACPI interrupt routing. */ static void parse_acpi_param(char *s); custom_param("acpi", parse_acpi_param); /* **** Linux config option: propagated to domain0. */ /* acpi_skip_timer_override: Skip IRQ0 overrides. */ extern int acpi_skip_timer_override; boolean_param("acpi_skip_timer_override", acpi_skip_timer_override); /* **** Linux config option: propagated to domain0. */ /* noapic: Disable IOAPIC setup. */ extern int skip_ioapic_setup; boolean_param("noapic", skip_ioapic_setup); /* **** Linux config option: propagated to domain0. */ /* xen_cpuidle: xen control cstate. */ /*static*/ int xen_cpuidle; boolean_param("cpuidle", xen_cpuidle); int early_boot = 1; cpumask_t cpu_present_map; unsigned long xen_phys_start; /* Limits of Xen heap, used to initialise the allocator. */ unsigned long xenheap_phys_start, xenheap_phys_end; extern void arch_init_memory(void); extern void init_IRQ(void); extern void early_time_init(void); extern void early_cpu_init(void); extern void vesa_init(void); extern void vesa_mtrr_init(void); DEFINE_PER_CPU(struct desc_struct *, gdt_table) = boot_cpu_gdt_table; #ifdef CONFIG_COMPAT DEFINE_PER_CPU(struct desc_struct *, compat_gdt_table) = boot_cpu_compat_gdt_table; #endif struct tss_struct init_tss[NR_CPUS]; char __attribute__ ((__section__(".bss.stack_aligned"))) cpu0_stack[STACK_SIZE]; struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, -1 }; unsigned long mmu_cr4_features = X86_CR4_PSE | X86_CR4_PGE | X86_CR4_PAE; EXPORT_SYMBOL(mmu_cr4_features); int acpi_disabled; int acpi_force; char acpi_param[10] = ""; static void __init parse_acpi_param(char *s) { /* Save the parameter so it can be propagated to domain0. */ safe_strcpy(acpi_param, s); /* Interpret the parameter for use within Xen. */ if ( !strcmp(s, "off") ) { disable_acpi(); } else if ( !strcmp(s, "force") ) { acpi_force = 1; acpi_ht = 1; acpi_disabled = 0; } else if ( !strcmp(s, "strict") ) { acpi_strict = 1; } else if ( !strcmp(s, "ht") ) { if ( !acpi_force ) disable_acpi(); acpi_ht = 1; } else if ( !strcmp(s, "noirq") ) { acpi_noirq_set(); } } static void __init do_initcalls(void) { initcall_t *call; for ( call = &__initcall_start; call < &__initcall_end; call++ ) (*call)(); } #define EARLY_FAIL(f, a...) do { \ printk( f , ## a ); \ for ( ; ; ) halt(); \ } while (0) static unsigned long __initdata initial_images_start, initial_images_end; unsigned long __init initial_images_nrpages(void) { ASSERT(!(initial_images_start & ~PAGE_MASK)); ASSERT(!(initial_images_end & ~PAGE_MASK)); return ((initial_images_end >> PAGE_SHIFT) - (initial_images_start >> PAGE_SHIFT)); } void __init discard_initial_images(void) { init_domheap_pages(initial_images_start, initial_images_end); } extern char __per_cpu_start[], __per_cpu_data_end[], __per_cpu_end[]; static void __init percpu_init_areas(void) { unsigned int i, data_size = __per_cpu_data_end - __per_cpu_start; unsigned int first_unused; BUG_ON(data_size > PERCPU_SIZE); /* Initialise per-cpu data area for all possible secondary CPUs. */ for ( i = 1; (i < NR_CPUS) && cpu_possible(i); i++ ) memcpy(__per_cpu_start + (i << PERCPU_SHIFT), __per_cpu_start, data_size); first_unused = i; /* Check that there are no holes in cpu_possible_map. */ for ( ; i < NR_CPUS; i++ ) BUG_ON(cpu_possible(i)); #ifndef MEMORY_GUARD init_xenheap_pages(__pa(__per_cpu_start) + (first_unused << PERCPU_SHIFT), __pa(__per_cpu_end)); #endif memguard_guard_range(&__per_cpu_start[first_unused << PERCPU_SHIFT], (NR_CPUS - first_unused) << PERCPU_SHIFT); #if defined(CONFIG_X86_64) /* Also zap the mapping in the 1:1 area. */ memguard_guard_range(__va(__pa(__per_cpu_start)) + (first_unused << PERCPU_SHIFT), (NR_CPUS - first_unused) << PERCPU_SHIFT); #endif } static void __init init_idle_domain(void) { struct domain *idle_domain; /* Domain creation requires that scheduler structures are initialised. */ scheduler_init(); idle_domain = domain_create(IDLE_DOMAIN_ID, 0, 0); if ( (idle_domain == NULL) || (alloc_vcpu(idle_domain, 0, 0) == NULL) ) BUG(); set_current(idle_domain->vcpu[0]); idle_vcpu[0] = this_cpu(curr_vcpu) = current; setup_idle_pagetable(); } static void __init srat_detect_node(int cpu) { unsigned node; u32 apicid = x86_cpu_to_apicid[cpu]; node = apicid_to_node[apicid]; if ( node == NUMA_NO_NODE ) node = 0; numa_set_node(cpu, node); if ( acpi_numa > 0 ) printk(KERN_INFO "CPU %d APIC %d -> Node %d\n", cpu, apicid, node); } /* * Ensure a given physical memory range is present in the bootstrap mappings. * Use superpage mappings to ensure that pagetable memory needn't be allocated. */ static void __init bootstrap_map(unsigned long start, unsigned long end) { unsigned long mask = (1UL << L2_PAGETABLE_SHIFT) - 1; start = max_t(unsigned long, start & ~mask, 16UL << 20); end = (end + mask) & ~mask; if ( start >= end ) return; if ( end > BOOTSTRAP_DIRECTMAP_END ) panic("Cannot access memory beyond end of " "bootstrap direct-map area\n"); map_pages_to_xen( (unsigned long)maddr_to_bootstrap_virt(start), start >> PAGE_SHIFT, (end-start) >> PAGE_SHIFT, PAGE_HYPERVISOR); } static void __init move_memory( unsigned long dst, unsigned long src_start, unsigned long src_end) { bootstrap_map(src_start, src_end); bootstrap_map(dst, dst + src_end - src_start); memmove(maddr_to_bootstrap_virt(dst), maddr_to_bootstrap_virt(src_start), src_end - src_start); } /* A temporary copy of the e820 map that we can mess with during bootstrap. */ static struct e820map __initdata boot_e820; struct boot_video_info { u8 orig_x; /* 0x00 */ u8 orig_y; /* 0x01 */ u8 orig_video_mode; /* 0x02 */ u8 orig_video_cols; /* 0x03 */ u8 orig_video_lines; /* 0x04 */ u8 orig_video_isVGA; /* 0x05 */ u16 orig_video_points; /* 0x06 */ /* VESA graphic mode -- linear frame buffer */ u32 capabilities; /* 0x08 */ u16 lfb_linelength; /* 0x0c */ u16 lfb_width; /* 0x0e */ u16 lfb_height; /* 0x10 */ u16 lfb_depth; /* 0x12 */ u32 lfb_base; /* 0x14 */ u32 lfb_size; /* 0x18 */ u8 red_size; /* 0x1c */ u8 red_pos; /* 0x1d */ u8 green_size; /* 0x1e */ u8 green_pos; /* 0x1f */ u8 blue_size; /* 0x20 */ u8 blue_pos; /* 0x21 */ u8 rsvd_size; /* 0x22 */ u8 rsvd_pos; /* 0x23 */ u16 vesapm_seg; /* 0x24 */ u16 vesapm_off; /* 0x26 */ u16 vesa_attrib; /* 0x28 */ }; static void __init parse_video_info(void) { struct boot_video_info *bvi = &bootsym(boot_vid_info); if ( (bvi->orig_video_isVGA == 1) && (bvi->orig_video_mode == 3) ) { vga_console_info.video_type = XEN_VGATYPE_TEXT_MODE_3; vga_console_info.u.text_mode_3.font_height = bvi->orig_video_points; vga_console_info.u.text_mode_3.cursor_x = bvi->orig_x; vga_console_info.u.text_mode_3.cursor_y = bvi->orig_y; vga_console_info.u.text_mode_3.rows = bvi->orig_video_lines; vga_console_info.u.text_mode_3.columns = bvi->orig_video_cols; } else if ( bvi->orig_video_isVGA == 0x23 ) { vga_console_info.video_type = XEN_VGATYPE_VESA_LFB; vga_console_info.u.vesa_lfb.width = bvi->lfb_width; vga_console_info.u.vesa_lfb.height = bvi->lfb_height; vga_console_info.u.vesa_lfb.bytes_per_line = bvi->lfb_linelength; vga_console_info.u.vesa_lfb.bits_per_pixel = bvi->lfb_depth; vga_console_info.u.vesa_lfb.lfb_base = bvi->lfb_base; vga_console_info.u.vesa_lfb.lfb_size = bvi->lfb_size; vga_console_info.u.vesa_lfb.red_pos = bvi->red_pos; vga_console_info.u.vesa_lfb.red_size = bvi->red_size; vga_console_info.u.vesa_lfb.green_pos = bvi->green_pos; vga_console_info.u.vesa_lfb.green_size = bvi->green_size; vga_console_info.u.vesa_lfb.blue_pos = bvi->blue_pos; vga_console_info.u.vesa_lfb.blue_size = bvi->blue_size; vga_console_info.u.vesa_lfb.rsvd_pos = bvi->rsvd_pos; vga_console_info.u.vesa_lfb.rsvd_size = bvi->rsvd_size; vga_console_info.u.vesa_lfb.gbl_caps = bvi->capabilities; vga_console_info.u.vesa_lfb.mode_attrs = bvi->vesa_attrib; } } void __init kexec_reserve_area(struct e820map *e820) { unsigned long kdump_start = kexec_crash_area.start; unsigned long kdump_size = kexec_crash_area.size; static int is_reserved = 0; kdump_size = (kdump_size + PAGE_SIZE - 1) & PAGE_MASK; if ( (kdump_start == 0) || (kdump_size == 0) || is_reserved ) return; is_reserved = 1; if ( !reserve_e820_ram(e820, kdump_start, kdump_start + kdump_size) ) { printk("Kdump: DISABLED (failed to reserve %luMB (%lukB) at 0x%lx)" "\n", kdump_size >> 20, kdump_size >> 10, kdump_start); kexec_crash_area.start = kexec_crash_area.size = 0; } else { printk("Kdump: %luMB (%lukB) at 0x%lx\n", kdump_size >> 20, kdump_size >> 10, kdump_start); } } void init_done(void) { extern char __init_begin[], __init_end[]; /* Free (or page-protect) the init areas. */ #ifndef MEMORY_GUARD init_xenheap_pages(__pa(__init_begin), __pa(__init_end)); #endif memguard_guard_range(__init_begin, __init_end - __init_begin); #if defined(CONFIG_X86_64) /* Also zap the mapping in the 1:1 area. */ memguard_guard_range(__va(__pa(__init_begin)), __init_end - __init_begin); #endif printk("Freed %ldkB init memory.\n", (long)(__init_end-__init_begin)>>10); startup_cpu_idle_loop(); } static char * __init cmdline_cook(char *p) { p = p ? : ""; while ( *p == ' ' ) p++; while ( (*p != ' ') && (*p != '\0') ) p++; while ( *p == ' ' ) p++; return p; } void __init __start_xen(unsigned long mbi_p) { char *memmap_type = NULL; char *cmdline, *kextra; unsigned long _initrd_start = 0, _initrd_len = 0; unsigned int initrdidx = 1; multiboot_info_t *mbi = __va(mbi_p); module_t *mod = (module_t *)__va(mbi->mods_addr); unsigned long nr_pages, modules_length; int i, e820_warn = 0, bytes = 0; struct ns16550_defaults ns16550 = { .data_bits = 8, .parity = 'n', .stop_bits = 1 }; extern void early_page_fault(void); set_intr_gate(TRAP_page_fault, &early_page_fault); /* Parse the command-line options. */ cmdline = cmdline_cook((mbi->flags & MBI_CMDLINE) ? __va(mbi->cmdline) : NULL); if ( (kextra = strstr(cmdline, " -- ")) != NULL ) { /* * Options after ' -- ' separator belong to dom0. * 1. Orphan dom0's options from Xen's command line. * 2. Skip all but final leading space from dom0's options. */ *kextra = '\0'; kextra += 3; while ( kextra[1] == ' ' ) kextra++; } cmdline_parse(cmdline); parse_video_info(); set_current((struct vcpu *)0xfffff000); /* debug sanity */ idle_vcpu[0] = current; set_processor_id(0); /* needed early, for smp_processor_id() */ if ( cpu_has_efer ) rdmsrl(MSR_EFER, this_cpu(efer)); asm volatile ( "mov %%cr4,%0" : "=r" (this_cpu(cr4)) ); smp_prepare_boot_cpu(); /* We initialise the serial devices very early so we can get debugging. */ ns16550.io_base = 0x3f8; ns16550.irq = 4; ns16550_init(0, &ns16550); ns16550.io_base = 0x2f8; ns16550.irq = 3; ns16550_init(1, &ns16550); serial_init_preirq(); init_console(); printk("Command line: %s\n", cmdline); printk("Video information:\n"); /* Print VGA display mode information. */ switch ( vga_console_info.video_type ) { case XEN_VGATYPE_TEXT_MODE_3: printk(" VGA is text mode %dx%d, font 8x%d\n", vga_console_info.u.text_mode_3.columns, vga_console_info.u.text_mode_3.rows, vga_console_info.u.text_mode_3.font_height); break; case XEN_VGATYPE_VESA_LFB: printk(" VGA is graphics mode %dx%d, %d bpp\n", vga_console_info.u.vesa_lfb.width, vga_console_info.u.vesa_lfb.height, vga_console_info.u.vesa_lfb.bits_per_pixel); bre
#
# Copyright (C) 2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

LIB_MENU:=Libraries

define KernelPackage/lib-crc-ccitt
  SUBMENU:=$(LIB_MENU)
  TITLE:=CRC-CCITT support
  KCONFIG:=CONFIG_CRC_CCITT
  FILES:=$(LINUX_DIR)/lib/crc-ccitt.ko
  AUTOLOAD:=$(call AutoProbe,crc-ccitt)
endef

define KernelPackage/lib-crc-ccitt/description
 Kernel module for CRC-CCITT support
endef

$(eval $(call KernelPackage,lib-crc-ccitt))


define KernelPackage/lib-crc-itu-t
  SUBMENU:=$(LIB_MENU)
  TITLE:=CRC ITU-T V.41 support
  KCONFIG:=CONFIG_CRC_ITU_T
  FILES:=$(LINUX_DIR)/lib/crc-itu-t.ko
  AUTOLOAD:=$(call AutoProbe,crc-itu-t)
endef

define KernelPackage/lib-crc-itu-t/description
 Kernel module for CRC ITU-T V.41 support
endef

$(eval $(call KernelPackage,lib-crc-itu-t))


define KernelPackage/lib-crc7
  SUBMENU:=$(LIB_MENU)
  TITLE:=CRC7 support
  KCONFIG:=CONFIG_CRC7
  FILES:=$(LINUX_DIR)/lib/crc7.ko
  AUTOLOAD:=$(call AutoProbe,crc7)
endef

define KernelPackage/lib-crc7/description
 Kernel module for CRC7 support
endef

$(eval $(call KernelPackage,lib-crc7))


define KernelPackage/lib-crc8
  SUBMENU:=$(LIB_MENU)
  TITLE:=CRC8 support
  KCONFIG:=CONFIG_CRC8
  FILES:=$(LINUX_DIR)/lib/crc8.ko
  AUTOLOAD:=$(call AutoProbe,crc8)
endef

define KernelPackage/lib-crc8/description
 Kernel module for CRC8 support
endef

$(eval $(call KernelPackage,lib-crc8))


define KernelPackage/lib-crc16
  SUBMENU:=$(LIB_MENU)
  TITLE:=CRC16 support
  KCONFIG:=CONFIG_CRC16
  FILES:=$(LINUX_DIR)/lib/crc16.ko
  AUTOLOAD:=$(call AutoLoad,20,crc16,1)
endef

define KernelPackage/lib-crc16/description
 Kernel module for CRC16 support
endef

$(eval $(call KernelPackage,lib-crc16))


define KernelPackage/lib-crc32c
  SUBMENU:=$(LIB_MENU)
  TITLE:=CRC32 support
  KCONFIG:=CONFIG_LIBCRC32C
  DEPENDS:=+kmod-crypto-crc32c
  FILES:=$(LINUX_DIR)/lib/libcrc32c.ko
  AUTOLOAD:=$(call AutoProbe,libcrc32c)
endef

define KernelPackage/lib-crc32c/description
 Kernel module for CRC32 support
endef

$(eval $(call KernelPackage,lib-crc32c))


define KernelPackage/lib-lzo
  SUBMENU:=$(LIB_MENU)
  TITLE:=LZO support
  DEPENDS:=+kmod-crypto-acompress
  KCONFIG:= \
	CONFIG_CRYPTO_LZO \
	CONFIG_LZO_COMPRESS \
	CONFIG_LZO_DECOMPRESS
  HIDDEN:=1
  FILES:= \
	$(LINUX_DIR)/crypto/lzo.ko \
	$(LINUX_DIR)/crypto/lzo-rle.ko \
	$(LINUX_DIR)/lib/lzo/lzo_compress.ko \
	$(LINUX_DIR)/lib/lzo/lzo_decompress.ko
  AUTOLOAD:=$(call AutoProbe,lzo lzo-rle lzo_compress lzo_decompress)
endef

define KernelPackage/lib-lzo/description
 Kernel module for LZO compression/decompression support
endef

$(eval $(call KernelPackage,lib-lzo))


define KernelPackage/lib-zstd
  SUBMENU:=$(LIB_MENU)
  TITLE:=ZSTD support
  DEPENDS:=+kmod-crypto-acompress
  KCONFIG:= \
	CONFIG_CRYPTO_ZSTD \
	CONFIG_ZSTD_COMPRESS \
	CONFIG_ZSTD_DECOMPRESS \
	CONFIG_XXHASH
  FILES:= \
	$(LINUX_DIR)/crypto/zstd.ko \
	$(LINUX_DIR)/lib/xxhash.ko \
	$(LINUX_DIR)/lib/zstd/zstd_common.ko@ge6.1 \
	$(LINUX_DIR)/lib/zstd/zstd_compress.ko \
	$(LINUX_DIR)/lib/zstd/zstd_decompress.ko
  AUTOLOAD:=$(call AutoProbe,xxhash zstd zstd_compress zstd_decompress)
endef

define KernelPackage/lib-zstd/description
 Kernel module for ZSTD compression/decompression support
endef

$(eval $(call KernelPackage,lib-zstd))


define KernelPackage/lib-lz4
  SUBMENU:=$(LIB_MENU)
  TITLE:=LZ4 support
  DEPENDS:=+kmod-crypto-acompress
  KCONFIG:= \
	CONFIG_CRYPTO_LZ4 \
	CONFIG_CRYPTO_LZ4HC \
	CONFIG_LZ4_COMPRESS \
	CONFIG_LZ4_DECOMPRESS
  FILES:= \
	$(LINUX_DIR)/crypto/lz4.ko \
	$(LINUX_DIR)/lib/lz4/lz4_compress.ko \
	$(LINUX_DIR)/lib/lz4/lz4hc_compress.ko \
	$(LINUX_DIR)/lib/lz4/lz4_decompress.ko
  AUTOLOAD:=$(call AutoProbe,lz4 lz4_compress lz4hc_compress lz4_decompress)
endef

define KernelPackage/lib-lz4/description
 Kernel module for LZ4 compression/decompression support
endef

$(eval $(call KernelPackage,lib-lz4))


define KernelPackage/lib-842
  SUBMENU:=$(LIB_MENU)
  TITLE:=842 support
  DEPENDS:=+kmod-crypto-acompress +kmod-crypto-crc32
  KCONFIG:= \
	CONFIG_CRYPTO_842 \
	CONFIG_842_COMPRESS \
	CONFIG_842_DECOMPRESS
  FILES:= \
	$(LINUX_DIR)/crypto/842.ko \
	$(LINUX_DIR)/lib/842/842_compress.ko \
	$(LINUX_DIR)/lib/842/842_decompress.ko
  AUTOLOAD:=$(call AutoProbe,842 842_compress 842_decompress)
endef

define KernelPackage/lib-842/description
 Kernel module for 842 compression/decompression support
endef

$(eval $(call KernelPackage,lib-842))


define KernelPackage/lib-raid6
  SUBMENU:=$(LIB_MENU)
  TITLE:=RAID6 algorithm support
  HIDDEN:=1
  KCONFIG:=CONFIG_RAID6_PQ
  FILES:=$(LINUX_DIR)/lib/raid6/raid6_pq.ko
  AUTOLOAD:=$(call AutoProbe,raid6_pq)
endef

define KernelPackage/lib-raid6/description
 Kernel module for RAID6 algorithms
endef

$(eval $(call KernelPackage,lib-raid6))


define KernelPackage/lib-xor
  SUBMENU:=$(LIB_MENU)
  TITLE:=XOR blocks algorithm support
  HIDDEN:=1
  KCONFIG:=CONFIG_XOR_BLOCKS
ifneq ($(wildcard $(LINUX_DIR)/arch/$(LINUX_KARCH)/lib/xor-neon.ko),)
  FILES:= \
    $(LINUX_DIR)/crypto/xor.ko \
    $(LINUX_DIR)/arch/$(LINUX_KARCH)/lib/xor-neon.ko
  AUTOLOAD:=$(call AutoProbe,xor-neon xor)
else
  FILES:=$(LINUX_DIR)/crypto/xor.ko
  AUTOLOAD:=$(call AutoProbe,xor)
endif
endef

define KernelPackage/lib-xor/description
 Kernel module for XOR blocks algorithms
endef

$(eval $(call KernelPackage,lib-xor))


define KernelPackage/lib-textsearch
SUBMENU:=$(LIB_MENU)
  TITLE:=Textsearch support
  KCONFIG:= \
    CONFIG_TEXTSEARCH=y \
    CONFIG_TEXTSEARCH_KMP \
    CONFIG_TEXTSEARCH_BM \
    CONFIG_TEXTSEARCH_FSM
  FILES:= \
    $(LINUX_DIR)/lib/ts_kmp.ko \
    $(LINUX_DIR)/lib/ts_bm.ko \
    $(LINUX_DIR)/lib/ts_fsm.ko
  AUTOLOAD:=$(call AutoProbe,ts_kmp ts_bm ts_fsm)
endef

$(eval $(call KernelPackage,lib-textsearch))


define KernelPackage/lib-zlib-inflate
  SUBMENU:=$(LIB_MENU)
  TITLE:=Zlib support
  HIDDEN:=1
  KCONFIG:=CONFIG_ZLIB_INFLATE
  FILES:=$(LINUX_DIR)/lib/zlib_inflate/zlib_inflate.ko
  AUTOLOAD:=$(call AutoProbe,zlib_inflate)
endef

$(eval $(call KernelPackage,lib-zlib-inflate))


define KernelPackage/lib-zlib-deflate
  SUBMENU:=$(LIB_MENU)
  TITLE:=Zlib support
  HIDDEN:=1
  KCONFIG:=CONFIG_ZLIB_DEFLATE
  FILES:=$(LINUX_DIR)/lib/zlib_deflate/zlib_deflate.ko
  AUTOLOAD:=$(call AutoProbe,zlib_deflate)
endef

$(eval $(call KernelPackage,lib-zlib-deflate))


define KernelPackage/lib-cordic
  SUBMENU:=$(LIB_MENU)
  TITLE:=Cordic function support
  KCONFIG:=CONFIG_CORDIC
  FILES:=$(LINUX_DIR)/lib/math/cordic.ko
  AUTOLOAD:=$(call AutoProbe,cordic)
endef

define KernelPackage/lib-cordic/description
 Kernel module for Cordic function support
endef

$(eval $(call KernelPackage,lib-cordic))


define KernelPackage/asn1-decoder
  SUBMENU:=$(LIB_MENU)
  TITLE:=Simple ASN1 decoder
  KCONFIG:= CONFIG_ASN1
  HIDDEN:=1
  FILES:=$(LINUX_DIR)/lib/asn1_decoder.ko
endef

$(eval $(call KernelPackage,asn1-decoder))

define KernelPackage/asn1-encoder
  SUBMENU:=$(LIB_MENU)
  TITLE:=Simple ASN1 encoder
  KCONFIG:= CONFIG_ASN1_ENCODER
  HIDDEN:=1
  FILES:=$(LINUX_DIR)/lib/asn1_encoder.ko
endef

$(eval $(call KernelPackage,asn1-encoder))

define KernelPackage/oid-registry
  SUBMENU:=$(LIB_MENU)
  TITLE:=Object identifier registry
  KCONFIG:= CONFIG_OID_REGISTRY
  FILES:=$(LINUX_DIR)/lib/oid_registry.ko
  AUTOLOAD:=$(call AutoLoad,31,oid_registry)
endef

$(eval $(call KernelPackage,oid-registry))


define KernelPackage/lib-objagg
  SUBMENU:=$(LIB_MENU)
  TITLE:=objagg support
  FILES:=$(LINUX_DIR)/lib/objagg.ko
  KCONFIG:= \
  CONFIG_OBJAGG \
  CONFIG_TEST_OBJAGG=n
  AUTOLOAD:=$(call AutoProbe,objagg)
endef

$(eval $(call KernelPackage,lib-objagg))


define KernelPackage/lib-parman
  SUBMENU:=$(LIB_MENU)
  TITLE:=parman support
  FILES:=$(LINUX_DIR)/lib/parman.ko
  KCONFIG:= \
  CONFIG_PARMAN \
  CONFIG_TEST_PARMAN=n
  AUTOLOAD:=$(call AutoProbe,parman)
endef

$(eval $(call KernelPackage,lib-parman))