Date: Fri, 5 May 2023 13:23:15 +0800 From: Ganbold Tsagaankhuu <ganbold@gmail.com> To: Matheus <lojas@arroway.org> Cc: freebsd-arm@freebsd.org Subject: Re: Nanopi R5S support and build guide Message-ID: <CAGtf9xPipUdDfGwPz6JDGRwXsppmZdnhQZCOx_nvi3rHVtL9PA@mail.gmail.com> In-Reply-To: <C8CE78B3-EADC-4755-B53F-D2A11CFE95A9@arroway.org> References: <C7082C2C-CC9B-493B-ADEF-6606FE875A3A@arroway.org> <A428B299-872C-4FEA-AF12-56F25D9211A8@gmail.com> <CDC8B9E7-B32B-435F-B2CF-88052C360B08@arroway.org> <CAGtf9xM6uFopHtp19TMd2eTp1NanCByPftbdOPWZxLiJJFBwqA@mail.gmail.com> <C8CE78B3-EADC-4755-B53F-D2A11CFE95A9@arroway.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000002d21cd05faeb7d17 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, May 4, 2023 at 10:05=E2=80=AFPM Matheus <lojas@arroway.org> wrote: > > On Tue, May 2, 2023 at 6:50=C3=A2=E2=82=AC=C2=AFPM Matheus <lojas@arrow= ay.org> wrote: > > > >> > >> > >> On May 1, 2023 1:47:12 PM GMT-03:00, "S=C3=83=C2=B8ren Schmidt" < > >> soren.schmidt@gmail.com> wrote: > >> >> On 30 Apr 2023, at 23.44, Matheus <lojas@arroway.org> wrote: > >> >> > >> >> Hi, > >> >> > >> >> I am trying to have FreeBSD 14 running on this SBC. I could not fin= d > >> >any guides in how to build images for it. I found the > >> >people.freebsd.org/~sos/ site that has some images, and one for it, > but > >> >that seldom boots my board, and when it did, there was no console ove= r > >> >serial or vga. > >> >> > >> >> If anyone can give any hints. Unfortunately my dev skills are not > >> >good. But I can test and help build once I figure out how :) > >> > > >> >Hi Matheus > >> > > >> >The image at > >> > > >> > > >> > https://people.freebsd.org/~sos/ARM64/current-RK356X-images/nano5-sdcard.= img.gz > >> > > >> >for the Nanopi R5S does indeed boot with both HDMI output and serial > >> >console (1500000baud). > >> > > >> >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. > >> > >> Hi S=C3=83=C2=B8ren, > >> > >> I had really issues on sd carda. I got it to boot once, but I was > >> printing > >> characters on screen at one per second. So I rebooted and don't rememb= er > >> why rewrote the card. I can't boot anymore. Tried different cards, > >> SanDisk > >> ultra, no luck. > >> > >> I can boot an 13.2 image from the guy at personalbsd though. But there= I > >> have just one ethernet. > >> On 13.2 I cannot list the ethernets nics using pciconf -lv, including > >> the > >> one that works. Is this expected? > > > > > > Yes. Did you try > > > https://personalbsd.org/download/Business/FreeBSD-aarch64-14.0-CURRENT-Na= noPi-R5S-20230402.img.xz > > ? > > This image should have support for pcie and all ethernet should work > IIRC. > > > > Ganbold > > Hi Ganbold, > > I tried it and other 2 images and no success, including the image pointed > by Soren. 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.2R, and I got it installed > fine (using an EFI image from personalbsd from March 23). > > Will wait for the next round of images for 14. > Above image works for me: root@NanoPi-R5S:~ # ifconfig re0: flags=3D8803<UP,BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=3D201b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,WOL_MAGIC> ether 62:73:64:e2:d4:87 inet 192.168.111.2 netmask 0xffffff00 broadcast 192.168.111.255 media: Ethernet autoselect status: no carrier nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> re1: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=3D201b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,WOL_MAGIC> ether 62:73:64:9a:5e:55 inet 192.168.2.2 netmask 0xffffff00 broadcast 192.168.2.255 media: Ethernet autoselect (1000baseT <full-duplex>) status: active nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> eq0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=3D80008<VLAN_MTU,LINKSTATE> ether 22:07:01:bb:41:76 inet 192.168.1.202 netmask 0xffffff00 broadcast 192.168.1.255 media: Ethernet autoselect (1000baseT <full-duplex>) status: active nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> lo0: flags=3D8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 options=3D680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6> inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 inet 127.0.0.1 netmask 0xff000000 groups: lo nd6 options=3D21<PERFORMNUD,AUTO_LINKLOCAL> root@NanoPi-R5S:~ # uname -an FreeBSD NanoPi-R5S 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n261950-4aeb939ecf8b-dirty: Sun Apr 2 17:42:01 MSK 2023 root@honeycomb.local:/usr/crochet/work/obj/usr/crochet/src-current-14.0/arm= 64.aarch64/sys/EXPERT arm64 root@NanoPi-R5S:~ # kldstat Id Refs Address Size Name 1 8 0xffff000000000000 10cb350 kernel 2 1 0xffff0000010cd000 a9508 if_re.ko 3 1 0xffff0000c9e00000 24000 fdescfs.ko 4 1 0xffff0000c9e24000 22000 mac_ntpd.ko root@NanoPi-R5S:~ # Ganbold > > Thanks, > > matheus > > >> > >> I have little understanding of the arch, so my progress is much slow. > >> I got some dmesg from OpenBSD people where the nics show in ifconfig. > >> But > >> I couldn't get mine to behave this way. I can install though, using US= B > >> nic. > >> I will try to buy a new sd card from the good list you pointed. > >> 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 d= id > >> not. Does it make sense? Using Linux mint as host for this. > >> 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 (a= nd > >> >not even in linux where our DTS files are fetched from). > >> >However the EDK2 boot loader provided (and used in above image) on > >> > > >> >https://people.freebsd.org/~sos/ARM64/EDK2-RK356X/NANOPI-R5S_EFI.itb= =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 file= if you want to experiment. > >> > > >> >If you need the used DTS file and build guidance let me know in priva= te > >> >mail... > >> > > >> >-- > >> >S=C3=83=C2=B8ren Schmidt > >> >sos@deepcore.dk / sos@freebsd.org > >> >"So much code to hack, so little time" > >> > >> --- > >> "We will call you Cygnus, > >> the God of balance you shall be." > >> > >> > > > > > -- > "We will call you Cygnus, > the God of balance you shall be." > ------------------------------ > "We will call you Cygnus, > the God of balance you shall be." --0000000000002d21cd05faeb7d17 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">= <div dir=3D"ltr" class=3D"gmail_attr">On Thu, May 4, 2023 at 10:05=E2=80=AF= PM Matheus <<a href=3D"mailto:lojas@arroway.org">lojas@arroway.org</a>&g= t; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0p= x 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> O= n Tue, May 2, 2023 at 6:50=C3=A2=E2=82=AC=C2=AFPM Matheus <<a href=3D"ma= ilto:lojas@arroway.org" target=3D"_blank">lojas@arroway.org</a>> wrote:<= br>><br>>><br>>><br>>> On May 1, 2023 1:47:12 PM GMT-0= 3:00, "S=C3=83=C2=B8ren Schmidt" <<br>>> <a href=3D"mail= to:soren.schmidt@gmail.com" target=3D"_blank">soren.schmidt@gmail.com</a>&g= t; wrote:<br>>> >> On 30 Apr 2023, at 23.44, Matheus <<a hre= f=3D"mailto:lojas@arroway.org" target=3D"_blank">lojas@arroway.org</a>> = wrote:<br>>> >><br>>> >> Hi,<br>>> >><b= r>>> >> I am trying to have FreeBSD 14 running on this SBC. I c= ould not find<br>>> >any guides in how to build images for it. I f= ound the<br>>> ><a href=3D"http://people.freebsd.org/~sos/" target= =3D"_blank">people.freebsd.org/~sos/</a> site that has some images, and one= for it, but<br>>> >that seldom boots my board, and when it did, t= here was no console over<br>>> >serial or vga.<br>>> >>= ;<br>>> >> If anyone can give any hints. Unfortunately my dev s= kills are not<br>>> >good. But I can test and help build once I fi= gure out how :)<br>>> ><br>>> >Hi Matheus<br>>> >= ;<br>>> >The image at<br>>> ><br>>> ><br>>>= ; <a href=3D"https://people.freebsd.org/~sos/ARM64/current-RK356X-images/na= no5-sdcard.img.gz" target=3D"_blank">https://people.freebsd.org/~sos/ARM64/= current-RK356X-images/nano5-sdcard.img.gz</a><br>>> ><br>>> = >for the Nanopi R5S does indeed boot with both HDMI output and serial<br= >>> >console (1500000baud).<br>>> ><br>>> >The b= oot loader (EDK2 in FDT mode) is very picky on SD card quality<br>>> = >though from experience, I works for me with Sandisk Ultra / Extreme<br>= >> >cards but not with Samsung and cheap noname SD cards YMMV.<br>= >><br>>> Hi S=C3=83=C2=B8ren,<br>>><br>>> I had rea= lly issues on sd carda. I got it to boot once, but I was<br>>> printi= ng<br>>> characters on screen at one per second. So I rebooted and do= n't remember<br>>> why rewrote the card. I can't boot anymore= . Tried different cards,<br>>> SanDisk<br>>> ultra, no luck.<br= >>><br>>> I can boot an 13.2 image from the guy at personalbsd = though. But there I<br>>> have just one ethernet.<br>>> On 13.2= I cannot list the ethernets nics using pciconf -lv, including<br>>> = the<br>>> one that works. Is this expected?<br>><br>><br>> Y= es. Did you try<br>> <a href=3D"https://personalbsd.org/download/Busines= s/FreeBSD-aarch64-14.0-CURRENT-NanoPi-R5S-20230402.img.xz" target=3D"_blank= ">https://personalbsd.org/download/Business/FreeBSD-aarch64-14.0-CURRENT-Na= noPi-R5S-20230402.img.xz</a><br>> ?<br>> This image should have suppo= rt for pcie and all ethernet should work IIRC.<br>><br>> Ganbold<br><= br>Hi Ganbold,<br><br>I tried it and other 2 images and no success, includi= ng the image pointed<br>by Soren. Unfortunately I just got to boot one imag= e from 14 but I<br>overwritten the sd card and can't remember which sd = card and image :(<br><br>The only image I can make it boot is from 13.2R, a= nd I got it installed<br>fine (using an EFI image from personalbsd from Mar= ch 23).<br><br>Will wait for the next round of images for 14.<br></blockquo= te><div><br></div><div>Above image works for me:</div><div><br></div><div>r= oot@NanoPi-R5S:~ # ifconfig<br>re0: flags=3D8803<UP,BROADCAST,SIMPLEX,MU= LTICAST> metric 0 mtu 1500<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 options=3D201b= <RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,WOL_MAGIC><br>=C2=A0 =C2=A0 = =C2=A0 =C2=A0 ether 62:73:64:e2:d4:87<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 inet 1= 92.168.111.2 netmask 0xffffff00 broadcast 192.168.111.255<br>=C2=A0 =C2=A0 = =C2=A0 =C2=A0 media: Ethernet autoselect<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 sta= tus: no carrier<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 nd6 options=3D29<PERFORMN= UD,IFDISABLED,AUTO_LINKLOCAL><br>re1: flags=3D8843<UP,BROADCAST,RUNNI= NG,SIMPLEX,MULTICAST> metric 0 mtu 1500<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 o= ptions=3D201b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,WOL_MAGIC><br>=C2= =A0 =C2=A0 =C2=A0 =C2=A0 ether 62:73:64:9a:5e:55<br>=C2=A0 =C2=A0 =C2=A0 = =C2=A0 inet 192.168.2.2 netmask 0xffffff00 broadcast 192.168.2.255<br>=C2= =A0 =C2=A0 =C2=A0 =C2=A0 media: Ethernet autoselect (1000baseT <full-dup= lex>)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 status: active<br>=C2=A0 =C2=A0 =C2= =A0 =C2=A0 nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL><br>= eq0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mt= u 1500<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 options=3D80008<VLAN_MTU,LINKSTATE= ><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 ether 22:07:01:bb:41:76<br>=C2=A0 =C2= =A0 =C2=A0 =C2=A0 inet 192.168.1.202 netmask 0xffffff00 broadcast 192.168.1= .255<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 media: Ethernet autoselect (1000baseT &= lt;full-duplex>)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 status: active<br>=C2=A0= =C2=A0 =C2=A0 =C2=A0 nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLO= CAL><br>lo0: flags=3D8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 = mtu 16384<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 options=3D680003<RXCSUM,TXCSUM,= LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 inet6 = ::1 prefixlen 128<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 inet6 fe80::1%lo0 prefixle= n 64 scopeid 0x4<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 inet 127.0.0.1 netmask 0xff= 000000<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 groups: lo<br>=C2=A0 =C2=A0 =C2=A0 = =C2=A0 nd6 options=3D21<PERFORMNUD,AUTO_LINKLOCAL><br>root@NanoPi-R5S= :~ # uname -an<br>FreeBSD NanoPi-R5S 14.0-CURRENT FreeBSD 14.0-CURRENT #0 m= ain-n261950-4aeb939ecf8b-dirty: Sun Apr =C2=A02 17:42:01 MSK 2023 =C2=A0 = =C2=A0 root@honeycomb.local:/usr/crochet/work/obj/usr/crochet/src-current-1= 4.0/arm64.aarch64/sys/EXPERT arm64<br>root@NanoPi-R5S:~ # kldstat<br>Id Ref= s Address =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Size Name<= br>=C2=A01 =C2=A0 =C2=A08 0xffff000000000000 =C2=A010cb350 kernel<br>=C2=A0= 2 =C2=A0 =C2=A01 0xffff0000010cd000 =C2=A0 =C2=A0a9508 if_re.ko<br>=C2=A03 = =C2=A0 =C2=A01 0xffff0000c9e00000 =C2=A0 =C2=A024000 fdescfs.ko<br>=C2=A04 = =C2=A0 =C2=A01 0xffff0000c9e24000 =C2=A0 =C2=A022000 mac_ntpd.ko<br>root@Na= noPi-R5S:~ #<br></div><div><br></div><div>Ganbold</div><div><br></div><div>= =C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0= .8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>Thanks,<b= r><br>matheus<br><br>>><br>>> I have little understanding of th= e arch, so my progress is much slow.<br>>> I got some dmesg from Open= BSD people where the nics show in ifconfig.<br>>> But<br>>> I c= ouldn't get mine to behave this way. I can install though, using USB<br= >>> nic.<br>>> I will try to buy a new sd card from the good li= st you pointed.<br>>> Another thing, I got the feeling that when I dd= 'ed the image using the<br>>> SD<br>>> card slot on the not= ebook it worked and when was through usb adapter did<br>>> not. Does = it make sense? Using Linux mint as host for this.<br>>> Thanks so muc= h for the answer and help,<br>>><br>>> Matheus<br>>><br>&= gt;><br>>> >You can build a stock ARM64 generic kernel and most= things will be<br>>> >usable, however as Ganbold wrote the DTS fi= les is not in there yet (and<br>>> >not even in linux where our DT= S files are fetched from).<br>>> >However the EDK2 boot loader pro= vided (and used in above image) on<br>>> ><br>>> ><a href= =3D"https://people.freebsd.org/~sos/ARM64/EDK2-RK356X/NANOPI-R5S_EFI.itb%C3= %AF">https://people.freebsd.org/~sos/ARM64/EDK2-RK356X/NANOPI-R5S_EFI.itb= =C3=AF</a>=C2=BF=C2=BC<br>>> >NANOPI-R5S_EFI<br>>> >File = =C3=82=C2=B7 1,7 MB<br>>> ><br>>> >does hand over the =C3= =A2=E2=82=AC=C5=93right=C3=A2=E2=82=AC DTB file if you want to experiment.= <br>>> ><br>>> >If you need the used DTS file and build g= uidance let me know in private<br>>> >mail...<br>>> ><br>= >> >--<br>>> >S=C3=83=C2=B8ren Schmidt<br>>> ><a= href=3D"mailto:sos@deepcore.dk" target=3D"_blank">sos@deepcore.dk</a> / <a= href=3D"mailto:sos@freebsd.org" target=3D"_blank">sos@freebsd.org</a><br>&= gt;> >"So much code to hack, so little time"<br>>><br= >>> ---<br>>> "We will call you Cygnus,<br>>> the Go= d of balance you shall be."<br>>><br>>><br>><br><br><br= >-- <br>"We will call you Cygnus,<br>the God of balance you shall be.&= quot;<hr>"We will call you Cygnus,<br>the God of balance you shall be.= "</blockquote></div></div> --0000000000002d21cd05faeb7d17--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGtf9xPipUdDfGwPz6JDGRwXsppmZdnhQZCOx_nvi3rHVtL9PA>