__,gnnnOCCCCCOObaau,_ _._ __,gnnCCCCCCCCOPF"'' ~ (N\XCbngg,._____.,gnnndCCCCCCCCCCCCF"___,,,,___ \N\XCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCOOOOPYvv. \N\XCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCPF"'' \N\XCCCCCCCCCCCCCCCCCCCCCCCCCOF"' \N\XCCCCCCCCCCCCCCCCCCCCOF"' \N\XCCCCCCCCCCCCCCCPF"' \N\"PCOCCCOCCFP"" \N\ \N\ --- qnnnn. qnnnnr \N\ qgggaagge, ,spsqs, qgggaaagga,. | R | NNNNL "NN BBB "BBb ;SS "Ss DDD "VDDm --- NNVNNb, NN ,t BBB IBP SSk, " DDD "DDb NN "VNNp, NN .epqe, zttttz BBBgggdBP' "SSSSp, DDD YDD NN "VNNp,NN eEY__YA TT BBB""""GBm, "SSSSR DDD ADD NN "VNbNN EEF""""' TT BBB BBB "YSL DDD .DDP NN "YNN VEL , TT BBB _BBP s, ISF DDD ,DDD' adNNbe "NN "VEggdF ttgt dBBBaaadBBF' YSgggdSP' dDDDaaadCDF" \NN\ \NN\ \NNA. \NNA, \NNN, \NNN\ \NNN\ \NNNA Setup Organe Pi Zero with NetBSD 9.2 ****************************************************************** 30th-June-2022, early morning, Shanghai, Cloudy In last few days, I tried to find some time playing with NetBSD with Orang Pi Zero. I planned to use it to replace my Raspberry Pi serving as a Samba home file server. ## Hardware setup ------------------ The hardware assemble doen't need too much work, just put the heatsink on, and putting it to box is nothing, but, the Orang Pi Zero doesn't have HDMI output, so I have to use other means for viewing the system output and issueing the early setup commands. Here, Orange Pi Zero has an 3-pin serial port for this purpose, I need to connect my USB-TTL convertor with wires to it. I had one convertor with FTDI FT232 chip and that works good on my host computer which runs LinuxMint 20.3 Cinnamon AMD64. I use putty on Linux to communicate with the USB serial port where I hooked my Orange Pi Zero. Orang Pi Zero has this connection instruction on their manual, so this is quite straight forward, just connect the correct RX, TX, GND to each other, you want Zero's RX goes to computer/convertor's TX, and vise visa, GND to GND. ## Flash the image and setup ----------------------------- This step I followed the NetBSD online instructions, the INSTALL instruction under the 9.2 release of evbarm-earmv7hf(this is Orange Pi Zero have to use). I firstly tried with pre-build testing image from armbsd.org, however there are only with NetBSD Current system, good for testing, and I end up with issues when I tried to install software, It keeping poping the error of missing ibterminfo.so.1, after several trys, I decided I shall use the stable release: 9.2. I then downloaded the 9.2 image and u-boot file and follows eaxtly the INSTALL instructions, however I don't know why, the dd command created SD card image(NetBSD and U-boot) seems doesn't boot, I then tried using balena Etcher to flash the NetBSD image and use INSTALL mentioned dd command for u-boot "inserting". and that worked! So I guess it is the first dd command writing NetBSD had something wrong, It may due to I'm running that command on Linux...I didn't dig into the reason of this. Good this works! I then did the initial setup following the Chapter 5 The first steps on NetBSD from The NetBSD Guide, together with the instructions explained in INSTALL, including enable mutiuser mode, set network to DHCP and add pkgsrc and add pkgin etc., and I found out it is very handy to use the "sysinst" easy meanu config for several items like Local Time Zone, pkgsrc and pkgin etc., added also a normal user, installed needed software like neofetch, vim, htop. Easy and handy. ## Adding Samba Share ---------------------- At first I followed the NetBSD website howto on setting up Samba, the pkgsrc compiling took so long time on the weak Pi Zero box, and I also ended up no success with the configuration setup, then I reallized that howto is 10 years old, some are may not apply to latest Samba. I then just used pkgin install the Samba, and followed the article from dressupgeekout.blogspot.com/2020/02/let-make-files-on-your-netbsd-machine.html, that worked, I could at least browsing the NetBSD shared files on iPad, however, I could not open them, don't know why, I may take some time later to find out. The other topic is how to mount the USB HDD, I managed to make it work with "mount_ntfs /dev/sd0e /mnt/share", still to make it further in /etc/fstab so it could get auto mount every power on. ## Further work ---------------- The Samba didn't work well, so I need fix it out, and make it auto mount in later time. And, I want to check out the speed of this box sharing vs. the Raspberry Pi 3B box, if Orang Pi Zero box with NetBSD can provide the same access speed of files, I definetly will switch. Let's see! And talk to you in next phlog! -Peter ------------------------------------------------------------------ Written with Vim on otaku.SDF.org, tmux ssh connection from Lenovo ideapa 710S runing on LinuxMint 20.3 Cinnamon.