Skip to contentSkip to conversation

package/raspberrypi-usbboot: bump version to 9324fd7

PATCH New Peter Seiderer 2 participants 7 messages May 19, 2021 – May 20, 2021 Broadcom BCM2711/BCM2835 Arm architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/6 package/raspberrypi-usbboot: bump version to 9324fd7

- add license description/file/hash

- rebased 0001-Makefile-allow-passing-CFLAGS-LDFLAGS.patch

- removed 0002-Makefile-add-DESTDIR-support.patch
(Makefile install target removed since [1])

- removed 0003-main.c-rework-logic-to-find-def1-def2-and-def3-files.patch (bootcode.bin/bootcode4.bin and start.elf/start4.elf compiled in since [2])

- change host install command

[1] https://github.com/raspberrypi/usbboot/commit/9e6ff777bbf271b75aa0b1aa24e6f12d7b768375
[2] https://github.com/raspberrypi/usbboot/commit/1bb4c2da4775329bcf5811616fc8f0ce78ee2121

---
 ...akefile-allow-passing-CFLAGS-LDFLAGS.patch |  18 +--
 .../0002-Makefile-add-DESTDIR-support.patch   |  51 -------
 ...gic-to-find-def1-def2-and-def3-files.patch | 127 ------------------
 .../raspberrypi-usbboot.hash                  |   5 +-
 .../raspberrypi-usbboot.mk                    |   7 +-
 5 files changed, 18 insertions(+), 190 deletions(-)
 delete mode 100644 package/raspberrypi-usbboot/0002-Makefile-add-DESTDIR-support.patch
 delete mode 100644 package/raspberrypi-usbboot/0003-main.c-rework-logic-to-find-def1-def2-and-def3-files.patch
package/raspberrypi-usbboot/0001-Makefile-allow-passing-CFLAGS-LDFLAGS.patch +10 -8
index cdab6070c2..d482b0b9d4 100644
@@ -1,4 +1,4 @@
-From 5b015e67af27679f4ca8f7f5f2f71020ec054b0c Mon Sep 17 00:00:00 2001
+From 38b730c00f45abf324caf687b5b00662ff4252c2 Mon Sep 17 00:00:00 2001
 From: Thomas Petazzoni <[email protected]>
 Date: Fri, 2 Dec 2016 23:09:44 +0100
 Subject: [PATCH] Makefile: allow passing CFLAGS/LDFLAGS
@@ -8,21 +8,23 @@ rpiboot.
 
 Submitted-upstream: https://github.com/raspberrypi/usbboot/pull/2
 Signed-off-by: Thomas Petazzoni <[email protected]>
+[Rebased on 9324fd7]
+Signed-off-by: Peter Seiderer <[email protected]>
 ---
  Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/Makefile b/Makefile
-index 3e7d1e4..d9a7220 100755
+index 822e714..875e717 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)
+ rpiboot: main.c msd/bootcode.h msd/start.h msd/bootcode4.h msd/start4.h
+-	$(CC) -Wall -Wextra -g -o $@ $< -lusb-1.0
++	$(CC) -Wall -Wextra -g $(CFLAGS) -o $@ $< -lusb-1.0 $(LDFLAGS)
  
- install: rpiboot
- 	cp rpiboot /usr/bin
+ %.h: %.bin ./bin2c
+ 	./bin2c $< $@
 -- 
-2.7.4
+2.31.1
 
package/raspberrypi-usbboot/0002-Makefile-add-DESTDIR-support.patch deleted +0 -51

51 lines not on this page · raw message

package/raspberrypi-usbboot/0003-main.c-rework-logic-to-find-def1-def2-and-def3-files.patch deleted +0 -127

127 lines not on this page · raw message

package/raspberrypi-usbboot/raspberrypi-usbboot.hash +4 -1
index 94860a9dab..3f66b12ff1 100644
@@ -1,2 +1,5 @@
 # Locally calculated
-sha256 a8893f8a10522bd58866eb34e7f0d7731c43200d585f122681f428cdef76e676 raspberrypi-usbboot-f4e3f0f9a3c64d846ba53ec3367e33a4f9a7d051.tar.gz
+sha256  e4a07df05c23e0eba100d4013367e7823e3b8bc72da7b79b031bd346616c6ae5  raspberrypi-usbboot-9324fd7034b9d3606aed8a27da74d6d57e066e7e.tar.gz
+
+# License files
+sha256  b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1  LICENSE
package/raspberrypi-usbboot/raspberrypi-usbboot.mk +4 -3
index 7018617906..5d7b433c64 100644
@@ -4,8 +4,10 @@
 #
 ################################################################################
 
-RASPBERRYPI_USBBOOT_VERSION = f4e3f0f9a3c64d846ba53ec3367e33a4f9a7d051
+RASPBERRYPI_USBBOOT_VERSION = 9324fd7034b9d3606aed8a27da74d6d57e066e7e
 RASPBERRYPI_USBBOOT_SITE = $(call github,raspberrypi,usbboot,$(RASPBERRYPI_USBBOOT_VERSION))
+RASPBERRYPI_USBBOOT_LICENSE = Apache-2.0
+RASPBERRYPI_USBBOOT_LICENSE_FILES = LICENSE
 
 HOST_RASPBERRYPI_USBBOOT_DEPENDENCIES = host-libusb
 
@@ -14,8 +16,7 @@ define HOST_RASPBERRYPI_USBBOOT_BUILD_CMDS
 endef
 
 define HOST_RASPBERRYPI_USBBOOT_INSTALL_CMDS
-	$(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) \
-		DESTDIR=$(HOST_DIR) install
+	$(INSTALL) -D -m 0755 $(@D)/rpiboot $(HOST_DIR)/bin/rpiboot
 endef
 
 $(eval $(host-generic-package))
Signature · 1 line
2.31.1
#1 lore raw

PATCH 2/6 package/raspberrypi-usbboot: enable for BR2_aarch64

---
 package/raspberrypi-usbboot/Config.in.host | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/raspberrypi-usbboot/Config.in.host +2 -2
index b1a434f36e..e5772e3aa1 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_HOST_RASPBERRYPI_USBBOOT
 	bool "host raspberrypi-usbboot"
-	depends on BR2_arm
+	depends on BR2_arm || BR2_aarch64
 	depends on BR2_HOST_GCC_AT_LEAST_4_9 # host-libusb
 	help
 	  This package builds and install the "rpiboot" tool for the
@@ -13,5 +13,5 @@ config BR2_PACKAGE_HOST_RASPBERRYPI_USBBOOT
 	  https://github.com/raspberrypi/usbboot
 
 comment "host raspberrypi-usbboot needs a toolchain w/ host gcc >= 4.9"
-	depends on BR2_arm
+	depends on BR2_arm || BR2_aarch64
 	depends on !BR2_HOST_GCC_AT_LEAST_4_9
Signature · 1 line
2.31.1
#2 lore raw

PATCH 3/6 board/raspberrypi: add rpi3 64 bit hint

In reply to Peter Seiderer
---
 board/raspberrypi/readme.txt | 4 ++++
 1 file changed, 4 insertions(+)
board/raspberrypi/readme.txt +4 -0
index 8b3de6d251..ac784e07fd 100644
@@ -35,6 +35,10 @@ For model 3 B and B+:
 
   $ make raspberrypi3_defconfig
 
+or for model 3 B and B+ (64 bit):
+
+  $ make raspberrypi3_64_defconfig
+
 For model 4 B:
 
   $ make raspberrypi4_defconfig
Signature · 1 line
2.31.1
#3 lore raw

PATCH 4/6 board/raspberrypi: add rpi4 64 bit hint

In reply to Peter Seiderer
---
 board/raspberrypi/readme.txt | 4 ++++
 1 file changed, 4 insertions(+)
board/raspberrypi/readme.txt +4 -0
index ac784e07fd..2a876f9ae4 100644
@@ -43,6 +43,10 @@ For model 4 B:
 
   $ make raspberrypi4_defconfig
 
+or for model 4 B (64 bit):
+
+  $ make raspberrypi4_64_defconfig
+
 Build the rootfs
 ----------------
 
Signature · 1 line
2.31.1
#4 lore raw

PATCH 5/6 board/raspberrypi: add Compute Module 4/IO Board support

In reply to Peter Seiderer
---
 .../raspberrypi/genimage-raspberrypicm4io.cfg | 30 ++++++++++++++
 board/raspberrypi/readme.txt                  | 34 +++++++++++++++
 board/raspberrypicm4io                        |  1 +
 configs/raspberrypicm4io_defconfig            | 41 +++++++++++++++++++
 4 files changed, 106 insertions(+)
 create mode 100644 board/raspberrypi/genimage-raspberrypicm4io.cfg
 create mode 120000 board/raspberrypicm4io
 create mode 100644 configs/raspberrypicm4io_defconfig
board/raspberrypi/genimage-raspberrypicm4io.cfg new file +30 -0
new file mode 100644
index 0000000000..5a42bcfbb4
@@ -0,0 +1,30 @@
+image boot.vfat {
+  vfat {
+    files = {
+      "bcm2711-rpi-cm4.dtb",
+      "rpi-firmware/cmdline.txt",
+      "rpi-firmware/config.txt",
+      "rpi-firmware/fixup.dat",
+      "rpi-firmware/start.elf",
+      "rpi-firmware/overlays",
+      "zImage"
+    }
+  }
+  size = 32M
+}
+
+image sdcard.img {
+  hdimage {
+  }
+
+  partition boot {
+    partition-type = 0xC
+    bootable = "true"
+    image = "boot.vfat"
+  }
+
+  partition rootfs {
+    partition-type = 0x83
+    image = "rootfs.ext4"
+  }
+}
board/raspberrypi/readme.txt +34 -0
index 2a876f9ae4..2032bf80ed 100644
@@ -9,6 +9,7 @@ These instructions apply to all models of the Raspberry Pi:
   - the model B2 (aka Raspberry Pi 2)
   - the model B3 (aka Raspberry Pi 3).
   - the model B4 (aka Raspberry Pi 4).
+  - the model CM4 (aka Raspberry Pi Compute Module 4 and IO Board).
 
 How to build it
 ===============
@@ -47,6 +48,10 @@ or for model 4 B (64 bit):
 
   $ make raspberrypi4_64_defconfig
 
+For model CM4 (on IO Board):
+
+  $ make raspberrypicm4io_defconfig
+
 Build the rootfs
 ----------------
 
@@ -71,6 +76,7 @@ After building, you should obtain this tree:
     +-- bcm2710-rpi-3-b.dtb         [1]
     +-- bcm2710-rpi-3-b-plus.dtb    [1]
     +-- bcm2711-rpi-4-b.dtb         [1]
+    +-- bcm2711-rpi-cm4.dtb         [1]
     +-- boot.vfat
     +-- rootfs.ext4
     +-- rpi-firmware/
@@ -105,3 +111,31 @@ Insert the SDcard into your Raspberry Pi, and power it up. Your new system
 should come up now and start two consoles: one on the serial port on
 the P1 header, one on the HDMI output where you can login using a USB
 keyboard.
+
+How to write to CM4 eMMC memory
+===============================
+
+For CM4 modules without eMMC memory see above for booting from SD card,
+for CM4 moduels with eMMC memory proceed as following:
+
+- fit jumper on IO Board header J2 to disable eMMC boot
+- connect IO Board micro USB port (J11 USB slave) to your host linux system
+- power up CM4/IO Board (lsusb command should show a '0a5c:2711 Broadcom Corp.
+  BCM2711 Boot' device)
+- run 'sudo ./host/bin/rpiboot', output should look like the following:
+    Waiting for BCM2835/6/7/2711...
+    Loading embedded: bootcode4.bin
+    Sending bootcode.bin
+    Successful read 4 bytes
+    Waiting for BCM2835/6/7/2711...
+    Loading embedded: bootcode4.bin
+    Second stage boot server
+    Loading embedded: start4.elf
+    File read: start4.elf
+    Second stage boot server done
+
+- a USB mass storage device should show up (the CM4 eMMC memory), proceed
+  as described above to copy sdcard.img to it
+- power down CM4/IO Board
+- remove jumper on IO Board header J2 to re-enable eMMC boot
+- power up CM4/IO Board
board/raspberrypicm4io new file +1 -0
new file mode 120000
index 0000000000..fcdafc81ed
@@ -0,0 +1 @@
+raspberrypi
\ No newline at end of file
configs/raspberrypicm4io_defconfig new file +41 -0

41 lines not on this page · raw message

Signature · 1 line
2.31.1
#5 lore raw

PATCH 6/6 board/raspberrypi: add Compute Module 4/IO Board support (64 Bit)

In reply to Peter Seiderer
---
 .../genimage-raspberrypicm4io-64.cfg          | 30 ++++++++++++++
 board/raspberrypi/readme.txt                  |  4 ++
 board/raspberrypicm4io-64                     |  1 +
 configs/raspberrypicm4io_64_defconfig         | 41 +++++++++++++++++++
 4 files changed, 76 insertions(+)
 create mode 100644 board/raspberrypi/genimage-raspberrypicm4io-64.cfg
 create mode 120000 board/raspberrypicm4io-64
 create mode 100644 configs/raspberrypicm4io_64_defconfig
board/raspberrypi/genimage-raspberrypicm4io-64.cfg new file +30 -0
new file mode 100644
index 0000000000..32a7ca897d
@@ -0,0 +1,30 @@
+image boot.vfat {
+  vfat {
+    files = {
+      "bcm2711-rpi-cm4.dtb",
+      "rpi-firmware/cmdline.txt",
+      "rpi-firmware/config.txt",
+      "rpi-firmware/fixup.dat",
+      "rpi-firmware/start.elf",
+      "rpi-firmware/overlays",
+      "Image"
+    }
+  }
+  size = 32M
+}
+
+image sdcard.img {
+  hdimage {
+  }
+
+  partition boot {
+    partition-type = 0xC
+    bootable = "true"
+    image = "boot.vfat"
+  }
+
+  partition rootfs {
+    partition-type = 0x83
+    image = "rootfs.ext4"
+  }
+}
board/raspberrypi/readme.txt +4 -0
index 2032bf80ed..62cb248633 100644
@@ -52,6 +52,10 @@ For model CM4 (on IO Board):
 
   $ make raspberrypicm4io_defconfig
 
+or for CM4 (on IO Board - 64 bit):
+
+  $ make raspberrypicm4io_64_defconfig
+
 Build the rootfs
 ----------------
 
board/raspberrypicm4io-64 new file +1 -0
new file mode 120000
index 0000000000..fcdafc81ed
@@ -0,0 +1 @@
+raspberrypi
\ No newline at end of file
configs/raspberrypicm4io_64_defconfig new file +41 -0

41 lines not on this page · raw message

Signature · 1 line
2.31.1
#6 lore raw

PATCH 1/6 package/raspberrypi-usbboot: bump version to 9324fd7

In reply to Peter Seiderer

Peter, All,

On 2021-05-19 23:51 +0200, Peter Seiderer spake thusly:

Quoted 10 lines

- add license description/file/hash

- rebased 0001-Makefile-allow-passing-CFLAGS-LDFLAGS.patch

- removed 0002-Makefile-add-DESTDIR-support.patch
(Makefile install target removed since [1])

- removed 0003-main.c-rework-logic-to-find-def1-def2-and-def3-files.patch (bootcode.bin/bootcode4.bin and start.elf/start4.elf compiled in since [2])

Quoted 6 lines

- change host install command

[1] https://github.com/raspberrypi/usbboot/commit/9e6ff777bbf271b75aa0b1aa24e6f12d7b768375
[2] https://github.com/raspberrypi/usbboot/commit/1bb4c2da4775329bcf5811616fc8f0ce78ee2121

Entire series applied to next, thanks.

Regards,
Yann E. MORIN.

Quoted 285 lines
---
 ...akefile-allow-passing-CFLAGS-LDFLAGS.patch |  18 +--
 .../0002-Makefile-add-DESTDIR-support.patch   |  51 -------
 ...gic-to-find-def1-def2-and-def3-files.patch | 127 ------------------
 .../raspberrypi-usbboot.hash                  |   5 +-
 .../raspberrypi-usbboot.mk                    |   7 +-
 5 files changed, 18 insertions(+), 190 deletions(-)
 delete mode 100644 package/raspberrypi-usbboot/0002-Makefile-add-DESTDIR-support.patch
 delete mode 100644 package/raspberrypi-usbboot/0003-main.c-rework-logic-to-find-def1-def2-and-def3-files.patch
package/raspberrypi-usbboot/0001-Makefile-allow-passing-CFLAGS-LDFLAGS.patch +10 -8
index cdab6070c2..d482b0b9d4 100644
@@ -1,4 +1,4 @@
-From 5b015e67af27679f4ca8f7f5f2f71020ec054b0c Mon Sep 17 00:00:00 2001
+From 38b730c00f45abf324caf687b5b00662ff4252c2 Mon Sep 17 00:00:00 2001
 From: Thomas Petazzoni <[email protected]>
 Date: Fri, 2 Dec 2016 23:09:44 +0100
 Subject: [PATCH] Makefile: allow passing CFLAGS/LDFLAGS
@@ -8,21 +8,23 @@ rpiboot.
 
 Submitted-upstream: https://github.com/raspberrypi/usbboot/pull/2
 Signed-off-by: Thomas Petazzoni <[email protected]>
+[Rebased on 9324fd7]
+Signed-off-by: Peter Seiderer <[email protected]>
 ---
  Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/Makefile b/Makefile
-index 3e7d1e4..d9a7220 100755
+index 822e714..875e717 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)
+ rpiboot: main.c msd/bootcode.h msd/start.h msd/bootcode4.h msd/start4.h
+-	$(CC) -Wall -Wextra -g -o $@ $< -lusb-1.0
++	$(CC) -Wall -Wextra -g $(CFLAGS) -o $@ $< -lusb-1.0 $(LDFLAGS)
 
- install: rpiboot
- 	cp rpiboot /usr/bin
+ %.h: %.bin ./bin2c
+ 	./bin2c $< $@
 -- 
-2.7.4
+2.31.1
 
package/raspberrypi-usbboot/0002-Makefile-add-DESTDIR-support.patch deleted +0 -51
deleted file mode 100644
index a757cb0e03..0000000000
@@ -1,51 +0,0 @@
-From 905bc741b189d67160b27551b8ad01459c2707a0 Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <[email protected]>
-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 <[email protected]>
-[Arnout: remove /usr]
-Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
----
- 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
-
package/raspberrypi-usbboot/0003-main.c-rework-logic-to-find-def1-def2-and-def3-files.patch deleted +0 -127
deleted file mode 100644
index 30cde49f34..0000000000
@@ -1,127 +0,0 @@
-From 935894908dc24acda0acea7d211a9d80e55ecadb Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <[email protected]>
-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 <[email protected]>
----
- 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
-
package/raspberrypi-usbboot/raspberrypi-usbboot.hash +4 -1
index 94860a9dab..3f66b12ff1 100644
@@ -1,2 +1,5 @@
 # Locally calculated
-sha256 a8893f8a10522bd58866eb34e7f0d7731c43200d585f122681f428cdef76e676 raspberrypi-usbboot-f4e3f0f9a3c64d846ba53ec3367e33a4f9a7d051.tar.gz
+sha256  e4a07df05c23e0eba100d4013367e7823e3b8bc72da7b79b031bd346616c6ae5  raspberrypi-usbboot-9324fd7034b9d3606aed8a27da74d6d57e066e7e.tar.gz
+
+# License files
+sha256  b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1  LICENSE
package/raspberrypi-usbboot/raspberrypi-usbboot.mk +4 -3
index 7018617906..5d7b433c64 100644
@@ -4,8 +4,10 @@
 #
 ################################################################################
 
-RASPBERRYPI_USBBOOT_VERSION = f4e3f0f9a3c64d846ba53ec3367e33a4f9a7d051
+RASPBERRYPI_USBBOOT_VERSION = 9324fd7034b9d3606aed8a27da74d6d57e066e7e
 RASPBERRYPI_USBBOOT_SITE = $(call github,raspberrypi,usbboot,$(RASPBERRYPI_USBBOOT_VERSION))
+RASPBERRYPI_USBBOOT_LICENSE = Apache-2.0
+RASPBERRYPI_USBBOOT_LICENSE_FILES = LICENSE
 
 HOST_RASPBERRYPI_USBBOOT_DEPENDENCIES = host-libusb
 
@@ -14,8 +16,7 @@ define HOST_RASPBERRYPI_USBBOOT_BUILD_CMDS
 endef
 
 define HOST_RASPBERRYPI_USBBOOT_INSTALL_CMDS
-	$(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) \
-		DESTDIR=$(HOST_DIR) install
+	$(INSTALL) -D -m 0755 $(@D)/rpiboot $(HOST_DIR)/bin/rpiboot
 endef
 
 $(eval $(host-generic-package))
Signature · 6 lines
2.31.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'