Skip to contentSkip to conversation

kernel.fitimage.bbclass: remove ramdisk_ctype

PATCH Superseded Heiko Schocher 2 participants 2 messages Sep 19, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel.fitimage.bbclass: remove ramdisk_ctype

set in the ramdisk node the compression property always to "none", as U-Boot nowadays since commit:

b1307f884a91 ("fit: Support compression for non-kernel components (e.g. FDT)")

decompress non kernel components. Setting compression to the used comression algorithm now, will end in fail of your kernel boot with the ramdisk.

This issue is fixed since commit:

bddd98573465 ("fit: Do not automatically decompress ramdisk images")

which now prints a warning in U-Boot, instead of decompressing the ramdisk, but we should setup compression property correct.

---

 meta/classes/kernel-fitimage.bbclass | 21 +--------------------
 1 file changed, 1 insertion(+), 20 deletions(-)
meta/classes/kernel-fitimage.bbclass +1 -20
index b51882dce4..1bcb09c598 100644
@@ -207,7 +207,6 @@ EOF
 fitimage_emit_section_ramdisk() {
 
 	ramdisk_csum="${FIT_HASH_ALG}"
-	ramdisk_ctype="none"
 	ramdisk_loadline=""
 	ramdisk_entryline=""
 
@@ -218,24 +217,6 @@ fitimage_emit_section_ramdisk() {
 		ramdisk_entryline="entry = <${UBOOT_RD_ENTRYPOINT}>;"
 	fi
 
-	case $3 in
-		*.gz)
-			ramdisk_ctype="gzip"
-			;;
-		*.bz2)
-			ramdisk_ctype="bzip2"
-			;;
-		*.lzma)
-			ramdisk_ctype="lzma"
-			;;
-		*.lzo)
-			ramdisk_ctype="lzo"
-			;;
-		*.lz4)
-			ramdisk_ctype="lz4"
-			;;
-	esac
-
 	cat << EOF >> ${1}
                 ramdisk@${2} {
                         description = "${INITRAMFS_IMAGE}";
@@ -243,7 +224,7 @@ fitimage_emit_section_ramdisk() {
                         type = "ramdisk";
                         arch = "${UBOOT_ARCH}";
                         os = "linux";
-                        compression = "${ramdisk_ctype}";
+                        compression = "none";
                         ${ramdisk_loadline}
                         ${ramdisk_entryline}
                         hash@1 {
Signature · 1 line
2.21.0
#1 lore raw

This should go to the oe-core list, [email protected].

Thanks,
Ross

Quoted 69 lines · Heiko Schocher

set in the ramdisk node the compression property always to "none", as U-Boot nowadays since commit:

b1307f884a91 ("fit: Support compression for non-kernel components (e.g. FDT)")

decompress non kernel components. Setting compression to the used comression algorithm now, will end in fail of your kernel boot with the ramdisk.

This issue is fixed since commit:

bddd98573465 ("fit: Do not automatically decompress ramdisk images")

which now prints a warning in U-Boot, instead of decompressing the ramdisk, but we should setup compression property correct.

---

  meta/classes/kernel-fitimage.bbclass | 21 +--------------------
  1 file changed, 1 insertion(+), 20 deletions(-)
meta/classes/kernel-fitimage.bbclass +1 -20
index b51882dce4..1bcb09c598 100644
@@ -207,7 +207,6 @@ EOF
  fitimage_emit_section_ramdisk() {
 
  	ramdisk_csum="${FIT_HASH_ALG}"
-	ramdisk_ctype="none"
  	ramdisk_loadline=""
  	ramdisk_entryline=""
 
@@ -218,24 +217,6 @@ fitimage_emit_section_ramdisk() {
  		ramdisk_entryline="entry = <${UBOOT_RD_ENTRYPOINT}>;"
  	fi
 
-	case $3 in
-		*.gz)
-			ramdisk_ctype="gzip"
-			;;
-		*.bz2)
-			ramdisk_ctype="bzip2"
-			;;
-		*.lzma)
-			ramdisk_ctype="lzma"
-			;;
-		*.lzo)
-			ramdisk_ctype="lzo"
-			;;
-		*.lz4)
-			ramdisk_ctype="lz4"
-			;;
-	esac
-
  	cat << EOF >> ${1}
                  ramdisk@${2} {
                          description = "${INITRAMFS_IMAGE}";
@@ -243,7 +224,7 @@ fitimage_emit_section_ramdisk() {
                          type = "ramdisk";
                          arch = "${UBOOT_ARCH}";
                          os = "linux";
-                        compression = "${ramdisk_ctype}";
+                        compression = "none";
                          ${ramdisk_loadline}
                          ${ramdisk_entryline}
                          hash@1 {