diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/image_types.bbclass | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index 9aee7458bc..1b8ceeebed 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass | |||
@@ -70,7 +70,11 @@ IMAGE_CMD_cpio () { | |||
70 | (cd ${IMAGE_ROOTFS} && find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) | 70 | (cd ${IMAGE_ROOTFS} && find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) |
71 | if [ ! -e ${IMAGE_ROOTFS}/init ]; then | 71 | if [ ! -e ${IMAGE_ROOTFS}/init ]; then |
72 | mkdir -p ${WORKDIR}/cpio_append | 72 | mkdir -p ${WORKDIR}/cpio_append |
73 | touch ${WORKDIR}/cpio_append/init | 73 | if [ -e ${IMAGE_ROOTFS}/sbin/init -o -L ${IMAGE_ROOTFS}/sbin/init ]; then |
74 | ln -sf /sbin/init ${WORKDIR}/cpio_append/init | ||
75 | else | ||
76 | touch ${WORKDIR}/cpio_append/init | ||
77 | fi | ||
74 | (cd ${WORKDIR}/cpio_append && echo ./init | cpio -oA -H newc -F ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) | 78 | (cd ${WORKDIR}/cpio_append && echo ./init | cpio -oA -H newc -F ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) |
75 | fi | 79 | fi |
76 | } | 80 | } |