Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fixes #2

Closed
wants to merge 3 commits into from

Conversation

tpetazzoni
Copy link
Contributor

No description provided.

This might be needed to pass some custom CFLAGS/LDFLAGS when building
rpiboot.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This allows installing rpiboot outside of /usr if needed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The current logic to find def1, def2 and def3 first tries to find them
in the local directory, and if they are not available, find them in
/usr/share.

However, this doesn't work if rpiboot and its related files are
installed, but not in /usr. In order to address this use-case, this
commit reworks the logic to find the file path.

A new function, getfilepath() is created. If the requested file is
available in the current directory, it is used. If not, then the path to
the file is inferred from the location of the currently running
program. I.e if we run /home/foo/sys/bin/rpiboot, then we will search
def1 in usbbootcode.bin in
/home/foo/sys/bin/../share/rpiboot/usbbootcode.bin.

This continues to address the case of an installation in /usr, while
allowing installation in other locations as well.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
@ghollingworth
Copy link
Contributor

Thanks for this, for the latest version of rpiboot I've actually removed the ability to install it to /usr/bin etc.

Of course this does mean people could accidentally leave behind an old version of the binaries which would be annoying so I've left uninstall around.

Not sure what the right way to do this is, be happy with a different PR if you think there's a cleaner way of doing it...

airtower-luna pushed a commit to airtower-luna/raspberrypi-usbboot that referenced this pull request Nov 7, 2024
This might be needed to pass some custom CFLAGS/LDFLAGS when building
rpiboot.

Submitted-upstream: raspberrypi#2
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Rebased on 9324fd7]
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
[Rebased on 20240926-102326-0-g82d8755]
Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
timg236 pushed a commit that referenced this pull request Nov 7, 2024
This might be needed to pass some custom CFLAGS/LDFLAGS when building
rpiboot.

Submitted-upstream: #2
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Rebased on 9324fd7]
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
[Rebased on 20240926-102326-0-g82d8755]
Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants