Commit c8531ab343dec88ed8005e403b1b304c710b7494

Authored by H. Peter Anvin
1 parent 2e9f3bddcb

bzip2/lzma: proper Kconfig dependencies for the ramdisk options

Impact: Partial resolution of build failure

Make all the compression algorithms properly configurable, and make
sure the ramdisk options pull in the proper compression algorithms, as
they should.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>

Showing 3 changed files with 29 additions and 11 deletions Side-by-side Diff

drivers/block/Kconfig
... ... @@ -358,10 +358,20 @@
358 358 will prevent RAM block device backing store memory from being
359 359 allocated from highmem (only a problem for highmem systems).
360 360  
  361 +config RD_GZIP
  362 + bool "Initial ramdisk compressed using gzip"
  363 + default y
  364 + depends on BLK_DEV_INITRD=y
  365 + select DECOMPRESS_GZIP
  366 + help
  367 + Support loading of a gzip encoded initial ramdisk or cpio buffer.
  368 + If unsure, say Y.
  369 +
361 370 config RD_BZIP2
362 371 bool "Initial ramdisk compressed using bzip2"
363 372 default n
364 373 depends on BLK_DEV_INITRD=y
  374 + select DECOMPRESS_BZIP2
365 375 help
366 376 Support loading of a bzip2 encoded initial ramdisk or cpio buffer
367 377 If unsure, say N.
368 378  
... ... @@ -370,18 +380,10 @@
370 380 bool "Initial ramdisk compressed using lzma"
371 381 default n
372 382 depends on BLK_DEV_INITRD=y
  383 + select DECOMPRESS_LZMA
373 384 help
374 385 Support loading of a lzma encoded initial ramdisk or cpio buffer
375 386 If unsure, say N.
376   -
377   -config RD_GZIP
378   - bool "Initial ramdisk compressed using gzip"
379   - default y
380   - depends on BLK_DEV_INITRD=y
381   - select ZLIB_INFLATE
382   - help
383   - Support loading of a gzip encoded initial ramdisk or cpio buffer.
384   - If unsure, say Y.
385 387  
386 388 config CDROM_PKTCDVD
387 389 tristate "Packet writing on CD/DVD media"
... ... @@ -98,6 +98,19 @@
98 98 tristate
99 99  
100 100 #
  101 +# These all provide a common interface (hence the apparent duplication with
  102 +# ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.)
  103 +#
  104 +config DECOMPRESS_GZIP
  105 + tristate
  106 +
  107 +config DECOMPRESS_BZIP2
  108 + tristate
  109 +
  110 +config DECOMPRESS_LZMA
  111 + tristate
  112 +
  113 +#
101 114 # Generic allocator support is selected if needed
102 115 #
103 116 config GENERIC_ALLOCATOR
... ... @@ -11,8 +11,7 @@
11 11 rbtree.o radix-tree.o dump_stack.o \
12 12 idr.o int_sqrt.o extable.o prio_tree.o \
13 13 sha1.o irq_regs.o reciprocal_div.o argv_split.o \
14   - proportions.o prio_heap.o ratelimit.o show_mem.o is_single_threaded.o \
15   - decompress_inflate.o decompress_bunzip2.o decompress_unlzma.o
  14 + proportions.o prio_heap.o ratelimit.o show_mem.o is_single_threaded.o
16 15  
17 16 lib-$(CONFIG_MMU) += ioremap.o
18 17 lib-$(CONFIG_SMP) += cpumask.o
... ... @@ -65,6 +64,10 @@
65 64 obj-$(CONFIG_REED_SOLOMON) += reed_solomon/
66 65 obj-$(CONFIG_LZO_COMPRESS) += lzo/
67 66 obj-$(CONFIG_LZO_DECOMPRESS) += lzo/
  67 +
  68 +obj-$(CONFIG_DECOMPRESS_GZIP) += decompress_inflate.o
  69 +obj-$(CONFIG_DECOMPRESS_BZIP2) += decompress_bunzip2.o
  70 +obj-$(CONFIG_DECOMPRESS_LZMA) += decompress_unlzma.o
68 71  
69 72 obj-$(CONFIG_TEXTSEARCH) += textsearch.o
70 73 obj-$(CONFIG_TEXTSEARCH_KMP) += ts_kmp.o