§2023-09-06
The Raspberry Pi does not need a boot loader
. There is no firmware for the ARM CPU, like there is in a PC. Instead, the GPU manages loading software
for the CPU to execute, while the CPU is held reset. Its the GPU that has the 'BIOS' that gets everything started.
This makes it impossible to brick the Pi, since at worst, the microSD card needs to be reloaded.
- This arrangement does impose some constraints on the microSD card.
- The partition table must be MSDOS
- The first partition (/boot) must be vfat.
- The bootcode.bin file has some useful defaults that make setup easier, which we will take advantage of later.
¶ Step 1. Partion microSD and Format
- Using the partitioning tool of your choice, make three partitions on your microSD card.
デバイス 起動 開始位置 最後から セクタ サイズ Id タイプ
/dev/sdc1 2048 264191 262144 128M c W95 FAT32 (LBA)
/dev/sdc2 264192 4458495 4194304 2G 82 Linux スワップ / Solaris
/dev/sdc3 4458496 31225855 26767360 12.8G 83 Linux
$ sudo mkfs.vfat -F 32 /dev/sdc1
mkfs.fat 4.2 (2021-01-31)
$ sudo mkswap /dev/sdc2
スワップ空間バージョン 1 を設定します。サイズ = 2 GiB (2147479552 バイト)
ラベルはありません, UUID=3ffda2e2-5c28-44ee-8288-2c77eb0e1d39
$ sudo mkfs.ext4 /dev/sdc3
¶ Step 2: Install the arm64 stage 3
$ sudo mkidr -p /mnt/gentoo
$ sudo mount /dev/sdc3 /mnt/gentoo
$ sudo tar xpvf stage3-arm64-systemd-20230903T203159Z.tar.xz --xattrs-include='*.*' --numeric-owner -C /mnt/gentoo
$ ls /mnt/gentoo/mnt/ <-- shoould be empty
/build/gentoo/src$ ls /mnt/gentoo/
bin boot dev etc home lib lib64 lost+found media mnt opt proc root run sbin sys tmp usr var
- explanation
tar: The command for working with tar archives.
xpvf: Options for tar:
x: Extract the archive.
p: Preserve permissions and ownership.
v: Verbosely list the files processed.
f: Specify the archive file to work with.
stage3-arm64-systemd-20230903T203159Z.tar.xz: The name of the input tar.xz archive file.
--xattrs-include='*.*': Include all extended attributes when extracting files.
--numeric-owner: Preserve numeric ownership information.
-C /mnt/gentoo: Change the directory to /mnt/gentoo before extracting the archive.
¶ Step 3: Install a Gentoo repository snapshot
This step is not actually needed to boot the Pi but emerge won't work without it. No software can be installed without the Gentoo repository containing the ebuilds to emerge.
Following the Handbook fetch and unpack a Gentoo repository shapshot in the normal way.
# get portage latest snapshot
$ wget https://distfiles.gentoo.org/snapshots/portage-latest.tar.bz2
$ sudo mkdir /mnt/gentoo/var/db/repos/gentoo
$ sudo tar xvpf portage-latest.tar.bz2 --strip-components=1 -C /mnt/gentoo/var/db/repos/gentoo
$ sudo ls /mnt/gentoo/var/db/repos/gentoo
Manifest app-crypt app-office dev-erlang dev-qt games-engines gnome-base licenses media-sound net-mail sci-astronomy sec-policy sys-libs x11-libs
Manifest.files.gz app-dicts app-officeext dev-games dev-ruby games-fps gnome-extra lxde-base media-tv net-misc sci-biology skel.ebuild sys-power x11-misc
acct-group app-doc app-pda dev-go dev-scheme games-kids gnustep-apps lxqt-base media-video net-nds sci-calculators skel.metadata.xml sys-process x11-plugins
acct-user app-editors app-portage dev-haskell dev-tcltk games-misc gnustep-base mail-client metadata net-news sci-chemistry sys-apps virtual x11-terms
app-accessibility app-emacs app-shells dev-java dev-tex games-mud gnustep-libs mail-filter net-analyzer net-nntp sci-electronics sys-auth www-apache x11-themes
app-admin app-emulation app-text dev-lang dev-texlive games-puzzle gui-apps mail-mta net-dialup net-p2p sci-geosciences sys-block www-apps x11-wm
app-alternatives app-eselect app-vim dev-libs dev-util games-roguelike gui-libs mate-base net-dns net-print sci-libs sys-boot www-client xfce-base
app-antivirus app-forensics app-xemacs dev-lisp dev-vcs games-rpg gui-wm mate-extra net-firewall net-proxy sci-mathematics sys-cluster www-misc xfce-extra
app-arch app-i18n dev-ada dev-lua eclass games-server header.txt media-fonts net-fs net-voip sci-misc sys-devel www-plugins
app-backup app-laptop dev-cpp dev-ml games-action games-simulation kde-apps media-gfx net-ftp net-vpn sci-physics sys-fabric www-servers
app-benchmarks app-metrics dev-db dev-perl games-arcade games-sports kde-frameworks media-libs net-im net-wireless sci-visualization sys-firmware x11-apps
app-cdr app-misc dev-dotnet dev-php games-board games-strategy kde-misc media-plugins net-irc perl-core scripts sys-fs x11-base
app-containers app-mobilephone dev-embedded dev-python games-emulation games-util kde-plasma media-radio net-libs profiles sec-keys sys-kernel x11-drivers
$ df /mnt/gentoo/
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdc3 13066944 1908520 10472856 16% /mnt/gentoo
¶ Step 4: Populating /boot
- The Raspberry Pi Foundation provided files
$ git clone -b stable --depth=1 https://github.com/raspberrypi/firmware
$ mv firmware/ raspi-firmware
- Mount the microSD card boot at /mnt/gentoo/boot. (The microSD card root should still be mounted at /mnt/gentoo)
$ sudo mount /dev/sdc1 /mnt/gentoo/boot/
sdc 8:32 1 14.9G 0 disk
├─sdc1 8:33 1 128M 0 part /mnt/gentoo/boot
├─sdc2 8:34 1 2G 0 part
└─sdc3 8:35 1 12.8G 0 part /mnt/gentoo
$ sudo cp -rv raspi-firmware/boot/* /mnt/gentoo/boot
'raspi-firmware/boot/COPYING.linux' -> '/mnt/gentoo/boot/COPYING.linux'
'raspi-firmware/boot/LICENCE.broadcom' -> '/mnt/gentoo/boot/LICENCE.broadcom'
'raspi-firmware/boot/bcm2708-rpi-b-plus.dtb' -> '/mnt/gentoo/boot/bcm2708-rpi-b-plus.dtb'
'raspi-firmware/boot/bcm2708-rpi-b-rev1.dtb' -> '/mnt/gentoo/boot/bcm2708-rpi-b-rev1.dtb'
'raspi-firmware/boot/bcm2708-rpi-b.dtb' -> '/mnt/gentoo/boot/bcm2708-rpi-b.dtb'
'raspi-firmware/boot/bcm2708-rpi-cm.dtb' -> '/mnt/gentoo/boot/bcm2708-rpi-cm.dtb'
'raspi-firmware/boot/bcm2708-rpi-zero-w.dtb' -> '/mnt/gentoo/boot/bcm2708-rpi-zero-w.dtb'
'raspi-firmware/boot/bcm2708-rpi-zero.dtb' -> '/mnt/gentoo/boot/bcm2708-rpi-zero.dtb'
'raspi-firmware/boot/bcm2709-rpi-2-b.dtb' -> '/mnt/gentoo/boot/bcm2709-rpi-2-b.dtb'
'raspi-firmware/boot/bcm2709-rpi-cm2.dtb' -> '/mnt/gentoo/boot/bcm2709-rpi-cm2.dtb'
'raspi-firmware/boot/bcm2710-rpi-2-b.dtb' -> '/mnt/gentoo/boot/bcm2710-rpi-2-b.dtb'
'raspi-firmware/boot/bcm2710-rpi-3-b-plus.dtb' -> '/mnt/gentoo/boot/bcm2710-rpi-3-b-plus.dtb'
'raspi-firmware/boot/bcm2710-rpi-3-b.dtb' -> '/mnt/gentoo/boot/bcm2710-rpi-3-b.dtb'
'raspi-firmware/boot/bcm2710-rpi-cm3.dtb' -> '/mnt/gentoo/boot/bcm2710-rpi-cm3.dtb'
'raspi-firmware/boot/bcm2710-rpi-zero-2-w.dtb' -> '/mnt/gentoo/boot/bcm2710-rpi-zero-2-w.dtb'
'raspi-firmware/boot/bcm2710-rpi-zero-2.dtb' -> '/mnt/gentoo/boot/bcm2710-rpi-zero-2.dtb'
'raspi-firmware/boot/bcm2711-rpi-4-b.dtb' -> '/mnt/gentoo/boot/bcm2711-rpi-4-b.dtb'
'raspi-firmware/boot/bcm2711-rpi-400.dtb' -> '/mnt/gentoo/boot/bcm2711-rpi-400.dtb'
'raspi-firmware/boot/bcm2711-rpi-cm4-io.dtb' -> '/mnt/gentoo/boot/bcm2711-rpi-cm4-io.dtb'
'raspi-firmware/boot/bcm2711-rpi-cm4.dtb' -> '/mnt/gentoo/boot/bcm2711-rpi-cm4.dtb'
'raspi-firmware/boot/bcm2711-rpi-cm4s.dtb' -> '/mnt/gentoo/boot/bcm2711-rpi-cm4s.dtb'
'raspi-firmware/boot/bootcode.bin' -> '/mnt/gentoo/boot/bootcode.bin'
'raspi-firmware/boot/fixup.dat' -> '/mnt/gentoo/boot/fixup.dat'
'raspi-firmware/boot/fixup4.dat' -> '/mnt/gentoo/boot/fixup4.dat'
'raspi-firmware/boot/fixup4cd.dat' -> '/mnt/gentoo/boot/fixup4cd.dat'
'raspi-firmware/boot/fixup4db.dat' -> '/mnt/gentoo/boot/fixup4db.dat'
'raspi-firmware/boot/fixup4x.dat' -> '/mnt/gentoo/boot/fixup4x.dat'
'raspi-firmware/boot/fixup_cd.dat' -> '/mnt/gentoo/boot/fixup_cd.dat'
'raspi-firmware/boot/fixup_db.dat' -> '/mnt/gentoo/boot/fixup_db.dat'
'raspi-firmware/boot/fixup_x.dat' -> '/mnt/gentoo/boot/fixup_x.dat'
'raspi-firmware/boot/kernel.img' -> '/mnt/gentoo/boot/kernel.img'
'raspi-firmware/boot/kernel7.img' -> '/mnt/gentoo/boot/kernel7.img'
'raspi-firmware/boot/kernel7l.img' -> '/mnt/gentoo/boot/kernel7l.img'
'raspi-firmware/boot/kernel8.img' -> '/mnt/gentoo/boot/kernel8.img'
'raspi-firmware/boot/overlays' -> '/mnt/gentoo/boot/overlays'
'raspi-firmware/boot/overlays/fbtft.dtbo' -> '/mnt/gentoo/boot/overlays/fbtft.dtbo'
'raspi-firmware/boot/overlays/exc3000.dtbo' -> '/mnt/gentoo/boot/overlays/exc3000.dtbo'
'raspi-firmware/boot/overlays/edt-ft5406.dtbo' -> '/mnt/gentoo/boot/overlays/edt-ft5406.dtbo'
'raspi-firmware/boot/overlays/enc28j60-spi2.dtbo' -> '/mnt/gentoo/boot/overlays/enc28j60-spi2.dtbo'
'raspi-firmware/boot/overlays/enc28j60.dtbo' -> '/mnt/gentoo/boot/overlays/enc28j60.dtbo'
'raspi-firmware/boot/overlays/gpio-charger.dtbo' -> '/mnt/gentoo/boot/overlays/gpio-charger.dtbo'
'raspi-firmware/boot/overlays/gpio-fan.dtbo' -> '/mnt/gentoo/boot/overlays/gpio-fan.dtbo'
'raspi-firmware/boot/overlays/gpio-hog.dtbo' -> '/mnt/gentoo/boot/overlays/gpio-hog.dtbo'
'raspi-firmware/boot/overlays/gpio-ir-tx.dtbo' -> '/mnt/gentoo/boot/overlays/gpio-ir-tx.dtbo'
'raspi-firmware/boot/overlays/gpio-ir.dtbo' -> '/mnt/gentoo/boot/overlays/gpio-ir.dtbo'
'raspi-firmware/boot/overlays/gpio-key.dtbo' -> '/mnt/gentoo/boot/overlays/gpio-key.dtbo'
'raspi-firmware/boot/overlays/gpio-led.dtbo' -> '/mnt/gentoo/boot/overlays/gpio-led.dtbo'
'raspi-firmware/boot/overlays/gpio-no-bank0-irq.dtbo' -> '/mnt/gentoo/boot/overlays/gpio-no-bank0-irq.dtbo'
'raspi-firmware/boot/overlays/gpio-no-irq.dtbo' -> '/mnt/gentoo/boot/overlays/gpio-no-irq.dtbo'
'raspi-firmware/boot/overlays/gpio-poweroff.dtbo' -> '/mnt/gentoo/boot/overlays/gpio-poweroff.dtbo'
'raspi-firmware/boot/overlays/gpio-shutdown.dtbo' -> '/mnt/gentoo/boot/overlays/gpio-shutdown.dtbo'
'raspi-firmware/boot/overlays/hd44780-lcd.dtbo' -> '/mnt/gentoo/boot/overlays/hd44780-lcd.dtbo'
'raspi-firmware/boot/overlays/hdmi-backlight-hwhack-gpio.dtbo' -> '/mnt/gentoo/boot/overlays/hdmi-backlight-hwhack-gpio.dtbo'
'raspi-firmware/boot/overlays/hifiberry-amp.dtbo' -> '/mnt/gentoo/boot/overlays/hifiberry-amp.dtbo'
'raspi-firmware/boot/overlays/hifiberry-amp100.dtbo' -> '/mnt/gentoo/boot/overlays/hifiberry-amp100.dtbo'
'raspi-firmware/boot/overlays/hifiberry-amp3.dtbo' -> '/mnt/gentoo/boot/overlays/hifiberry-amp3.dtbo'
'raspi-firmware/boot/overlays/hifiberry-dac.dtbo' -> '/mnt/gentoo/boot/overlays/hifiberry-dac.dtbo'
'raspi-firmware/boot/overlays/hifiberry-dacplus.dtbo' -> '/mnt/gentoo/boot/overlays/hifiberry-dacplus.dtbo'
'raspi-firmware/boot/overlays/hifiberry-dacplusadc.dtbo' -> '/mnt/gentoo/boot/overlays/hifiberry-dacplusadc.dtbo'
'raspi-firmware/boot/overlays/hifiberry-dacplusadcpro.dtbo' -> '/mnt/gentoo/boot/overlays/hifiberry-dacplusadcpro.dtbo'
'raspi-firmware/boot/overlays/hifiberry-dacplusdsp.dtbo' -> '/mnt/gentoo/boot/overlays/hifiberry-dacplusdsp.dtbo'
'raspi-firmware/boot/overlays/hifiberry-dacplushd.dtbo' -> '/mnt/gentoo/boot/overlays/hifiberry-dacplushd.dtbo'
'raspi-firmware/boot/overlays/hifiberry-digi-pro.dtbo' -> '/mnt/gentoo/boot/overlays/hifiberry-digi-pro.dtbo'
'raspi-firmware/boot/overlays/hifiberry-digi.dtbo' -> '/mnt/gentoo/boot/overlays/hifiberry-digi.dtbo'
'raspi-firmware/boot/overlays/highperi.dtbo' -> '/mnt/gentoo/boot/overlays/highperi.dtbo'
'raspi-firmware/boot/overlays/hy28a.dtbo' -> '/mnt/gentoo/boot/overlays/hy28a.dtbo'
'raspi-firmware/boot/overlays/hy28b-2017.dtbo' -> '/mnt/gentoo/boot/overlays/hy28b-2017.dtbo'
'raspi-firmware/boot/overlays/hy28b.dtbo' -> '/mnt/gentoo/boot/overlays/hy28b.dtbo'
'raspi-firmware/boot/overlays/i-sabre-q2m.dtbo' -> '/mnt/gentoo/boot/overlays/i-sabre-q2m.dtbo'
'raspi-firmware/boot/overlays/i2c-bcm2708.dtbo' -> '/mnt/gentoo/boot/overlays/i2c-bcm2708.dtbo'
'raspi-firmware/boot/overlays/i2c-fan.dtbo' -> '/mnt/gentoo/boot/overlays/i2c-fan.dtbo'
'raspi-firmware/boot/overlays/i2c-gpio.dtbo' -> '/mnt/gentoo/boot/overlays/i2c-gpio.dtbo'
'raspi-firmware/boot/overlays/i2c-mux.dtbo' -> '/mnt/gentoo/boot/overlays/i2c-mux.dtbo'
'raspi-firmware/boot/overlays/i2c-pwm-pca9685a.dtbo' -> '/mnt/gentoo/boot/overlays/i2c-pwm-pca9685a.dtbo'
'raspi-firmware/boot/overlays/i2c-rtc-gpio.dtbo' -> '/mnt/gentoo/boot/overlays/i2c-rtc-gpio.dtbo'
'raspi-firmware/boot/overlays/i2c-rtc.dtbo' -> '/mnt/gentoo/boot/overlays/i2c-rtc.dtbo'
'raspi-firmware/boot/overlays/i2c-sensor.dtbo' -> '/mnt/gentoo/boot/overlays/i2c-sensor.dtbo'
'raspi-firmware/boot/overlays/i2c0.dtbo' -> '/mnt/gentoo/boot/overlays/i2c0.dtbo'
'raspi-firmware/boot/overlays/i2c1.dtbo' -> '/mnt/gentoo/boot/overlays/i2c1.dtbo'
'raspi-firmware/boot/overlays/i2c3.dtbo' -> '/mnt/gentoo/boot/overlays/i2c3.dtbo'
'raspi-firmware/boot/overlays/i2c4.dtbo' -> '/mnt/gentoo/boot/overlays/i2c4.dtbo'
'raspi-firmware/boot/overlays/i2c5.dtbo' -> '/mnt/gentoo/boot/overlays/i2c5.dtbo'
'raspi-firmware/boot/overlays/i2c6.dtbo' -> '/mnt/gentoo/boot/overlays/i2c6.dtbo'
'raspi-firmware/boot/overlays/i2s-dac.dtbo' -> '/mnt/gentoo/boot/overlays/i2s-dac.dtbo'
'raspi-firmware/boot/overlays/i2s-gpio28-31.dtbo' -> '/mnt/gentoo/boot/overlays/i2s-gpio28-31.dtbo'
'raspi-firmware/boot/overlays/ilitek251x.dtbo' -> '/mnt/gentoo/boot/overlays/ilitek251x.dtbo'
'raspi-firmware/boot/overlays/imx219.dtbo' -> '/mnt/gentoo/boot/overlays/imx219.dtbo'
'raspi-firmware/boot/overlays/imx258.dtbo' -> '/mnt/gentoo/boot/overlays/imx258.dtbo'
'raspi-firmware/boot/overlays/imx290.dtbo' -> '/mnt/gentoo/boot/overlays/imx290.dtbo'
'raspi-firmware/boot/overlays/imx296.dtbo' -> '/mnt/gentoo/boot/overlays/imx296.dtbo'
'raspi-firmware/boot/overlays/imx327.dtbo' -> '/mnt/gentoo/boot/overlays/imx327.dtbo'
'raspi-firmware/boot/overlays/imx378.dtbo' -> '/mnt/gentoo/boot/overlays/imx378.dtbo'
'raspi-firmware/boot/overlays/imx462.dtbo' -> '/mnt/gentoo/boot/overlays/imx462.dtbo'
'raspi-firmware/boot/overlays/imx477.dtbo' -> '/mnt/gentoo/boot/overlays/imx477.dtbo'
'raspi-firmware/boot/overlays/imx519.dtbo' -> '/mnt/gentoo/boot/overlays/imx519.dtbo'
'raspi-firmware/boot/overlays/imx708.dtbo' -> '/mnt/gentoo/boot/overlays/imx708.dtbo'
'raspi-firmware/boot/overlays/iqaudio-codec.dtbo' -> '/mnt/gentoo/boot/overlays/iqaudio-codec.dtbo'
'raspi-firmware/boot/overlays/iqaudio-dac.dtbo' -> '/mnt/gentoo/boot/overlays/iqaudio-dac.dtbo'
'raspi-firmware/boot/overlays/iqaudio-dacplus.dtbo' -> '/mnt/gentoo/boot/overlays/iqaudio-dacplus.dtbo'
'raspi-firmware/boot/overlays/iqaudio-digi-wm8804-audio.dtbo' -> '/mnt/gentoo/boot/overlays/iqaudio-digi-wm8804-audio.dtbo'
'raspi-firmware/boot/overlays/iqs550.dtbo' -> '/mnt/gentoo/boot/overlays/iqs550.dtbo'
'raspi-firmware/boot/overlays/irs1125.dtbo' -> '/mnt/gentoo/boot/overlays/irs1125.dtbo'
'raspi-firmware/boot/overlays/jedec-spi-nor.dtbo' -> '/mnt/gentoo/boot/overlays/jedec-spi-nor.dtbo'
'raspi-firmware/boot/overlays/justboom-both.dtbo' -> '/mnt/gentoo/boot/overlays/justboom-both.dtbo'
'raspi-firmware/boot/overlays/justboom-dac.dtbo' -> '/mnt/gentoo/boot/overlays/justboom-dac.dtbo'
'raspi-firmware/boot/overlays/justboom-digi.dtbo' -> '/mnt/gentoo/boot/overlays/justboom-digi.dtbo'
'raspi-firmware/boot/overlays/ltc294x.dtbo' -> '/mnt/gentoo/boot/overlays/ltc294x.dtbo'
'raspi-firmware/boot/overlays/max98357a.dtbo' -> '/mnt/gentoo/boot/overlays/max98357a.dtbo'
'raspi-firmware/boot/overlays/maxtherm.dtbo' -> '/mnt/gentoo/boot/overlays/maxtherm.dtbo'
'raspi-firmware/boot/overlays/mbed-dac.dtbo' -> '/mnt/gentoo/boot/overlays/mbed-dac.dtbo'
'raspi-firmware/boot/overlays/mcp23017.dtbo' -> '/mnt/gentoo/boot/overlays/mcp23017.dtbo'
'raspi-firmware/boot/overlays/mcp23s17.dtbo' -> '/mnt/gentoo/boot/overlays/mcp23s17.dtbo'
'raspi-firmware/boot/overlays/mcp2515-can0.dtbo' -> '/mnt/gentoo/boot/overlays/mcp2515-can0.dtbo'
'raspi-firmware/boot/overlays/mcp2515-can1.dtbo' -> '/mnt/gentoo/boot/overlays/mcp2515-can1.dtbo'
'raspi-firmware/boot/overlays/mcp2515.dtbo' -> '/mnt/gentoo/boot/overlays/mcp2515.dtbo'
'raspi-firmware/boot/overlays/mcp251xfd.dtbo' -> '/mnt/gentoo/boot/overlays/mcp251xfd.dtbo'
'raspi-firmware/boot/overlays/mcp3008.dtbo' -> '/mnt/gentoo/boot/overlays/mcp3008.dtbo'
'raspi-firmware/boot/overlays/mcp3202.dtbo' -> '/mnt/gentoo/boot/overlays/mcp3202.dtbo'
'raspi-firmware/boot/overlays/mcp342x.dtbo' -> '/mnt/gentoo/boot/overlays/mcp342x.dtbo'
'raspi-firmware/boot/overlays/media-center.dtbo' -> '/mnt/gentoo/boot/overlays/media-center.dtbo'
'raspi-firmware/boot/overlays/merus-amp.dtbo' -> '/mnt/gentoo/boot/overlays/merus-amp.dtbo'
'raspi-firmware/boot/overlays/midi-uart0.dtbo' -> '/mnt/gentoo/boot/overlays/midi-uart0.dtbo'
'raspi-firmware/boot/overlays/midi-uart1.dtbo' -> '/mnt/gentoo/boot/overlays/midi-uart1.dtbo'
'raspi-firmware/boot/overlays/midi-uart2.dtbo' -> '/mnt/gentoo/boot/overlays/midi-uart2.dtbo'
'raspi-firmware/boot/overlays/midi-uart3.dtbo' -> '/mnt/gentoo/boot/overlays/midi-uart3.dtbo'
'raspi-firmware/boot/overlays/midi-uart4.dtbo' -> '/mnt/gentoo/boot/overlays/midi-uart4.dtbo'
'raspi-firmware/boot/overlays/midi-uart5.dtbo' -> '/mnt/gentoo/boot/overlays/midi-uart5.dtbo'
'raspi-firmware/boot/overlays/minipitft13.dtbo' -> '/mnt/gentoo/boot/overlays/minipitft13.dtbo'
'raspi-firmware/boot/overlays/miniuart-bt.dtbo' -> '/mnt/gentoo/boot/overlays/miniuart-bt.dtbo'
'raspi-firmware/boot/overlays/mipi-dbi-spi.dtbo' -> '/mnt/gentoo/boot/overlays/mipi-dbi-spi.dtbo'
'raspi-firmware/boot/overlays/mlx90640.dtbo' -> '/mnt/gentoo/boot/overlays/mlx90640.dtbo'
'raspi-firmware/boot/overlays/mmc.dtbo' -> '/mnt/gentoo/boot/overlays/mmc.dtbo'
'raspi-firmware/boot/overlays/mpu6050.dtbo' -> '/mnt/gentoo/boot/overlays/mpu6050.dtbo'
'raspi-firmware/boot/overlays/mz61581.dtbo' -> '/mnt/gentoo/boot/overlays/mz61581.dtbo'
'raspi-firmware/boot/overlays/ov2311.dtbo' -> '/mnt/gentoo/boot/overlays/ov2311.dtbo'
'raspi-firmware/boot/overlays/ov5647.dtbo' -> '/mnt/gentoo/boot/overlays/ov5647.dtbo'
'raspi-firmware/boot/overlays/ov7251.dtbo' -> '/mnt/gentoo/boot/overlays/ov7251.dtbo'
'raspi-firmware/boot/overlays/ov9281.dtbo' -> '/mnt/gentoo/boot/overlays/ov9281.dtbo'
'raspi-firmware/boot/overlays/overlay_map.dtb' -> '/mnt/gentoo/boot/overlays/overlay_map.dtb'
'raspi-firmware/boot/overlays/papirus.dtbo' -> '/mnt/gentoo/boot/overlays/papirus.dtbo'
'raspi-firmware/boot/overlays/pca953x.dtbo' -> '/mnt/gentoo/boot/overlays/pca953x.dtbo'
'raspi-firmware/boot/overlays/pcf857x.dtbo' -> '/mnt/gentoo/boot/overlays/pcf857x.dtbo'
'raspi-firmware/boot/overlays/pcie-32bit-dma.dtbo' -> '/mnt/gentoo/boot/overlays/pcie-32bit-dma.dtbo'
'raspi-firmware/boot/overlays/pibell.dtbo' -> '/mnt/gentoo/boot/overlays/pibell.dtbo'
'raspi-firmware/boot/overlays/pifacedigital.dtbo' -> '/mnt/gentoo/boot/overlays/pifacedigital.dtbo'
'raspi-firmware/boot/overlays/pifi-40.dtbo' -> '/mnt/gentoo/boot/overlays/pifi-40.dtbo'
'raspi-firmware/boot/overlays/pifi-dac-hd.dtbo' -> '/mnt/gentoo/boot/overlays/pifi-dac-hd.dtbo'
'raspi-firmware/boot/overlays/pifi-dac-zero.dtbo' -> '/mnt/gentoo/boot/overlays/pifi-dac-zero.dtbo'
'raspi-firmware/boot/overlays/pifi-mini-210.dtbo' -> '/mnt/gentoo/boot/overlays/pifi-mini-210.dtbo'
'raspi-firmware/boot/overlays/piglow.dtbo' -> '/mnt/gentoo/boot/overlays/piglow.dtbo'
'raspi-firmware/boot/overlays/piscreen.dtbo' -> '/mnt/gentoo/boot/overlays/piscreen.dtbo'
'raspi-firmware/boot/overlays/piscreen2r.dtbo' -> '/mnt/gentoo/boot/overlays/piscreen2r.dtbo'
'raspi-firmware/boot/overlays/pisound.dtbo' -> '/mnt/gentoo/boot/overlays/pisound.dtbo'
'raspi-firmware/boot/overlays/pitft22.dtbo' -> '/mnt/gentoo/boot/overlays/pitft22.dtbo'
'raspi-firmware/boot/overlays/pitft28-capacitive.dtbo' -> '/mnt/gentoo/boot/overlays/pitft28-capacitive.dtbo'
'raspi-firmware/boot/overlays/pitft28-resistive.dtbo' -> '/mnt/gentoo/boot/overlays/pitft28-resistive.dtbo'
'raspi-firmware/boot/overlays/pitft35-resistive.dtbo' -> '/mnt/gentoo/boot/overlays/pitft35-resistive.dtbo'
'raspi-firmware/boot/overlays/pps-gpio.dtbo' -> '/mnt/gentoo/boot/overlays/pps-gpio.dtbo'
'raspi-firmware/boot/overlays/proto-codec.dtbo' -> '/mnt/gentoo/boot/overlays/proto-codec.dtbo'
'raspi-firmware/boot/overlays/pwm-2chan.dtbo' -> '/mnt/gentoo/boot/overlays/pwm-2chan.dtbo'
'raspi-firmware/boot/overlays/pwm-ir-tx.dtbo' -> '/mnt/gentoo/boot/overlays/pwm-ir-tx.dtbo'
'raspi-firmware/boot/overlays/pwm.dtbo' -> '/mnt/gentoo/boot/overlays/pwm.dtbo'
'raspi-firmware/boot/overlays/pwm1.dtbo' -> '/mnt/gentoo/boot/overlays/pwm1.dtbo'
'raspi-firmware/boot/overlays/qca7000-uart0.dtbo' -> '/mnt/gentoo/boot/overlays/qca7000-uart0.dtbo'
'raspi-firmware/boot/overlays/qca7000.dtbo' -> '/mnt/gentoo/boot/overlays/qca7000.dtbo'
'raspi-firmware/boot/overlays/ramoops-pi4.dtbo' -> '/mnt/gentoo/boot/overlays/ramoops-pi4.dtbo'
'raspi-firmware/boot/overlays/ramoops.dtbo' -> '/mnt/gentoo/boot/overlays/ramoops.dtbo'
'raspi-firmware/boot/overlays/rotary-encoder.dtbo' -> '/mnt/gentoo/boot/overlays/rotary-encoder.dtbo'
'raspi-firmware/boot/overlays/rpi-backlight.dtbo' -> '/mnt/gentoo/boot/overlays/rpi-backlight.dtbo'
'raspi-firmware/boot/overlays/rpi-codeczero.dtbo' -> '/mnt/gentoo/boot/overlays/rpi-codeczero.dtbo'
'raspi-firmware/boot/overlays/rpi-dacplus.dtbo' -> '/mnt/gentoo/boot/overlays/rpi-dacplus.dtbo'
'raspi-firmware/boot/overlays/rpi-dacpro.dtbo' -> '/mnt/gentoo/boot/overlays/rpi-dacpro.dtbo'
'raspi-firmware/boot/overlays/rpi-digiampplus.dtbo' -> '/mnt/gentoo/boot/overlays/rpi-digiampplus.dtbo'
'raspi-firmware/boot/overlays/rpi-ft5406.dtbo' -> '/mnt/gentoo/boot/overlays/rpi-ft5406.dtbo'
'raspi-firmware/boot/overlays/rpi-poe-plus.dtbo' -> '/mnt/gentoo/boot/overlays/rpi-poe-plus.dtbo'
'raspi-firmware/boot/overlays/rpi-poe.dtbo' -> '/mnt/gentoo/boot/overlays/rpi-poe.dtbo'
'raspi-firmware/boot/overlays/rpi-sense-v2.dtbo' -> '/mnt/gentoo/boot/overlays/rpi-sense-v2.dtbo'
'raspi-firmware/boot/overlays/rpi-sense.dtbo' -> '/mnt/gentoo/boot/overlays/rpi-sense.dtbo'
'raspi-firmware/boot/overlays/rpi-tv.dtbo' -> '/mnt/gentoo/boot/overlays/rpi-tv.dtbo'
'raspi-firmware/boot/overlays/rra-digidac1-wm8741-audio.dtbo' -> '/mnt/gentoo/boot/overlays/rra-digidac1-wm8741-audio.dtbo'
'raspi-firmware/boot/overlays/sainsmart18.dtbo' -> '/mnt/gentoo/boot/overlays/sainsmart18.dtbo'
'raspi-firmware/boot/overlays/sc16is750-i2c.dtbo' -> '/mnt/gentoo/boot/overlays/sc16is750-i2c.dtbo'
'raspi-firmware/boot/overlays/sc16is752-i2c.dtbo' -> '/mnt/gentoo/boot/overlays/sc16is752-i2c.dtbo'
'raspi-firmware/boot/overlays/sc16is752-spi0.dtbo' -> '/mnt/gentoo/boot/overlays/sc16is752-spi0.dtbo'
'raspi-firmware/boot/overlays/sc16is752-spi1.dtbo' -> '/mnt/gentoo/boot/overlays/sc16is752-spi1.dtbo'
'raspi-firmware/boot/overlays/sdhost.dtbo' -> '/mnt/gentoo/boot/overlays/sdhost.dtbo'
'raspi-firmware/boot/overlays/sdio.dtbo' -> '/mnt/gentoo/boot/overlays/sdio.dtbo'
'raspi-firmware/boot/overlays/seeed-can-fd-hat-v1.dtbo' -> '/mnt/gentoo/boot/overlays/seeed-can-fd-hat-v1.dtbo'
'raspi-firmware/boot/overlays/seeed-can-fd-hat-v2.dtbo' -> '/mnt/gentoo/boot/overlays/seeed-can-fd-hat-v2.dtbo'
'raspi-firmware/boot/overlays/sh1106-spi.dtbo' -> '/mnt/gentoo/boot/overlays/sh1106-spi.dtbo'
'raspi-firmware/boot/overlays/si446x-spi0.dtbo' -> '/mnt/gentoo/boot/overlays/si446x-spi0.dtbo'
'raspi-firmware/boot/overlays/smi-dev.dtbo' -> '/mnt/gentoo/boot/overlays/smi-dev.dtbo'
'raspi-firmware/boot/overlays/smi-nand.dtbo' -> '/mnt/gentoo/boot/overlays/smi-nand.dtbo'
'raspi-firmware/boot/overlays/smi.dtbo' -> '/mnt/gentoo/boot/overlays/smi.dtbo'
'raspi-firmware/boot/overlays/spi-gpio35-39.dtbo' -> '/mnt/gentoo/boot/overlays/spi-gpio35-39.dtbo'
'raspi-firmware/boot/overlays/spi-gpio40-45.dtbo' -> '/mnt/gentoo/boot/overlays/spi-gpio40-45.dtbo'
'raspi-firmware/boot/overlays/spi-rtc.dtbo' -> '/mnt/gentoo/boot/overlays/spi-rtc.dtbo'
'raspi-firmware/boot/overlays/spi0-0cs.dtbo' -> '/mnt/gentoo/boot/overlays/spi0-0cs.dtbo'
'raspi-firmware/boot/overlays/spi0-1cs.dtbo' -> '/mnt/gentoo/boot/overlays/spi0-1cs.dtbo'
'raspi-firmware/boot/overlays/spi0-2cs.dtbo' -> '/mnt/gentoo/boot/overlays/spi0-2cs.dtbo'
'raspi-firmware/boot/overlays/spi1-1cs.dtbo' -> '/mnt/gentoo/boot/overlays/spi1-1cs.dtbo'
'raspi-firmware/boot/overlays/spi1-2cs.dtbo' -> '/mnt/gentoo/boot/overlays/spi1-2cs.dtbo'
'raspi-firmware/boot/overlays/spi1-3cs.dtbo' -> '/mnt/gentoo/boot/overlays/spi1-3cs.dtbo'
'raspi-firmware/boot/overlays/spi2-1cs.dtbo' -> '/mnt/gentoo/boot/overlays/spi2-1cs.dtbo'
'raspi-firmware/boot/overlays/spi2-2cs.dtbo' -> '/mnt/gentoo/boot/overlays/spi2-2cs.dtbo'
'raspi-firmware/boot/overlays/spi2-3cs.dtbo' -> '/mnt/gentoo/boot/overlays/spi2-3cs.dtbo'
'raspi-firmware/boot/overlays/spi3-1cs.dtbo' -> '/mnt/gentoo/boot/overlays/spi3-1cs.dtbo'
'raspi-firmware/boot/overlays/spi3-2cs.dtbo' -> '/mnt/gentoo/boot/overlays/spi3-2cs.dtbo'
'raspi-firmware/boot/overlays/spi4-1cs.dtbo' -> '/mnt/gentoo/boot/overlays/spi4-1cs.dtbo'
'raspi-firmware/boot/overlays/spi4-2cs.dtbo' -> '/mnt/gentoo/boot/overlays/spi4-2cs.dtbo'
'raspi-firmware/boot/overlays/spi5-1cs.dtbo' -> '/mnt/gentoo/boot/overlays/spi5-1cs.dtbo'
'raspi-firmware/boot/overlays/spi5-2cs.dtbo' -> '/mnt/gentoo/boot/overlays/spi5-2cs.dtbo'
'raspi-firmware/boot/overlays/spi6-1cs.dtbo' -> '/mnt/gentoo/boot/overlays/spi6-1cs.dtbo'
'raspi-firmware/boot/overlays/spi6-2cs.dtbo' -> '/mnt/gentoo/boot/overlays/spi6-2cs.dtbo'
'raspi-firmware/boot/overlays/ssd1306-spi.dtbo' -> '/mnt/gentoo/boot/overlays/ssd1306-spi.dtbo'
'raspi-firmware/boot/overlays/ssd1306.dtbo' -> '/mnt/gentoo/boot/overlays/ssd1306.dtbo'
'raspi-firmware/boot/overlays/ssd1331-spi.dtbo' -> '/mnt/gentoo/boot/overlays/ssd1331-spi.dtbo'
'raspi-firmware/boot/overlays/ssd1351-spi.dtbo' -> '/mnt/gentoo/boot/overlays/ssd1351-spi.dtbo'
'raspi-firmware/boot/overlays/superaudioboard.dtbo' -> '/mnt/gentoo/boot/overlays/superaudioboard.dtbo'
'raspi-firmware/boot/overlays/sx150x.dtbo' -> '/mnt/gentoo/boot/overlays/sx150x.dtbo'
'raspi-firmware/boot/overlays/tc358743-audio.dtbo' -> '/mnt/gentoo/boot/overlays/tc358743-audio.dtbo'
'raspi-firmware/boot/overlays/tc358743.dtbo' -> '/mnt/gentoo/boot/overlays/tc358743.dtbo'
'raspi-firmware/boot/overlays/tinylcd35.dtbo' -> '/mnt/gentoo/boot/overlays/tinylcd35.dtbo'
'raspi-firmware/boot/overlays/tpm-slb9670.dtbo' -> '/mnt/gentoo/boot/overlays/tpm-slb9670.dtbo'
'raspi-firmware/boot/overlays/tpm-slb9673.dtbo' -> '/mnt/gentoo/boot/overlays/tpm-slb9673.dtbo'
'raspi-firmware/boot/overlays/uart0.dtbo' -> '/mnt/gentoo/boot/overlays/uart0.dtbo'
'raspi-firmware/boot/overlays/uart1.dtbo' -> '/mnt/gentoo/boot/overlays/uart1.dtbo'
'raspi-firmware/boot/overlays/uart2.dtbo' -> '/mnt/gentoo/boot/overlays/uart2.dtbo'
'raspi-firmware/boot/overlays/uart3.dtbo' -> '/mnt/gentoo/boot/overlays/uart3.dtbo'
'raspi-firmware/boot/overlays/uart4.dtbo' -> '/mnt/gentoo/boot/overlays/uart4.dtbo'
'raspi-firmware/boot/overlays/uart5.dtbo' -> '/mnt/gentoo/boot/overlays/uart5.dtbo'
'raspi-firmware/boot/overlays/udrc.dtbo' -> '/mnt/gentoo/boot/overlays/udrc.dtbo'
'raspi-firmware/boot/overlays/disable-bt.dtbo' -> '/mnt/gentoo/boot/overlays/disable-bt.dtbo'
'raspi-firmware/boot/overlays/disable-emmc2.dtbo' -> '/mnt/gentoo/boot/overlays/disable-emmc2.dtbo'
'raspi-firmware/boot/overlays/disable-wifi.dtbo' -> '/mnt/gentoo/boot/overlays/disable-wifi.dtbo'
'raspi-firmware/boot/overlays/dpi18.dtbo' -> '/mnt/gentoo/boot/overlays/dpi18.dtbo'
'raspi-firmware/boot/overlays/dpi18cpadhi.dtbo' -> '/mnt/gentoo/boot/overlays/dpi18cpadhi.dtbo'
'raspi-firmware/boot/overlays/dpi24.dtbo' -> '/mnt/gentoo/boot/overlays/dpi24.dtbo'
'raspi-firmware/boot/overlays/draws.dtbo' -> '/mnt/gentoo/boot/overlays/draws.dtbo'
'raspi-firmware/boot/overlays/dwc-otg.dtbo' -> '/mnt/gentoo/boot/overlays/dwc-otg.dtbo'
'raspi-firmware/boot/overlays/cutiepi-panel.dtbo' -> '/mnt/gentoo/boot/overlays/cutiepi-panel.dtbo'
'raspi-firmware/boot/overlays/dacberry400.dtbo' -> '/mnt/gentoo/boot/overlays/dacberry400.dtbo'
'raspi-firmware/boot/overlays/dht11.dtbo' -> '/mnt/gentoo/boot/overlays/dht11.dtbo'
'raspi-firmware/boot/overlays/dionaudio-kiwi.dtbo' -> '/mnt/gentoo/boot/overlays/dionaudio-kiwi.dtbo'
'raspi-firmware/boot/overlays/dionaudio-loco-v2.dtbo' -> '/mnt/gentoo/boot/overlays/dionaudio-loco-v2.dtbo'
'raspi-firmware/boot/overlays/dionaudio-loco.dtbo' -> '/mnt/gentoo/boot/overlays/dionaudio-loco.dtbo'
'raspi-firmware/boot/overlays/ugreen-dabboard.dtbo' -> '/mnt/gentoo/boot/overlays/ugreen-dabboard.dtbo'
'raspi-firmware/boot/overlays/upstream-pi4.dtbo' -> '/mnt/gentoo/boot/overlays/upstream-pi4.dtbo'
'raspi-firmware/boot/overlays/upstream.dtbo' -> '/mnt/gentoo/boot/overlays/upstream.dtbo'
'raspi-firmware/boot/overlays/vc4-fkms-v3d-pi4.dtbo' -> '/mnt/gentoo/boot/overlays/vc4-fkms-v3d-pi4.dtbo'
'raspi-firmware/boot/overlays/vc4-fkms-v3d.dtbo' -> '/mnt/gentoo/boot/overlays/vc4-fkms-v3d.dtbo'
'raspi-firmware/boot/overlays/vc4-kms-dpi-generic.dtbo' -> '/mnt/gentoo/boot/overlays/vc4-kms-dpi-generic.dtbo'
'raspi-firmware/boot/overlays/vc4-kms-dpi-hyperpixel2r.dtbo' -> '/mnt/gentoo/boot/overlays/vc4-kms-dpi-hyperpixel2r.dtbo'
'raspi-firmware/boot/overlays/vc4-kms-dpi-hyperpixel4.dtbo' -> '/mnt/gentoo/boot/overlays/vc4-kms-dpi-hyperpixel4.dtbo'
'raspi-firmware/boot/overlays/vc4-kms-dpi-hyperpixel4sq.dtbo' -> '/mnt/gentoo/boot/overlays/vc4-kms-dpi-hyperpixel4sq.dtbo'
'raspi-firmware/boot/overlays/vc4-kms-dpi-panel.dtbo' -> '/mnt/gentoo/boot/overlays/vc4-kms-dpi-panel.dtbo'
'raspi-firmware/boot/overlays/vc4-kms-dsi-7inch.dtbo' -> '/mnt/gentoo/boot/overlays/vc4-kms-dsi-7inch.dtbo'
'raspi-firmware/boot/overlays/vc4-kms-dsi-lt070me05000-v2.dtbo' -> '/mnt/gentoo/boot/overlays/vc4-kms-dsi-lt070me05000-v2.dtbo'
'raspi-firmware/boot/overlays/vc4-kms-dsi-lt070me05000.dtbo' -> '/mnt/gentoo/boot/overlays/vc4-kms-dsi-lt070me05000.dtbo'
'raspi-firmware/boot/overlays/vc4-kms-dsi-waveshare-panel.dtbo' -> '/mnt/gentoo/boot/overlays/vc4-kms-dsi-waveshare-panel.dtbo'
'raspi-firmware/boot/overlays/vc4-kms-kippah-7inch.dtbo' -> '/mnt/gentoo/boot/overlays/vc4-kms-kippah-7inch.dtbo'
'raspi-firmware/boot/overlays/vc4-kms-v3d-pi4.dtbo' -> '/mnt/gentoo/boot/overlays/vc4-kms-v3d-pi4.dtbo'
'raspi-firmware/boot/overlays/vc4-kms-v3d.dtbo' -> '/mnt/gentoo/boot/overlays/vc4-kms-v3d.dtbo'
'raspi-firmware/boot/overlays/vc4-kms-vga666.dtbo' -> '/mnt/gentoo/boot/overlays/vc4-kms-vga666.dtbo'
'raspi-firmware/boot/overlays/vga666.dtbo' -> '/mnt/gentoo/boot/overlays/vga666.dtbo'
'raspi-firmware/boot/overlays/vl805.dtbo' -> '/mnt/gentoo/boot/overlays/vl805.dtbo'
'raspi-firmware/boot/overlays/w1-gpio-pullup.dtbo' -> '/mnt/gentoo/boot/overlays/w1-gpio-pullup.dtbo'
'raspi-firmware/boot/overlays/w1-gpio.dtbo' -> '/mnt/gentoo/boot/overlays/w1-gpio.dtbo'
'raspi-firmware/boot/overlays/w5500.dtbo' -> '/mnt/gentoo/boot/overlays/w5500.dtbo'
'raspi-firmware/boot/overlays/watterott-display.dtbo' -> '/mnt/gentoo/boot/overlays/watterott-display.dtbo'
'raspi-firmware/boot/overlays/waveshare-can-fd-hat-mode-a.dtbo' -> '/mnt/gentoo/boot/overlays/waveshare-can-fd-hat-mode-a.dtbo'
'raspi-firmware/boot/overlays/waveshare-can-fd-hat-mode-b.dtbo' -> '/mnt/gentoo/boot/overlays/waveshare-can-fd-hat-mode-b.dtbo'
'raspi-firmware/boot/overlays/wittypi.dtbo' -> '/mnt/gentoo/boot/overlays/wittypi.dtbo'
'raspi-firmware/boot/overlays/wm8960-soundcard.dtbo' -> '/mnt/gentoo/boot/overlays/wm8960-soundcard.dtbo'
'raspi-firmware/boot/overlays/crystalfontz-cfa050_pi_m.dtbo' -> '/mnt/gentoo/boot/overlays/crystalfontz-cfa050_pi_m.dtbo'
'raspi-firmware/boot/overlays/cirrus-wm5102.dtbo' -> '/mnt/gentoo/boot/overlays/cirrus-wm5102.dtbo'
'raspi-firmware/boot/overlays/cm-swap-i2c0.dtbo' -> '/mnt/gentoo/boot/overlays/cm-swap-i2c0.dtbo'
'raspi-firmware/boot/overlays/cma.dtbo' -> '/mnt/gentoo/boot/overlays/cma.dtbo'
'raspi-firmware/boot/overlays/chipdip-dac.dtbo' -> '/mnt/gentoo/boot/overlays/chipdip-dac.dtbo'
'raspi-firmware/boot/overlays/camera-mux-4port.dtbo' -> '/mnt/gentoo/boot/overlays/camera-mux-4port.dtbo'
'raspi-firmware/boot/overlays/balena-fin.dtbo' -> '/mnt/gentoo/boot/overlays/balena-fin.dtbo'
'raspi-firmware/boot/overlays/camera-mux-2port.dtbo' -> '/mnt/gentoo/boot/overlays/camera-mux-2port.dtbo'
'raspi-firmware/boot/overlays/audremap.dtbo' -> '/mnt/gentoo/boot/overlays/audremap.dtbo'
'raspi-firmware/boot/overlays/README' -> '/mnt/gentoo/boot/overlays/README'
'raspi-firmware/boot/overlays/act-led.dtbo' -> '/mnt/gentoo/boot/overlays/act-led.dtbo'
'raspi-firmware/boot/overlays/adafruit-st7735r.dtbo' -> '/mnt/gentoo/boot/overlays/adafruit-st7735r.dtbo'
'raspi-firmware/boot/overlays/adafruit18.dtbo' -> '/mnt/gentoo/boot/overlays/adafruit18.dtbo'
'raspi-firmware/boot/overlays/adau1977-adc.dtbo' -> '/mnt/gentoo/boot/overlays/adau1977-adc.dtbo'
'raspi-firmware/boot/overlays/adau7002-simple.dtbo' -> '/mnt/gentoo/boot/overlays/adau7002-simple.dtbo'
'raspi-firmware/boot/overlays/ads1015.dtbo' -> '/mnt/gentoo/boot/overlays/ads1015.dtbo'
'raspi-firmware/boot/overlays/ads1115.dtbo' -> '/mnt/gentoo/boot/overlays/ads1115.dtbo'
'raspi-firmware/boot/overlays/ads7846.dtbo' -> '/mnt/gentoo/boot/overlays/ads7846.dtbo'
'raspi-firmware/boot/overlays/adv7282m.dtbo' -> '/mnt/gentoo/boot/overlays/adv7282m.dtbo'
'raspi-firmware/boot/overlays/adv728x-m.dtbo' -> '/mnt/gentoo/boot/overlays/adv728x-m.dtbo'
'raspi-firmware/boot/overlays/akkordion-iqdacplus.dtbo' -> '/mnt/gentoo/boot/overlays/akkordion-iqdacplus.dtbo'
'raspi-firmware/boot/overlays/allo-boss-dac-pcm512x-audio.dtbo' -> '/mnt/gentoo/boot/overlays/allo-boss-dac-pcm512x-audio.dtbo'
'raspi-firmware/boot/overlays/allo-boss2-dac-audio.dtbo' -> '/mnt/gentoo/boot/overlays/allo-boss2-dac-audio.dtbo'
'raspi-firmware/boot/overlays/allo-digione.dtbo' -> '/mnt/gentoo/boot/overlays/allo-digione.dtbo'
'raspi-firmware/boot/overlays/allo-katana-dac-audio.dtbo' -> '/mnt/gentoo/boot/overlays/allo-katana-dac-audio.dtbo'
'raspi-firmware/boot/overlays/allo-piano-dac-pcm512x-audio.dtbo' -> '/mnt/gentoo/boot/overlays/allo-piano-dac-pcm512x-audio.dtbo'
'raspi-firmware/boot/overlays/allo-piano-dac-plus-pcm512x-audio.dtbo' -> '/mnt/gentoo/boot/overlays/allo-piano-dac-plus-pcm512x-audio.dtbo'
'raspi-firmware/boot/overlays/anyspi.dtbo' -> '/mnt/gentoo/boot/overlays/anyspi.dtbo'
'raspi-firmware/boot/overlays/apds9960.dtbo' -> '/mnt/gentoo/boot/overlays/apds9960.dtbo'
'raspi-firmware/boot/overlays/applepi-dac.dtbo' -> '/mnt/gentoo/boot/overlays/applepi-dac.dtbo'
'raspi-firmware/boot/overlays/arducam-64mp.dtbo' -> '/mnt/gentoo/boot/overlays/arducam-64mp.dtbo'
'raspi-firmware/boot/overlays/arducam-pivariety.dtbo' -> '/mnt/gentoo/boot/overlays/arducam-pivariety.dtbo'
'raspi-firmware/boot/overlays/at86rf233.dtbo' -> '/mnt/gentoo/boot/overlays/at86rf233.dtbo'
'raspi-firmware/boot/overlays/audioinjector-addons.dtbo' -> '/mnt/gentoo/boot/overlays/audioinjector-addons.dtbo'
'raspi-firmware/boot/overlays/audioinjector-bare-i2s.dtbo' -> '/mnt/gentoo/boot/overlays/audioinjector-bare-i2s.dtbo'
'raspi-firmware/boot/overlays/audioinjector-isolated-soundcard.dtbo' -> '/mnt/gentoo/boot/overlays/audioinjector-isolated-soundcard.dtbo'
'raspi-firmware/boot/overlays/audioinjector-ultra.dtbo' -> '/mnt/gentoo/boot/overlays/audioinjector-ultra.dtbo'
'raspi-firmware/boot/overlays/audioinjector-wm8731-audio.dtbo' -> '/mnt/gentoo/boot/overlays/audioinjector-wm8731-audio.dtbo'
'raspi-firmware/boot/overlays/audiosense-pi.dtbo' -> '/mnt/gentoo/boot/overlays/audiosense-pi.dtbo'
'raspi-firmware/boot/overlays/cap1106.dtbo' -> '/mnt/gentoo/boot/overlays/cap1106.dtbo'
'raspi-firmware/boot/overlays/dwc2.dtbo' -> '/mnt/gentoo/boot/overlays/dwc2.dtbo'
'raspi-firmware/boot/overlays/fe-pi-audio.dtbo' -> '/mnt/gentoo/boot/overlays/fe-pi-audio.dtbo'
'raspi-firmware/boot/overlays/fsm-demo.dtbo' -> '/mnt/gentoo/boot/overlays/fsm-demo.dtbo'
'raspi-firmware/boot/overlays/gc9a01.dtbo' -> '/mnt/gentoo/boot/overlays/gc9a01.dtbo'
'raspi-firmware/boot/overlays/ghost-amp.dtbo' -> '/mnt/gentoo/boot/overlays/ghost-amp.dtbo'
'raspi-firmware/boot/overlays/goodix.dtbo' -> '/mnt/gentoo/boot/overlays/goodix.dtbo'
'raspi-firmware/boot/overlays/googlevoicehat-soundcard.dtbo' -> '/mnt/gentoo/boot/overlays/googlevoicehat-soundcard.dtbo'
'raspi-firmware/boot/start.elf' -> '/mnt/gentoo/boot/start.elf'
'raspi-firmware/boot/start4.elf' -> '/mnt/gentoo/boot/start4.elf'
'raspi-firmware/boot/start4cd.elf' -> '/mnt/gentoo/boot/start4cd.elf'
'raspi-firmware/boot/start4db.elf' -> '/mnt/gentoo/boot/start4db.elf'
'raspi-firmware/boot/start4x.elf' -> '/mnt/gentoo/boot/start4x.elf'
'raspi-firmware/boot/start_cd.elf' -> '/mnt/gentoo/boot/start_cd.elf'
'raspi-firmware/boot/start_db.elf' -> '/mnt/gentoo/boot/start_db.elf'
'raspi-firmware/boot/start_x.elf' -> '/mnt/gentoo/boot/start_x.elf'
You should end up with files in /mnt/gentoo/boot, not a directory called boot. Not all the files there are required. It's a one size fits all for all models of Raspberry Pi operating in 32-bit mode.
§Install the kernel to the microSD card
The kernel was built above, now to install it. The kernel is in three parts:
- Kernel binary.
- The device tree.
- Kernel modules.
¶ Step 5: Install the kernel binary
alexlai@SurfacePro:~/build/gentoo/src$ ls root/usr/src/raspberrypi/linux/arch/arm64/boot/
Image Image.gz Makefile dts install.sh
$ sudo cp -v root/usr/src/raspberrypi/linux/arch/arm64/boot/Image /mnt/gentoo/boot/my_kernel8-rpi3-b.img
What is config.txt? The Raspberry Pi uses /boot/config.txt as its configuration file instead of the BIOS you would expect to find on a conventional PC.
sudo nano /mnt/gentoo/boot/config.txt
# for my rpi3 modelB
kernel=my_kernel8-rpi3-b.img
¶ Step 6: The device tree (.dtb)
The device tree binary (.dtb) describes the hardware to the kernel. This avoids having all the existing hardware configurations hard coded into the kernel.
Due to the way the Raspberry Pi 64-bit kernel support has been added, there are going to be two different device trees with the same file name.
-
A
32-bit
version and -
a
64-bit
version. -
They are not interchangeable. Move the 32-bit version out of the way.
-
?? Move the 32-bit version out of the way.
$ ls /mnt/gentoo/boot/bcm2710-rpi-3*
/mnt/gentoo/boot/bcm2710-rpi-3-b-plus.dtb /mnt/gentoo/boot/bcm2710-rpi-3-b.dtb
$ sudo mv /mnt/gentoo/boot/bcm2710-rpi-3-b.dtb /mnt/gentoo/boot/bcm2710-rpi-3-b.dtb_32
$ sudo mv /mnt/gentoo/boot/bcm2710-rpi-3-b-plus.dtb /mnt/gentoo/boot/bcm2710-rpi-3-b-plus.dtb_32
$ ls /mnt/gentoo/boot/bcm2710-rpi-3*
/mnt/gentoo/boot/bcm2710-rpi-3-b-plus.dtb_32 /mnt/gentoo/boot/bcm2710-rpi-3-b.dtb_32
- Copy the dtb from the build location
For Raspberry Pi 3B:
$ sudo cp -v root/usr/src/raspberrypi/linux/arch/arm64/boot/dts/broadcom/bcm2710-rpi-3-b.dtb /mnt/gentoo/boot
- For Raspberry Pi 3B Plus:
$ sudo cp -v root/usr/src/raspberrypi/linux/arch/arm64/boot/dts/broadcom/bcm2710-rpi-3-b-plus.dtb /mnt/gentoo/boot
For Raspberry Pi 3B:
$ sudo cp -v root/usr/src/raspberrypi/linux/arch/arm64/boot/dts/broadcom/bcm2710-rpi-3-b-plus.dtb /mnt/gentoo/boot
$ ls /mnt/gentoo/boot/bcm2710-rpi-3*
/mnt/gentoo/boot/bcm2710-rpi-3-b-plus.dtb /mnt/gentoo/boot/bcm2710-rpi-3-b-plus.dtb_32 /mnt/gentoo/boot/bcm2710-rpi-3-b.dtb /mnt/gentoo/boot/bcm2710-rpi-3-b.dtb_32
*.dtb and *.dts files are related to device tree configuration on systems that use the Device Tree mechanism, which is common in embedded systems and single-board computers like the Raspberry Pi. These files are used to describe the hardware configuration of a system in a human-readable and machine-parsable format. Here's the difference between them:
DTS (Device Tree Source) Files (*.dts):
Human-Readable: DTS files are human-readable text files. They are typically written by developers to describe the hardware configuration of a system. Source Code: DTS files are the source code for the device tree. They contain descriptions of devices, their addresses, interrupt mappings, and other hardware-related information. Editable: DTS files can be edited directly by developers to modify the hardware configuration of a system. Not Loaded by the System: DTS files are not loaded directly by the system but are compiled into DTB files. DTB (Device Tree Blob) Files (*.dtb):
Binary: DTB files are binary files compiled from DTS files. They are not human-readable and are intended for consumption by the kernel and bootloader. Machine-Parsable: DTB files are parsed by the system at boot time. The kernel uses the DTB to understand the hardware configuration of the system. Loaded by the System: DTB files are loaded by the bootloader (e.g., U-Boot) and passed to the kernel during boot to configure the hardware. Not Intended for Editing: DTB files are not intended to be edited directly by developers, as they are generated from DTS files.
¶ Step 7: Kernel modules
From the top of the kernel tree, install the kernel modules.
make sure the micrSD you are using are not mounted
$ sudo losetup -f
/dev/loop13
$ sudo losetup /dev/loop13 gentoo-32G-x86_64-systemd-2023-09-06.img
$ sudo partprobe /dev/loop13
$ lsblk /dev/loop13
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop13 7:13 0 32G 0 loop
├─loop13p1 259:6 0 512M 0 part
└─loop13p2 259:7 0 31.5G 0 part
$ sudo arch-chroot ~/build/gentoo/src/root /bin/bash
alexlai@SurfacePro:~/build/gentoo/src$ sudo mount /dev/loop13p2 root
alexlai@SurfacePro:~/build/gentoo/src$ sudo arch-chroot root /bin/bash
SurfacePro / # source /etc/profile
(chroot) SurfacePro / #
(chroot) SurfacePro / # mount /dev/sdc1 /mnt
(chroot) SurfacePro / # cat /mnt/config.txt
# for my rpi3 modelB
kernel=my_kernel8-rpi3-b.img
(chroot) SurfacePro / # cd /usr/src/raspberrypi/linux/
(chroot) SurfacePro / # mount /dev/sdc3 /mnt
(chroot) SurfacePro / # ls /mnt
bin boot dev etc home lib lib64 lost+found media mnt opt proc root run sbin sys tmp usr var
(chroot) SurfacePro / # cd /usr/src/raspberrypi/linux/
(chroot) SurfacePro / # ARCH=arm64 CROSS_COMPILE=aarch64-unknown-linux-gnu- make modules_install INSTALL_MOD_PATH=/mnt/
...
INSTALL /mnt//lib/modules/6.1.51-v8+/kernel/sound/usb/misc/snd-ua101.ko
XZ /mnt//lib/modules/6.1.51-v8+/kernel/sound/usb/misc/snd-ua101.ko.xz
INSTALL /mnt//lib/modules/6.1.51-v8+/kernel/sound/usb/snd-usb-audio.ko
XZ /mnt//lib/modules/6.1.51-v8+/kernel/sound/usb/snd-usb-audio.ko.xz
INSTALL /mnt//lib/modules/6.1.51-v8+/kernel/sound/usb/snd-usbmidi-lib.ko
XZ /mnt//lib/modules/6.1.51-v8+/kernel/sound/usb/snd-usbmidi-lib.ko.xz
DEPMOD /mnt//lib/modules/6.1.51-v8+
(chroot) SurfacePro /usr/src/raspberrypi/
(chroot) SurfacePro /usr/src/raspberrypi/linux # ls /mnt/lib/modules/6.1.51-v8+/
build modules.alias modules.builtin modules.builtin.bin modules.dep modules.devname modules.softdep modules.symbols.bin
kernel modules.alias.bin modules.builtin.alias.bin modules.builtin.modinfo modules.dep.bin modules.order modules.symbols source
¶ Setp 8: /etc/fstab
(chroot) SurfacePro ~ # mount /dev/sdc3 /mnt
(chroot) SurfacePro ~ # blkid /dev/sdc*
/dev/sdc: PTUUID="93f044de" PTTYPE="dos"
/dev/sdc1: UUID="D83A-E4C8" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="93f044de-01"
/dev/sdc2: UUID="3ffda2e2-5c28-44ee-8288-2c77eb0e1d39" TYPE="swap" PARTUUID="93f044de-02"
/dev/sdc3: UUID="fc75d73a-4df9-4860-810b-436115f69b11" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="93f044de-03"
- nano /mnt/etc/fstab as,
#LABEL=boot /boot ext4 defaults 1 2
UUID=D83A-E4C8 /boot vfat defaults 1 2
#LABEL=root / xfs defaults 0 1
UUID=fc75d73a-4df9-4860-810b-436115f69b11 / ext4 defaults 0 1