Re: [meta-xilinx] Using wic to generate sd-image and writing it correctly

2018-02-20 Thread Jean-Francois Dagenais


> On Feb 20, 2018, at 16:29, Giordon Stark  wrote:
> 
> 
> The script looks formatted weird in my email, but how is this script run or 
> where? Is it part of bitbake, or separately? Do you use the wic output file, 
> etc...?
> 
> 

Sorry about that, that'll teach me to think I can get away with a quick answer 
from an iPhone.

Here again:

if $IS_SD_CARD; then
printWarning "adjusting sdcard's partitions"
set +e
command="sudo partprobe /dev/$DEVICE"
echo "$command"; $command
sudo udevadm settle
command="sudo e2fsck -f /dev/${DEVICE}2"
echo "$command"; $command
command="sudo parted /dev/${DEVICE} resizepart 2 '100%'"
echo "$command"; $command
sudo udevadm settle
command="sudo resize2fs /dev/${DEVICE}2"
echo "$command"; $command
set -e

sync
fi



Sow we use a wrapper script called "writewic 
/path/to/tmp/image/deploy/myimage.wic /dev/sdX". It is invoked completely 
outside bitbake, post image build.

It will raw write (using dd or the like) to the device, then run the bit I 
pasted above.

I think this should/could be part of the poky/scripts directory as it is 
generic code which anybody could use. (I didn't check if someone already did 
something like this in there or in poky-contrib)

Cheers!
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] Using wic to generate sd-image and writing it correctly

2018-02-20 Thread Giordon Stark
Hi Jean-François,

The script looks formatted weird in my email, but how is this script run or
where? Is it part of bitbake, or separately? Do you use the wic output
file, etc...?

Giordon

On Tue, Feb 20, 2018 at 3:25 PM Jean-François Dagenais <
jeff.dagen...@gmail.com> wrote:

>
> On Feb 19, 2018, at 10:21, Giordon Stark  wrote:
>
> Mac), I see the two partitions (great!) but the Linux partition only takes
> up 150MB instead of the expected rest of the SD card. Is there a way to
> resize that partition? Is this just not possible, or should I be writing a
> custom wks that defines the size of the second partition? Where should I
> start?
>
>
> Hi Giordon
>
> We use a helper script to perform the raw write, then partition expansion.
> Her’s an extract:
>
>
>
> if $IS_SD_CARD; then
> printWarning "adjusting sdcard's partitions"
> set +e
> command="sudo partprobe /dev/$DEVICE"
> echo "$command"; $command
> sudo udevadm settle
> command="sudo e2fsck -f /dev/${DEVICE}2"
> echo "$command"; $command
> command="sudo parted /dev/${DEVICE} resizepart 2 '100%'"
> echo "$command"; $command
> sudo udevadm settle
> command="sudo resize2fs /dev/${DEVICE}2"
> echo "$command"; $command
> set -e
>
> sync
> fi
>
> Hope it helps.
>
> --
Giordon Stark
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] Using wic to generate sd-image and writing it correctly

2018-02-20 Thread Jean-François Dagenais

> On Feb 19, 2018, at 10:21, Giordon Stark  wrote:
> 
> Mac), I see the two partitions (great!) but the Linux partition only takes up 
> 150MB instead of the expected rest of the SD card. Is there a way to resize 
> that partition? Is this just not possible, or should I be writing a custom 
> wks that defines the size of the second partition? Where should I start?

Hi Giordon

We use a helper script to perform the raw write, then partition expansion. 
Her’s an extract:


if $IS_SD_CARD; then printWarning "adjusting sdcard's partitions" set +e 
command="sudo partprobe /dev/$DEVICE" echo "$command"; $command sudo udevadm 
settle command="sudo e2fsck -f /dev/${DEVICE}2" echo "$command"; $command 
command="sudo parted /dev/${DEVICE} resizepart 2 '100%'" echo "$command"; 
$command sudo udevadm settle command="sudo resize2fs /dev/${DEVICE}2" echo 
"$command"; $command set -e sync fi
Hope it helps. -- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


[meta-xilinx] Using wic to generate sd-image and writing it correctly

2018-02-19 Thread Giordon Stark
Hi all,

Do you know how to get the filesystem partition to auto-expand to the rest
of the disk space? I followed some of the instructions here:
https://www.yoctoproject.org/docs/2.3/dev-manual/dev-manual.html#creating-wic-images-oe


using `dd` to flash the SD card that I have. Looking at it from Disk
Utility (on Mac), I see the two partitions (great!) but the Linux partition
only takes up 150MB instead of the expected rest of the SD card. Is there a
way to resize that partition? Is this just not possible, or should I be
writing a custom wks that defines the size of the second partition? Where
should I start?

Giordon
-- 
Giordon Stark
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx