summaryrefslogtreecommitdiffstats
path: root/package/raspberrypi-usbboot
diff options
context:
space:
mode:
authorRaptor Engineering Development Team <support@raptorengineering.com>2019-11-05 21:22:28 +0000
committerRaptor Engineering Development Team <support@raptorengineering.com>2019-11-05 21:22:53 +0000
commitf5907d7a3a9b27210bf4e39111bd229ed9079855 (patch)
treea062f7ee561400c4115e6b79da02a41b2958f879 /package/raspberrypi-usbboot
parent4b6188e0f2397a013b91105828437c90a3b1dfb7 (diff)
downloadbuildroot-2017.11-op-build.tar.gz
buildroot-2017.11-op-build.zip
Initial pass at removing binary-only, unlicensed, and proprietary packages from buildroot tree2017.11-op-build
Note that DAHDI is only being removed due to poor packaging -- it does not require binary firmware on some cards, but the buildroot packaging for it unconditionally pulls in binary-only firmware regardless.
Diffstat (limited to 'package/raspberrypi-usbboot')
-rw-r--r--package/raspberrypi-usbboot/0001-Makefile-allow-passing-CFLAGS-LDFLAGS.patch28
-rw-r--r--package/raspberrypi-usbboot/0002-Makefile-add-DESTDIR-support.patch51
-rw-r--r--package/raspberrypi-usbboot/0003-main.c-rework-logic-to-find-def1-def2-and-def3-files.patch127
-rw-r--r--package/raspberrypi-usbboot/Config.in.host12
-rw-r--r--package/raspberrypi-usbboot/raspberrypi-usbboot.hash2
-rw-r--r--package/raspberrypi-usbboot/raspberrypi-usbboot.mk21
6 files changed, 0 insertions, 241 deletions
diff --git a/package/raspberrypi-usbboot/0001-Makefile-allow-passing-CFLAGS-LDFLAGS.patch b/package/raspberrypi-usbboot/0001-Makefile-allow-passing-CFLAGS-LDFLAGS.patch
deleted file mode 100644
index cdab6070c2..0000000000
--- a/package/raspberrypi-usbboot/0001-Makefile-allow-passing-CFLAGS-LDFLAGS.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 5b015e67af27679f4ca8f7f5f2f71020ec054b0c Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Date: Fri, 2 Dec 2016 23:09:44 +0100
-Subject: [PATCH] Makefile: allow passing CFLAGS/LDFLAGS
-
-This might be needed to pass some custom CFLAGS/LDFLAGS when building
-rpiboot.
-
-Submitted-upstream: https://github.com/raspberrypi/usbboot/pull/2
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 3e7d1e4..d9a7220 100755
---- a/Makefile
-+++ b/Makefile
-@@ -1,5 +1,5 @@
- rpiboot: main.c
-- $(CC) -g -o $@ $< -lusb-1.0
-+ $(CC) -g $(CFLAGS) -o $@ $< -lusb-1.0 $(LDFLAGS)
-
- install: rpiboot
- cp rpiboot /usr/bin
---
-2.7.4
-
diff --git a/package/raspberrypi-usbboot/0002-Makefile-add-DESTDIR-support.patch b/package/raspberrypi-usbboot/0002-Makefile-add-DESTDIR-support.patch
deleted file mode 100644
index a757cb0e03..0000000000
--- a/package/raspberrypi-usbboot/0002-Makefile-add-DESTDIR-support.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 905bc741b189d67160b27551b8ad01459c2707a0 Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Date: Fri, 2 Dec 2016 23:10:37 +0100
-Subject: [PATCH] Makefile: add DESTDIR support
-
-This allows installing rpiboot outside of /usr if needed.
-
-Submitted-upstream: https://github.com/raspberrypi/usbboot/pull/2
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-[Arnout: remove /usr]
-Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
----
- Makefile | 20 ++++++++++----------
- 1 file changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index d9a7220..7835b7f 100755
---- a/Makefile
-+++ b/Makefile
-@@ -2,18 +2,18 @@ rpiboot: main.c
- $(CC) -g $(CFLAGS) -o $@ $< -lusb-1.0 $(LDFLAGS)
-
- install: rpiboot
-- cp rpiboot /usr/bin
-- mkdir -p /usr/share/rpiboot
-- cp usbbootcode.bin /usr/share/rpiboot
-- cp msd.elf /usr/share/rpiboot
-- cp buildroot.elf /usr/share/rpiboot
-+ cp rpiboot $(DESTDIR)bin
-+ mkdir -p $(DESTDIR)/share/rpiboot
-+ cp usbbootcode.bin $(DESTDIR)/share/rpiboot
-+ cp msd.elf $(DESTDIR)/share/rpiboot
-+ cp buildroot.elf $(DESTDIR)/share/rpiboot
-
- uninstall:
-- rm -f /usr/bin/rpiboot
-- rm -f /usr/share/rpiboot/usbbootcode.bin
-- rm -f /usr/share/rpiboot/msd.elf
-- rm -f /usr/share/rpiboot/buildroot.elf
-- rmdir --ignore-fail-on-non-empty /usr/share/rpiboot/
-+ rm -f $(DESTDIR)/bin/rpiboot
-+ rm -f $(DESTDIR)/share/rpiboot/usbbootcode.bin
-+ rm -f $(DESTDIR)/share/rpiboot/msd.elf
-+ rm -f $(DESTDIR)/share/rpiboot/buildroot.elf
-+ rmdir --ignore-fail-on-non-empty $(DESTDIR)/share/rpiboot/
-
- clean:
- rm rpiboot
---
-2.7.4
-
diff --git a/package/raspberrypi-usbboot/0003-main.c-rework-logic-to-find-def1-def2-and-def3-files.patch b/package/raspberrypi-usbboot/0003-main.c-rework-logic-to-find-def1-def2-and-def3-files.patch
deleted file mode 100644
index 30cde49f34..0000000000
--- a/package/raspberrypi-usbboot/0003-main.c-rework-logic-to-find-def1-def2-and-def3-files.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From 935894908dc24acda0acea7d211a9d80e55ecadb Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Date: Fri, 2 Dec 2016 23:43:23 +0100
-Subject: [PATCH] main.c: rework logic to find def1, def2 and def3 files
-
-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.
-
-Submitted-upstream: https://github.com/raspberrypi/usbboot/pull/2
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- main.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++-------------
- 1 file changed, 48 insertions(+), 13 deletions(-)
-
-diff --git a/main.c b/main.c
-index 1b4e042..7c571d6 100755
---- a/main.c
-+++ b/main.c
-@@ -1,10 +1,12 @@
--#include "libusb-1.0/libusb.h"
-+#define _GNU_SOURCE
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--
-+#include <libgen.h>
- #include <unistd.h>
-
-+#include "libusb-1.0/libusb.h"
-+
- int verbose = 0;
- int out_ep = 1;
- int in_ep = 2;
-@@ -146,6 +148,37 @@ int ep_read(unsigned char *buf, int len, libusb_device_handle * usb_device)
- return len;
- }
-
-+char *getfilepath(char *filename)
-+{
-+ char *progpath, *filepath, *progdir;
-+ ssize_t len;
-+
-+ /* If file is available locally, use it */
-+ if (access(filename, F_OK) != -1)
-+ return filename;
-+
-+ /* Otherwise, use the installed version */
-+ progpath = malloc(PATH_MAX);
-+ len = readlink("/proc/self/exe", progpath, PATH_MAX - 1);
-+ if (len == -1)
-+ {
-+ free(progpath);
-+ return NULL;
-+ }
-+
-+ progpath[len] = '\0';
-+ progdir = dirname(progpath);
-+ if (asprintf(&filepath, "%s/../share/rpiboot/%s", progdir, filename) < 0)
-+ {
-+ free(progpath);
-+ return NULL;
-+ }
-+
-+ free(progpath);
-+
-+ return filepath;
-+}
-+
- int main(int argc, char *argv[])
- {
- int result;
-@@ -157,13 +190,9 @@ int main(int argc, char *argv[])
- int last_serial = -1;
- FILE *fp1, *fp2, *fp;
-
-- char def1_inst[] = "/usr/share/rpiboot/usbbootcode.bin";
-- char def2_inst[] = "/usr/share/rpiboot/msd.elf";
-- char def3_inst[] = "/usr/share/rpiboot/buildroot.elf";
--
-- char def1_loc[] = "./usbbootcode.bin";
-- char def2_loc[] = "./msd.elf";
-- char def3_loc[] = "./buildroot.elf";
-+ char def1_name[] = "usbbootcode.bin";
-+ char def2_name[] = "msd.elf";
-+ char def3_name[] = "buildroot.elf";
-
- char *def1, *def2, *def3;
-
-@@ -171,10 +200,16 @@ int main(int argc, char *argv[])
- char *fatimage = NULL, *executable = NULL;
- int loop = 0;
-
--// if local file version exists use it else use installed
-- if( access( def1_loc, F_OK ) != -1 ) { def1 = def1_loc; } else { def1 = def1_inst; }
-- if( access( def2_loc, F_OK ) != -1 ) { def2 = def2_loc; } else { def2 = def2_inst; }
-- if( access( def3_loc, F_OK ) != -1 ) { def3 = def3_loc; } else { def3 = def3_inst; }
-+ def1 = getfilepath(def1_name);
-+ def2 = getfilepath(def2_name);
-+ def3 = getfilepath(def3_name);
-+
-+ if (!def1 || !def2 || !def3)
-+ {
-+ fprintf(stderr, "One of %s, %s or %s cannot be found\n",
-+ def1_name, def2_name, def3_name);
-+ exit(1);
-+ }
-
- stage1 = def1;
- stage2 = def2;
---
-2.7.4
-
diff --git a/package/raspberrypi-usbboot/Config.in.host b/package/raspberrypi-usbboot/Config.in.host
deleted file mode 100644
index dce2fccd54..0000000000
--- a/package/raspberrypi-usbboot/Config.in.host
+++ /dev/null
@@ -1,12 +0,0 @@
-config BR2_PACKAGE_HOST_RASPBERRYPI_USBBOOT
- bool "host raspberrypi-usbboot"
- depends on BR2_arm
- help
- This package builds and install the "rpiboot" tool for the
- host machine. This tool allows to boot the Broadcom BCM
- processor used in the RaspberryPi to boot over USB, and have
- it expose a USB mass storage device in order to reflash the
- built-in storage of the RaspberryPi (useful for the eMMC
- built into the Compute module).
-
- https://github.com/raspberrypi/usbboot
diff --git a/package/raspberrypi-usbboot/raspberrypi-usbboot.hash b/package/raspberrypi-usbboot/raspberrypi-usbboot.hash
deleted file mode 100644
index 94860a9dab..0000000000
--- a/package/raspberrypi-usbboot/raspberrypi-usbboot.hash
+++ /dev/null
@@ -1,2 +0,0 @@
-# Locally calculated
-sha256 a8893f8a10522bd58866eb34e7f0d7731c43200d585f122681f428cdef76e676 raspberrypi-usbboot-f4e3f0f9a3c64d846ba53ec3367e33a4f9a7d051.tar.gz
diff --git a/package/raspberrypi-usbboot/raspberrypi-usbboot.mk b/package/raspberrypi-usbboot/raspberrypi-usbboot.mk
deleted file mode 100644
index 7018617906..0000000000
--- a/package/raspberrypi-usbboot/raspberrypi-usbboot.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-################################################################################
-#
-# raspberrypi-usbboot
-#
-################################################################################
-
-RASPBERRYPI_USBBOOT_VERSION = f4e3f0f9a3c64d846ba53ec3367e33a4f9a7d051
-RASPBERRYPI_USBBOOT_SITE = $(call github,raspberrypi,usbboot,$(RASPBERRYPI_USBBOOT_VERSION))
-
-HOST_RASPBERRYPI_USBBOOT_DEPENDENCIES = host-libusb
-
-define HOST_RASPBERRYPI_USBBOOT_BUILD_CMDS
- $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D)
-endef
-
-define HOST_RASPBERRYPI_USBBOOT_INSTALL_CMDS
- $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) \
- DESTDIR=$(HOST_DIR) install
-endef
-
-$(eval $(host-generic-package))
OpenPOWER on IntegriCloud