Date: Sat, 23 Nov 2019 02:15:06 -0800 From: Mark Millard <marklmi@yahoo.com> To: freebsd-arm@freebsd.org Subject: head r355027M : Rock64 4GB booted from 128GB emmc (no sdcard plugged in and no jumper to force sdcard slot use) Message-ID: <87A31A90-774A-4EF7-8428-8F8FEBFD5406@yahoo.com> References: <87A31A90-774A-4EF7-8428-8F8FEBFD5406.ref@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
# uname -apKU FreeBSD Rock64OrRPI3 13.0-CURRENT FreeBSD 13.0-CURRENT #24 r355027M: Sat = Nov 23 00:41:05 PST 2019 = markmi@FBSDFHUGE:/usr/obj/cortexA53_clang/arm64.aarch64/usr/src/arm64.aarc= h64/sys/GENERIC-NODBG arm64 aarch64 1300061 1300061 A few notes about what was done . . . The more modern FreeBSD source replaced some of my old hacks that allowed booting the Pine64+ 2GB via emmc on a conversion card. (I've not tried replacing the u-boot material with the Pine64+ 2GB material to see if that would still work.) Since I built a non-debug head r355027, I had to work around one build failure: a variable only used in a KASSERT that stopped the build. I used: # more /usr/local/share/u-boot/u-boot-rock64/README U-Boot loader and related files for the Pine64 Rock64. To install this bootloader on an sdcard just do: dd if=3D/usr/local/share/u-boot/u-boot-rock64/idbloader.img = of=3D/path/to/sdcarddevice seek=3D64 bs=3D512 conv=3Dsync dd if=3D/usr/local/share/u-boot/u-boot-rock64/u-boot.itb = of=3D/path/to/sdcarddevice seek=3D16384 bs=3D512 conv=3Dsync (In the cross build/install environment at the time /dev/da13 was the /path/to/sdcarddevice .) # ls -la /usr/local/share/u-boot/u-boot-rock64/ total 1124 drwxr-xr-x 2 root wheel 512 Oct 26 20:56 . drwxr-xr-x 8 root wheel 512 Sep 15 16:02 .. -rw-r--r-- 1 root wheel 358 Oct 26 19:28 README -rw-r--r-- 1 root wheel 351560 Oct 26 19:28 idbloader.img -rw-r--r-- 1 root wheel 724148 Oct 26 19:28 u-boot.itb The emmc was set up with (shown on the Rock64 after installation, not as seen on the cross build/install environment): # gpart show =3D> 63 244277185 mmcsd0 MBR (116G) 63 32705 - free - (16M) 32768 102312 1 fat32lba [active] (50M) 135080 28760 - free - (14M) 163840 241172480 2 freebsd (115G) 241336320 2940928 - free - (1.4G) =3D> 0 241172480 mmcsd0s2 BSD (115G) 0 230686720 1 freebsd-ufs (110G) 230686720 7340032 2 freebsd-swap (3.5G) 238026752 2097152 4 freebsd-swap (1.0G) 240123904 1048576 - free - (512M) I got the 32768 for fat32lba from what Arch Linux ARM has one start with for installing Arch on a Rock64. (I've not found FreeBSD material about that choice, implicitly leaving it to the u-boot.itb size and seek position for what to avoid in this case.) (Things are set up to allow less total swap space for smaller memory machines by just not adding the other swap space.) The media is an updated variant of my old Pine64+ 2GB setup, which explains some naming that I've left alone. Historically I could boot either the Pine64+ 2GB or the RPi3 with that media. (No u-boot conflicts or such. I've not dealt with the RPI3 material yet.) # df -m Filesystem 1M-blocks Used Avail Capacity Mounted on /dev/label/PINE64P2Groot 109101 37794 62578 38% / devfs 0 0 0 100% /dev /dev/label/PINE642GAboot 49 15 34 31% /boot/efi # ls -la /boot/efi/EFI/BOOT/ total 1336 drwxr-xr-x 1 root wheel 4096 Sep 27 2018 . drwxr-xr-x 1 root wheel 4096 Sep 27 2018 .. -rwxr-xr-x 1 root wheel 679256 Nov 22 16:45 bootaa64.efi -rwxr-xr-x 1 root wheel 679256 Nov 22 16:45 loader.efi Both of the *.efi files are copies of: # ls -ld /boot/loader.efi=20 -r-xr-xr-x 2 root wheel 679256 Nov 23 00:45 /boot/loader.efi (The cross-build/install environment had an odd, 8 hour earlier time for a while for some reason.) Before there was just the bootaa64.efi but I decided to also have a copy under the FreeBSD name. (The source file was /mnt/boot/loader.efi during the cross-install activity. I had mounted the msdosfs file sytsem to /media there as well, making for /media/EFI/BOOT/ for the target directory the copy.) Other that some of the above detail, the install was essentially normal for my context. For reference: # ls -ld /dev/mmcsd* crw-r----- 1 root operator 0x4f Nov 23 00:56 /dev/mmcsd0 crw-r----- 1 root operator 0x50 Nov 23 00:56 /dev/mmcsd0boot0 crw-r----- 1 root operator 0x51 Nov 23 00:56 /dev/mmcsd0boot1 crw-r----- 1 root operator 0x49 Nov 23 00:56 /dev/mmcsd0rpmb crw-r----- 1 root operator 0x52 Nov 23 00:54 /dev/mmcsd0s1 crw-r----- 1 root operator 0x53 Nov 23 00:54 /dev/mmcsd0s2 crw-r----- 1 root operator 0x56 Nov 23 00:54 /dev/mmcsd0s2a crw-r----- 1 root operator 0x57 Nov 23 00:54 /dev/mmcsd0s2b crw-r----- 1 root operator 0x59 Nov 23 01:06 /dev/mmcsd0s2d =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87A31A90-774A-4EF7-8428-8F8FEBFD5406>