mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] Using CMake/CPack install info in targetinstall step
@ 2015-04-08  9:08 Dörfler Florian
  2015-04-09  8:50 ` Michael Olbrich
  0 siblings, 1 reply; 5+ messages in thread
From: Dörfler Florian @ 2015-04-08  9:08 UTC (permalink / raw)
  To: ptxdist

Hello All

I wonder if I can simplify the install step for a CMake based target package and need a sanity check and a pointer to some info:

If I have understood, then the flow of the compiled packet's output is the following:
1) the "make install" step of the build of a packet copies the relevant files binaries/headers to the platform-<xyz>/sysroot-target/ directory 
2)  $(call install_copy, ...) and friends copy the files needed in the root FS to platform-<xyz>/root and create a packet

I could like to try and get rid of one of these lists of file to copy: If I use CMake to build the packet in step 1), I have already described the installation directions pretty detailed. I wonder if I can reuse that info for step 2).

The way I would go about it is this: I put a little more info into the CMakeLists.txt file and use CPack to create the .ipkg packet. Then I smuggle this package into the install flow.

Does this sound reasonable?
If yes: Can anybody point me to some info on how I can make the targetinstall step use an existing ipkg?

I use ptxdist 2015.02.0

Cheers

Florian

--
Florian Dörfler, Development Engineer
Direct +41 (0)43 456 16 01  .  Phone +41 (0)43 456 16 00  .  www.scs.ch
Supercomputing Systems AG  .  Technoparkstrasse 1  .  CH-8005 Zürich


-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] Using CMake/CPack install info in targetinstall step
  2015-04-08  9:08 [ptxdist] Using CMake/CPack install info in targetinstall step Dörfler Florian
@ 2015-04-09  8:50 ` Michael Olbrich
  2015-04-09  9:36   ` Dörfler Florian
  2015-06-02 11:42   ` Dörfler Florian
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Olbrich @ 2015-04-09  8:50 UTC (permalink / raw)
  To: ptxdist

On Wed, Apr 08, 2015 at 11:08:54AM +0200, Dörfler Florian wrote:
> I wonder if I can simplify the install step for a CMake based target package
> and need a sanity check and a pointer to some info:
> 
> If I have understood, then the flow of the compiled packet's output is the following:
> 1) the "make install" step of the build of a packet copies the relevant files
> binaries/headers to the platform-<xyz>/sysroot-target/ directory

rNnot quite: In pkg.install "make install" installs to
platform-<xyz>/packages/<pkg>/ and int pkg.install.post everything there is
copied to sysroot-target/ (with some path fixups).

> 2)  $(call install_copy, ...) and friends copy the files needed in the
> root FS to platform-<xyz>/root and create a packet
> 
> I could like to try and get rid of one of these lists of file to copy: If
> I use CMake to build the packet in step 1), I have already described the
> installation directions pretty detailed. I wonder if I can reuse that
> info for step 2).
> 
> The way I would go about it is this: I put a little more info into the
> CMakeLists.txt file and use CPack to create the .ipkg packet. Then I
> smuggle this package into the install flow.

No need for that. platform-<xyz>/packages/<pkg>/ contains all the files
installed by "make install", so just use install_tree in targetinstall:

	@$(call install_tree, <pkg>, 0, 0, -, /)


Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] Using CMake/CPack install info in targetinstall step
  2015-04-09  8:50 ` Michael Olbrich
@ 2015-04-09  9:36   ` Dörfler Florian
  2015-04-09  9:46     ` Michael Olbrich
  2015-06-02 11:42   ` Dörfler Florian
  1 sibling, 1 reply; 5+ messages in thread
From: Dörfler Florian @ 2015-04-09  9:36 UTC (permalink / raw)
  To: ptxdist

Hello Michael

Thank you for the explanation! That fits well for my use case, the only thing I have to look at now are the ownerships/permissions.

Regards Florian

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] Using CMake/CPack install info in targetinstall step
  2015-04-09  9:36   ` Dörfler Florian
@ 2015-04-09  9:46     ` Michael Olbrich
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Olbrich @ 2015-04-09  9:46 UTC (permalink / raw)
  To: ptxdist

Hi,

On Thu, Apr 09, 2015 at 11:36:08AM +0200, Dörfler Florian wrote:
> Thank you for the explanation! That fits well for my use case, the only thing
> I have to look at now are the ownerships/permissions.

install_tree keeps the permissions from the original file. However, it can
only handle one user/group for all of them (that's the '... 0, 0 ...' in
my example.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] Using CMake/CPack install info in targetinstall step
  2015-04-09  8:50 ` Michael Olbrich
  2015-04-09  9:36   ` Dörfler Florian
@ 2015-06-02 11:42   ` Dörfler Florian
  1 sibling, 0 replies; 5+ messages in thread
From: Dörfler Florian @ 2015-06-02 11:42 UTC (permalink / raw)
  To: ptxdist

Hello Michael

Sorry for digging out an older Thread. I just got around to trying out your solution and it almost works (in my ptxdist-2015.02.0). Here's the a fix if anyone else tries this:

> No need for that. platform-<xyz>/packages/<pkg>/ contains all the files installed by "make install", so just use install_tree in targetinstall:
>	@$(call install_tree, <pkg>, 0, 0, -, /)

I had to adjust it to:
@$(call install_tree, <pkg>, 0, 0, -, //)

Else I would eventually get the weird error message in the targetinstall step:
...
No suitable file '' could be found in any of these locations:
-.my_platformname
-
...

The suspected reason: The destination directory logic in scripts/lib/ptxd_make_xpkg_pkg.sh:568 removes trailing slashes, which in this case empties the destination, which in turn causes problems later. With my hacky solution only one slash gets removed which leaves  the one slash that I want.

Regards

Florian


-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2015-06-02 11:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-08  9:08 [ptxdist] Using CMake/CPack install info in targetinstall step Dörfler Florian
2015-04-09  8:50 ` Michael Olbrich
2015-04-09  9:36   ` Dörfler Florian
2015-04-09  9:46     ` Michael Olbrich
2015-06-02 11:42   ` Dörfler Florian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox