[meta-xilinx] Yocto inside docker

2018-02-20 Thread Giordon Stark
Hi all,

I found a docker image which looks to work for yocto builds here (
https://hub.docker.com/r/gmacario/build-yocto/) like so:

docker run -ti --rm gmacario/build-yocto

and then cloning poky and the other layers and running bitbake. However,
what works on my ubuntu machine seems to be failing in this docker image on
the unpack step for a recipe (see below).

Has anyone seen this or has an idea why it's failing? I ran it by hand
manually, and I don't have issues.

Giordon

ERROR: linux-libc-headers-4.10-r0 do_unpack: Unpack failure for URL: '
http://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.10.tar.xz'. Unpack
command
PATH="/home/build/poky/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/build/openembedded-core/scripts:/home/build/poky/build/tmp/work/aarch64-poky-linux/linux-libc-headers/4.10-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/home/build/poky/build/tmp/work/aarch64-poky-linux/linux-libc-headers/4.10-r0/recipe-sysroot/usr/bin/crossscripts:/home/build/poky/build/tmp/work/aarch64-poky-linux/linux-libc-headers/4.10-r0/recipe-sysroot-native/usr/sbin:/home/build/poky/build/tmp/work/aarch64-poky-linux/linux-libc-headers/4.10-r0/recipe-sysroot-native/usr/bin:/home/build/poky/build/tmp/work/aarch64-poky-linux/linux-libc-headers/4.10-r0/recipe-sysroot-native/sbin:/home/build/poky/build/tmp/work/aarch64-poky-linux/linux-libc-headers/4.10-r0/recipe-sysroot-native/bin:/home/build/poky/bitbake/bin:/home/build/poky/build/tmp/hosttools"
xz -dc /home/build/poky/build/downloads/linux-4.10.tar.xz | tar x
--no-same-owner -f - failed with return value 2
ERROR: linux-libc-headers-4.10-r0 do_unpack: Function failed: base_do_unpack
ERROR: Logfile of failure stored in:
/home/build/poky/build/tmp/work/aarch64-poky-linux/linux-libc-headers/4.10-r0/temp/log.do_unpack.4320
ERROR: Task
(/home/build/openembedded-core/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.10.bb:do_unpack)
failed with exit code '1'
NOTE: Tasks Summary: Attempted 278 tasks of which 256 didn't need to be
rerun and 1 failed.

Summary: 1 task failed:

/home/build/openembedded-core/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.10.bb:
do_unpack
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

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


Re: [meta-xilinx] Yocto inside docker

2018-02-20 Thread Peter Smith
Hi, I have used the "official" Yocto project crops containers without
issue. You can find them here : https://github.com/crops/. There is some
material about using them in the Yocto rocko manual.

Best Regards
Peter

On 20 February 2018 at 16:12, Giordon Stark  wrote:

> Hi all,
>
> I found a docker image which looks to work for yocto builds here (
> https://hub.docker.com/r/gmacario/build-yocto/) like so:
>
> docker run -ti --rm gmacario/build-yocto
>
> and then cloning poky and the other layers and running bitbake. However,
> what works on my ubuntu machine seems to be failing in this docker image on
> the unpack step for a recipe (see below).
>
> Has anyone seen this or has an idea why it's failing? I ran it by hand
> manually, and I don't have issues.
>
> Giordon
>
> ERROR: linux-libc-headers-4.10-r0 do_unpack: Unpack failure for URL: '
> http://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.10.tar.xz'. Unpack
> command PATH="/home/build/poky/build/tmp/sysroots-uninative/x86_64-
> linux/usr/bin:/home/build/openembedded-core/scripts:/
> home/build/poky/build/tmp/work/aarch64-poky-linux/linux-
> libc-headers/4.10-r0/recipe-sysroot-native/usr/bin/
> aarch64-poky-linux:/home/build/poky/build/tmp/work/
> aarch64-poky-linux/linux-libc-headers/4.10-r0/recipe-
> sysroot/usr/bin/crossscripts:/home/build/poky/build/tmp/
> work/aarch64-poky-linux/linux-libc-headers/4.10-r0/recipe-
> sysroot-native/usr/sbin:/home/build/poky/build/tmp/work/
> aarch64-poky-linux/linux-libc-headers/4.10-r0/recipe-
> sysroot-native/usr/bin:/home/build/poky/build/tmp/work/
> aarch64-poky-linux/linux-libc-headers/4.10-r0/recipe-
> sysroot-native/sbin:/home/build/poky/build/tmp/work/
> aarch64-poky-linux/linux-libc-headers/4.10-r0/recipe-
> sysroot-native/bin:/home/build/poky/bitbake/bin:/home/
> build/poky/build/tmp/hosttools" xz -dc 
> /home/build/poky/build/downloads/linux-4.10.tar.xz
> | tar x --no-same-owner -f - failed with return value 2
> ERROR: linux-libc-headers-4.10-r0 do_unpack: Function failed:
> base_do_unpack
> ERROR: Logfile of failure stored in: /home/build/poky/build/tmp/
> work/aarch64-poky-linux/linux-libc-headers/4.10-r0/temp/log.do_unpack.4320
> ERROR: Task (/home/build/openembedded-core/meta/recipes-kernel/
> linux-libc-headers/linux-libc-headers_4.10.bb:do_unpack) failed with exit
> code '1'
> NOTE: Tasks Summary: Attempted 278 tasks of which 256 didn't need to be
> rerun and 1 failed.
>
> Summary: 1 task failed:
>   /home/build/openembedded-core/meta/recipes-kernel/linux-
> libc-headers/linux-libc-headers_4.10.bb:do_unpack
> Summary: There was 1 WARNING message shown.
> Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
>
> --
> Giordon Stark
>
> --
> ___
> meta-xilinx mailing list
> meta-xilinx@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-xilinx
>
>
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] Yocto inside docker

2018-02-20 Thread Tim Orling
Documentation on how to use the CROPS docker containers on Linux, Mac and
Windows can be found here:
https://github.com/crops/docker-win-mac-docs/wiki

On Tue, Feb 20, 2018 at 8:50 AM, Peter Smith  wrote:

> Hi, I have used the "official" Yocto project crops containers without
> issue. You can find them here : https://github.com/crops/. There is some
> material about using them in the Yocto rocko manual.
>
> Best Regards
> Peter
>
> On 20 February 2018 at 16:12, Giordon Stark  wrote:
>
>> Hi all,
>>
>> I found a docker image which looks to work for yocto builds here (
>> https://hub.docker.com/r/gmacario/build-yocto/) like so:
>>
>> docker run -ti --rm gmacario/build-yocto
>>
>> and then cloning poky and the other layers and running bitbake. However,
>> what works on my ubuntu machine seems to be failing in this docker image on
>> the unpack step for a recipe (see below).
>>
>> Has anyone seen this or has an idea why it's failing? I ran it by hand
>> manually, and I don't have issues.
>>
>> Giordon
>>
>> ERROR: linux-libc-headers-4.10-r0 do_unpack: Unpack failure for URL: '
>> http://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.10.tar.xz'. Unpack
>> command PATH="/home/build/poky/build/tmp/sysroots-uninative/x86_64-l
>> inux/usr/bin:/home/build/openembedded-core/scripts:/home/
>> build/poky/build/tmp/work/aarch64-poky-linux/linux-libc-
>> headers/4.10-r0/recipe-sysroot-native/usr/bin/aarch64-poky-
>> linux:/home/build/poky/build/tmp/work/aarch64-poky-linux/
>> linux-libc-headers/4.10-r0/recipe-sysroot/usr/bin/
>> crossscripts:/home/build/poky/build/tmp/work/aarch64-poky-
>> linux/linux-libc-headers/4.10-r0/recipe-sysroot-native/usr/
>> sbin:/home/build/poky/build/tmp/work/aarch64-poky-linux/
>> linux-libc-headers/4.10-r0/recipe-sysroot-native/usr/bin:
>> /home/build/poky/build/tmp/work/aarch64-poky-linux/linux-
>> libc-headers/4.10-r0/recipe-sysroot-native/sbin:/home/build/
>> poky/build/tmp/work/aarch64-poky-linux/linux-libc-headers/
>> 4.10-r0/recipe-sysroot-native/bin:/home/build/poky/bitbake/
>> bin:/home/build/poky/build/tmp/hosttools" xz -dc
>> /home/build/poky/build/downloads/linux-4.10.tar.xz | tar x
>> --no-same-owner -f - failed with return value 2
>> ERROR: linux-libc-headers-4.10-r0 do_unpack: Function failed:
>> base_do_unpack
>> ERROR: Logfile of failure stored in: /home/build/poky/build/tmp/wor
>> k/aarch64-poky-linux/linux-libc-headers/4.10-r0/temp/log.do_unpack.4320
>> ERROR: Task (/home/build/openembedded-core/meta/recipes-kernel/linux-
>> libc-headers/linux-libc-headers_4.10.bb:do_unpack) failed with exit code
>> '1'
>> NOTE: Tasks Summary: Attempted 278 tasks of which 256 didn't need to be
>> rerun and 1 failed.
>>
>> Summary: 1 task failed:
>>   /home/build/openembedded-core/meta/recipes-kernel/linux-libc
>> -headers/linux-libc-headers_4.10.bb:do_unpack
>> Summary: There was 1 WARNING message shown.
>> Summary: There were 2 ERROR messages shown, returning a non-zero exit
>> code.
>>
>> --
>> Giordon Stark
>>
>> --
>> ___
>> meta-xilinx mailing list
>> meta-xilinx@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-xilinx
>>
>>
>
> --
> ___
> meta-xilinx mailing list
> meta-xilinx@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-xilinx
>
>
-- 
___
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


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-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