From: Denys Dmytriyenko <[email protected]>
Signed-off-by: Denys Dmytriyenko <[email protected]>
---
meta-arago-distro/classes/kernel-fitimage.bbclass | 32 +++++++++++------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/meta-arago-distro/classes/kernel-fitimage.bbclass
b/meta-arago-distro/classes/kernel-fitimage.bbclass
index 23b162b..d9b9ff8 100644
--- a/meta-arago-distro/classes/kernel-fitimage.bbclass
+++ b/meta-arago-distro/classes/kernel-fitimage.bbclass
@@ -473,7 +473,18 @@ fitimage_assemble() {
fitimage_emit_section_kernel ${1} "${kernelcount}" linux.bin.sec
"${linux_comp}"
#
- # Step 2: Prepare a DTB image section
+ # Step 2: Prepare a ramdisk section.
+ #
+ if [ "x${ramdiskcount}" = "x1" ] ; then
+ copy_initramfs
+ RAMDISK_FILE="usr/${INITRAMFS_IMAGE}-${MACHINE}.cpio"
+ xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_THREADS}
--check=${XZ_INTEGRITY_CHECK} ${RAMDISK_FILE} > ${RAMDISK_FILE}.xz
+ fitimage_ti_secure ${RAMDISK_FILE}.xz ${RAMDISK_FILE}.xz.sec
+ fitimage_emit_section_ramdisk ${1} "${ramdiskcount}"
${RAMDISK_FILE}.xz.sec
+ fi
+
+ #
+ # Step 3: Prepare a DTB image section
#
if test -n "${KERNEL_DEVICETREE}"; then
dtbcount=1
@@ -500,7 +511,7 @@ fitimage_assemble() {
fi
#
- # Step 2a: Prepare OP/TEE image section
+ # Step 4: Prepare OP/TEE image section
#
if test -n "${FITIMAGE_TEE}"; then
mkdir -p ${B}/usr
@@ -525,24 +536,13 @@ fitimage_assemble() {
fi
#
- # Step 3: Prepare a setup section. (For x86)
+ # Step 5: Prepare a setup section. (For x86)
#
if test -e arch/${ARCH}/boot/setup.bin ; then
setupcount=1
fitimage_emit_section_setup ${1} "${setupcount}"
arch/${ARCH}/boot/setup.bin
fi
- #
- # Step 4: Prepare a ramdisk section.
- #
- if [ "x${ramdiskcount}" = "x1" ] ; then
- copy_initramfs
- RAMDISK_FILE="usr/${INITRAMFS_IMAGE}-${MACHINE}.cpio"
- xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_THREADS}
--check=${XZ_INTEGRITY_CHECK} ${RAMDISK_FILE} > ${RAMDISK_FILE}.xz
- fitimage_ti_secure ${RAMDISK_FILE}.xz ${RAMDISK_FILE}.xz.sec
- fitimage_emit_section_ramdisk ${1} "${ramdiskcount}"
${RAMDISK_FILE}.xz.sec
- fi
-
fitimage_emit_section_maint ${1} sectend
# Force the first Kernel and DTB in the default config
@@ -552,7 +552,7 @@ fitimage_assemble() {
fi
#
- # Step 5: Prepare a configurations section
+ # Step 6: Prepare a configurations section
#
fitimage_emit_section_maint ${1} confstart
@@ -567,7 +567,7 @@ fitimage_assemble() {
fitimage_emit_section_maint ${1} fitend
#
- # Step 6: Assemble the image
+ # Step 7: Assemble the image
#
uboot-mkimage \
${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if
len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \
--
2.7.4
_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago