diff options
| -rw-r--r-- | meta/classes/kernel-fitimage.bbclass | 10 | ||||
| -rw-r--r-- | meta/classes/kernel.bbclass | 21 |
2 files changed, 16 insertions, 15 deletions
diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass index 8ae2eb6df5..2630b47316 100644 --- a/meta/classes/kernel-fitimage.bbclass +++ b/meta/classes/kernel-fitimage.bbclass | |||
| @@ -370,7 +370,7 @@ fitimage_assemble() { | |||
| 370 | if [ "x${ramdiskcount}" = "x1" ] ; then | 370 | if [ "x${ramdiskcount}" = "x1" ] ; then |
| 371 | # Find and use the first initramfs image archive type we find | 371 | # Find and use the first initramfs image archive type we find |
| 372 | for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz cpio; do | 372 | for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz cpio; do |
| 373 | initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.${img}" | 373 | initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.${img}" |
| 374 | echo "Using $initramfs_path" | 374 | echo "Using $initramfs_path" |
| 375 | if [ -e "${initramfs_path}" ]; then | 375 | if [ -e "${initramfs_path}" ]; then |
| 376 | fitimage_emit_section_ramdisk ${1} "${ramdiskcount}" "${initramfs_path}" | 376 | fitimage_emit_section_ramdisk ${1} "${ramdiskcount}" "${initramfs_path}" |
| @@ -459,11 +459,11 @@ kernel_do_deploy_append() { | |||
| 459 | 459 | ||
| 460 | if [ -n "${INITRAMFS_IMAGE}" ]; then | 460 | if [ -n "${INITRAMFS_IMAGE}" ]; then |
| 461 | echo "Copying fit-image-${INITRAMFS_IMAGE}.its source file..." | 461 | echo "Copying fit-image-${INITRAMFS_IMAGE}.its source file..." |
| 462 | its_initramfs_base_name="fitImage-its-${INITRAMFS_IMAGE}-${PV}-${PR}-${MACHINE}-${DATETIME}" | 462 | its_initramfs_base_name="fitImage-its-${INITRAMFS_IMAGE_NAME}-${PV}-${PR}-${DATETIME}" |
| 463 | its_initramfs_symlink_name=fitImage-its-${INITRAMFS_IMAGE}-${MACHINE} | 463 | its_initramfs_symlink_name=fitImage-its-${INITRAMFS_IMAGE_NAME} |
| 464 | install -m 0644 fit-image-${INITRAMFS_IMAGE}.its ${DEPLOYDIR}/${its_initramfs_base_name}.its | 464 | install -m 0644 fit-image-${INITRAMFS_IMAGE}.its ${DEPLOYDIR}/${its_initramfs_base_name}.its |
| 465 | fit_initramfs_base_name="fitImage-${INITRAMFS_IMAGE}-${PV}-${PR}-${MACHINE}-${DATETIME}" | 465 | fit_initramfs_base_name="fitImage-${INITRAMFS_IMAGE_NAME}-${PV}-${PR}-${DATETIME}" |
| 466 | fit_initramfs_symlink_name=fitImage-${INITRAMFS_IMAGE}-${MACHINE} | 466 | fit_initramfs_symlink_name=fitImage-${INITRAMFS_IMAGE_NAME} |
| 467 | install -m 0644 arch/${ARCH}/boot/fitImage-${INITRAMFS_IMAGE} ${DEPLOYDIR}/${fit_initramfs_base_name}.bin | 467 | install -m 0644 arch/${ARCH}/boot/fitImage-${INITRAMFS_IMAGE} ${DEPLOYDIR}/${fit_initramfs_base_name}.bin |
| 468 | fi | 468 | fi |
| 469 | 469 | ||
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 91c260a1b9..b7f5fce360 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass | |||
| @@ -16,6 +16,7 @@ INHIBIT_DEFAULT_DEPS = "1" | |||
| 16 | 16 | ||
| 17 | KERNEL_IMAGETYPE ?= "zImage" | 17 | KERNEL_IMAGETYPE ?= "zImage" |
| 18 | INITRAMFS_IMAGE ?= "" | 18 | INITRAMFS_IMAGE ?= "" |
| 19 | INITRAMFS_IMAGE_NAME ?= "${@['${INITRAMFS_IMAGE}-${MACHINE}', ''][d.getVar('INITRAMFS_IMAGE') == '']}" | ||
| 19 | INITRAMFS_TASK ?= "" | 20 | INITRAMFS_TASK ?= "" |
| 20 | INITRAMFS_IMAGE_BUNDLE ?= "" | 21 | INITRAMFS_IMAGE_BUNDLE ?= "" |
| 21 | 22 | ||
| @@ -167,34 +168,34 @@ copy_initramfs() { | |||
| 167 | # In case the directory is not created yet from the first pass compile: | 168 | # In case the directory is not created yet from the first pass compile: |
| 168 | mkdir -p ${B}/usr | 169 | mkdir -p ${B}/usr |
| 169 | # Find and use the first initramfs image archive type we find | 170 | # Find and use the first initramfs image archive type we find |
| 170 | rm -f ${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.cpio | 171 | rm -f ${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio |
| 171 | for img in cpio cpio.gz cpio.lz4 cpio.lzo cpio.lzma cpio.xz; do | 172 | for img in cpio cpio.gz cpio.lz4 cpio.lzo cpio.lzma cpio.xz; do |
| 172 | if [ -e "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" ]; then | 173 | if [ -e "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.$img" ]; then |
| 173 | cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img ${B}/usr/. | 174 | cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.$img ${B}/usr/. |
| 174 | case $img in | 175 | case $img in |
| 175 | *gz) | 176 | *gz) |
| 176 | echo "gzip decompressing image" | 177 | echo "gzip decompressing image" |
| 177 | gunzip -f ${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.$img | 178 | gunzip -f ${B}/usr/${INITRAMFS_IMAGE_NAME}.$img |
| 178 | break | 179 | break |
| 179 | ;; | 180 | ;; |
| 180 | *lz4) | 181 | *lz4) |
| 181 | echo "lz4 decompressing image" | 182 | echo "lz4 decompressing image" |
| 182 | lz4 -df ${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.$img | 183 | lz4 -df ${B}/usr/${INITRAMFS_IMAGE_NAME}.$img |
| 183 | break | 184 | break |
| 184 | ;; | 185 | ;; |
| 185 | *lzo) | 186 | *lzo) |
| 186 | echo "lzo decompressing image" | 187 | echo "lzo decompressing image" |
| 187 | lzop -df ${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.$img | 188 | lzop -df ${B}/usr/${INITRAMFS_IMAGE_NAME}.$img |
| 188 | break | 189 | break |
| 189 | ;; | 190 | ;; |
| 190 | *lzma) | 191 | *lzma) |
| 191 | echo "lzma decompressing image" | 192 | echo "lzma decompressing image" |
| 192 | lzma -df ${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.$img | 193 | lzma -df ${B}/usr/${INITRAMFS_IMAGE_NAME}.$img |
| 193 | break | 194 | break |
| 194 | ;; | 195 | ;; |
| 195 | *xz) | 196 | *xz) |
| 196 | echo "xz decompressing image" | 197 | echo "xz decompressing image" |
| 197 | xz -df ${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.$img | 198 | xz -df ${B}/usr/${INITRAMFS_IMAGE_NAME}.$img |
| 198 | break | 199 | break |
| 199 | ;; | 200 | ;; |
| 200 | esac | 201 | esac |
| @@ -222,7 +223,7 @@ do_bundle_initramfs () { | |||
| 222 | tmp_path=$tmp_path" "$type"##" | 223 | tmp_path=$tmp_path" "$type"##" |
| 223 | fi | 224 | fi |
| 224 | done | 225 | done |
| 225 | use_alternate_initrd=CONFIG_INITRAMFS_SOURCE=${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.cpio | 226 | use_alternate_initrd=CONFIG_INITRAMFS_SOURCE=${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio |
| 226 | kernel_do_compile | 227 | kernel_do_compile |
| 227 | # Restoring kernel image | 228 | # Restoring kernel image |
| 228 | for tp in $tmp_path ; do | 229 | for tp in $tmp_path ; do |
| @@ -261,7 +262,7 @@ kernel_do_compile() { | |||
| 261 | # The old style way of copying an prebuilt image and building it | 262 | # The old style way of copying an prebuilt image and building it |
| 262 | # is turned on via INTIRAMFS_TASK != "" | 263 | # is turned on via INTIRAMFS_TASK != "" |
| 263 | copy_initramfs | 264 | copy_initramfs |
| 264 | use_alternate_initrd=CONFIG_INITRAMFS_SOURCE=${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.cpio | 265 | use_alternate_initrd=CONFIG_INITRAMFS_SOURCE=${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio |
| 265 | fi | 266 | fi |
| 266 | for typeformake in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do | 267 | for typeformake in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do |
| 267 | oe_runmake ${typeformake} CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} $use_alternate_initrd | 268 | oe_runmake ${typeformake} CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} $use_alternate_initrd |
