* [PATCH 0/1] Fix image creation problems (WRT dosfstools)
@ 2016-05-27 8:08 Jussi Kukkonen
2016-05-27 8:08 ` [PATCH 1/1] image-live.bbclass: Tweak rounding up sector count Jussi Kukkonen
2016-06-07 3:33 ` [PATCH 0/1] Fix image creation problems (WRT dosfstools) Robert Yang
0 siblings, 2 replies; 4+ messages in thread
From: Jussi Kukkonen @ 2016-05-27 8:08 UTC (permalink / raw)
To: openembedded-core, liezhi.yang
This fixes the image build issues that were a result of my dosfstools
upgrade, sorry for not testing that one properly.
This was the first time I even looked at the image generation code,
would appreciate review from Robert or someone else more familiar
with it. There are alternative solutions (like silencing the warning
from mcopy), but this seemed like an ok one to me.
I've pushed this commit on top of the branch with the dosfstools
upgrade, let me know if you'd rather have this sort of things
separately.
Thanks,
Jussi
The following changes since commit 265c2d710ce6941f6ddae3aa699bf1e9c13aa156:
libgpg-error: Upgrade 1.21 -> 1.22 (2016-05-26 15:39:14 +0300)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib jku/gnupg-mirror-plus-upgrades
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=jku/gnupg-mirror-plus-upgrades
Jussi Kukkonen (1):
image-live.bbclass: Tweak rounding up sector count
meta/classes/image-live.bbclass | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
--
2.1.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] image-live.bbclass: Tweak rounding up sector count
2016-05-27 8:08 [PATCH 0/1] Fix image creation problems (WRT dosfstools) Jussi Kukkonen
@ 2016-05-27 8:08 ` Jussi Kukkonen
2016-05-27 8:10 ` Jussi Kukkonen
2016-06-07 3:33 ` [PATCH 0/1] Fix image creation problems (WRT dosfstools) Robert Yang
1 sibling, 1 reply; 4+ messages in thread
From: Jussi Kukkonen @ 2016-05-27 8:08 UTC (permalink / raw)
To: openembedded-core, liezhi.yang
New mkdosfs has changed the default sectors-per-track it sets on a
new image: This number is useless in our use case but mcopy has
sanity checks to make sure image size is an integral number of
sectors-per-track.
Make sure our sector count is always divisible by sectors-per-track.
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
meta/classes/image-live.bbclass | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/meta/classes/image-live.bbclass b/meta/classes/image-live.bbclass
index ea6ced2..9b65753 100644
--- a/meta/classes/image-live.bbclass
+++ b/meta/classes/image-live.bbclass
@@ -199,14 +199,15 @@ build_fat_img() {
FAT_SECTORS=$(expr $(expr $(expr $FAT_BYTES + 511) / 512) \* 2)
SECTORS=$(expr $SECTORS + $(expr $DIR_SECTORS + $FAT_SECTORS))
- # Determine the final size in blocks accounting for some padding
- BLOCKS=$(expr $(expr $SECTORS / 2) + ${BOOTIMG_EXTRA_SPACE})
+ # Determine the final size accounting for some padding
+ SECTORS=$(expr $SECTORS + $(expr ${BOOTIMG_EXTRA_SPACE} \* 2))
# 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)))
+ # track or mcopy will complain. Sectors are 512 bytes, and current
+ # mkdosfs generates images with 63 sectors per track. Use 2*63
+ # as the mod to ensure result is divisible by two.
+ SECTORS=$(expr $SECTORS + $(expr 126 - $(expr $SECTORS % 126)))
+ BLOCKS=$(expr $SECTORS / 2)
# mkdosfs will sometimes use FAT16 when it is not appropriate,
# resulting in a boot failure from SYSLINUX. Use FAT32 for
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] image-live.bbclass: Tweak rounding up sector count
2016-05-27 8:08 ` [PATCH 1/1] image-live.bbclass: Tweak rounding up sector count Jussi Kukkonen
@ 2016-05-27 8:10 ` Jussi Kukkonen
0 siblings, 0 replies; 4+ messages in thread
From: Jussi Kukkonen @ 2016-05-27 8:10 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer, Robert Yang
On 27 May 2016 at 11:08, Jussi Kukkonen <jussi.kukkonen@intel.com> wrote:
> New mkdosfs has changed the default sectors-per-track it sets on a
> new image: This number is useless in our use case but mcopy has
> sanity checks to make sure image size is an integral number of
> sectors-per-track.
Just to be on the safe side: this patch should _not_ be applied
without the dosfstools upgrade.
- Jussi
> Make sure our sector count is always divisible by sectors-per-track.
>
> Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
> ---
> meta/classes/image-live.bbclass | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/meta/classes/image-live.bbclass b/meta/classes/image-live.bbclass
> index ea6ced2..9b65753 100644
> --- a/meta/classes/image-live.bbclass
> +++ b/meta/classes/image-live.bbclass
> @@ -199,14 +199,15 @@ build_fat_img() {
> FAT_SECTORS=$(expr $(expr $(expr $FAT_BYTES + 511) / 512) \* 2)
> SECTORS=$(expr $SECTORS + $(expr $DIR_SECTORS + $FAT_SECTORS))
>
> - # Determine the final size in blocks accounting for some padding
> - BLOCKS=$(expr $(expr $SECTORS / 2) + ${BOOTIMG_EXTRA_SPACE})
> + # Determine the final size accounting for some padding
> + SECTORS=$(expr $SECTORS + $(expr ${BOOTIMG_EXTRA_SPACE} \* 2))
>
> # 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)))
> + # track or mcopy will complain. Sectors are 512 bytes, and current
> + # mkdosfs generates images with 63 sectors per track. Use 2*63
> + # as the mod to ensure result is divisible by two.
> + SECTORS=$(expr $SECTORS + $(expr 126 - $(expr $SECTORS % 126)))
> + BLOCKS=$(expr $SECTORS / 2)
>
> # mkdosfs will sometimes use FAT16 when it is not appropriate,
> # resulting in a boot failure from SYSLINUX. Use FAT32 for
> --
> 2.1.4
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/1] Fix image creation problems (WRT dosfstools)
2016-05-27 8:08 [PATCH 0/1] Fix image creation problems (WRT dosfstools) Jussi Kukkonen
2016-05-27 8:08 ` [PATCH 1/1] image-live.bbclass: Tweak rounding up sector count Jussi Kukkonen
@ 2016-06-07 3:33 ` Robert Yang
1 sibling, 0 replies; 4+ messages in thread
From: Robert Yang @ 2016-06-07 3:33 UTC (permalink / raw)
To: Jussi Kukkonen, openembedded-core
On 05/27/2016 04:08 PM, Jussi Kukkonen wrote:
> This fixes the image build issues that were a result of my dosfstools
> upgrade, sorry for not testing that one properly.
>
> This was the first time I even looked at the image generation code,
> would appreciate review from Robert or someone else more familiar
> with it. There are alternative solutions (like silencing the warning
> from mcopy), but this seemed like an ok one to me.
Sorry, I'm on paternity leave from May. 27 to Jun. 10, this is fine to me.
// Robert
>
> I've pushed this commit on top of the branch with the dosfstools
> upgrade, let me know if you'd rather have this sort of things
> separately.
>
> Thanks,
> Jussi
>
>
>
> The following changes since commit 265c2d710ce6941f6ddae3aa699bf1e9c13aa156:
>
> libgpg-error: Upgrade 1.21 -> 1.22 (2016-05-26 15:39:14 +0300)
>
> are available in the git repository at:
>
> git://git.yoctoproject.org/poky-contrib jku/gnupg-mirror-plus-upgrades
> http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=jku/gnupg-mirror-plus-upgrades
>
> Jussi Kukkonen (1):
> image-live.bbclass: Tweak rounding up sector count
>
> meta/classes/image-live.bbclass | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-07 3:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-27 8:08 [PATCH 0/1] Fix image creation problems (WRT dosfstools) Jussi Kukkonen
2016-05-27 8:08 ` [PATCH 1/1] image-live.bbclass: Tweak rounding up sector count Jussi Kukkonen
2016-05-27 8:10 ` Jussi Kukkonen
2016-06-07 3:33 ` [PATCH 0/1] Fix image creation problems (WRT dosfstools) Robert Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox