From: Darren Hart <dvhart@linux.intel.com>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [Build App RFC 3/5] boot-directdisk: Fix Block Calcuation
Date: Mon, 26 Mar 2012 11:26:43 -0700 [thread overview]
Message-ID: <4F70B4E3.700@linux.intel.com> (raw)
In-Reply-To: <364f6a61d06cecb52e21639dc69f292a4b8a3591.1332744104.git.sgw@linux.intel.com>
On 03/25/2012 11:47 PM, Saul Wold wrote:
> This also changes the timeout to be settable
>
> The block calcuation was not correctly rounding, see comment
>
> Thanks to Darren Hart for fixing this.
>
> Cc: Darren Hart <dvhart@linux.intel.com>
Thanks, but be sure to use the option to get that added to actual email
header :-) That's "-c" for the send-pull-request script.
--
Darren
> Signed-off-by: Saul Wold <sgw@linux.intel.com>
> ---
> meta/classes/boot-directdisk.bbclass | 19 +++++++++++++------
> 1 files changed, 13 insertions(+), 6 deletions(-)
>
> diff --git a/meta/classes/boot-directdisk.bbclass b/meta/classes/boot-directdisk.bbclass
> index 893164f..e9e1ba3 100644
> --- a/meta/classes/boot-directdisk.bbclass
> +++ b/meta/classes/boot-directdisk.bbclass
> @@ -37,9 +37,8 @@ BOOTDD_EXTRA_SPACE ?= "16384"
> # Get the build_syslinux_cfg() function from the syslinux class
>
> AUTO_SYSLINUXCFG = "1"
> -LABELS = "boot"
> SYSLINUX_ROOT ?= "root=/dev/sda2"
> -SYSLINUX_TIMEOUT = "10" # 1 second
> +SYSLINUX_TIMEOUT ?= "10"
>
> SYSLINUXCFG = "${HDDDIR}/syslinux.cfg"
> SYSLINUXMENU = "${HDDDIR}/menu"
> @@ -55,15 +54,23 @@ build_boot_dd() {
> install -m 444 ${STAGING_LIBDIR}/syslinux/ldlinux.sys ${HDDDIR}/ldlinux.sys
>
> BLOCKS=`du -bks ${HDDDIR} | cut -f 1`
> - SIZE=`expr $BLOCKS + ${BOOTDD_EXTRA_SPACE}`
> + BLOCKS=`expr $BLOCKS + ${BOOTDD_EXTRA_SPACE}`
> +
> + # Ensure total sectors is an integral number of sectors per
> + # track or mcopy will complain. Sectors are 512 bytes, and we
> + # generate images with 32 sectors per track. This calculation is
> + # done in blocks, thus the mod by 16 instead of 32.
> + BLOCKS=$(expr $BLOCKS + $(expr 16 - $(expr $BLOCKS % 16)))
> +
> + mkdosfs -n ${BOOTDD_VOLUME_ID} -S 512 -C ${HDDIMG} $BLOCKS
> + mcopy -i ${HDDIMG} -s ${HDDDIR}/* ::/
>
> - mkdosfs -n ${BOOTDD_VOLUME_ID} -d ${HDDDIR} -C ${HDDIMG} $SIZE
> syslinux ${HDDIMG}
> chmod 644 ${HDDIMG}
>
> ROOTFSBLOCKS=`du -Lbks ${ROOTFS} | cut -f 1`
> - TOTALSIZE=`expr $SIZE + $ROOTFSBLOCKS`
> - END1=`expr $SIZE \* 1024`
> + TOTALSIZE=`expr $BLOCKS + $ROOTFSBLOCKS`
> + END1=`expr $BLOCKS \* 1024`
> END2=`expr $END1 + 512`
> END3=`expr \( $ROOTFSBLOCKS \* 1024 \) + $END1`
>
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
next prev parent reply other threads:[~2012-03-26 18:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-26 6:47 [Build App RFC 0/5] Review Request for Build Appliance Saul Wold
2012-03-26 6:47 ` [Build App RFC 1/5] self-hosted-image: pre-populate the builder user with poky source Saul Wold
2012-03-26 6:47 ` [Build App RFC 2/5] image-vmdk: Add symbolic link Saul Wold
2012-03-26 18:23 ` Darren Hart
2012-03-26 6:47 ` [Build App RFC 3/5] boot-directdisk: Fix Block Calcuation Saul Wold
2012-03-26 18:26 ` Darren Hart [this message]
2012-03-26 6:47 ` [Build App RFC 4/5] vmdk: Update for direstdisk Saul Wold
2012-03-26 18:31 ` Darren Hart
2012-03-26 6:47 ` [Build App RFC 5/5] builder: Enable auto starting of Hob Saul Wold
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=4F70B4E3.700@linux.intel.com \
--to=dvhart@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/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