From: yzhu1 <Yanjun.Zhu@windriver.com>
To: Saul Wold <sgw@linux.intel.com>,
<openembedded-core@lists.openembedded.org>, <joaohf@gmail.com>
Subject: Re: [PATCH] boot-directdisk: fix the support of vmdk
Date: Thu, 5 Jun 2014 13:11:14 +0800 [thread overview]
Message-ID: <538FFBF2.4010301@windriver.com> (raw)
In-Reply-To: <1390459814-15764-1-git-send-email-sgw@linux.intel.com>
Hi, Saul
Sorry. I do not understand. What does the patch fix? After this patch is
applied, what is the difference?
Zhu Yanjun
On 01/23/2014 02:50 PM, Saul Wold wrote:
> From: Joao Henrique Ferreira de Freitas <joaohf@gmail.com>
>
> Previous change (086ce22b88f5ef5f75a83119a32c8b3fdcfa296d) broke
> the creating of vmdk images. This protects shell expansion variables
> and let dd generate the image to be transformed to vmdk by image-vmdk.class.
>
> Signed-off-by: Joao Henrique Ferreira de Freitas <joaohf@gmail.com>
>
> [edit to change the usage of IMAGE_FSTYPE to IS_VMDK]
>
> Signed-off-by: Saul Wold <sgw@linux.intel.com>
> ---
> meta/classes/boot-directdisk.bbclass | 18 ++++++++----------
> 1 file changed, 8 insertions(+), 10 deletions(-)
>
> diff --git a/meta/classes/boot-directdisk.bbclass b/meta/classes/boot-directdisk.bbclass
> index 3277666..afab843 100644
> --- a/meta/classes/boot-directdisk.bbclass
> +++ b/meta/classes/boot-directdisk.bbclass
> @@ -61,6 +61,8 @@ DISK_SIGNATURE ?= "${DISK_SIGNATURE_GENERATED}"
> SYSLINUX_ROOT ?= "root=/dev/sda2"
> SYSLINUX_TIMEOUT ?= "10"
>
> +IS_VMDK = '${@base_contains("IMAGE_FSTYPES", "vmdk", "true", "false", d)}'
> +
> boot_direct_populate() {
> dest=$1
> install -d $dest
> @@ -88,10 +90,10 @@ build_boot_dd() {
> grubefi_hddimg_populate $HDDDIR
> fi
>
> - if [ ${IMAGE_FSTYPE} = "vmdk" ]; then
> - if [ x${AUTO_SYSLINUXMENU} = x1 ] ; then
> + if [ "${IS_VMDK}" ]; then
> + if [ "x${AUTO_SYSLINUXMENU}" = "x1" ] ; then
> install -m 0644 ${STAGING_DIR}/${MACHINE}/usr/share/syslinux/vesamenu.c32 ${HDDDIR}${SYSLINUXDIR}/vesamenu.c32
> - if [ x${SYSLINUX_SPLASH} != x ] ; then
> + if [ "x${SYSLINUX_SPLASH}" != "x" ] ; then
> install -m 0644 ${SYSLINUX_SPLASH} ${HDDDIR}${SYSLINUXDIR}/splash.lss
> fi
> fi
> @@ -129,9 +131,7 @@ build_boot_dd() {
> parted $IMAGE unit B mkpart primary ext2 ${END2}B ${END3}B
> parted $IMAGE set 1 boot on
>
> - if [ ${IMAGE_FSTYPE} != "vmdk" ]; then
> - parted $IMAGE print
> - fi
> + parted $IMAGE print
>
> awk "BEGIN { printf \"$(echo ${DISK_SIGNATURE} | fold -w 2 | tac | paste -sd '' | sed 's/\(..\)/\\x&/g')\" }" | \
> dd of=$IMAGE bs=1 seek=440 conv=notrunc
> @@ -141,10 +141,8 @@ build_boot_dd() {
> dd if=${STAGING_DATADIR}/syslinux/mbr.bin of=$IMAGE conv=notrunc
> fi
>
> - if [ ${IMAGE_FSTYPE} != "vmdk" ]; then
> - dd if=$HDDIMG of=$IMAGE conv=notrunc seek=1 bs=512
> - dd if=${ROOTFS} of=$IMAGE conv=notrunc seek=$OFFSET bs=512
> - fi
> + dd if=$HDDIMG of=$IMAGE conv=notrunc seek=1 bs=512
> + dd if=${ROOTFS} of=$IMAGE conv=notrunc seek=$OFFSET bs=512
>
> cd ${DEPLOY_DIR_IMAGE}
> rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect
next prev parent reply other threads:[~2014-06-05 5:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-23 6:50 [PATCH] boot-directdisk: fix the support of vmdk Saul Wold
2014-01-23 7:04 ` Phil Blundell
2014-01-23 12:21 ` Richard Purdie
2014-01-23 12:36 ` Otavio Salvador
2014-01-23 11:21 ` Otavio Salvador
2014-06-05 5:11 ` yzhu1 [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-12-20 10:10 Joao Henrique Ferreira de Freitas
2013-12-20 11:32 ` Martin Jansa
2013-12-20 11:37 ` Paul Eggleton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=538FFBF2.4010301@windriver.com \
--to=yanjun.zhu@windriver.com \
--cc=joaohf@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=sgw@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox