Reference: Linux implementation of the USB mass-storage gadget for Pi Zero W v1.1

Đang mở
#387 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Ít trao đổi
Công nghệ
c, linux, raspberry-pi, shell

Hướng nghiên cứu

Start with the linked rpi-zero-usb-gadget repository and compare its reproducible Nix-flake output and rpiboot deployment with the existing usbboot payload directories. The issue does not name files or tests, and completion would require deciding whether and how this Linux mass-storage payload belongs in the usbboot ecosystem, including the proposed 32- and 64-bit arrangement.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

The msd payload used to expose the SD card over USB on the Pi Zero W is firmware. I wanted to modify its behaviour to be able to reboot the gadget without physically replugging the Pi.

So I built a Linux-based replacement for that payload for the Raspberry Pi Zero W v1.1. The Pi boots a small cross-compiled kernel plus an initramfs containing a freestanding init (C, no libc). It waits for the SD card, exposes /dev/mmcblk0 as a USB mass-storage device via configfs, and reboots on eject (and also reboots if no card appears within 20s). The whole thing builds reproducibly with a Nix flake into an rpiboot boot directory, deployed with rpiboot -d result.

Tested end-to-end on real hardware.

Sharing in case it's useful to others hitting the same limitation, and I'd welcome thoughts on whether a Linux-based MSD payload like this fits anywhere in the usbboot ecosystem (perhaps merging 32 and 64 bit directories at some point).

Repo: https://github.com/FraFrieFa/rpi-zero-usb-gadget

Ngôn ngữ chính
C
Star
1.4k
Fork
318
Merge trung bình
15 giờ 55 phút
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của raspberrypi/usbboot

Tất cả issue của raspberrypi/usbboot

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.