All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] create-boot-sd.sh: fix script for sfdisk (>=2.26)
@ 2016-07-04  0:22 Georges Savoundararadj
  2016-07-04  7:04 ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Georges Savoundararadj @ 2016-07-04  0:22 UTC (permalink / raw)
  To: buildroot

"Since version 2.26, sfdisk [...] no longer provides any functionality
for CHS (Cylinder-Head-Sector) addressing." [1]

The unit used in this script is the cylinder which is not supported in
the latest versions of sfdisk. However, it supports the deprecated option
"--unit S" that allows to keep the retro-compatibility with the older
versions of sfdisk if we use the sector unit.

This commit converts the offset and size from the cylinder unit (8 bytes)
to the sector unit (512 bytes).

[1] man page of sfdisk 2.28

Signed-off-by: Georges Savoundararadj <savoundg@gmail.com>
Signed-off-by: Stanislas Bach <sbach@0g.re>
---
 board/freescale/create-boot-sd.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/board/freescale/create-boot-sd.sh b/board/freescale/create-boot-sd.sh
index af45115..32ad31e 100755
--- a/board/freescale/create-boot-sd.sh
+++ b/board/freescale/create-boot-sd.sh
@@ -59,9 +59,9 @@ sync
 # - Bootloader at offset 1024
 # - 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
+sfdisk --unit S ${DEV} <<EOF
+2048,30720,b
+32768,,L
 EOF
 
 sync
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 1/1] create-boot-sd.sh: fix script for sfdisk (>=2.26)
  2016-07-04  0:22 [Buildroot] [PATCH 1/1] create-boot-sd.sh: fix script for sfdisk (>=2.26) Georges Savoundararadj
@ 2016-07-04  7:04 ` Thomas Petazzoni
  2016-07-04 19:44   ` Georges Savoundararadj
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2016-07-04  7:04 UTC (permalink / raw)
  To: buildroot

Hello Georges,

On Sun,  3 Jul 2016 17:22:29 -0700, Georges Savoundararadj wrote:
> "Since version 2.26, sfdisk [...] no longer provides any functionality
> for CHS (Cylinder-Head-Sector) addressing." [1]
> 
> The unit used in this script is the cylinder which is not supported in
> the latest versions of sfdisk. However, it supports the deprecated option
> "--unit S" that allows to keep the retro-compatibility with the older
> versions of sfdisk if we use the sector unit.
> 
> This commit converts the offset and size from the cylinder unit (8 bytes)
> to the sector unit (512 bytes).
> 
> [1] man page of sfdisk 2.28
> 
> Signed-off-by: Georges Savoundararadj <savoundg@gmail.com>
> Signed-off-by: Stanislas Bach <sbach@0g.re>

Thanks for this patch. May I ask on which platform you are still using
create-boot-sd.sh ? Indeed, we are trying to move away from this sort
of script and use genimage instead.

As far as I can see, only the imx28evk and imx6sabre support in
Buildroot still have a reference to this script. Are you using of those
two platforms? If that's the case, then we would very much prefer a
solution where the platform is migrated to use genimage.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 1/1] create-boot-sd.sh: fix script for sfdisk (>=2.26)
  2016-07-04  7:04 ` Thomas Petazzoni
@ 2016-07-04 19:44   ` Georges Savoundararadj
  2016-07-04 20:01     ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Georges Savoundararadj @ 2016-07-04 19:44 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On 07/04/2016 12:04 AM, Thomas Petazzoni wrote:
> Hello Georges,
>
> On Sun,  3 Jul 2016 17:22:29 -0700, Georges Savoundararadj wrote:
>> "Since version 2.26, sfdisk [...] no longer provides any functionality
>> for CHS (Cylinder-Head-Sector) addressing." [1]
>>
>> The unit used in this script is the cylinder which is not supported in
>> the latest versions of sfdisk. However, it supports the deprecated option
>> "--unit S" that allows to keep the retro-compatibility with the older
>> versions of sfdisk if we use the sector unit.
>>
>> This commit converts the offset and size from the cylinder unit (8 bytes)
>> to the sector unit (512 bytes).
>>
>> [1] man page of sfdisk 2.28
>>
>> Signed-off-by: Georges Savoundararadj<savoundg@gmail.com>
>> Signed-off-by: Stanislas Bach<sbach@0g.re>
> Thanks for this patch. May I ask on which platform you are still using
> create-boot-sd.sh ? Indeed, we are trying to move away from this sort
> of script and use genimage instead.
>
> As far as I can see, only the imx28evk and imx6sabre support in
> Buildroot still have a reference to this script. Are you using of those
> two platforms? If that's the case, then we would very much prefer a
> solution where the platform is migrated to use genimage.
I am using this script for the imx6sololiteevk 
(freescale_imx6sololiteevk_defconfig)
platform which does not refer to this script.

Actually, imx28evk is referring to 
./board/freescale/imx28evk/create-boot-sd.sh whereas
imx6sabre is referring to ./board/freescale/create-boot-sd.sh which has 
a different partition
layout.

Thanks,

Georges
> Thanks,
>
> Thomas


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160704/6a91f4d2/attachment.html>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 1/1] create-boot-sd.sh: fix script for sfdisk (>=2.26)
  2016-07-04 19:44   ` Georges Savoundararadj
@ 2016-07-04 20:01     ` Thomas Petazzoni
  2016-07-04 22:30       ` Georges Savoundararadj
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2016-07-04 20:01 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 4 Jul 2016 12:44:50 -0700, Georges Savoundararadj wrote:

> > As far as I can see, only the imx28evk and imx6sabre support in
> > Buildroot still have a reference to this script. Are you using of those
> > two platforms? If that's the case, then we would very much prefer a
> > solution where the platform is migrated to use genimage.  
> I am using this script for the imx6sololiteevk 
> (freescale_imx6sololiteevk_defconfig)
> platform which does not refer to this script.

OK. What about using genimage instead then?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 1/1] create-boot-sd.sh: fix script for sfdisk (>=2.26)
  2016-07-04 20:01     ` Thomas Petazzoni
@ 2016-07-04 22:30       ` Georges Savoundararadj
  0 siblings, 0 replies; 5+ messages in thread
From: Georges Savoundararadj @ 2016-07-04 22:30 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On 07/04/2016 01:01 PM, Thomas Petazzoni wrote:
> Hello,
>
> On Mon, 4 Jul 2016 12:44:50 -0700, Georges Savoundararadj wrote:
>
>>> As far as I can see, only the imx28evk and imx6sabre support in
>>> Buildroot still have a reference to this script. Are you using of those
>>> two platforms? If that's the case, then we would very much prefer a
>>> solution where the platform is migrated to use genimage.
>> I am using this script for the imx6sololiteevk
>> (freescale_imx6sololiteevk_defconfig)
>> platform which does not refer to this script.
> OK. What about using genimage instead then?
OK, I will send you a patch based on genimage.

Thanks,

Georges
> Thanks,
>
> Thomas

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-07-04 22:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-04  0:22 [Buildroot] [PATCH 1/1] create-boot-sd.sh: fix script for sfdisk (>=2.26) Georges Savoundararadj
2016-07-04  7:04 ` Thomas Petazzoni
2016-07-04 19:44   ` Georges Savoundararadj
2016-07-04 20:01     ` Thomas Petazzoni
2016-07-04 22:30       ` Georges Savoundararadj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.