Advertisement
Guest User

Untitled

a guest
Feb 27th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.24 KB | None | 0 0
  1. commit 753e9317a5501ade1c44fd6ea0abb2c809a0c76c
  2. Author: Christian Lamparter <chunkeey@gmail.com>
  3. Date: Sun Feb 24 22:05:28 2019 +0100
  4.  
  5. mpc85xx: enable HAVE_KERNEL_XZ to allow lzma/xz'd zImages
  6.  
  7. The HiveAP's 330 initramfs image failes to boot due to an
  8. gunzip extraction error:
  9.  
  10. |## Booting kernel from Legacy Image at 05000000 ...
  11. | Image Name: Linux-4.19.24
  12. | Created: 2019-02-23 1:58:20 UTC
  13. | Image Type: PowerPC Linux Kernel Image (gzip compressed)
  14. | Data Size: 6752470 Bytes = 6.4 MB
  15. | Load Address: 00000000
  16. | Entry Point: 00000000
  17. | Verifying Checksum ... OK
  18. |## Flattened Device Tree blob at 01000000
  19. | Booting using the fdt blob at 0x1000000
  20. | Uncompressing Kernel Image ... Error: inflate() returned -5
  21. |GUNZIP: uncompress, out-of-mem or overwrite error - must RESET board to recover
  22. | Loading Device Tree to 00ffa000, end 00fffc78 ... OK
  23. |ft_fixup_l2cache: FDT_ERR_NOTFOUND
  24.  
  25. The HiveAP 330 already uses a (gzip) zImage so the compressing
  26. it again with gzip is not necessary.
  27.  
  28. Reported-by: Chris Blake <chrisrblake93@gmail.com>
  29. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
  30.  
  31. diff --git a/target/linux/generic/hack-4.14/302-powerpc-Enable-kernel-XZ-compression-option-on-BOOK3.patch b/target/linux/generic/hack-4.14/302-powerpc-Enable-kernel-XZ-compression-option-on-BOOK3.patch
  32. new file mode 100644
  33. index 0000000000..3897ba9983
  34. --- /dev/null
  35. +++ b/target/linux/generic/hack-4.14/302-powerpc-Enable-kernel-XZ-compression-option-on-BOOK3.patch
  36. @@ -0,0 +1,37 @@
  37. +From 26064848efbca49c643d1237dc1f8215515d52ee Mon Sep 17 00:00:00 2001
  38. +From: Aaro Koskinen <aaro.koskinen@iki.fi>
  39. +Date: Tue, 19 Jun 2018 23:52:30 +0300
  40. +Subject: [PATCH] powerpc: Enable kernel XZ compression option on BOOK3S_32
  41. +
  42. +Enable kernel XZ compression option on BOOK3S_32. Tested on G4
  43. +PowerBook.
  44. +
  45. +Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
  46. +[mpe: Use one select under the PPC symbol guarded by if PPC_BOOK3S]
  47. +Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  48. +[added PPC_85xx too]
  49. +---
  50. +
  51. +--- a/arch/powerpc/Kconfig
  52. ++++ b/arch/powerpc/Kconfig
  53. +@@ -199,6 +199,7 @@ config PPC
  54. + select HAVE_IOREMAP_PROT
  55. + select HAVE_IRQ_EXIT_ON_IRQ_STACK
  56. + select HAVE_KERNEL_GZIP
  57. ++ select HAVE_KERNEL_XZ if PPC_BOOK3S || PPC_85xx
  58. + select HAVE_KPROBES
  59. + select HAVE_KPROBES_ON_FTRACE
  60. + select HAVE_KRETPROBES
  61. +--- a/arch/powerpc/platforms/Kconfig.cputype
  62. ++++ b/arch/powerpc/platforms/Kconfig.cputype
  63. +@@ -75,7 +75,6 @@ config PPC_BOOK3S_64
  64. + select HAVE_ARCH_TRANSPARENT_HUGEPAGE
  65. + select ARCH_SUPPORTS_NUMA_BALANCING
  66. + select IRQ_WORK
  67. +- select HAVE_KERNEL_XZ
  68. +
  69. + config PPC_BOOK3E_64
  70. + bool "Embedded processors"
  71. +--
  72. +2.20.1
  73. +
  74. diff --git a/target/linux/generic/hack-4.19/302-powerpc-Enable-kernel-XZ-compression-option-on-BOOK3.patch b/target/linux/generic/hack-4.19/302-powerpc-Enable-kernel-XZ-compression-option-on-BOOK3.patch
  75. new file mode 100644
  76. index 0000000000..0014e8f939
  77. --- /dev/null
  78. +++ b/target/linux/generic/hack-4.19/302-powerpc-Enable-kernel-XZ-compression-option-on-BOOK3.patch
  79. @@ -0,0 +1,28 @@
  80. +From 26064848efbca49c643d1237dc1f8215515d52ee Mon Sep 17 00:00:00 2001
  81. +From: Aaro Koskinen <aaro.koskinen@iki.fi>
  82. +Date: Tue, 19 Jun 2018 23:52:30 +0300
  83. +Subject: [PATCH] powerpc: Enable kernel XZ compression option on BOOK3S_32
  84. +
  85. +Enable kernel XZ compression option on BOOK3S_32. Tested on G4
  86. +PowerBook.
  87. +
  88. +Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
  89. +[mpe: Use one select under the PPC symbol guarded by if PPC_BOOK3S]
  90. +Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  91. +[added PPC_85xx too]
  92. +---
  93. +
  94. +--- a/arch/powerpc/Kconfig
  95. ++++ b/arch/powerpc/Kconfig
  96. +@@ -199,7 +199,7 @@ config PPC
  97. + select HAVE_IOREMAP_PROT
  98. + select HAVE_IRQ_EXIT_ON_IRQ_STACK
  99. + select HAVE_KERNEL_GZIP
  100. +- select HAVE_KERNEL_XZ if PPC_BOOK3S
  101. ++ select HAVE_KERNEL_XZ if PPC_BOOK3S || PPC_85xx
  102. + select HAVE_KPROBES
  103. + select HAVE_KPROBES_ON_FTRACE
  104. + select HAVE_KRETPROBES
  105. +--
  106. +2.20.1
  107. +
  108. diff --git a/target/linux/mpc85xx/config-4.14 b/target/linux/mpc85xx/config-4.14
  109. index f057e5c910..5bd6503186 100644
  110. --- a/target/linux/mpc85xx/config-4.14
  111. +++ b/target/linux/mpc85xx/config-4.14
  112. @@ -183,7 +183,6 @@ CONFIG_IRQ_DOMAIN=y
  113. CONFIG_IRQ_FORCED_THREADING=y
  114. CONFIG_IRQ_WORK=y
  115. CONFIG_ISA_DMA_API=y
  116. -CONFIG_KERNEL_GZIP=y
  117. CONFIG_KERNEL_START=0xc0000000
  118. # CONFIG_KSI8560 is not set
  119. CONFIG_LEGACY_PTYS=y
  120. diff --git a/target/linux/mpc85xx/config-4.19 b/target/linux/mpc85xx/config-4.19
  121. index c92edcfa37..bbe50a8903 100644
  122. --- a/target/linux/mpc85xx/config-4.19
  123. +++ b/target/linux/mpc85xx/config-4.19
  124. @@ -170,7 +170,6 @@ CONFIG_IRQ_DOMAIN=y
  125. CONFIG_IRQ_FORCED_THREADING=y
  126. CONFIG_IRQ_WORK=y
  127. CONFIG_ISA_DMA_API=y
  128. -CONFIG_KERNEL_GZIP=y
  129. CONFIG_KERNEL_START=0xc0000000
  130. # CONFIG_KSI8560 is not set
  131. CONFIG_LEGACY_PTYS=y
  132. diff --git a/target/linux/mpc85xx/image/Makefile b/target/linux/mpc85xx/image/Makefile
  133. index afb2b78c1b..bcea7f2330 100644
  134. --- a/target/linux/mpc85xx/image/Makefile
  135. +++ b/target/linux/mpc85xx/image/Makefile
  136. @@ -78,6 +78,7 @@ define Device/hiveap-330
  137. DEVICE_TITLE := Aerohive HiveAP-330
  138. DEVICE_PACKAGES := kmod-ath9k wpad-basic kmod-tpm-i2c-atmel
  139. BLOCKSIZE := 128k
  140. + KERNEL := kernel-bin | uImage none
  141. KERNEL_NAME := zImage
  142. KERNEL_SIZE := 8m
  143. SUPPORTED_DEVICES := aerohive,hiveap-330
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement