All of lore.kernel.org
 help / color / mirror / Atom feed
* package development recompile and install to rootfs
@ 2013-09-12  9:57 Karl Hiramoto
  2013-09-12 10:28 ` Hans Beckérus
  0 siblings, 1 reply; 3+ messages in thread
From: Karl Hiramoto @ 2013-09-12  9:57 UTC (permalink / raw)
  To: yocto

Hi,

I'm looking for a faster way  to recompile and install my package to my 
rootfs.   I am currently developing on a ARM board, and I'm booting the 
kernel and loading the rootfs over NFS.  I point the nfs root to 
/home/karl/Work/yocto/poky-dylan-9.0.1/build/tmp/work/mymachine-poky-linux-gnueabi/mymachine-image/1.0-r0/rootfs

in my custom "mypackage.bb" recipe I have:

DESCRIPTION = "mypackage"
SECTION = "base"
LICENSE = "CLOSED"
DEPENDS = "libnl jansson file"
SRCREV = "HEAD"
PR = "r0"
inherit autotools pkgconfig externalsrc
S = "/home/karl/Work/mypackage"

So to compile and reinstall mypackage i do:
bitbake -v mypackage -c clean -f  && bitbake -v mypackage -c install -f 
&& bitbake -v mymachine-image


The mymachine-image  deletes and recreates the rootfs, which is 
lengthly.  After i do this, I need to reboot my  target board, so the 
nfsroot gets remounted.

Is there any way to quickly get  mypackage  installed on the rootfs?    
I'd like to be able to quickly recompile/link mypackage after changing a 
few lines of code.


I could write a script to copy the binaries over but I'm wondering if 
there is an easier way.


Thanks,

Karl


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: package development recompile and install to rootfs
  2013-09-12  9:57 package development recompile and install to rootfs Karl Hiramoto
@ 2013-09-12 10:28 ` Hans Beckérus
  2013-09-12 10:48   ` Paul Eggleton
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Beckérus @ 2013-09-12 10:28 UTC (permalink / raw)
  To: Karl Hiramoto; +Cc: yocto@yoctoproject.org

On Thu, Sep 12, 2013 at 11:57 AM, Karl Hiramoto <karl@hiramoto.org> wrote:
> Hi,
>
> I'm looking for a faster way  to recompile and install my package to my
> rootfs.   I am currently developing on a ARM board, and I'm booting the
> kernel and loading the rootfs over NFS.  I point the nfs root to
> /home/karl/Work/yocto/poky-dylan-9.0.1/build/tmp/work/mymachine-poky-linux-gnueabi/mymachine-image/1.0-r0/rootfs
>
> in my custom "mypackage.bb" recipe I have:
>
> DESCRIPTION = "mypackage"
> SECTION = "base"
> LICENSE = "CLOSED"
> DEPENDS = "libnl jansson file"
> SRCREV = "HEAD"
> PR = "r0"
> inherit autotools pkgconfig externalsrc
> S = "/home/karl/Work/mypackage"
>
> So to compile and reinstall mypackage i do:
> bitbake -v mypackage -c clean -f  && bitbake -v mypackage -c install -f &&
> bitbake -v mymachine-image
>
>
> The mymachine-image  deletes and recreates the rootfs, which is lengthly.
> After i do this, I need to reboot my  target board, so the nfsroot gets
> remounted.
>
> Is there any way to quickly get  mypackage  installed on the rootfs?    I'd
> like to be able to quickly recompile/link mypackage after changing a few
> lines of code.
>
>
> I could write a script to copy the binaries over but I'm wondering if there
> is an easier way.
>
AFAIK there is no quick way of updating a rootfs image with a new
version of a package. If there is then please tell us because I would
like to know too ;)
If your are only after package development and testing it on target I
would use the SDK. That is why it exists. The poky tree is so much
more than a simple cross-compilation toolchain. It is a complete
integration/build and package management environment, not a
development tool for individual packages. In our case we build our
packages stand-alone using the SDK toolchain and then upload them to
the board using scp or a special dedicated NFS mount for testing. It
is a very quick way to try out those few lines of code you changed.

To build the SDK, you do bitbake -c populate_sdk <your image>
The result will be a huge .sh script that you run to install the
toolchain somewhere on your host/build machine.
After install you source an environment setup script in the root of
the install path and that is it. Now you can configure/compile your
package from anywhere. The SDK will provide exactly the same header
files and libraries as used when building your rootfs so output from
the build is 100% binary compatible. Just throw it onto the board and
run :)

Hope it helps!
Hans



>
> Thanks,
>
> Karl
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: package development recompile and install to rootfs
  2013-09-12 10:28 ` Hans Beckérus
@ 2013-09-12 10:48   ` Paul Eggleton
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Eggleton @ 2013-09-12 10:48 UTC (permalink / raw)
  To: Hans Beckérus, Karl Hiramoto; +Cc: yocto

Hi Karl / Hans,

On Thursday 12 September 2013 12:28:16 Hans Beckérus wrote:
> On Thu, Sep 12, 2013 at 11:57 AM, Karl Hiramoto <karl@hiramoto.org> wrote:
> > So to compile and reinstall mypackage i do:
> > bitbake -v mypackage -c clean -f  && bitbake -v mypackage -c install -f &&
> > bitbake -v mymachine-image
> > 
> > 
> > The mymachine-image  deletes and recreates the rootfs, which is lengthly.
> > After i do this, I need to reboot my  target board, so the nfsroot gets
> > remounted.
> > 
> > Is there any way to quickly get  mypackage  installed on the rootfs?   
> > I'd like to be able to quickly recompile/link mypackage after changing a
> > few lines of code.
> > 
> > I could write a script to copy the binaries over but I'm wondering if
> > there is an easier way.
> 
> AFAIK there is no quick way of updating a rootfs image with a new
> version of a package. If there is then please tell us because I would
> like to know too ;)

Well, assuming you're prepared to enable package management in the target
image (can just be temporary during development), you can share your
packages as a feed over http and install/update from there from the target. 
There's a section of the manual that covers this (for rpm, but can be
adapted for ipk):

http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#setting-up-runtime-package-management

> If your are only after package development and testing it on target I
> would use the SDK. That is why it exists. The poky tree is so much
> more than a simple cross-compilation toolchain. It is a complete
> integration/build and package management environment, not a
> development tool for individual packages. In our case we build our
> packages stand-alone using the SDK toolchain and then upload them to
> the board using scp or a special dedicated NFS mount for testing. It
> is a very quick way to try out those few lines of code you changed.
> 
> To build the SDK, you do bitbake -c populate_sdk <your image>
> The result will be a huge .sh script that you run to install the
> toolchain somewhere on your host/build machine.
> After install you source an environment setup script in the root of
> the install path and that is it. Now you can configure/compile your
> package from anywhere. The SDK will provide exactly the same header
> files and libraries as used when building your rootfs so output from
> the build is 100% binary compatible. Just throw it onto the board and
> run :)

This is definitely an option. Personally I prefer something closer to the build
system like the package method I mentioned above; however it depends on what
you're doing. The SDK is great for people developing applications that just
want to be able to build their apps so they can run on the target and don't
want or need to deal with the complexities of building the entire OS, but on
the other hand it doesn't automate building the application like the build
system can (on the assumption that you have your own means to do that, e.g. an
IDE that you're integrating the SDK with).

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-12 10:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-12  9:57 package development recompile and install to rootfs Karl Hiramoto
2013-09-12 10:28 ` Hans Beckérus
2013-09-12 10:48   ` Paul Eggleton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.