From 15aac0cd08039ac28225d5820c38c4ce733f0cd8 Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Thu, 20 Oct 2022 14:22:38 +0100 Subject: [PATCH] mass-storage-gadget: Update & move source repo to official Raspberry Pi buildroot fork --- mass-storage-gadget/README.md | 31 +++++++++++++++++++++++++++++++ mass-storage-gadget/boot.img | Bin 13631488 -> 0 bytes 2 files changed, 31 insertions(+), 0 deletions(-) diff --git a/mass-storage-gadget/README.md b/mass-storage-gadget/README.md index 50b112b..0717080 100644 --- a/mass-storage-gadget/README.md +++ b/mass-storage-gadget/README.md @@ -42,3 +42,34 @@ N.B. This takes a few seconds longer to initialise than the previous mass storage implementation. However, the write speed should be much faster now that all of the file-system code is running on the ARM processors. + +## Source code +The buildroot configuration and supporting patches is available on +the [mass-storage-gadget](https://github.com/raspberrypi/buildroot/tree/mass-storage-gadget) +branch of the Raspberry Pi [buildroot](https://github.com/raspberrypi/buildroot) repo. + +### Building +```bash +git clone --branch mass-storage-gadget git@github.com:raspberrypi/buildroot.git +cd buildroot +make raspberrypicm4io_initrd_defconfig +make +``` + +The output is written to `output/target/images/sdcard.img` and can be copied +to `boot.img` + +Optional: +Load time can be reduced by optmizing the size of the sdcard.img as +follows (run as root). + +```bash +mkdir -p source-files +kpartx -av sdcard.img +mount /dev/mapper/loop0p1 source-files/ +usbboot/tools/make-boot-image -d source-files/ -o boot.img +umount source-files +kpartx -dv sdcard.img +dmsetup remove /dev/mapper/loop0p1 +losetup -D +``` diff --git a/mass-storage-gadget/boot.img b/mass-storage-gadget/boot.img index 192eee1..fb87e97 100644 Binary files a/mass-storage-gadget/boot.img and b/mass-storage-gadget/boot.img differ -- libgit2 0.21.4