Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] board/freescale: refresh create-boot-sd.sh
Date: Wed, 14 Oct 2015 23:10:56 +0200	[thread overview]
Message-ID: <561EC4E0.9050202@mind.be> (raw)
In-Reply-To: <561E7D11.7040207@lucaceresoli.net>

On 14-10-15 18:04, Luca Ceresoli wrote:
> Dear Vincent,
> 
> Vincent Stehl? wrote:
>> Starting with version 2.26, sfdisk defaults to a unit of 512 B sectors.
>> With those recent versions of sfdisk, the create-boot-sd.sh script ends
>> up creating a boot partition of 240 KB, which is too small to contain a
>> Linux kernel.
> 
> Ouch!
> 
>>
>> Version 2.25 of sfdisk and older defaulted to cylinders; a
>> media-dependant unit, typically much larger than 512 B. With those
>> versions the create-boot-sd.sh creates paritions, large enough to hold a
> 
> paritions -> partitions, and remove the ',' after it.
> 
>> kernel.
>>
>> We update the create-boot-sd.sh script to use the more readable and more
>> stable named-fields sfdisk format for the partitioning command, and set
>> the boot partition size to 64 MB, which should be enough for everyone.
>>
>> Signed-off-by: Vincent Stehl? <vincent.stehle@freescale.com>
>> Cc: Luca Ceresoli <luca@lucaceresoli.net>
>> Cc: Gary Bisson <gary.bisson@boundarydevices.com>
>> ---
>>   board/freescale/create-boot-sd.sh | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/board/freescale/create-boot-sd.sh
>> b/board/freescale/create-boot-sd.sh
>> index af45115..cfb1101 100755
>> --- a/board/freescale/create-boot-sd.sh
>> +++ b/board/freescale/create-boot-sd.sh
>> @@ -60,8 +60,8 @@ sync
>>   # - FAT partition starting at 1MB offset, containing uImage and *.dtb
>>   # - ext2/3 partition formatted as ext2 or ext3, containing the root filesystem.
>>   sfdisk ${DEV} <<EOF
>> -32,480,b
>> -512,,L
>> +start=1MiB, size=64MiB, type=b
> 
> Is the "MiB" suffix supported on older sfdisk releases? Ubuntu 14.04
> ships sfdisk 2.20.1, and its manpage does not contain "MiB".
> 
> If that is not supported, then I guess "--unit M" should work. It's in
> the manpage, but I haven't tested it yet.
> 
> I strongly think we should support the latest Ubuntu LTS, AFAIK it's
> widely used by embedded Linux developers.

 We should also still support Ubuntu 12.02 IMHO and even older RHEL.

 So to avoid this kind of issue, it would be better to use genimage. But that's
a much bigger change, of course.


 Regards,
 Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

  reply	other threads:[~2015-10-14 21:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-14 14:03 [Buildroot] Repair boot from SD card on i.MX6 Sabre boards Vincent Stehlé
2015-10-14 14:03 ` [Buildroot] [PATCH 1/2] board/freescale: refresh create-boot-sd.sh Vincent Stehlé
2015-10-14 16:04   ` Luca Ceresoli
2015-10-14 21:10     ` Arnout Vandecappelle [this message]
2015-10-15  8:30       ` Gary Bisson
2015-10-21  8:57         ` [Buildroot] [PATCH v2] board/freescale: switch create-boot-sd.sh to parted Vincent Stehlé
2015-10-21  9:14           ` Baruch Siach
2015-10-21 18:37           ` Arnout Vandecappelle
2015-10-22 10:08             ` Vincent Stehlé
2015-10-14 14:03 ` [Buildroot] [PATCH 2/2] imx6sabre: use zImage format for kernel Vincent Stehlé
2015-10-15 13:03 ` [Buildroot] Repair boot from SD card on i.MX6 Sabre boards Jeremy Rosen

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=561EC4E0.9050202@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /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