Browse Source

update Linux kernels, add support for compression choice

Waldemar Brodkorb 13 years ago
parent
commit
75ccd81812
65 changed files with 104 additions and 19 deletions
  1. 54 6
      Config.in
  2. 23 4
      mk/image.mk
  3. 9 9
      mk/kernel-ver.mk
  4. 6 0
      scripts/scan-tools.sh
  5. 12 0
      target/linux/config/Config.in.kernel
  6. 0 0
      target/linux/patches/3.0.17/bsd-compatibility.patch
  7. 0 0
      target/linux/patches/3.0.17/cris-etrax.patch
  8. 0 0
      target/linux/patches/3.0.17/defaults.patch
  9. 0 0
      target/linux/patches/3.0.17/fon2100.patch
  10. 0 0
      target/linux/patches/3.0.17/gemalto.patch
  11. 0 0
      target/linux/patches/3.0.17/mips-malta.patch
  12. 0 0
      target/linux/patches/3.0.17/mmc-host.patch
  13. 0 0
      target/linux/patches/3.0.17/non-static.patch
  14. 0 0
      target/linux/patches/3.0.17/sparc-include.patch
  15. 0 0
      target/linux/patches/3.0.17/startup.patch
  16. 0 0
      target/linux/patches/3.0.17/usb-defaults-off.patch
  17. 0 0
      target/linux/patches/3.0.17/uuid.patch
  18. 0 0
      target/linux/patches/3.0.17/vga-cons-default-off.patch
  19. 0 0
      target/linux/patches/3.0.17/wlan-cf.patch
  20. 0 0
      target/linux/patches/3.0.17/x86-build.patch
  21. 0 0
      target/linux/patches/3.0.17/zlib-inflate.patch
  22. 0 0
      target/linux/patches/3.1.9/bsd-compatibility.patch
  23. 0 0
      target/linux/patches/3.1.9/cris-etrax.patch
  24. 0 0
      target/linux/patches/3.1.9/defaults.patch
  25. 0 0
      target/linux/patches/3.1.9/fon2100.patch
  26. 0 0
      target/linux/patches/3.1.9/gemalto.patch
  27. 0 0
      target/linux/patches/3.1.9/mmc-host.patch
  28. 0 0
      target/linux/patches/3.1.9/non-static.patch
  29. 0 0
      target/linux/patches/3.1.9/sparc-include.patch
  30. 0 0
      target/linux/patches/3.1.9/startup.patch
  31. 0 0
      target/linux/patches/3.1.9/usb-defaults-off.patch
  32. 0 0
      target/linux/patches/3.1.9/uuid.patch
  33. 0 0
      target/linux/patches/3.1.9/vga-cons-default-off.patch
  34. 0 0
      target/linux/patches/3.1.9/wlan-cf.patch
  35. 0 0
      target/linux/patches/3.1.9/x86-build.patch
  36. 0 0
      target/linux/patches/3.1.9/zlib-inflate.patch
  37. 0 0
      target/linux/patches/3.2.1/bsd-compatibility.patch
  38. 0 0
      target/linux/patches/3.2.1/cris-etrax.patch
  39. 0 0
      target/linux/patches/3.2.1/defaults.patch
  40. 0 0
      target/linux/patches/3.2.1/gemalto.patch
  41. 0 0
      target/linux/patches/3.2.1/mmc-host.patch
  42. 0 0
      target/linux/patches/3.2.1/non-static.patch
  43. 0 0
      target/linux/patches/3.2.1/sparc-include.patch
  44. 0 0
      target/linux/patches/3.2.1/startup.patch
  45. 0 0
      target/linux/patches/3.2.1/usb-defaults-off.patch
  46. 0 0
      target/linux/patches/3.2.1/uuid.patch
  47. 0 0
      target/linux/patches/3.2.1/vga-cons-default-off.patch
  48. 0 0
      target/linux/patches/3.2.1/wlan-cf.patch
  49. 0 0
      target/linux/patches/3.2.1/x86-build.patch
  50. 0 0
      target/linux/patches/3.2.1/zlib-inflate.patch
  51. 0 0
      toolchain/kernel-headers/patches/3.0.17/aufs2.patch
  52. 0 0
      toolchain/kernel-headers/patches/3.0.17/cleankernel.patch
  53. 0 0
      toolchain/kernel-headers/patches/3.0.17/etrax-header.patch
  54. 0 0
      toolchain/kernel-headers/patches/3.0.17/linux-gcc-check.patch
  55. 0 0
      toolchain/kernel-headers/patches/3.0.17/microperl.patch
  56. 0 0
      toolchain/kernel-headers/patches/3.1.9/aufs2.patch
  57. 0 0
      toolchain/kernel-headers/patches/3.1.9/cleankernel.patch
  58. 0 0
      toolchain/kernel-headers/patches/3.1.9/etrax-header.patch
  59. 0 0
      toolchain/kernel-headers/patches/3.1.9/linux-gcc-check.patch
  60. 0 0
      toolchain/kernel-headers/patches/3.1.9/microperl.patch
  61. 0 0
      toolchain/kernel-headers/patches/3.2.1/aufs2.patch
  62. 0 0
      toolchain/kernel-headers/patches/3.2.1/cleankernel.patch
  63. 0 0
      toolchain/kernel-headers/patches/3.2.1/etrax-header.patch
  64. 0 0
      toolchain/kernel-headers/patches/3.2.1/linux-gcc-check.patch
  65. 0 0
      toolchain/kernel-headers/patches/3.2.1/microperl.patch

+ 54 - 6
Config.in

@@ -98,20 +98,68 @@ config ADK_KERNEL_VERSION_2_6_39_4
 	prompt "2.6.39.4"
 	boolean
 
-config ADK_KERNEL_VERSION_3_0_9
-	prompt "3.0.9"
+config ADK_KERNEL_VERSION_3_0_17
+	prompt "3.0.17"
 	boolean
 
-config ADK_KERNEL_VERSION_3_1_8
-	prompt "3.1.8"
+config ADK_KERNEL_VERSION_3_1_9
+	prompt "3.1.9"
 	boolean
 
-config ADK_KERNEL_VERSION_3_2_0
-	prompt "3.2.0"
+config ADK_KERNEL_VERSION_3_2_1
+	prompt "3.2.1"
 	boolean
 
 endchoice
 
+choice
+prompt "Kernel Compression"
+config ADK_KERNEL_COMP_XZ
+	prompt "use XZ compression"
+	boolean
+	select ADK_KERNEL_RD_XZ
+	select ADK_KERNEL_KERNEL_XZ
+	select ADK_KERNEL_INITRAMFS_COMPRESSION_XZ
+
+config ADK_KERNEL_COMP_LZMA
+	prompt "use LZMA compression"
+	boolean
+	select ADK_KERNEL_RD_LZMA
+	select ADK_KERNEL_KERNEL_LZMA
+	select ADK_KERNEL_INITRAMFS_COMPRESSION_LZMA
+
+config ADK_KERNEL_COMP_LZO
+	prompt "use LZO compression"
+	boolean
+	select ADK_KERNEL_RD_LZO
+	select ADK_KERNEL_KERNEL_LZO
+	select ADK_KERNEL_INITRAMFS_COMPRESSION_LZO
+
+config ADK_KERNEL_COMP_GZIP
+	prompt "use GZIP compression"
+	boolean
+	select ADK_KERNEL_RD_GZIP
+	select ADK_KERNEL_KERNEL_GZIP
+	select ADK_KERNEL_INITRAMFS_COMPRESSION_GZIP
+
+config ADK_KERNEL_COMP_BZIP2
+	prompt "use BZIP2 compression"
+	boolean
+	select ADK_KERNEL_RD_BZIP2
+	select ADK_KERNEL_KERNEL_BZIP2
+	select ADK_KERNEL_INITRAMFS_COMPRESSION_BZIP2
+
+endchoice
+
+config ADK_COMPRESSION_TOOL
+	string
+	default "gzip -n9" if ADK_TARGET_INITRAMFS_COMPRESSION_GZIP
+	default "bzip2" if ADK_TARGET_INITRAMFS_COMPRESSION_BZIP2
+	default "xz" if ADK_TARGET_INITRAMFS_COMPRESSION_XZ
+	default "lzma -9" if ADK_TARGET_INITRAMFS_COMPRESSION_LZMA
+	default "lzop" if ADK_TARGET_INITRAMFS_COMPRESSION_LZO
+	help
+
 source "target/linux/Config.in"
 endmenu
 

+ 23 - 4
mk/image.mk

@@ -105,7 +105,7 @@ ${BIN_DIR}/${INITRAMFS}_list: ${TARGET_DIR}
 
 ${BIN_DIR}/${INITRAMFS}: ${BIN_DIR}/${INITRAMFS}_list
 	sh ${LINUX_DIR}/usr/gen_init_cpio ${BIN_DIR}/${INITRAMFS}_list | \
-		gzip -9 -c >$@
+		${ADK_COMPRESSION_TOOL} -c >$@
 
 ${BUILD_DIR}/root.squashfs: ${TARGET_DIR}
 	${STAGING_HOST_DIR}/bin/mksquashfs ${TARGET_DIR} \
@@ -113,14 +113,33 @@ ${BUILD_DIR}/root.squashfs: ${TARGET_DIR}
 		-nopad -noappend -root-owned $(MAKE_TRACE)
 
 createinitramfs: ${BIN_DIR}/${INITRAMFS}_list
-	${SED} 's/.*CONFIG_(BLK_DEV_INITRD|INITRAMFS_SOURCE).*//' \
+	${SED} 's/.*CONFIG_(BLK_DEV_INITRD|INITRAMFS_SOURCE|INITRAMFS_COMPRESSION).*//' \
 		${LINUX_DIR}/.config
 	( \
 		echo "CONFIG_BLK_DEV_INITRD=y"; \
 		echo 'CONFIG_INITRAMFS_SOURCE="${BIN_DIR}/${INITRAMFS}_list"'; \
-		echo "CONFIG_INITRAMFS_COMPRESSION_GZIP=y"; \
+		echo 'CONFIG_INITRAMFS_COMPRESSION_NONE is not set' >> ${LINUX_DIR}/.config; \
 	) >> ${LINUX_DIR}/.config
-
+ifeq ($(ADK_KERNEL_COMP_XZ),y)
+		echo "CONFIG_RD_XZ=y" >> ${LINUX_DIR}/.config
+		echo "CONFIG_INITRAMFS_COMPRESSION_XZ=y" >> ${LINUX_DIR}/.config
+endif
+ifeq ($(ADK_KERNEL_COMP_LZMA),y)
+		echo "CONFIG_RD_LZMA=y" >> ${LINUX_DIR}/.config
+		echo "CONFIG_INITRAMFS_COMPRESSION_LZMA=y" >> ${LINUX_DIR}/.config
+endif
+ifeq ($(ADK_KERNEL_COMP_LZO),y)
+		echo "CONFIG_RD_LZO=y" >> ${LINUX_DIR}/.config
+		echo "CONFIG_INITRAMFS_COMPRESSION_LZO=y" >> ${LINUX_DIR}/.config
+endif
+ifeq ($(ADK_KERNEL_COMP_GZIP),y)
+		echo "CONFIG_RD_GZIP=y" >> ${LINUX_DIR}/.config
+		echo "CONFIG_INITRAMFS_COMPRESSION_GZIP=y" >> ${LINUX_DIR}/.config
+endif
+ifeq ($(ADK_KERNEL_COMP_BZIP2),y)
+		echo "CONFIG_RD_BZIP2=y" >> ${LINUX_DIR}/.config
+		echo "CONFIG_INITRAMFS_COMPRESSION_BZIP2=y" >> ${LINUX_DIR}/.config
+endif
 	@-rm $(LINUX_DIR)/usr/initramfs_data.cpio* $(MAKE_TRACE)
 	echo N | \
 	$(MAKE) -C $(LINUX_DIR) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \

+ 9 - 9
mk/kernel-ver.mk

@@ -3,18 +3,18 @@ KERNEL_VERSION:=	2.6.39.4
 KERNEL_RELEASE:=	1
 KERNEL_MD5SUM:=		a17c748c2070168f1e784e9605ca043d
 endif
-ifeq ($(ADK_KERNEL_VERSION_3_0_9),y)
-KERNEL_VERSION:=	3.0.9
+ifeq ($(ADK_KERNEL_VERSION_3_0_17),y)
+KERNEL_VERSION:=	3.0.17
 KERNEL_RELEASE:=	1
-KERNEL_MD5SUM:=		71992fa4dfc289a959f9ce266d08d77b
+KERNEL_MD5SUM:=		fcdd6a945445336e4cd28b2d195f1fea
 endif
-ifeq ($(ADK_KERNEL_VERSION_3_1_8),y)
-KERNEL_VERSION:=	3.1.8
+ifeq ($(ADK_KERNEL_VERSION_3_1_9),y)
+KERNEL_VERSION:=	3.1.9
 KERNEL_RELEASE:=	1
-KERNEL_MD5SUM:=		69dfba755ab8691a426d8061c94a7ddc
+KERNEL_MD5SUM:=		4e387a49cde20805955c905bc8c311e0
 endif
-ifeq ($(ADK_KERNEL_VERSION_3_2_0),y)
-KERNEL_VERSION:=	3.2
+ifeq ($(ADK_KERNEL_VERSION_3_2_1),y)
+KERNEL_VERSION:=	3.2.1
 KERNEL_RELEASE:=	1
-KERNEL_MD5SUM:=		7ceb61f87c097fc17509844b71268935
+KERNEL_MD5SUM:=		090eb3dae0f520f7770f85193e931ad3
 endif

+ 6 - 0
scripts/scan-tools.sh

@@ -112,6 +112,12 @@ if ! which gzip >/dev/null 2>&1; then
 	out=1
 fi
 
+if ! which lzop >/dev/null 2>&1; then
+	echo You must install lzop to continue.
+	echo
+	out=1
+fi
+
 if ! which lzma >/dev/null 2>&1; then
 	echo You must install lzma to continue.
 	echo

+ 12 - 0
target/linux/config/Config.in.kernel

@@ -25,9 +25,21 @@ config ADK_KERNEL_BLK_DEV_INITRD
 config ADK_KERNEL_INITRAMFS_COMPRESSION_NONE
 	boolean
 
+config ADK_KERNEL_INITRAMFS_COMPRESSION_XZ
+	boolean
+
 config ADK_KERNEL_INITRAMFS_COMPRESSION_LZMA
 	boolean
 
+config ADK_KERNEL_INITRAMFS_COMPRESSION_LZO
+	boolean
+
+config ADK_KERNEL_INITRAMFS_COMPRESSION_GZIP
+	boolean
+
+config ADK_KERNEL_INITRAMFS_COMPRESSION_BZIP2
+	boolean
+
 config ADK_KERNEL_RD_GZIP
 	boolean
 

+ 0 - 0
target/linux/patches/3.0.9/bsd-compatibility.patch → target/linux/patches/3.0.17/bsd-compatibility.patch


+ 0 - 0
target/linux/patches/3.0.9/cris-etrax.patch → target/linux/patches/3.0.17/cris-etrax.patch


+ 0 - 0
target/linux/patches/3.0.9/defaults.patch → target/linux/patches/3.0.17/defaults.patch


+ 0 - 0
target/linux/patches/3.0.9/fon2100.patch → target/linux/patches/3.0.17/fon2100.patch


+ 0 - 0
target/linux/patches/3.0.9/gemalto.patch → target/linux/patches/3.0.17/gemalto.patch


+ 0 - 0
target/linux/patches/3.0.9/mips-malta.patch → target/linux/patches/3.0.17/mips-malta.patch


+ 0 - 0
target/linux/patches/3.0.9/mmc-host.patch → target/linux/patches/3.0.17/mmc-host.patch


+ 0 - 0
target/linux/patches/3.0.9/non-static.patch → target/linux/patches/3.0.17/non-static.patch


+ 0 - 0
target/linux/patches/3.0.9/sparc-include.patch → target/linux/patches/3.0.17/sparc-include.patch


+ 0 - 0
target/linux/patches/3.0.9/startup.patch → target/linux/patches/3.0.17/startup.patch


+ 0 - 0
target/linux/patches/3.0.9/usb-defaults-off.patch → target/linux/patches/3.0.17/usb-defaults-off.patch


+ 0 - 0
target/linux/patches/3.0.9/uuid.patch → target/linux/patches/3.0.17/uuid.patch


+ 0 - 0
target/linux/patches/3.0.9/vga-cons-default-off.patch → target/linux/patches/3.0.17/vga-cons-default-off.patch


+ 0 - 0
target/linux/patches/3.0.9/wlan-cf.patch → target/linux/patches/3.0.17/wlan-cf.patch


+ 0 - 0
target/linux/patches/3.0.9/x86-build.patch → target/linux/patches/3.0.17/x86-build.patch


+ 0 - 0
target/linux/patches/3.0.9/zlib-inflate.patch → target/linux/patches/3.0.17/zlib-inflate.patch


+ 0 - 0
target/linux/patches/3.1.8/bsd-compatibility.patch → target/linux/patches/3.1.9/bsd-compatibility.patch


+ 0 - 0
target/linux/patches/3.1.8/cris-etrax.patch → target/linux/patches/3.1.9/cris-etrax.patch


+ 0 - 0
target/linux/patches/3.1.8/defaults.patch → target/linux/patches/3.1.9/defaults.patch


+ 0 - 0
target/linux/patches/3.1.8/fon2100.patch → target/linux/patches/3.1.9/fon2100.patch


+ 0 - 0
target/linux/patches/3.1.8/gemalto.patch → target/linux/patches/3.1.9/gemalto.patch


+ 0 - 0
target/linux/patches/3.1.8/mmc-host.patch → target/linux/patches/3.1.9/mmc-host.patch


+ 0 - 0
target/linux/patches/3.1.8/non-static.patch → target/linux/patches/3.1.9/non-static.patch


+ 0 - 0
target/linux/patches/3.1.8/sparc-include.patch → target/linux/patches/3.1.9/sparc-include.patch


+ 0 - 0
target/linux/patches/3.1.8/startup.patch → target/linux/patches/3.1.9/startup.patch


+ 0 - 0
target/linux/patches/3.1.8/usb-defaults-off.patch → target/linux/patches/3.1.9/usb-defaults-off.patch


+ 0 - 0
target/linux/patches/3.1.8/uuid.patch → target/linux/patches/3.1.9/uuid.patch


+ 0 - 0
target/linux/patches/3.1.8/vga-cons-default-off.patch → target/linux/patches/3.1.9/vga-cons-default-off.patch


+ 0 - 0
target/linux/patches/3.1.8/wlan-cf.patch → target/linux/patches/3.1.9/wlan-cf.patch


+ 0 - 0
target/linux/patches/3.1.8/x86-build.patch → target/linux/patches/3.1.9/x86-build.patch


+ 0 - 0
target/linux/patches/3.1.8/zlib-inflate.patch → target/linux/patches/3.1.9/zlib-inflate.patch


+ 0 - 0
target/linux/patches/3.2/bsd-compatibility.patch → target/linux/patches/3.2.1/bsd-compatibility.patch


+ 0 - 0
target/linux/patches/3.2/cris-etrax.patch → target/linux/patches/3.2.1/cris-etrax.patch


+ 0 - 0
target/linux/patches/3.2/defaults.patch → target/linux/patches/3.2.1/defaults.patch


+ 0 - 0
target/linux/patches/3.2/gemalto.patch → target/linux/patches/3.2.1/gemalto.patch


+ 0 - 0
target/linux/patches/3.2/mmc-host.patch → target/linux/patches/3.2.1/mmc-host.patch


+ 0 - 0
target/linux/patches/3.2/non-static.patch → target/linux/patches/3.2.1/non-static.patch


+ 0 - 0
target/linux/patches/3.2/sparc-include.patch → target/linux/patches/3.2.1/sparc-include.patch


+ 0 - 0
target/linux/patches/3.2/startup.patch → target/linux/patches/3.2.1/startup.patch


+ 0 - 0
target/linux/patches/3.2/usb-defaults-off.patch → target/linux/patches/3.2.1/usb-defaults-off.patch


+ 0 - 0
target/linux/patches/3.2/uuid.patch → target/linux/patches/3.2.1/uuid.patch


+ 0 - 0
target/linux/patches/3.2/vga-cons-default-off.patch → target/linux/patches/3.2.1/vga-cons-default-off.patch


+ 0 - 0
target/linux/patches/3.2/wlan-cf.patch → target/linux/patches/3.2.1/wlan-cf.patch


+ 0 - 0
target/linux/patches/3.2/x86-build.patch → target/linux/patches/3.2.1/x86-build.patch


+ 0 - 0
target/linux/patches/3.2/zlib-inflate.patch → target/linux/patches/3.2.1/zlib-inflate.patch


+ 0 - 0
toolchain/kernel-headers/patches/3.0.9/aufs2.patch → toolchain/kernel-headers/patches/3.0.17/aufs2.patch


+ 0 - 0
toolchain/kernel-headers/patches/3.0.9/cleankernel.patch → toolchain/kernel-headers/patches/3.0.17/cleankernel.patch


+ 0 - 0
toolchain/kernel-headers/patches/3.0.9/etrax-header.patch → toolchain/kernel-headers/patches/3.0.17/etrax-header.patch


+ 0 - 0
toolchain/kernel-headers/patches/3.0.9/linux-gcc-check.patch → toolchain/kernel-headers/patches/3.0.17/linux-gcc-check.patch


+ 0 - 0
toolchain/kernel-headers/patches/3.0.9/microperl.patch → toolchain/kernel-headers/patches/3.0.17/microperl.patch


+ 0 - 0
toolchain/kernel-headers/patches/3.1.8/aufs2.patch → toolchain/kernel-headers/patches/3.1.9/aufs2.patch


+ 0 - 0
toolchain/kernel-headers/patches/3.1.8/cleankernel.patch → toolchain/kernel-headers/patches/3.1.9/cleankernel.patch


+ 0 - 0
toolchain/kernel-headers/patches/3.1.8/etrax-header.patch → toolchain/kernel-headers/patches/3.1.9/etrax-header.patch


+ 0 - 0
toolchain/kernel-headers/patches/3.1.8/linux-gcc-check.patch → toolchain/kernel-headers/patches/3.1.9/linux-gcc-check.patch


+ 0 - 0
toolchain/kernel-headers/patches/3.1.8/microperl.patch → toolchain/kernel-headers/patches/3.1.9/microperl.patch


+ 0 - 0
toolchain/kernel-headers/patches/3.2/aufs2.patch → toolchain/kernel-headers/patches/3.2.1/aufs2.patch


+ 0 - 0
toolchain/kernel-headers/patches/3.2/cleankernel.patch → toolchain/kernel-headers/patches/3.2.1/cleankernel.patch


+ 0 - 0
toolchain/kernel-headers/patches/3.2/etrax-header.patch → toolchain/kernel-headers/patches/3.2.1/etrax-header.patch


+ 0 - 0
toolchain/kernel-headers/patches/3.2/linux-gcc-check.patch → toolchain/kernel-headers/patches/3.2.1/linux-gcc-check.patch


+ 0 - 0
toolchain/kernel-headers/patches/3.2/microperl.patch → toolchain/kernel-headers/patches/3.2.1/microperl.patch