Skip to content
/ RPi4 Public
forked from pftf/RPi4

Custom RPi4 UEFI-based boot F/W

License

Notifications You must be signed in to change notification settings

ajiyengar/RPi4

 
 

Repository files navigation

Goal

Boot Raspberry Pi4 with custom boot loader, linux, shell and utilities:

  • ARM Trusted Firmware
  • UEFI
  • Linux
  • Mksh (Shell)
  • Utilities (Toybox)

Instructions

Format USB flash drive

  1. Format GPT and create 3 partitions:
    • sudo cgdisk /dev/disk/by-id/<usb-drive>
      • part1 (EFI system partition)
      • part2 (Linux swap)
      • part3 (Linux filesystem)
  2. Format file systems
    • sudo mkfs.vfat -F 16 /dev/disk/by-id/<usb-drive>-part1
    • sudo mkswap /dev/disk/by-id/<usb-drive>-part2
    • sudo mkfs.ext4 -N 803200 /dev/disk/by-id/<usb-drive>-part3

Boot!

  1. Sync: sync.sh
  2. Build: build.sh
  3. Use udisksctl to:
    • Copy /sdcard to /dev/disk/by-id/<usb-drive>-part1
    • Copy /rootfs to /dev/disk/by-id/<usb-drive>-part3

Miscellaneous

  • Supports 1024x600 LCD; remove hdmi* entries from config.txt if not desired
  • rootfs is mounted r/w

Acknowledgements

About

Custom RPi4 UEFI-based boot F/W

Resources

License

Stars

Watchers

Forks

Languages

  • Shell 100.0%