[OE-core] [PATCH] oeqa/controllers/beaglebonetarget.py: add conditions for files copied to /boot

Stoicescu, CorneliuX corneliux.stoicescu at intel.com
Tue May 27 07:12:26 UTC 2014



> -----Original Message-----
> From: Stoicescu, CorneliuX
> Sent: Tuesday, May 27, 2014 10:02 AM
> To: 'Anders Darander'
> Cc: openembedded-core at lists.openembedded.org
> Subject: RE: [OE-core] [PATCH] oeqa/controllers/beaglebonetarget.py: add
> conditions for files copied to /boot
> 
> 
> 
> > -----Original Message-----
> > From: Anders Darander [mailto:anders at chargestorm.se]
> > Sent: Tuesday, May 27, 2014 9:46 AM
> > To: Stoicescu, CorneliuX
> > Cc: openembedded-core at lists.openembedded.org
> > Subject: Re: [OE-core] [PATCH] oeqa/controllers/beaglebonetarget.py:
> > add conditions for files copied to /boot
> >
> > * Corneliu Stoicescu <corneliux.stoicescu at intel.com> [140526 15:23]:
> >
> > > Sometimes the rootfs archive contains the kernel file
> > > (core-image-full-cmdline) or the dtbs files (core-image-sato).
> > > Adding verification to add them if they don't allready exist.
> >

My explanation of the patch was kind of wrong, there was a check already but I interpreted it as more like an "association" of circumstances in my head, but this time not because of lack of coffee but because it was late :D. I can change that if necessary.

> > > Without this, the first condition would fail and the image deploy
> > > task would
> > stop.
> >
> > What failure and errors are you seeing?
> >
> 
> '[ ! -e /mnt/testrootfs/boot/uImage ] && cp ~/test-
> kernel/mnt/testrootfs/boot/uImage' returns exit code 1 if the first condition
> is not met, and thus the deploy task fails. My version would return exit code
> 0 weather or not the first condition is met.
> 
> We could also modify the way the commands are run to ignore that exit
> code but that would involve more changes, many of them not needed or
> expected by other commands and/or target controllers.
> 
> > > -                '[ ! -e /mnt/testrootfs/boot/uImage ] && cp ~/test-kernel
> > /mnt/testrootfs/boot/uImage',
> > > +                'if [ ! -e /mnt/testrootfs/boot/uImage ]; then cp
> > > + ~/test-kernel /mnt/testrootfs/boot/uImage; fi',
> >
> > It might be that I've had no coffee yet, but I can't see what
> > difference your change is making (apart from being more verbose)?
> >
> > The original code checks for the existance of
> > /mnt/testrootfs/boot/uImage, negates the result and copies the test-
> kernel if the negated result is true, i.e.
> > if /mnt/testrootfs/boot/uImage doesn't exist, copy the test-kernel.
> >
> > > -            self.deploy_cmds.append('[ ! -e /mnt/testrootfs/boot/{0} ] && cp
> > ~/{0} /mnt/testrootfs/boot/'.format(dtbfn))
> > > +            self.deploy_cmds.append('if [ ! -e
> > > + /mnt/testrootfs/boot/{0} ]; then cp ~/{0}
> > > + /mnt/testrootfs/boot/'.format(dtbfn) + '; fi')
> >
> > See above...
> >
> > Cheers,
> > Anders
> >
> > --
> > Anders Darander
> > ChargeStorm AB / eStorm AB



More information about the Openembedded-core mailing list