Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.

host-apps/dtoverlay: don't install scripts in random location#380

Closed
yann-morin-1998 wants to merge 1 commit into
raspberrypi:masterfrom
yann-morin-1998:yem/fix-doverlay-build
Closed

host-apps/dtoverlay: don't install scripts in random location#380
yann-morin-1998 wants to merge 1 commit into
raspberrypi:masterfrom
yann-morin-1998:yem/fix-doverlay-build

Conversation

@yann-morin-1998
Copy link
Copy Markdown
Contributor

Currently, we add a custom command that installs the dtoverlay pre/post
scripts in ${CMAKE_BINARY_DIR}/../../bin

However:

  • this points outside of the package directory; it even points two
    directories higher;

  • when doing cross-compilation, this is definitely not the place where
    the /bin directory really is;

  • the scripts are already properly installed without this code.

Remove that code, it serves no purpose and breaks for cross-compilation.

Signed-off-by: "Yann E. MORIN" yann.morin.1998@free.fr

Currently, we add a custom command that installs the dtoverlay pre/post
scripts in ${CMAKE_BINARY_DIR}/../../bin

However:

  - this points outside of the package directory; it even points two
    directories higher;

  - when doing cross-compilation, this is definitely not the place where
    the /bin directory really is;

  - the scripts are already properly installed without this code.

Remove that code, it serves no purpose and breaks for cross-compilation.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
@pelwell
Copy link
Copy Markdown
Contributor

pelwell commented Mar 27, 2017

The purpose of these command is to copy the scripts into build/bin during the build phase to make them easier to locate. Obviously they aren't absolutely necessary, but it was nice to be able to see all the build targets in a single location before installing them. Do you know of a cleaner way to achieve the same thing?

@yann-morin-1998
Copy link
Copy Markdown
Contributor Author

@pelwell Sorry, I don't see the point. What is this "build/" directory you're talking about?

${CMAKE_BINARY_DIR}/../../bin poitns outside of the build tree, two levels upper.

For example (cross-compile options and the likes just ignored for the sake of the example):

$ mkdir ~/foo/bar/buz   # Deep enough
$ cd ~/foo/bar/buz
$ git clone https://github.com/raspberrypi/userland/
$ cd userland
$ cmake
$ ls -F ~/foo/bar
bin/ buz/

The scripts are stored in that new bin/ directory. This corresponds to nothing usefull, especially when one is doing cross-compilation. Worse, it may even clash with a build-system's own directories, or otherwise existing bin/ directories (for example, if a build is attempted in /usr/src/userland, it would clobber files in /usr/bin).

Regards,
Yann E. MORIN.

@pelwell
Copy link
Copy Markdown
Contributor

pelwell commented Dec 8, 2017

I was doing some work on the dtoverlay command and remembered this PR. It's merged now - sorry for the delay.

@pelwell pelwell closed this Dec 8, 2017
@yann-morin-1998
Copy link
Copy Markdown
Contributor Author

@pelwell Thanks! Better late than never. ;-)

@yann-morin-1998 yann-morin-1998 deleted the yem/fix-doverlay-build branch December 14, 2017 20:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants