SlideShare a Scribd company logo
NetBSD workshop
Jun Ebihara
jun@soum.co.jp
jun@netbsd.org
OverView in 4hours
● Install NetBSD/amd64 on VirtualBox
– Make earmv6hf cross-compiling toolchain
– Make RPI kernel
● Install NetBSD/earmv6hf on RPI
– Play RPI with NetBSD
– Feel difference between your favorite environment
● Copy your RPI kernel to RPI
– Update NetBSD-current kernel
● Boot RPI with your cross-compiled kernel
Hardwares
● Windows 10 PC with VirtualBox
● Raspberry PI
– MicroSD Card: Over 4GB class 10
– HDMI Display
– USB Keyboard/mouse
– USB power supply
– Ethernet Cable
● Internet access via Ethernet Cable
– RPI get IP address via DHCP
– RPI set time via NTP
Pre-Downloading
● NetBSD-7.1.amd64.iso
● src.tar.gz
● VirtualBox
● Rawrite32.exe
● RPI Image
– 2017-07-15-netbsd-earmv6hf.img.gz or newer
– http://cdn.netbsd.org/pub/NetBSD/misc/jun/raspberry-pi
– http://mail-index.netbsd.org/port-arm/2017/07/13/msg004307.html
– https://github.com/ebijun/NetBSD/blob/master/RPI/RPIimage/READ
ME
VirtualBox
● NetBSD on VirtualBox
– Assign 2GB mem: Disk 10GB
● NetBSD-7.1-amd64.iso
● Set NetBSD source on /usr/src
– cd /usr
– ftp
http://cdn.netbsd.org/pub/NetBSD/NetBSD-current/tar_files/src.tar
.gz
– tar xzvf src.tar.gz
NetBSD RPI Image
● on Windows
● http://cdn.netbsd.org/pub/NetBSD/misc/jun/raspberry-
pi/2017-07-15-earmv6hf/2017-07-15-netbsd-raspi-
earmv6hf.img.gz
● http://www.netbsd.org/~martin/rawrite32/download.html
● Use rawrite32 to write RPI image to microSD
● Connect RPI:
● Boot
● Wait 15 min to resize partition
Using RPI image
● Login: root
● startx
● medit
● mikutter
● mlterm-fb
● omxplayer & youtube-dl
– pkg_add omxplayer
– pkg_add youtube-dl
PaX
● Some application exec failed on starting
● sysctl -a |grep pax
– security.pax.mprotect.enabled = 1
– security.pax.mprotect.global = 1
– security.pax.mprotect.ptrace = 1
– security.pax.mprotect.debug = 1
– security.pax.segvguard.enabled = 1
– security.pax.segvguard.global = 1
● Loooose protection: (bad manner)
– sysctl -w security.pax.mprotect.enabled=0
NTP time setting
● ntpq -p
● /etc/rc.d/ntpd stop
● /etc/rc.d/ntpdate start
● /etc/rc.d/ntpd start
● ntpq -p
Reboot and / mount failed
● Power supply cut down failure
– make file system damaged
● Reboot but / read only access
● drop on single usermode
– df
– fsck /dev/ld0a
– reboot
● /etc/fstab
– add “log,noatime”
– man 5 fstab
RPI:/boot
● Kernel
– kernel.img – kernel for RPI0/1
– kernel7.img – kernel for RPI2/3
● cmdline.txt
– root=ld0a console=fb
– Add -s to boot single user mode
● config.txt
– http://elinux.org/RPiconfig
– hdmi_group=2
– hdmi_mode=16
/etc/rc.conf
● rc_configred=YES
● sshd=YES
● ntpd=YES
● hostname=nandemoii
NetBSD source
● dhcpcd
● ftp
http://cdn.netbsd.org/pub/NetBSD/NetBSD-current
/tar_files/src.tar.gz
● tar xzvf src.tar.gz
● mv src /usr/src
● mkdir /usr/obj
Kernel cross build for RPI2
● cd /usr/src
● ./build.sh -u -U -m evbarm -a earmv6hf tools
● ./build.sh -u -U -m evbarm -a earmv6hf
kernel=RPI2
● Copy netbsd.bin to /boot/kernel7.img
● objdump -D netbsd.bin
● Copy netbsd.bin to RPI:/boot/kernel7.img
● Set over 2GB mem for VirtualBox,if failed
Kernel cross build for KOBO
● cd /usr/src
● ./build.sh -j 6 -u -U -m evbarm -a earmv7hf
tools
● ./build.sh -j 6 -u -U -m evbarm -a earmv7hf
kernel=KOBO
● Copy netbsd.bin to /boot/kernel7.img
● objdump -D netbsd.bin
Kernel cross build for NetWalker
● cd /usr/src
● ./build.sh -j 6 -u -U -m evbarm -a earmv7hf
tools
● ./build.sh -j 6 -u -U -m evbarm -a earmv7hf
kernel=NETWALKER
● Copy netbsd.bin to /boot/kernel7.img
● objdump -D netbsd.bin
Kernel cross build for earmv4
● cd /usr/src
● ./build.sh -j 6 -u -U -m hpcarm tools
● ./build.sh -j 6 -u -U -m hpcarm kernel=WZERO3
● Copy netbsd to MSDOS partition
● Copy
/usr/src/sys/arch/hpc/stand/binary/ARM/hpcboot.exe.uue
● Uudecode hpcboot.exe.uue
● objdump -D netbsd
Kernel cross build for mipsel
● cd /usr/src
● ./build.sh -j 6 -u -U -m hpcmips tools
● ./build.sh -j 6 -u -U -m hpcmips kernel=GENERIC
● Copy netbsd to MSDOS partition
● Copy
/usr/src/sys/arch/hpc/stand/binary/MIPS/hpcboot.exe.uue
● Uudecode hpcboot.exe.uue
● objdump -D netbsd
Kernel cross build for sh3
● cd /usr/src
● ./build.sh -j 6 -u -U -m hpcsh tools
● ./build.sh -j 6 -u -U -m hpcsh kernel=GENERIC
● Copy netbsd to MSDOS partition
● Copy
/usr/src/sys/arch/hpc/stand/binary/SH3/hpcboot.exe.uue
● uudecode hpcboot.exe.uue
● objdump -D netbsd
Kernel cross build for sh4
● cd /usr/src
● ./build.sh -j 6 -u -U -m dreamcast tools
● ./build.sh -j 6 -u -U -m dreamcast
kernel=GENERIC
● objdump -D netbsd
Paths
● /etc/mk.conf
● /usr/src
– obj → ln -s /usr/obj
● tooldir.NetBSD-8.99.1-amd64
– bin/nbmake-hpcmips
● destdir.hpcmips
● releasedir
– sys/arch/hpcmips/
● conf/GENERIC
● compile/obj/GENERIC/netbsd
● compile/obj/GENERIC/netbsd.bin
● compile/obj/GENERIC/netbsd.ub
CVS update
● cd /usr/src
● script 20170810.log
● cvs update -Pad
● exit
● grep -v Updating 20170810.log |more
MediaTek MT7620
● ELECOM WRH-300CR
● http://pastebin.com/n05jnhjs
● NetBSD/evbmips:
● /usr/src/sys/arch/evbmips/conf
● grep MT7620
– ZYXELKX
Kernel cross build for MT7620
● cd /usr/src
● ./build.sh -j 6 -u -U -m evbmips -a mipsel tools
● ./build.sh -j 6 -u -U -m evbmips -a mipsel
kernel=ZYXELKX
● objdump -D netbsd
OrangePI
● Allwinnler H
● earmv7hf
● https://github.com/jaredmcneill/netbsd-arm-
docs/wiki/Allwinner
Kernel cross build for OrangePI
● cd /usr/src
● ./build.sh -j 6 -u -U -m evbarm -a earmv7hf
tools
● ./build.sh -j 6 -u -U -m evbarm -a earmv7hf
kernel=SUNXI
● https://github.com/jaredmcneill/netbsd-arm-
docs/wiki/Allwinner
● objdump -D netbsd.bin
Uboot
● Armbian
– https://github.com/ebijun/NetBSD/blob/master/sunxi/u-boot
/Makefile
– apt-get install binutils-arm-none-eabi
– apt-get install gcc-arm-none-eabi
– apt-get install swig libpython-dev
– make ${BOARD}_defconfig;make
● pkgsrc/sysutils/u-boot-orangepi-plus2e
● dd if=u-boot-sunxi-with-spl.bin of=imagefile bs=1024
seek=8 conv=sync
dmesg
● https://github.com/ebijun/NetBSD/tree/master/
dmesg
● http://dmesgd.nycbug.org/index.cgi

More Related Content

What's hot (20)

PDF
vbsd2013
krispcbsd
 
PDF
FUSE Filesystems
elliando dias
 
PDF
Linux fundamental - Chap 12 Hardware Management
Kenny (netman)
 
PDF
Life Preserver - AsiaBSDCon2014
krispcbsd
 
PDF
Porting Puppet to OpenBSD
Puppet
 
PDF
eurobsd2013
krispcbsd
 
PDF
MongoDB Replication Cluster
Anuchit Chalothorn
 
PDF
LSA2 - PostgreSQL
Marian Marinov
 
PDF
Look Into Libvirt Osier Yang
OpenCity Community
 
PDF
redis-benchmark with AMD RYZEN 1800X Intel Kaby Lake (i7-7700K) memo
Naoto MATSUMOTO
 
ODP
Qemu x86 BIOS @ https://youtu.be/F71LGSrj9cc
Sanjay Adhikari
 
ODP
BlankOn Server - Lesson Learned
Andika Triwidada
 
PDF
MongoDB Shard Cluster
Anuchit Chalothorn
 
PDF
Recipe of a linux Live CD (archived)
Bud Siddhisena
 
PDF
Lpreservereurobsd2014
krispcbsd
 
PDF
Deploying And Scaling Rails
Jonathan Weiss
 
PDF
Self 2013
krispcbsd
 
ODP
Cluster filesystems
Marian Marinov
 
ODP
Libvirt and bhyve under FreeBSD
Craig Rodrigues
 
vbsd2013
krispcbsd
 
FUSE Filesystems
elliando dias
 
Linux fundamental - Chap 12 Hardware Management
Kenny (netman)
 
Life Preserver - AsiaBSDCon2014
krispcbsd
 
Porting Puppet to OpenBSD
Puppet
 
eurobsd2013
krispcbsd
 
MongoDB Replication Cluster
Anuchit Chalothorn
 
LSA2 - PostgreSQL
Marian Marinov
 
Look Into Libvirt Osier Yang
OpenCity Community
 
redis-benchmark with AMD RYZEN 1800X Intel Kaby Lake (i7-7700K) memo
Naoto MATSUMOTO
 
Qemu x86 BIOS @ https://youtu.be/F71LGSrj9cc
Sanjay Adhikari
 
BlankOn Server - Lesson Learned
Andika Triwidada
 
MongoDB Shard Cluster
Anuchit Chalothorn
 
Recipe of a linux Live CD (archived)
Bud Siddhisena
 
Lpreservereurobsd2014
krispcbsd
 
Deploying And Scaling Rails
Jonathan Weiss
 
Self 2013
krispcbsd
 
Cluster filesystems
Marian Marinov
 
Libvirt and bhyve under FreeBSD
Craig Rodrigues
 

Similar to NetBSD workshop (20)

PDF
005 skyeye
Sherif Mousa
 
ZIP
Embedded Linux Odp
ghessler
 
PDF
Embedded Linux primer
Drew Fustini
 
PDF
Ubuntu初體驗:脫離邪惡微軟帝國吧!_150606
Eunice Lin
 
PDF
Portin g
thebalabe
 
PDF
How to-boot-linuxl-on-your-soc-boards
Liang Yan
 
PDF
Development platform virtualization using qemu
Premjith Achemveettil
 
PDF
Introduction to NetBSD kernel
Mahendra M
 
PDF
Introduction to the rapid prototyping with python and linux for embedded systems
Naohiko Shimizu
 
PDF
Im trying to run make qemu-nox In a putty terminal but it.pdf
maheshkumar12354
 
PDF
Android Variants, Hacks, Tricks and Resources presented at AnDevConII
Opersys inc.
 
PDF
Leveraging Android's Linux Heritage at AnDevCon VI
Opersys inc.
 
PDF
Build your own embedded linux distributions by yocto project
Yen-Chin Lee
 
PDF
NetBSD and Linux for Embedded Systems
Mahendra M
 
PDF
Leveraging Android's Linux Heritage at AnDevCon V
Opersys inc.
 
PDF
Android for Embedded Linux Developers
Opersys inc.
 
PDF
Hack.LU 2018 ARM IoT Firmware Emulation Workshop
Saumil Shah
 
PDF
Kernel entrance to-geek-
mao999
 
PPT
Basic Linux kernel
Morteza Nourelahi Alamdari
 
PDF
SHARE.ORG Orlando 2015
Filipe Miranda
 
005 skyeye
Sherif Mousa
 
Embedded Linux Odp
ghessler
 
Embedded Linux primer
Drew Fustini
 
Ubuntu初體驗:脫離邪惡微軟帝國吧!_150606
Eunice Lin
 
Portin g
thebalabe
 
How to-boot-linuxl-on-your-soc-boards
Liang Yan
 
Development platform virtualization using qemu
Premjith Achemveettil
 
Introduction to NetBSD kernel
Mahendra M
 
Introduction to the rapid prototyping with python and linux for embedded systems
Naohiko Shimizu
 
Im trying to run make qemu-nox In a putty terminal but it.pdf
maheshkumar12354
 
Android Variants, Hacks, Tricks and Resources presented at AnDevConII
Opersys inc.
 
Leveraging Android's Linux Heritage at AnDevCon VI
Opersys inc.
 
Build your own embedded linux distributions by yocto project
Yen-Chin Lee
 
NetBSD and Linux for Embedded Systems
Mahendra M
 
Leveraging Android's Linux Heritage at AnDevCon V
Opersys inc.
 
Android for Embedded Linux Developers
Opersys inc.
 
Hack.LU 2018 ARM IoT Firmware Emulation Workshop
Saumil Shah
 
Kernel entrance to-geek-
mao999
 
Basic Linux kernel
Morteza Nourelahi Alamdari
 
SHARE.ORG Orlando 2015
Filipe Miranda
 
Ad

Recently uploaded (20)

PPTX
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
PDF
ERP Consulting Services and Solutions by Contetra Pvt Ltd
jayjani123
 
PPTX
BB FlashBack Pro 5.61.0.4843 With Crack Free Download
cracked shares
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PPTX
Smart Doctor Appointment Booking option in odoo.pptx
AxisTechnolabs
 
PDF
Best Web development company in india 2025
Greenusys
 
PDF
AI Prompts Cheat Code prompt engineering
Avijit Kumar Roy
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PDF
Why is partnering with a SaaS development company crucial for enterprise succ...
Nextbrain Technologies
 
PDF
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PPTX
From spreadsheets and delays to real-time control
SatishKumar2651
 
PDF
intro_to_cpp_namespace_robotics_corner.pdf
MohamedSaied877003
 
PDF
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
PDF
Everything you need to know about pricing & licensing Microsoft 365 Copilot f...
Q-Advise
 
PDF
IObit Driver Booster Pro 12.4.0.585 Crack Free Download
henryc1122g
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
PDF
Salesforce Experience Cloud Consultant.pdf
VALiNTRY360
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
ERP Consulting Services and Solutions by Contetra Pvt Ltd
jayjani123
 
BB FlashBack Pro 5.61.0.4843 With Crack Free Download
cracked shares
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
Smart Doctor Appointment Booking option in odoo.pptx
AxisTechnolabs
 
Best Web development company in india 2025
Greenusys
 
AI Prompts Cheat Code prompt engineering
Avijit Kumar Roy
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
Why is partnering with a SaaS development company crucial for enterprise succ...
Nextbrain Technologies
 
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
From spreadsheets and delays to real-time control
SatishKumar2651
 
intro_to_cpp_namespace_robotics_corner.pdf
MohamedSaied877003
 
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
Everything you need to know about pricing & licensing Microsoft 365 Copilot f...
Q-Advise
 
IObit Driver Booster Pro 12.4.0.585 Crack Free Download
henryc1122g
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
Salesforce Experience Cloud Consultant.pdf
VALiNTRY360
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
Ad

NetBSD workshop

  • 2. OverView in 4hours ● Install NetBSD/amd64 on VirtualBox – Make earmv6hf cross-compiling toolchain – Make RPI kernel ● Install NetBSD/earmv6hf on RPI – Play RPI with NetBSD – Feel difference between your favorite environment ● Copy your RPI kernel to RPI – Update NetBSD-current kernel ● Boot RPI with your cross-compiled kernel
  • 3. Hardwares ● Windows 10 PC with VirtualBox ● Raspberry PI – MicroSD Card: Over 4GB class 10 – HDMI Display – USB Keyboard/mouse – USB power supply – Ethernet Cable ● Internet access via Ethernet Cable – RPI get IP address via DHCP – RPI set time via NTP
  • 4. Pre-Downloading ● NetBSD-7.1.amd64.iso ● src.tar.gz ● VirtualBox ● Rawrite32.exe ● RPI Image – 2017-07-15-netbsd-earmv6hf.img.gz or newer – http://cdn.netbsd.org/pub/NetBSD/misc/jun/raspberry-pi – http://mail-index.netbsd.org/port-arm/2017/07/13/msg004307.html – https://github.com/ebijun/NetBSD/blob/master/RPI/RPIimage/READ ME
  • 5. VirtualBox ● NetBSD on VirtualBox – Assign 2GB mem: Disk 10GB ● NetBSD-7.1-amd64.iso ● Set NetBSD source on /usr/src – cd /usr – ftp http://cdn.netbsd.org/pub/NetBSD/NetBSD-current/tar_files/src.tar .gz – tar xzvf src.tar.gz
  • 6. NetBSD RPI Image ● on Windows ● http://cdn.netbsd.org/pub/NetBSD/misc/jun/raspberry- pi/2017-07-15-earmv6hf/2017-07-15-netbsd-raspi- earmv6hf.img.gz ● http://www.netbsd.org/~martin/rawrite32/download.html ● Use rawrite32 to write RPI image to microSD ● Connect RPI: ● Boot ● Wait 15 min to resize partition
  • 7. Using RPI image ● Login: root ● startx ● medit ● mikutter ● mlterm-fb ● omxplayer & youtube-dl – pkg_add omxplayer – pkg_add youtube-dl
  • 8. PaX ● Some application exec failed on starting ● sysctl -a |grep pax – security.pax.mprotect.enabled = 1 – security.pax.mprotect.global = 1 – security.pax.mprotect.ptrace = 1 – security.pax.mprotect.debug = 1 – security.pax.segvguard.enabled = 1 – security.pax.segvguard.global = 1 ● Loooose protection: (bad manner) – sysctl -w security.pax.mprotect.enabled=0
  • 9. NTP time setting ● ntpq -p ● /etc/rc.d/ntpd stop ● /etc/rc.d/ntpdate start ● /etc/rc.d/ntpd start ● ntpq -p
  • 10. Reboot and / mount failed ● Power supply cut down failure – make file system damaged ● Reboot but / read only access ● drop on single usermode – df – fsck /dev/ld0a – reboot ● /etc/fstab – add “log,noatime” – man 5 fstab
  • 11. RPI:/boot ● Kernel – kernel.img – kernel for RPI0/1 – kernel7.img – kernel for RPI2/3 ● cmdline.txt – root=ld0a console=fb – Add -s to boot single user mode ● config.txt – http://elinux.org/RPiconfig – hdmi_group=2 – hdmi_mode=16
  • 12. /etc/rc.conf ● rc_configred=YES ● sshd=YES ● ntpd=YES ● hostname=nandemoii
  • 13. NetBSD source ● dhcpcd ● ftp http://cdn.netbsd.org/pub/NetBSD/NetBSD-current /tar_files/src.tar.gz ● tar xzvf src.tar.gz ● mv src /usr/src ● mkdir /usr/obj
  • 14. Kernel cross build for RPI2 ● cd /usr/src ● ./build.sh -u -U -m evbarm -a earmv6hf tools ● ./build.sh -u -U -m evbarm -a earmv6hf kernel=RPI2 ● Copy netbsd.bin to /boot/kernel7.img ● objdump -D netbsd.bin ● Copy netbsd.bin to RPI:/boot/kernel7.img ● Set over 2GB mem for VirtualBox,if failed
  • 15. Kernel cross build for KOBO ● cd /usr/src ● ./build.sh -j 6 -u -U -m evbarm -a earmv7hf tools ● ./build.sh -j 6 -u -U -m evbarm -a earmv7hf kernel=KOBO ● Copy netbsd.bin to /boot/kernel7.img ● objdump -D netbsd.bin
  • 16. Kernel cross build for NetWalker ● cd /usr/src ● ./build.sh -j 6 -u -U -m evbarm -a earmv7hf tools ● ./build.sh -j 6 -u -U -m evbarm -a earmv7hf kernel=NETWALKER ● Copy netbsd.bin to /boot/kernel7.img ● objdump -D netbsd.bin
  • 17. Kernel cross build for earmv4 ● cd /usr/src ● ./build.sh -j 6 -u -U -m hpcarm tools ● ./build.sh -j 6 -u -U -m hpcarm kernel=WZERO3 ● Copy netbsd to MSDOS partition ● Copy /usr/src/sys/arch/hpc/stand/binary/ARM/hpcboot.exe.uue ● Uudecode hpcboot.exe.uue ● objdump -D netbsd
  • 18. Kernel cross build for mipsel ● cd /usr/src ● ./build.sh -j 6 -u -U -m hpcmips tools ● ./build.sh -j 6 -u -U -m hpcmips kernel=GENERIC ● Copy netbsd to MSDOS partition ● Copy /usr/src/sys/arch/hpc/stand/binary/MIPS/hpcboot.exe.uue ● Uudecode hpcboot.exe.uue ● objdump -D netbsd
  • 19. Kernel cross build for sh3 ● cd /usr/src ● ./build.sh -j 6 -u -U -m hpcsh tools ● ./build.sh -j 6 -u -U -m hpcsh kernel=GENERIC ● Copy netbsd to MSDOS partition ● Copy /usr/src/sys/arch/hpc/stand/binary/SH3/hpcboot.exe.uue ● uudecode hpcboot.exe.uue ● objdump -D netbsd
  • 20. Kernel cross build for sh4 ● cd /usr/src ● ./build.sh -j 6 -u -U -m dreamcast tools ● ./build.sh -j 6 -u -U -m dreamcast kernel=GENERIC ● objdump -D netbsd
  • 21. Paths ● /etc/mk.conf ● /usr/src – obj → ln -s /usr/obj ● tooldir.NetBSD-8.99.1-amd64 – bin/nbmake-hpcmips ● destdir.hpcmips ● releasedir – sys/arch/hpcmips/ ● conf/GENERIC ● compile/obj/GENERIC/netbsd ● compile/obj/GENERIC/netbsd.bin ● compile/obj/GENERIC/netbsd.ub
  • 22. CVS update ● cd /usr/src ● script 20170810.log ● cvs update -Pad ● exit ● grep -v Updating 20170810.log |more
  • 23. MediaTek MT7620 ● ELECOM WRH-300CR ● http://pastebin.com/n05jnhjs ● NetBSD/evbmips: ● /usr/src/sys/arch/evbmips/conf ● grep MT7620 – ZYXELKX
  • 24. Kernel cross build for MT7620 ● cd /usr/src ● ./build.sh -j 6 -u -U -m evbmips -a mipsel tools ● ./build.sh -j 6 -u -U -m evbmips -a mipsel kernel=ZYXELKX ● objdump -D netbsd
  • 25. OrangePI ● Allwinnler H ● earmv7hf ● https://github.com/jaredmcneill/netbsd-arm- docs/wiki/Allwinner
  • 26. Kernel cross build for OrangePI ● cd /usr/src ● ./build.sh -j 6 -u -U -m evbarm -a earmv7hf tools ● ./build.sh -j 6 -u -U -m evbarm -a earmv7hf kernel=SUNXI ● https://github.com/jaredmcneill/netbsd-arm- docs/wiki/Allwinner ● objdump -D netbsd.bin
  • 27. Uboot ● Armbian – https://github.com/ebijun/NetBSD/blob/master/sunxi/u-boot /Makefile – apt-get install binutils-arm-none-eabi – apt-get install gcc-arm-none-eabi – apt-get install swig libpython-dev – make ${BOARD}_defconfig;make ● pkgsrc/sysutils/u-boot-orangepi-plus2e ● dd if=u-boot-sunxi-with-spl.bin of=imagefile bs=1024 seek=8 conv=sync