From nobody Fri Apr 12 14:05:29 2024 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VGJJD5vPmz5HRp6 for ; Fri, 12 Apr 2024 14:06:04 +0000 (UTC) (envelope-from mstiller@me.com) Received: from st43p00im-ztfb10073301.me.com (st43p00im-ztfb10073301.me.com [17.58.63.186]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4VGJJD455wz4b2V for ; Fri, 12 Apr 2024 14:06:04 +0000 (UTC) (envelope-from mstiller@me.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1712930763; bh=DqvwwYucEBjf5ZCu7Bnc1Njofc0pOeHr2VosexhRZT8=; h=Content-Type:Mime-Version:Subject:From:Date:Message-Id:To; b=NM0MaF8hH08p/5QJWgknNcNUMfSCDYqwXbPD7tP83PRwwUFkMaSnaOmC6NzYLewAM IqdpWQ11xU1ZF6N003GioQQuJ+tqWuYvVJojkucvAFch+9mrvMOnHLb1ttHvyMZRxe 7YdIu9VlSOwea+MLvlwXRNr+dSTJbzNaNWBAcdBka7A1dB6tRgv3Vx/fFm1ZNDi39J /GVdj66o2XGmQCj7L9nXBtuoFDrxzMd+lvfnc2HnIAhRhqiS1Oq846XRWZNFdGIiFr EsO2VTFUTLVpMvjMeQNvZ2Sx7oBfo3/9G34su7g/QxPG0B8kVrp/oc+WnPoljE4ne5 kt7FGbaujw7Cw== Received: from smtpclient.apple (st43p00im-dlb-asmtp-mailmevip.me.com [17.42.251.41]) by st43p00im-ztfb10073301.me.com (Postfix) with ESMTPSA id 40CEA8000BA; Fri, 12 Apr 2024 14:06:02 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\)) Subject: Re: Raspberry Pi 4 and M.2 SATA SSD recognized but not booting or available for install - unsupported interface From: Michael Stiller In-Reply-To: <8ebacbcb-1b49-437d-bfe0-5f829ef2ee6f@Julf.com> Date: Fri, 12 Apr 2024 16:05:29 +0200 Cc: Mark Millard , freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <7D75942E-5CAC-422E-BEA6-90100BB724C7@me.com> References: <3AA7F3FA-5CCC-401C-A638-DC5A65D707E4@yahoo.com> <0E07E7CD-FFA7-411E-AF92-E79B7007E4C1@yahoo.com> <8ebacbcb-1b49-437d-bfe0-5f829ef2ee6f@Julf.com> To: Johan Helsingius X-Mailer: Apple Mail (2.3774.500.171.1.1) X-Proofpoint-GUID: vTACUGQexNORdSetABRBG2Dq8dQmis7Y X-Proofpoint-ORIG-GUID: vTACUGQexNORdSetABRBG2Dq8dQmis7Y X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-12_10,2024-04-09_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxscore=0 adultscore=0 suspectscore=0 clxscore=1011 spamscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2404120102 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:714, ipnet:17.58.63.0/24, country:US] X-Rspamd-Queue-Id: 4VGJJD455wz4b2V I think I have roughly the same setup as you on a pi4. What I basically did was: - write the .img to the usb stick - boot that - create partitions on the ssd using gpart with that layout below: (because the .img tends to extend the root fs which I did not want.) gpart of ssd: =3D> 63 488397105 da0 MBR (233G) 63 131072 1 fat32lba [active] (64M) 131135 488266033 2 freebsd (233G) =3D> 0 488266033 da0s2 BSD (233G) 0 33554432 1 freebsd-ufs (16G) 33554432 8388608 2 freebsd-swap (4.0G) 41943040 446322993 4 freebsd-zfs (213G) On the Pi4 I think it's not relevant if the disk is MBR partitioned, at least not for this (small) size. Then I made the filesystems there, / as ufs and then /boot/efi as msdos. I copied the files from the usb stick (which contains the .img contents) using the "clone" program which is in pkg: pkg info clone clone-1.0.8 Name : clone Version : 1.0.8 Installed on : Sat Mar 23 16:15:40 2024 UTC Origin : sysutils/clone Architecture : FreeBSD:14:aarch64 Prefix : /usr/local Categories : sysutils Licenses : BSD2CLAUSE Maintainer : cyclaero@gmail.com WWW : https://cyclaero.github.io/clone/ Comment : File tree cloning tool ... I basically used this commands: (mount correctly!) clone -s -v 3 / /mnt clone -s -v 3 /boot/efi /mnt/boot/efi On important thing is: On the SSD my loader.conf contains this line: vfs.root.mountfrom=3D"ufs:/dev/da0s2a" Which is the device the kernel detects if NO usb stick is inserted. So this must be adjusted basically in /mnt/boot/loader.conf Then umounted all /mnt, removed usb stick. After this it booted from SSD, I created the zfs pool and moved some = directories to zfs. Hope this helps. Feel free to ask any more questions. Best regards, Michael > On 12. Apr 2024, at 15:41, Johan Helsingius wrote: >=20 > On 11/04/2024 19:57, Mark Millard wrote: >> As far as I know, the absence of sufficient material in >> da1p1 (efiboot0) could be your only problem. >=20 > OK, I have some progress (but not quite sure how). The > system now boots from the USB stick, but with the ZFS > file system from the SSD as it should - but without the > USB stick it doesn't boot, complaining "Firmware not found". >=20 > Here is the current partitioning, da0 is the USB stick, > da1 the SSD: >=20 > $ gpart show > =3D> 63 31301568 da0 MBR (15G) > 63 1985 - free - (993K) > 2048 102400 1 fat32lba [active] (50M) > 104448 10381312 2 freebsd (5.0G) > 10485760 20815871 - free - (9.9G) >=20 > =3D> 0 10381312 da0s2 BSD (5.0G) > 0 128 - free - (64K) > 128 10381184 1 freebsd-ufs (4.9G) >=20 > =3D> 40 937703008 da1 GPT (447G) > 40 532480 1 efi (260M) > 532520 2008 - free - (1.0M) > 534528 4194304 2 freebsd-swap (2.0G) > 4728832 932972544 3 freebsd-zfs (445G) > 937701376 1672 - free - (836K) >=20 > $ gpart show -pl > =3D> 63 31301568 da0 MBR (15G) > 63 1985 - free - (993K) > 2048 102400 da0s1 (null) [active] (50M) > 104448 10381312 da0s2 (null) (5.0G) > 10485760 20815871 - free - (9.9G) >=20 > =3D> 0 10381312 da0s2 BSD (5.0G) > 0 128 - free - (64K) > 128 10381184 da0s2a (null) (4.9G) >=20 > =3D> 40 937703008 da1 GPT (447G) > 40 532480 da1p1 efiboot0 (260M) > 532520 2008 - free - (1.0M) > 534528 4194304 da1p2 swap0 (2.0G) > 4728832 932972544 da1p3 zfs0 (445G) > 937701376 1672 - free - (836K) >=20 > da0s1 and da1p1 (that I assume are the EFI boot partitions) > have totally different contents: >=20 > SSD / da1p1: > $ find /boot/efi > /boot/efi > /boot/efi/efi > /boot/efi/efi/freebsd > /boot/efi/efi/freebsd/loader.efi > /boot/efi/efi/boot > /boot/efi/efi/boot/bootaa64.efi > /boot/efi/ubootefi.var >=20 >=20 > USB stick / da0s1: >=20 > $ find /mnt/da0s1 > /mnt > /mnt/EFI > /mnt/EFI/BOOT > /mnt/EFI/BOOT/bootaa64.efi > /mnt/dtb > /mnt/dtb/allwinner > /mnt/dtb/allwinner/sun50i-a64-nanopi-a64.dtb > /mnt/dtb/allwinner/sun50i-a64-olinuxino.dtb > /mnt/dtb/allwinner/sun50i-a64-pine64-lts.dtb > /mnt/dtb/allwinner/sun50i-a64-pine64-plus.dtb > /mnt/dtb/allwinner/sun50i-a64-pine64.dtb > /mnt/dtb/allwinner/sun50i-a64-pinebook.dtb > /mnt/dtb/allwinner/sun50i-a64-sopine-baseboard.dtb > /mnt/dtb/allwinner/sun50i-h5-orangepi-pc2.dtb > /mnt/dtb/allwinner/sun50i-h5-nanopi-neo2.dtb > /mnt/dtb/allwinner/sun50i-h6-pine-h64.dtb > /mnt/dtb/allwinner/sun50i-h6-pine-h64-model-b.dtb > /mnt/dtb/overlays > /mnt/dtb/overlays/sun50i-a64-mmc0-disable.dtbo > /mnt/dtb/overlays/sun50i-a64-mmc1-disable.dtbo > /mnt/dtb/overlays/sun50i-a64-mmc2-disable.dtbo > /mnt/dtb/overlays/sun50i-a64-pwm.dtbo > /mnt/dtb/overlays/sun50i-a64-rpwm.dtbo > /mnt/dtb/overlays/sun50i-a64-spi0-spigen.dtbo > /mnt/dtb/overlays/sun50i-a64-timer.dtbo > /mnt/dtb/overlays/sun50i-h5-opp.dtbo > /mnt/dtb/overlays/sun50i-h5-nanopi-neo2-opp.dtbo > /mnt/dtb/overlays/rk3328-analog-sound.dtbo > /mnt/dtb/overlays/rk3328-i2c0.dtbo > /mnt/dtb/overlays/rk3328-uart1.dtbo > /mnt/dtb/overlays/rk3399-mmc0-disable.dtbo > /mnt/dtb/overlays/rk3399-mmc1-disable.dtbo > /mnt/dtb/overlays/rk3399-sdhci-disable.dtbo > /mnt/dtb/overlays/spigen-rpi3.dtbo > /mnt/dtb/overlays/spigen-rpi4.dtbo > /mnt/dtb/rockchip > /mnt/dtb/rockchip/rk3399-khadas-edge-captain.dtb > /mnt/dtb/rockchip/rk3399-khadas-edge.dtb > /mnt/dtb/rockchip/rk3399-khadas-edge-v.dtb > /mnt/dtb/rockchip/rk3399-nanopc-t4.dtb > /mnt/dtb/rockchip/rk3328-nanopi-r2s.dtb > /mnt/dtb/rockchip/rk3399-nanopi-r4s.dtb > /mnt/dtb/rockchip/rk3399-rock-pi-4.dtb > /mnt/dtb/rockchip/rk3328-rock-pi-e.dtb > /mnt/dtb/rockchip/rk3328-rock64.dtb > /mnt/dtb/rockchip/rk3399-firefly.dtb > /mnt/dtb/rockchip/rk3399-rockpro64.dtb > /mnt/dtb/freescale > /mnt/dtb/freescale/fsl-ls1028a-rdb.dtb > /mnt/dtb/freescale/fsl-lx2160a-clearfog-cx.dtb > /mnt/dtb/freescale/fsl-lx2160a-honeycomb.dtb > /mnt/dtb/freescale/fsl-lx2160a-qds.dtb > /mnt/dtb/freescale/fsl-lx2160a-rdb.dtb > /mnt/dtb/freescale/imx8mq-evk.dtb > /mnt/dtb/freescale/imx8mq-nitrogen.dtb > /mnt/dtb/marvell > /mnt/dtb/marvell/armada-3720-espressobin.dtb > /mnt/dtb/marvell/armada-8040-clearfog-gt-8k.dtb > /mnt/dtb/marvell/armada-8040-db.dtb > /mnt/dtb/marvell/armada-8040-mcbin.dtb > /mnt/dtb/marvell/armada-8040-mcbin-singleshot.dtb > /mnt/dtb/nvidia > /mnt/dtb/nvidia/tegra210-p2371-2180.dtb > /mnt/dtb/nvidia/tegra210-p3450-0000.dtb > /mnt/README > /mnt/u-boot.bin > /mnt/armstub8.bin > /mnt/armstub8-gic.bin > /mnt/bootcode.bin > /mnt/fixup_cd.dat > /mnt/fixup_db.dat > /mnt/fixup_x.dat > /mnt/fixup.dat > /mnt/LICENCE.broadcom > /mnt/start_cd.elf > /mnt/start_db.elf > /mnt/start_x.elf > /mnt/start.elf > /mnt/fixup4.dat > /mnt/fixup4cd.dat > /mnt/fixup4db.dat > /mnt/fixup4x.dat > /mnt/start4.elf > /mnt/start4cd.elf > /mnt/start4db.elf > /mnt/start4x.elf > /mnt/bcm2710-rpi-2-b.dtb > /mnt/bcm2710-rpi-3-b.dtb > /mnt/bcm2710-rpi-3-b-plus.dtb > /mnt/bcm2710-rpi-cm3.dtb > /mnt/bcm2711-rpi-4-b.dtb > /mnt/config.txt > /mnt/overlays > /mnt/overlays/mmc.dtbo > /mnt/overlays/pwm.dtbo > /mnt/overlays/disable-bt.dtbo >=20 > Julf >=20 >=20 >=20