From nobody Fri May 5 22:03:10 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 4QCl7P58GQz49rlF for ; Fri, 5 May 2023 22:03:29 +0000 (UTC) (envelope-from lojas@arroway.org) Received: from hobbes.arroway.org (hobbes.arroway.org [173.199.118.77]) by mx1.freebsd.org (Postfix) with ESMTP id 4QCl7N4jFJz3jsV for ; Fri, 5 May 2023 22:03:28 +0000 (UTC) (envelope-from lojas@arroway.org) Authentication-Results: mx1.freebsd.org; none Received: from [10.9.192.149] (179-240-31-180.3g.claro.net.br [179.240.31.180]) by hobbes.arroway.org (Postfix) with ESMTPA id 7E7A114D2B0; Fri, 5 May 2023 19:03:27 -0300 (-03) Date: Fri, 05 May 2023 19:03:10 -0300 User-Agent: K-9 Mail for Android In-Reply-To: References: 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: Nanopi R5S support and build guide To: freebsd-arm@freebsd.org,Ganbold Tsagaankhuu From: Matheus Message-ID: <7F68ABB3-8D7A-40EA-9713-DAA0E63E1A6A@arroway.org> X-Rspamd-Queue-Id: 4QCl7N4jFJz3jsV X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20473, ipnet:173.199.116.0/22, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On May 5, 2023 2:23:15 AM GMT-03:00, Ganbold Tsagaankhuu wrote: >On Thu, May 4, 2023 at 10:05=E2=80=AFPM Matheus wro= te: > >> > On Tue, May 2, 2023 at 6:50=C3=A2=E2=82=AC=C2=AFPM Matheus wrote: >> > >> >> >> >> >> >> On May 1, 2023 1:47:12 PM GMT-03:00, "S=C3=83=C2=B8ren Schmidt" < >> >> soren=2Eschmidt@gmail=2Ecom> wrote: >> >> >> On 30 Apr 2023, at 23=2E44, Matheus wrote: >> >> >> >> >> >> Hi, >> >> >> >> >> >> I am trying to have FreeBSD 14 running on this SBC=2E I could not >find >> >> >any guides in how to build images for it=2E I found the >> >> >people=2Efreebsd=2Eorg/~sos/ site that has some images, and one for >it, >> but >> >> >that seldom boots my board, and when it did, there was no console >over >> >> >serial or vga=2E >> >> >> >> >> >> If anyone can give any hints=2E Unfortunately my dev skills are >not >> >> >good=2E But I can test and help build once I figure out how :) >> >> > >> >> >Hi Matheus >> >> > >> >> >The image at >> >> > >> >> > >> >> >> >https://people=2Efreebsd=2Eorg/~sos/ARM64/current-RK356X-images/nano5-sdc= ard=2Eimg=2Egz >> >> > >> >> >for the Nanopi R5S does indeed boot with both HDMI output and >serial >> >> >console (1500000baud)=2E >> >> > >> >> >The boot loader (EDK2 in FDT mode) is very picky on SD card >quality >> >> >though from experience, I works for me with Sandisk Ultra / >Extreme >> >> >cards but not with Samsung and cheap noname SD cards YMMV=2E >> >> >> >> Hi S=C3=83=C2=B8ren, >> >> >> >> I had really issues on sd carda=2E I got it to boot once, but I was >> >> printing >> >> characters on screen at one per second=2E So I rebooted and don't >remember >> >> why rewrote the card=2E I can't boot anymore=2E Tried different card= s, >> >> SanDisk >> >> ultra, no luck=2E >> >> >> >> I can boot an 13=2E2 image from the guy at personalbsd though=2E But >there I >> >> have just one ethernet=2E >> >> On 13=2E2 I cannot list the ethernets nics using pciconf -lv, >including >> >> the >> >> one that works=2E Is this expected? >> > >> > >> > Yes=2E Did you try >> > >> >https://personalbsd=2Eorg/download/Business/FreeBSD-aarch64-14=2E0-CURREN= T-NanoPi-R5S-20230402=2Eimg=2Exz >> > ? >> > This image should have support for pcie and all ethernet should >work >> IIRC=2E >> > >> > Ganbold >> >> Hi Ganbold, >> >> I tried it and other 2 images and no success, including the image >pointed >> by Soren=2E Unfortunately I just got to boot one image from 14 but I >> overwritten the sd card and can't remember which sd card and image :( >> >> The only image I can make it boot is from 13=2E2R, and I got it >installed >> fine (using an EFI image from personalbsd from March 23)=2E >> >> Will wait for the next round of images for 14=2E >> > >Above image works for me: > >root@NanoPi-R5S:~ # ifconfig >re0: flags=3D8803 metric 0 mtu 1500 > options=3D201b > ether 62:73:64:e2:d4:87 > inet 192=2E168=2E111=2E2 netmask 0xffffff00 broadcast 192=2E168= =2E111=2E255 > media: Ethernet autoselect > status: no carrier > nd6 options=3D29 >re1: flags=3D8843 metric 0 mtu >1500 > options=3D201b > ether 62:73:64:9a:5e:55 > inet 192=2E168=2E2=2E2 netmask 0xffffff00 broadcast 192=2E168=2E2= =2E255 > media: Ethernet autoselect (1000baseT ) > status: active > nd6 options=3D29 >eq0: flags=3D8843 metric 0 mtu >1500 > options=3D80008 > ether 22:07:01:bb:41:76 > inet 192=2E168=2E1=2E202 netmask 0xffffff00 broadcast 192=2E168= =2E1=2E255 > media: Ethernet autoselect (1000baseT ) > status: active > nd6 options=3D29 >lo0: flags=3D8049 metric 0 mtu 16384 > options=3D680003 > inet6 ::1 prefixlen 128 > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 > inet 127=2E0=2E0=2E1 netmask 0xff000000 > groups: lo > nd6 options=3D21 >root@NanoPi-R5S:~ # uname -an >FreeBSD NanoPi-R5S 14=2E0-CURRENT FreeBSD 14=2E0-CURRENT #0 >main-n261950-4aeb939ecf8b-dirty: Sun Apr 2 17:42:01 MSK 2023 >root@honeycomb=2Elocal:/usr/crochet/work/obj/usr/crochet/src-current-14= =2E0/arm64=2Eaarch64/sys/EXPERT >arm64 >root@NanoPi-R5S:~ # kldstat >Id Refs Address Size Name > 1 8 0xffff000000000000 10cb350 kernel > 2 1 0xffff0000010cd000 a9508 if_re=2Eko > 3 1 0xffff0000c9e00000 24000 fdescfs=2Eko > 4 1 0xffff0000c9e24000 22000 mac_ntpd=2Eko >root@NanoPi-R5S:~ # > >Ganbold Hi Ganbold and others,=20 I gave another try today and I got to see some stuff on the serial console= but the serial terminal itself is not usable=2E It prints unrecognizable c= haracters, but I could recognize the red beastie logo=2E=20 On the hdmi screen I have no output=2E Can you confirm the serial speed li= ne?=20 It was 115200 when I saw all that, and then tried 1500000 and despite it w= as printing something that looks like the boot, just weird characters appea= red=2E=20 Thanks again,=20 Matheus=20 >> >> Thanks, >> >> matheus >> >> >> >> >> I have little understanding of the arch, so my progress is much >slow=2E >> >> I got some dmesg from OpenBSD people where the nics show in >ifconfig=2E >> >> But >> >> I couldn't get mine to behave this way=2E I can install though, >using USB >> >> nic=2E >> >> I will try to buy a new sd card from the good list you pointed=2E >> >> Another thing, I got the feeling that when I dd'ed the image using >the >> >> SD >> >> card slot on the notebook it worked and when was through usb >adapter did >> >> not=2E Does it make sense? Using Linux mint as host for this=2E >> >> Thanks so much for the answer and help, >> >> >> >> Matheus >> >> >> >> >> >> >You can build a stock ARM64 generic kernel and most things will >be >> >> >usable, however as Ganbold wrote the DTS files is not in there >yet (and >> >> >not even in linux where our DTS files are fetched from)=2E >> >> >However the EDK2 boot loader provided (and used in above image) >on >> >> > >> >> >>https://people=2Efreebsd=2Eorg/~sos/ARM64/EDK2-RK356X/NANOPI-R5S_EFI=2Ei= tb=C3=AF >> =C2=BF=C2=BC >> >> >NANOPI-R5S_EFI >> >> >File =C3=82=C2=B7 1,7 MB >> >> > >> >> >does hand over the =C3=A2=E2=82=AC=C5=93right=C3=A2=E2=82=AC DTB fi= le if you want to experiment=2E >> >> > >> >> >If you need the used DTS file and build guidance let me know in >private >> >> >mail=2E=2E=2E >> >> > >> >> >-- >> >> >S=C3=83=C2=B8ren Schmidt >> >> >sos@deepcore=2Edk / sos@freebsd=2Eorg >> >> >"So much code to hack, so little time" >> >> >> >> --- >> >> "We will call you Cygnus, >> >> the God of balance you shall be=2E" >> >> >> >> >> > >> >> >> -- >> "We will call you Cygnus, >> the God of balance you shall be=2E" >> ------------------------------ >> "We will call you Cygnus, >> the God of balance you shall be=2E" --- "We will call you Cygnus, the God of balance you shall be=2E"