Date: Fri, 15 Dec 2017 01:21:07 -0800 From: Mark Millard <markmi@dsl-only.net> To: Freebsd-arm <freebsd-arm@freebsd.org> Subject: Fairly minimal sdcard content for booting kernel and world on an RPI2 V1.1 from a USB SSD instead of from the sdcard Message-ID: <96279C4C-C713-48E1-AD5F-178852C04B45@dsl-only.net>
next in thread | raw e-mail | index | archive | help
For the following the sdcard can be removed after the kernel starts to load from the USB drive (in my context a USB SSD stick). =46rom gpart show (sdcard plugged in someplace else via USB): =3D> 63 62521281 da4 MBR (30G) 63 102375 da4s1 !12 [active] (50M) 102438 56623098 da4s2 freebsd (27G) 56725536 5795808 - free - (2.8G) =3D> 0 56623098 da4s2 BSD (27G) 0 90 - free - (45K) 90 56623008 da4s2a freebsd-ufs (27G) (I did not bother to shrink the ufs partition on s2a or s2 itself. But little space is needed.) For /media being where I mounted s1 in order to show it: # du -Asm /media/* 1 /media/BOOTCODE.BIN 1 /media/CONFIG.TXT 1 /media/FIXUP.DAT 1 /media/FIXUP_CD.DAT 1 /media/FIXUP_X.DAT 1 /media/LICENCE.broadcom 1 /media/README 3 /media/START.ELF 1 /media/START_CD.ELF 4 /media/START_X.ELF 1 /media/U-BOOT.BIN 1 /media/fixup_db.dat 5 /media/start_db.elf 1 /media/ubldr.bin So. . . Ports based: sysutils/rpi-firmware content sysutils/u-boot-rpi2 content installworld copy based: boot/ubldr.bin copy # du -Asm /usr/local/share/rpi-firmware = /usr/local/share/u-boot/u-boot-rpi2 12 /usr/local/share/rpi-firmware 1 /usr/local/share/u-boot/u-boot-rpi2 (I do not repeat the port instructions here.) For /mnt being where I mounted s2a in order to show it: # du -Asm /mnt/*/* 1 /mnt/boot/beastie.4th 1 /mnt/boot/boot1.efi 1 /mnt/boot/boot1.efifat 1 /mnt/boot/brand-fbsd.4th 1 /mnt/boot/brand.4th 1 /mnt/boot/check-password.4th 1 /mnt/boot/color.4th 1 /mnt/boot/defaults 1 /mnt/boot/delay.4th 3 /mnt/boot/dtb 1 /mnt/boot/efi.4th 1 /mnt/boot/entropy 1 /mnt/boot/firmware 1 /mnt/boot/frames.4th 1 /mnt/boot/loader.4th 1 /mnt/boot/loader.conf 1 /mnt/boot/loader.efi 1 /mnt/boot/loader.help 1 /mnt/boot/loader.rc 1 /mnt/boot/logo-beastie.4th 1 /mnt/boot/logo-beastiebw.4th 1 /mnt/boot/logo-fbsdbw.4th 1 /mnt/boot/logo-orb.4th 1 /mnt/boot/logo-orbbw.4th 1 /mnt/boot/menu-commands.4th 1 /mnt/boot/menu.4th 1 /mnt/boot/menu.rc 1 /mnt/boot/menu.rc.sample 1 /mnt/boot/menusets.4th 1 /mnt/boot/modules 1 /mnt/boot/msdos 1 /mnt/boot/pcibios.4th 1 /mnt/boot/screen.4th 1 /mnt/boot/shortcuts.4th 1 /mnt/boot/support.4th 1 /mnt/boot/ubldr 1 /mnt/boot/ubldr.bin 1 /mnt/boot/version.4th 1 /mnt/boot/zfs 1 /mnt/etc/fstab (I'll not list all the dtb files in the dtb directory.) # df -m /mnt Filesystem 1M-blocks Used Avail Capacity Mounted on /dev/da4s2a 26763 5 24617 0% /mnt (So not much space needed.) # more /mnt/etc/fstab /dev/da0p1 / ufs rw,noatime 1 1 /dev/da0p2 none swap sw 0 0 fstab used notation for the root file system that ubldr.bin could interpret on its own. Of course, for the /dev/da0p1 and /dev/da0p2 notation for the USB SSD, it can be important that other USB drives not be plugged in yet or the paths needed might be different. As for populating boot/ above: Having done an installkernel and installworld locally in order to copy selectively to the sdcard's s2a UFS partition: # du -Asm /usr/obj/DESTDIRs/clang-armv7-installworld/boot/* = /usr/obj/DESTDIRs/clang-armv7-installkernel/boot/dtb | more 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/beastie.4th 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/boot1.efi 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/boot1.efifat 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/brand-fbsd.4th 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/brand.4th 1 = /usr/obj/DESTDIRs/clang-armv7-installworld/boot/check-password.4th 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/color.4th 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/defaults 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/delay.4th 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/dtb 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/efi.4th 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/firmware 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/frames.4th 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/kernel 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/loader.4th 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/loader.efi 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/loader.help 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/loader.rc 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/logo-beastie.4th 1 = /usr/obj/DESTDIRs/clang-armv7-installworld/boot/logo-beastiebw.4th 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/logo-fbsdbw.4th 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/logo-orb.4th 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/logo-orbbw.4th 1 = /usr/obj/DESTDIRs/clang-armv7-installworld/boot/menu-commands.4th 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/menu.4th 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/menu.rc 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/menusets.4th 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/modules 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/pcibios.4th 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/screen.4th 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/shortcuts.4th 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/support.4th 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/ubldr 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/ubldr.bin 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/version.4th 1 /usr/obj/DESTDIRs/clang-armv7-installworld/boot/zfs 3 /usr/obj/DESTDIRs/clang-armv7-installkernel/boot/dtb Copy (my paths are just examples): cp -ax /usr/obj/DESTDIRs/clang-armv7-installworld/boot /mnt/ cp -ax /usr/obj/DESTDIRs/clang-armv7-installkernel/boot/dtb /mnt/boot/ (Updates may mean cleaning out older directory/file names.) (A more selective copy should be possible but gets into tracking potential changes in what files are required more carefully.) [For UFS the mounts presume endian matching, here little endian.] [In my context, the USB SSD stick is on a powered hub that is plugged into the RPI2-B V1.1 .] =3D=3D=3D Mark Millard markmi at dsl-only.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?96279C4C-C713-48E1-AD5F-178852C04B45>