From nobody Mon Apr 10 00:27:46 2023 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 4PvqYy74h9z44VWF for ; Mon, 10 Apr 2023 00:27:50 +0000 (UTC) (envelope-from 01070187688fca8d-1c25fac3-8c15-4323-bcd6-fbc9d5032cf0-000000@eu-central-1.amazonses.com) Received: from b224-8.smtp-out.eu-central-1.amazonses.com (b224-8.smtp-out.eu-central-1.amazonses.com [69.169.224.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PvqYx2m4jz3Qkm for ; Mon, 10 Apr 2023 00:27:49 +0000 (UTC) (envelope-from 01070187688fca8d-1c25fac3-8c15-4323-bcd6-fbc9d5032cf0-000000@eu-central-1.amazonses.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cyclaero.com header.s=ez3m2wtglgbm5wj4q3hdyvc7qtjtqmlb header.b=g3gvZEWz; dkim=pass header.d=amazonses.com header.s=sokbgaaqhfgd6qjht2wmdajpuuanpimv header.b=PQ+AzEfV; spf=pass (mx1.freebsd.org: domain of 01070187688fca8d-1c25fac3-8c15-4323-bcd6-fbc9d5032cf0-000000@eu-central-1.amazonses.com designates 69.169.224.8 as permitted sender) smtp.mailfrom=01070187688fca8d-1c25fac3-8c15-4323-bcd6-fbc9d5032cf0-000000@eu-central-1.amazonses.com; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ez3m2wtglgbm5wj4q3hdyvc7qtjtqmlb; d=cyclaero.com; t=1681086467; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To; bh=EgB/1+85xJo01/nA4QCsQT/roHv77okqNhKuBvFXvLM=; b=g3gvZEWzjwEvi2OCrvMedYeoaKYk5p86mXtq5vQObxk1nocZo5depSNzE+mY7ZAA 8ODGTo1cp84cI2LdHrgd2ioNYLFyBQWtZOdX5b+t0h9dbPP2Duha/EdiSooIWZO9QlR bonjnSndFiuEFjKoEWrRc+jn9Cit7VtjLe83MUovpcCUzTlsWqXfy/hzlRRgrJ5YElt ZSttauP78S5XOIqLGDRyBqPz5s5AwhFqJqn3ntwfzUxqXO+WZhHzw4QtqldPsEqG+qa SPWzc2ryGl5+YI5QGN0Qbtay9k6x9oiKJPxKJWvnP1MetmNMrq5M9Xf5vOnvBk5AE2x 90wIuZd2gg== DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=sokbgaaqhfgd6qjht2wmdajpuuanpimv; d=amazonses.com; t=1681086467; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:Feedback-ID; bh=EgB/1+85xJo01/nA4QCsQT/roHv77okqNhKuBvFXvLM=; b=PQ+AzEfVxZ8S3DqhIuluNFRARZFsr8k/8yNKUnHO7K8rBIe9vHxpgHTjLcZKRoHP i35nztK9Opke94XxBJjsxYN0ksER9TpEpKEqyhGa2yBGyRWRC66lD//CLxwT8FtwBts rYlLfX1i/kgDO1UkliXWfgfeepWnz8rG1sb3HStM= Content-Type: text/plain; charset=utf-8 List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: Would FreeBSD run on an Orange Pi Zero 2 (Allwinner H616) From: Dr. Rolf Jansen In-Reply-To: <010701870ecab258-069e4aaf-c018-42d4-bf68-933a970b24d7-000000@eu-central-1.amazonses.com> Date: Mon, 10 Apr 2023 00:27:46 +0000 Cc: Daniel Engberg Content-Transfer-Encoding: quoted-printable Message-ID: <01070187688fca8d-1c25fac3-8c15-4323-bcd6-fbc9d5032cf0-000000@eu-central-1.amazonses.com> References: <010701870ecab258-069e4aaf-c018-42d4-bf68-933a970b24d7-000000@eu-central-1.amazonses.com> To: freebsd-arm X-Mailer: Apple Mail (2.3445.104.15) Feedback-ID: 1.eu-central-1.i3TZMOZE/rJo3HQG0qvfyolMxXljeCj2Qj8Jp3rxK3c=:AmazonSES X-SES-Outgoing: 2023.04.10-69.169.224.8 X-Spamd-Result: default: False [-1.69 / 15.00]; FROM_NAME_HAS_TITLE(1.00)[dr]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.994]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[freebsd-rj@cyclaero.com,01070187688fca8d-1c25fac3-8c15-4323-bcd6-fbc9d5032cf0-000000@eu-central-1.amazonses.com]; R_DKIM_ALLOW(-0.20)[cyclaero.com:s=ez3m2wtglgbm5wj4q3hdyvc7qtjtqmlb,amazonses.com:s=sokbgaaqhfgd6qjht2wmdajpuuanpimv]; R_SPF_ALLOW(-0.20)[+ip4:69.169.224.0/20]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_ZERO(0.00)[0]; RWL_MAILSPIKE_POSSIBLE(0.00)[69.169.224.8:from]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; ASN(0.00)[asn:16509, ipnet:69.169.224.0/23, country:US]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[cyclaero.com:+,amazonses.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_NA(0.00)[cyclaero.com]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[69.169.224.8:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[freebsd-rj@cyclaero.com,01070187688fca8d-1c25fac3-8c15-4323-bcd6-fbc9d5032cf0-000000@eu-central-1.amazonses.com]; TO_DN_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[amazonses.com:dkim] X-Rspamd-Queue-Id: 4PvqYx2m4jz3Qkm X-Spamd-Bar: - X-ThisMailContainsUnwantedMimeParts: N > Am 23.03.2023 um 11:06 schrieb Dr. Rolf Jansen = : >=20 > Hello, >=20 > For a new project I bought an Orange Pi Zero 2, is it worth trying = FreeBSD with it. I don=E2=80=99t need graphics and wireless, only = ethernet. >=20 > http://www.orangepi.org/orangepiwiki/index.php/Orange_Pi_Zero_2 >=20 > Any insights would be appreciated. >=20 >=20 >> Anfang der weitergeleiteten Nachricht: >>=20 >> Von: Daniel Engberg >> Betreff: Would FreeBSD run on an Orange Pi Zero 2 (Allwinner H616) >> Datum: 25. M=C3=A4rz 2023 um 16:48:38 GMT-3 >> An: rj@obsigna.com >>=20 >> Hi, >>=20 >> Not subscribed but probably not as only some parts of H6 are = supported and H616 is the next revsion = (https://wiki.freebsd.org/arm/Allwinner#arm.2FAllwinner.2FH6.H6_Supported_= Boards). >> According to https://linux-sunxi.org/Xunlong_Orange_Pi_Zero2 there's = a build target for your board and you also need to attach the correct = dts file to the kernel and see how far it boots. >>=20 >> You need to create a port for u-boot and modify the Makefile in src = so the kernel includes device tree for your SBC. >>=20 >> https://cgit.freebsd.org/src/tree/sys/modules/dtb/allwinner/Makefile >> = https://cgit.freebsd.org/ports/tree/sysutils/u-boot-orangepi-pc2/Makefile = (you can use that as a template) >>=20 >> = https://cgit.freebsd.org/src/tree/sys/contrib/device-tree/src/arm64/allwin= ner/sun50i-h616-orangepi-zero2.dts My Orange Pi Zero 2 arrived, and I built an u-boot port for it following = Daniels=E2=80=99s suggestions, however, quite possible I missed the one = or the other point. I built it on a RPi4B running FreeBSD 14-CURRENT (2023-03-30). I added to /usr/src/sys/modules/dtb/allwinner/Makefile a line for the = DTS file of the Orange Pi Zero 2 (before I checked that it exists - it = does): DTS=3D \ allwinner/sun50i-a64-nanopi-a64.dts \ ... ... allwinner/sun50i-h6-pine-h64-model-b.dts \ allwinner/sun50i-h616-orangepi-zero2.dts ... Then I started make in that directory and copied the generated = sun50i-h616-orangepi-zero2.dtb to /boot/dtb/allwinner - perhaps this is = not necessary, but it shouldn=E2=80=99t harm either. I created a ports directory systutils/u-boot-orangepi-zero2 and I = modified the Makefile to: MASTERDIR=3D ${.CURDIR}/../u-boot-master MODEL=3D orangepi-zero2 BOARD_CONFIG=3D orangepi_zero2_defconfig FAMILY=3D allwinner64 SUBFAMILY=3D h616 .include "${MASTERDIR}/Makefile=E2=80=9C In that directory, I executed make install clean, and it went through = without hickup. Now my Orange Pi Zero 2 boots well from a SD card with Debian 3.0.6 = Bullseye with Linux 5.16.17-sun50iw9. That SD card is a MBR one, and = therefore I created a new one by which I replaced the linux-data = partition by a freebsd one having one freebsd-ufs slice. The partition scheme of the Linux uSD card: =3D> 63 31116225 da2 MBR (15G) 63 8129 - free - (4.0M) 8192 30793728 1 linux-data (15G) 30801920 314368 - free - (154M) The partition scheme of the FreeBSD uSD card: =3D> 63 15523777 da1 MBR (7.4G) 63 8066 - free - (3.9M) 8129 15515711 1 freebsd (7.4G) =3D> 0 15515711 da1s1 BSD (7.4G) 0 15515711 1 freebsd-ufs (7.4G) /dev/da1s1s contains a complete FreeBSD 14-CURRENT-aarch64 installation = which I cloned from the respective root slice of my running RPi4B. Then = I put sun50i-h616-orangepi-zero2.dtb into /boot/dtb/allwinner, and I = dd=E2=80=99ed my new u-boot port to the SD card: dd = if=3D/usr/local/share/u-boot/u-boot-orangepi-zero2/u-boot-sunxi-with-spl.b= in of=3D/dev/da1 bs=3D128k seek=3D1 conv=3Dsync I started the Orange Pi Zero 2 from the newly created uSD card and the = serial console shows me: U-Boot SPL 2021.10-orangepi (Aug 09 2022 - 21:00:00 +0800) DRAM: 1024 MiB Trying to boot from MMC1 mmc_load_image_raw_sector: mmc block read error SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ### U-Boot SPL 2021.10-orangepi is not the one which I built (2023.01). May = it be that the Orange Pi comes with an U-Boot somewhere on-board? Does anybody have ideas any ideas on how to proceed? Best regards Rolf=20