From owner-freebsd-arm@freebsd.org Sat Nov 23 10:15:17 2019 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 46D541B1520 for ; Sat, 23 Nov 2019 10:15:17 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic313-19.consmr.mail.gq1.yahoo.com (sonic313-19.consmr.mail.gq1.yahoo.com [98.137.65.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47Kq1H10Qrz3PYv for ; Sat, 23 Nov 2019 10:15:14 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: L40p3OkVM1lFH4pkCjZsB0EJo97fyKRy2TWMUHuHCDjHC2qpKDUkDZS75gG42xI kaXUVKkopzwczznlawc42NQvhjYqB6g91t71BCyU6vG4w1mcwQlEIL9x0QeQsZEF60FecDk5af5G stoxwxUqXm3Lt1tEbm5fl9O4TzfGBhQgrdIuBznGo6p83AF7CmillPqSS_mydow_mTMV22SMrCvw IeqTyUI9aJQZHaJxJCo6IUY1v_lCqGA_gU33ghYC13kXN8oqhc_cYvR_Pjkp8UMIr5lBM0iNuocJ 45gL_57l9SWjbnqi74ybLe.zhWnB6XeHEroYAevQZ0TYb9ce9pARN8_UH.Pbjz5vfd0Q6qsQicTk bmLYnasjS7Eu45myQ7NJxdo2eF6lu9kNsBndwxP_Qqr6ENolxeYE..3fzo2kdL9DDEMrDR_s4h0F b0SvelIOQtXv2IZUksQN1g1yIaDCK2UJIZYoMbcWgx1I_9FNgFNaEl5kApEKDRRM4xcjA6lt2GIF 0vzglG99DoRVscOfAzswmPbX7OtfBCYOX1sGH0Z_d2c5mnH6x6MJS.OGKZFZ0mOULSmbqbHWZAAf lIhJf6NTVq9Zwb6qZKZhg6X0MhI9O4ApT5ZkN5XfmQ6iThWBeR1cRnEvSIKLMscD0H9AtzthYTCw Bid61y2xWZF4fGqVqibibZed5TEJE8Hbr3Y6RNY7XQmX.RAVUwLcUuM7QBlQl54fEQA.yd5iPCAO 5amcRlUjsPjTZS.ZzKBuO5TMd8kC5D4.wVo0XEemFlxHirGtYiXASmxOhBOaVB8eXwFTjXk7_1dc mZIxCM_9EQeE13W8GpPE9YtojolveVbWnMvOEEaVnjFC.7ay1kL5ffIfYaLS_h2jxGL_B9YZRZfX h9rUKfLWRXsTHx0T9HMGX02f.VE_AkHJga1UGPAyY9Sfgfkfg3fYyxYQetpn3oGh5kV_T6dgYW4T cy3DmeBiz_pt4OC0flsSDPrSY2mcUuU5kIo7q_hcqE0uZnkMECdpke4A1vVOwIIwbh9HvkTuGn9i JCsrnHA2f1o2bHP6FASw9XJ7we3ihoyIAjJhVn01fbhsFuITBZTKpyLDnXLpsE6TChGAEmE1uIqC hLcKnximGotplw1P5Etw7Lwd9M8yesBrqMO9_uMi0HZfmuZgkwb7gZPmv1xsu_Xr9nhBqPWp5roh 24LQwZZaFi9ekp_aSHg6yLYxd4lTaYtNIJBJ7djh5VnZKfdbwZXEGjnDvfdEAiZTFG.mGJ1dWKuj EJztDgXslUy1qgkH84YLyuHW8nh9cphlLLlIA4YTy3XI1DYOk5Wnv2JkEh_xcPanKigSd_Vyts2w 0yDiyEO4GZw5fiXklNgHyf_jztBbXN6.klOMRi8nEv9xxtkB5H1.1MxJttgz.RMd8FQkA2jpbMYx f84_srum2jO0rtB5HbbC_Hw-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.gq1.yahoo.com with HTTP; Sat, 23 Nov 2019 10:15:12 +0000 Received: by smtp404.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 4301ba94c85afa74d84256b2348d79a2; Sat, 23 Nov 2019 10:15:08 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3601.0.10\)) 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> Date: Sat, 23 Nov 2019 02:15:06 -0800 To: freebsd-arm@freebsd.org X-Mailer: Apple Mail (2.3601.0.10) References: <87A31A90-774A-4EF7-8428-8F8FEBFD5406.ref@yahoo.com> X-Rspamd-Queue-Id: 47Kq1H10Qrz3PYv X-Spamd-Bar: + X-Spamd-Result: default: False [1.43 / 15.00]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_SPAM_MEDIUM(0.95)[0.950,0]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; RCVD_IN_DNSWL_NONE(0.00)[82.65.137.98.list.dnswl.org : 127.0.5.0]; MV_CASE(0.50)[]; IP_SCORE(0.00)[ip: (5.22), ipnet: 98.137.64.0/21(0.88), asn: 36647(0.70), country: US(-0.05)]; IP_SCORE_FREEMAIL(0.00)[]; NEURAL_SPAM_LONG(0.98)[0.976,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Nov 2019 10:15:17 -0000 # 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)