Re: [OE-core] [fido][PATCH 0/2] Backports for WIC

2015-07-30 Thread Ash Charles
On Thu, Jul 30, 2015 at 9:22 AM, Joshua Lock
 wrote:
> Backporting those
> changes seems reasonable to me, I've queued them in my joshuagl/fido
> -next branch[1].
Thanks Joshua.
--Ash
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [fido][PATCH 2/2] wic: Make sure file exists before removing it

2015-07-23 Thread Ash Charles
From: Ed Bartosh 

Bunch of os.remove calls were added to the partition.py lately.
They're causing wic to fail with OSError: [Errno 2] No such file or directory
if file doesn't exist.

Added check for file existence to all recently added calls of
os.remove. That should fix this regression.

Signed-off-by: Ed Bartosh 
Signed-off-by: Ross Burton 
---
 scripts/lib/wic/kickstart/custom_commands/partition.py | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py 
b/scripts/lib/wic/kickstart/custom_commands/partition.py
index 654c380..7cfeec4 100644
--- a/scripts/lib/wic/kickstart/custom_commands/partition.py
+++ b/scripts/lib/wic/kickstart/custom_commands/partition.py
@@ -231,7 +231,7 @@ class Wic_PartData(Mic_PartData):
 image_rootfs = rootfs_dir
 rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label ,self.fstype)
 
-os.remove(rootfs)
+os.path.isfile(rootfs) and os.remove(rootfs)
 du_cmd = "du -ks %s" % image_rootfs
 out = exec_cmd(du_cmd)
 actual_rootfs_size = int(out.split()[0])
@@ -283,7 +283,7 @@ class Wic_PartData(Mic_PartData):
 image_rootfs = rootfs_dir
 rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label, self.fstype)
 
-os.remove(rootfs)
+os.path.isfile(rootfs) and os.remove(rootfs)
 du_cmd = "du -ks %s" % image_rootfs
 out = exec_cmd(du_cmd)
 actual_rootfs_size = int(out.split()[0])
@@ -328,7 +328,7 @@ class Wic_PartData(Mic_PartData):
 image_rootfs = rootfs_dir
 rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label, self.fstype)
 
-os.remove(rootfs)
+os.path.isfile(rootfs) and os.remove(rootfs)
 du_cmd = "du -bks %s" % image_rootfs
 out = exec_cmd(du_cmd)
 blocks = int(out.split()[0])
@@ -381,7 +381,7 @@ class Wic_PartData(Mic_PartData):
 image_rootfs = rootfs_dir
 rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label ,self.fstype)
 
-os.remove(rootfs)
+os.path.isfile(rootfs) and os.remove(rootfs)
 squashfs_cmd = "mksquashfs %s %s -noappend" % \
(image_rootfs, rootfs)
 exec_native_cmd(pseudo + squashfs_cmd, native_sysroot)
@@ -420,7 +420,7 @@ class Wic_PartData(Mic_PartData):
 """
 fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
 
-os.remove(fs)
+os.path.isfile(fs) and os.remove(fs)
 dd_cmd = "dd if=/dev/zero of=%s bs=1k seek=%d count=0" % \
 (fs, self.size)
 exec_cmd(dd_cmd)
@@ -448,7 +448,7 @@ class Wic_PartData(Mic_PartData):
 """
 fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
 
-os.remove(fs)
+os.path.isfile(fs) and os.remove(fs)
 dd_cmd = "dd if=/dev/zero of=%s bs=1k seek=%d count=0" % \
 (fs, self.size)
 exec_cmd(dd_cmd)
@@ -473,7 +473,7 @@ class Wic_PartData(Mic_PartData):
 Prepare an empty vfat partition.
 """
 fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
-os.remove(fs)
+os.path.isfile(fs) and os.remove(fs)
 
 blocks = self.size
 
@@ -500,7 +500,7 @@ class Wic_PartData(Mic_PartData):
   "Proceeding as requested." % self.mountpoint)
 
 fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
-os.remove(fs)
+os.path.isfile(fs) and os.remove(fs)
 
 # it is not possible to create a squashfs without source data,
 # thus prepare an empty temp dir that is used as source
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [fido][PATCH 1/2] wic: remove intermediate partitions

2015-07-23 Thread Ash Charles
From: Alexandre Belloni 

Remove intermediate partitions that may have been created by a previous
wic invocation. Those partitions are causing issues on some systems. In
particular vfat partition creation is hanging on mcopy execution on
Fedora.

Signed-off-by: Alexandre Belloni 
Signed-off-by: Richard Purdie 
---
 scripts/lib/wic/kickstart/custom_commands/partition.py | 8 
 1 file changed, 8 insertions(+)

diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py 
b/scripts/lib/wic/kickstart/custom_commands/partition.py
index f3d553b..654c380 100644
--- a/scripts/lib/wic/kickstart/custom_commands/partition.py
+++ b/scripts/lib/wic/kickstart/custom_commands/partition.py
@@ -231,6 +231,7 @@ class Wic_PartData(Mic_PartData):
 image_rootfs = rootfs_dir
 rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label ,self.fstype)
 
+os.remove(rootfs)
 du_cmd = "du -ks %s" % image_rootfs
 out = exec_cmd(du_cmd)
 actual_rootfs_size = int(out.split()[0])
@@ -282,6 +283,7 @@ class Wic_PartData(Mic_PartData):
 image_rootfs = rootfs_dir
 rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label, self.fstype)
 
+os.remove(rootfs)
 du_cmd = "du -ks %s" % image_rootfs
 out = exec_cmd(du_cmd)
 actual_rootfs_size = int(out.split()[0])
@@ -326,6 +328,7 @@ class Wic_PartData(Mic_PartData):
 image_rootfs = rootfs_dir
 rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label, self.fstype)
 
+os.remove(rootfs)
 du_cmd = "du -bks %s" % image_rootfs
 out = exec_cmd(du_cmd)
 blocks = int(out.split()[0])
@@ -378,6 +381,7 @@ class Wic_PartData(Mic_PartData):
 image_rootfs = rootfs_dir
 rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label ,self.fstype)
 
+os.remove(rootfs)
 squashfs_cmd = "mksquashfs %s %s -noappend" % \
(image_rootfs, rootfs)
 exec_native_cmd(pseudo + squashfs_cmd, native_sysroot)
@@ -416,6 +420,7 @@ class Wic_PartData(Mic_PartData):
 """
 fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
 
+os.remove(fs)
 dd_cmd = "dd if=/dev/zero of=%s bs=1k seek=%d count=0" % \
 (fs, self.size)
 exec_cmd(dd_cmd)
@@ -443,6 +448,7 @@ class Wic_PartData(Mic_PartData):
 """
 fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
 
+os.remove(fs)
 dd_cmd = "dd if=/dev/zero of=%s bs=1k seek=%d count=0" % \
 (fs, self.size)
 exec_cmd(dd_cmd)
@@ -467,6 +473,7 @@ class Wic_PartData(Mic_PartData):
 Prepare an empty vfat partition.
 """
 fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
+os.remove(fs)
 
 blocks = self.size
 
@@ -493,6 +500,7 @@ class Wic_PartData(Mic_PartData):
   "Proceeding as requested." % self.mountpoint)
 
 fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
+os.remove(fs)
 
 # it is not possible to create a squashfs without source data,
 # thus prepare an empty temp dir that is used as source
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [fido][PATCH 0/2] Backports for WIC

2015-07-23 Thread Ash Charles
In order to use the wic tool multiple times (Ubuntu 15.04 host), I need
to cherry-pick these two patches onto the fido branch.  Otherwise, wic
just hangs on the second invocation.  Can these two patches be applied
as backports to Fido?

Alexandre Belloni (1):
  wic: remove intermediate partitions

Ed Bartosh (1):
  wic: Make sure file exists before removing it

 scripts/lib/wic/kickstart/custom_commands/partition.py | 8 
 1 file changed, 8 insertions(+)

-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] python-io: Add runtime dependency on contextlib

2015-07-08 Thread Ash Charles
On Jul 8, 2015 4:20 AM, "Burton, Ross"  wrote:
>
>
> On 7 July 2015 at 22:22, Ash Charles  wrote:
>>
>> This applied to Python 2.7.9 but not 3.3.
>
>
> Do you mean this isn't applicable to python 3.3 or you haven't checked
with 3.3?
It is not applicable to 3.3.

Ash
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] python-io: Add runtime dependency on contextlib

2015-07-07 Thread Ash Charles
The python-io package includes ssl.py module which imports the
contextlib library.

This applied to Python 2.7.9 but not 3.3.

Signed-off-by: Ash Charles 
---
 meta/recipes-devtools/python/python-2.7-manifest.inc | 2 +-
 scripts/contrib/python/generate-manifest-2.7.py  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/python/python-2.7-manifest.inc 
b/meta/recipes-devtools/python/python-2.7-manifest.inc
index 9ba9c7f..dd8d825 100644
--- a/meta/recipes-devtools/python/python-2.7-manifest.inc
+++ b/meta/recipes-devtools/python/python-2.7-manifest.inc
@@ -130,7 +130,7 @@ RDEPENDS_${PN}-importlib="${PN}-core"
 FILES_${PN}-importlib="${libdir}/python2.7/importlib "
 
 SUMMARY_${PN}-io="Python low-level I/O"
-RDEPENDS_${PN}-io="${PN}-core ${PN}-math ${PN}-textutils ${PN}-netclient"
+RDEPENDS_${PN}-io="${PN}-core ${PN}-math ${PN}-textutils ${PN}-netclient 
${PN}-contextlib"
 FILES_${PN}-io="${libdir}/python2.7/lib-dynload/_socket.so 
${libdir}/python2.7/lib-dynload/_io.so ${libdir}/python2.7/lib-dynload/_ssl.so 
${libdir}/python2.7/lib-dynload/select.so 
${libdir}/python2.7/lib-dynload/termios.so 
${libdir}/python2.7/lib-dynload/cStringIO.so ${libdir}/python2.7/pipes.* 
${libdir}/python2.7/socket.* ${libdir}/python2.7/ssl.* 
${libdir}/python2.7/tempfile.* ${libdir}/python2.7/StringIO.* 
${libdir}/python2.7/io.* ${libdir}/python2.7/_pyio.* "
 
 SUMMARY_${PN}-json="Python JSON support"
diff --git a/scripts/contrib/python/generate-manifest-2.7.py 
b/scripts/contrib/python/generate-manifest-2.7.py
index a368c8a..936522e 100755
--- a/scripts/contrib/python/generate-manifest-2.7.py
+++ b/scripts/contrib/python/generate-manifest-2.7.py
@@ -275,7 +275,7 @@ if __name__ == "__main__":
 m.addPackage( "${PN}-image", "Python graphical image handling", 
"${PN}-core",
 "colorsys.* imghdr.* lib-dynload/imageop.so lib-dynload/rgbimg.so" )
 
-m.addPackage( "${PN}-io", "Python low-level I/O", "${PN}-core ${PN}-math 
${PN}-textutils ${PN}-netclient",
+m.addPackage( "${PN}-io", "Python low-level I/O", "${PN}-core ${PN}-math 
${PN}-textutils ${PN}-netclient ${PN}-contextlib",
 "lib-dynload/_socket.so lib-dynload/_io.so lib-dynload/_ssl.so 
lib-dynload/select.so lib-dynload/termios.so lib-dynload/cStringIO.so " +
 "pipes.* socket.* ssl.* tempfile.* StringIO.* io.* _pyio.*" )
 
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] busybox: Include 'mesg' utility

2015-01-29 Thread Ash Charles
The 'dot.profile' supplied by base-files calls 'mesg'.  For simple
images using busybox e.g. core-image-minimal, this utility should be
available to avoid errors on login:

 -sh: mesg: command not found

Provide mesg with busybox.

Signed-off-by: Ash Charles 
---
 meta/recipes-core/busybox/busybox/defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/busybox/busybox/defconfig 
b/meta/recipes-core/busybox/busybox/defconfig
index 8394067..c200ee0 100644
--- a/meta/recipes-core/busybox/busybox/defconfig
+++ b/meta/recipes-core/busybox/busybox/defconfig
@@ -441,7 +441,7 @@ CONFIG_FEATURE_KILL_DELAY=0
 # CONFIG_FEATURE_INIT_COREDUMPS is not set
 # CONFIG_FEATURE_INITRD is not set
 CONFIG_INIT_TERMINAL_TYPE=""
-# CONFIG_MESG is not set
+CONFIG_MESG=y
 # CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP is not set
 
 #
-- 
2.1.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [WIP][PATCH] systemd: don't move libgudev around, it breaks libgudev-1.0.la

2014-12-04 Thread Ash Charles
Hi Armin,

Would it be possible to cherry-pick this commit "systemd: don't move
libgudev around, it breaks libgudev-1.0.la"
(7807d1d8b9535a87ba3e5ab7df21a2954708333f on oe-core,
41ae2056e6b6f17a1d9fe7408596a448f3e605ad on poky) to the dizzy branch?

Thanks,

Ash

On Fri, Nov 28, 2014 at 9:23 AM, Burton, Ross  wrote:
> I can't see why not.  CC'ing Armin, the dizzy maintainer.
>
> On 27 November 2014 at 21:29, Ash Charles  wrote:
>>
>> I cherry-picked this patch onto dizzy and it unbroke my build.  Is it
>> possible/reasonable for it to be included in dizzy?
>> --Ash
>>
>> On Fri, Oct 31, 2014 at 1:21 AM, Andreas Müller
>>  wrote:
>> > On Fri, Oct 24, 2014 at 12:29 PM, Burton, Ross 
>> > wrote:
>> >>
>> >> On 24 October 2014 10:04, Martin Jansa  wrote:
>> >>>
>> >>> Should I resend without WIP tag now when ChenQi confirmed that moving
>> >>> libgudev isn't needed?
>> >>
>> >>
>> >> No need, I've merged it into my staging branch already.
>> >>
>> > This should go into dizzy - right?
>> >
>> > Andreas
>> > --
>> > ___
>> > Openembedded-core mailing list
>> > Openembedded-core@lists.openembedded.org
>> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [WIP][PATCH] systemd: don't move libgudev around, it breaks libgudev-1.0.la

2014-11-27 Thread Ash Charles
I cherry-picked this patch onto dizzy and it unbroke my build.  Is it
possible/reasonable for it to be included in dizzy?
--Ash

On Fri, Oct 31, 2014 at 1:21 AM, Andreas Müller
 wrote:
> On Fri, Oct 24, 2014 at 12:29 PM, Burton, Ross  wrote:
>>
>> On 24 October 2014 10:04, Martin Jansa  wrote:
>>>
>>> Should I resend without WIP tag now when ChenQi confirmed that moving
>>> libgudev isn't needed?
>>
>>
>> No need, I've merged it into my staging branch already.
>>
> This should go into dizzy - right?
>
> Andreas
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] u-boot: Optionally deploy an environment or script file

2014-06-24 Thread Ash Charles
Some boards are configured to read a script or environment file as part
of the u-boot boot sequence.  This file, typically called 'uEnv.txt' or
'boot.scr', would be deployed alongside the u-boot binary.  If a recipe
uses this u-boot.inc, such a file can be deployed by setting the optional
UBOOT_ENV parameter and including the file in the SRC_URI.  For example:

SRC_URI_append_overo = "file://uEnv.txt"
UBOOT_ENV_overo = "uEnv"

Signed-off-by: Ash Charles 
---
 meta/recipes-bsp/u-boot/u-boot.inc | 25 +
 1 file changed, 25 insertions(+)

diff --git a/meta/recipes-bsp/u-boot/u-boot.inc 
b/meta/recipes-bsp/u-boot/u-boot.inc
index d826a40..53c87c2 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -28,6 +28,17 @@ SPL_BINARY ?= ""
 SPL_IMAGE ?= "${SPL_BINARY}-${MACHINE}-${PV}-${PR}"
 SPL_SYMLINK ?= "${SPL_BINARY}-${MACHINE}"
 
+# Additional environment variables or a script can be installed alongside
+# u-boot to be used automatically on boot.  This file, typically 'uEnv.txt'
+# or 'boot.scr', should be packaged along with u-boot as well as placed in the
+# deploy directory.  Machine configurations needing one of these files should
+# include it in the SRC_URI and set the UBOOT_ENV parameter.
+UBOOT_ENV_SUFFIX ?= "txt"
+UBOOT_ENV ?= ""
+UBOOT_ENV_BINARY ?= "${UBOOT_ENV}.${UBOOT_ENV_SUFFIX}"
+UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${PV}-${PR}.${UBOOT_ENV_SUFFIX}"
+UBOOT_ENV_SYMLINK ?= "${UBOOT_ENV}-${MACHINE}.${UBOOT_ENV_SUFFIX}"
+
 do_compile () {
if [ "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', 
'ld-is-gold', '', d)}" = "ld-is-gold" ] ; then
sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' 
config.mk
@@ -62,6 +73,12 @@ do_install () {
 install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}
 ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARY}
 fi
+
+if [ "x${UBOOT_ENV}" != "x" ]
+then
+install ${WORKDIR}/${UBOOT_ENV_BINARY} ${D}/boot/${UBOOT_ENV_IMAGE}
+ln -sf ${UBOOT_ENV_IMAGE} ${D}/boot/${UBOOT_ENV_BINARY}
+fi
 }
 
 FILES_${PN} = "/boot ${sysconfdir}"
@@ -82,6 +99,14 @@ do_deploy () {
 ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARY}
 ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK}
 fi
+
+if [ "x${UBOOT_ENV}" != "x" ]
+then
+install ${WORKDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_IMAGE}
+rm -f ${DEPLOYDIR}/${UBOOT_ENV_BINARY} 
${DEPLOYDIR}/${UBOOT_ENV_SYMLINK}
+ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_BINARY}
+ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK}
+fi
 }
 
 addtask deploy before do_build after do_compile
-- 
1.8.3.2

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core