tool does not properly create partitions

Bug #622979 reported by Torez Smith
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Linaro Image Tools
Fix Released
Undecided
Tom Gall

Bug Description

a recent change went into this tool to remove the "sudo fdisk -H 255 -S 63 ${MMC} << END" line and thus it no longer creates proper partitions if one passes arguments -mmc /dev/sdb

At the present moment, the tool will only support arguments of image_file and not an actual scsi device as a argument.

This needs to be fixed.

Related branches

Revision history for this message
Torez Smith (lnxtorez) wrote :

by makings the changes specified in the attached patch file, I'm able to get this tool working with scsi devices as well as images

Revision history for this message
Torez Smith (lnxtorez) wrote :
Revision history for this message
Loïc Minier (lool) wrote :

Could you fix the sfdisk calls instead? it's not too nice to use two different partitioning tools in the same script.

Revision history for this message
John Rigby (jcrigby) wrote : Re: [Bug 622979] Re: tool does not properly create partitions

On 08/23/2010 04:12 PM, Loïc Minier wrote:
> Could you fix the sfdisk calls instead? it's not too nice to use two
> different partitioning tools in the same script.
>
>
Yes, please avoid using fdisk with a HEREDOC. It is not only ugly but
fails if the version of fdisk is the new gnu-fdisk that changes the
prompting. The use of sfdisk is ugly also but really our only option
right now.

Revision history for this message
Torez Smith (lnxtorez) wrote :

add the following in support of panda board...

Panda support....
    v_opts="vram=32M"
    board_opts="mem=463M"
    uboot_extra_cmdline=" root=/dev/mmcblk0p2 fixrtc"
    uboot_kernel_addr="0x80000000"
    uboot_ramdisk_addr="0x81600000"

cat >"$uboot_script_text" <<EOF
    fatload mmc 0:1 $uboot_kernel_addr $uboot_kernel
    fatload mmc 0:1 $uboot_ramdisk_addr $uboot_initrd
    setenv bootargs $v_opts $board_opts $DEFAULT_PRESEED $uboot_extra_cmdline
    bootm $uboot_kernel_addr $uboot_ramdisk_addr
EOF

mkimage -A arm -T script -C none -n "Ubuntu boot script" -d "$uboot_script_text" "$uboot_script_image"
rm -f "$uboot_script_text"

Revision history for this message
Loïc Minier (lool) wrote :

Torez, please file a separate bug for panda support; how are you actually testing it BTW?

Please submit a bzr merge proposal for your changes

Revision history for this message
Loïc Minier (lool) wrote :

Torez told me she was asked to add panda support by ogra/asac, but doesn't hardware to test.

I told her not to work on panda / omap4 support for now, until she can test.

Revision history for this message
Torez Smith (lnxtorez) wrote :

# in the following examples, /dev/sdd boots fine while /dev/sdb does not

sudo fdisk -lu /dev/sdb /dev/sdd

Disk /dev/sdb: 3959 MB, 3959422976 bytes
255 heads, 63 sectors/track, 481 cylinders, total 7733248 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x0005e0e2

   Device Boot Start End Blocks Id System
/dev/sdb1 * 63 144584 72261 c W95 FAT32 (LBA)
/dev/sdb2 144585 16418429 8136922+ 83 Linux

Disk /dev/sdd: 3963 MB, 3963617280 bytes
255 heads, 63 sectors/track, 481 cylinders, total 7741440 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x000ce71b

   Device Boot Start End Blocks Id System
/dev/sdd1 * 63 144584 72261 e W95 FAT16 (LBA)
/dev/sdd2 144585 7727264 3791340 83 Linux

xxd -l 125 -p /dev/sdb
fab800108ed0bc00b0b800008ed88ec0fbbe007cbf0006b90002f3a4ea21
060000bebe073804750b83c61081fefe0775f3eb16b402b001bb007cb280
8a74018b4c02cd13ea007c0000ebfe000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
0000000000

 xxd -l 125 -p /dev/sdd
fab800108ed0bc00b0b800008ed88ec0fbbe007cbf0006b90002f3a4ea21
060000bebe073804750b83c61081fefe0775f3eb16b402b001bb007cb280
8a74018b4c02cd13ea007c0000ebfe000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
0000000000

Tom Gall (tom-gall)
Changed in linaro-image-tools:
assignee: nobody → Tom Gall (tom-gall)
Revision history for this message
Tom Gall (tom-gall) wrote :

I've validated my fix both on a rev C4 Beagle and a rev A2 Beagle XM with miniSD and SDHC respectively. Both partition successfully and result in images that are able to boot.

Changed in linaro-image-tools:
status: New → In Progress
Tom Gall (tom-gall)
Changed in linaro-image-tools:
status: In Progress → Fix Committed
Loïc Minier (lool)
Changed in linaro-image-tools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.