SlideShare a Scribd company logo
1 of 28
Download to read offline
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

Linux fundamental - Chap 12 Hardware Management
Linux fundamental - Chap 12 Hardware ManagementLinux fundamental - Chap 12 Hardware Management
Linux fundamental - Chap 12 Hardware ManagementKenny (netman)
 
Life Preserver - AsiaBSDCon2014
Life Preserver - AsiaBSDCon2014Life Preserver - AsiaBSDCon2014
Life Preserver - AsiaBSDCon2014krispcbsd
 
Porting Puppet to OpenBSD
Porting Puppet to OpenBSD Porting Puppet to OpenBSD
Porting Puppet to OpenBSD Puppet
 
redis-benchmark with AMD RYZEN 1800X Intel Kaby Lake (i7-7700K) memo
redis-benchmark with AMD RYZEN 1800X Intel Kaby Lake (i7-7700K) memoredis-benchmark with AMD RYZEN 1800X Intel Kaby Lake (i7-7700K) memo
redis-benchmark with AMD RYZEN 1800X Intel Kaby Lake (i7-7700K) memoNaoto MATSUMOTO
 
Qemu x86 BIOS @ https://youtu.be/F71LGSrj9cc
Qemu x86 BIOS @ https://youtu.be/F71LGSrj9ccQemu x86 BIOS @ https://youtu.be/F71LGSrj9cc
Qemu x86 BIOS @ https://youtu.be/F71LGSrj9ccSanjay Adhikari
 
BlankOn Server - Lesson Learned
BlankOn Server - Lesson LearnedBlankOn Server - Lesson Learned
BlankOn Server - Lesson LearnedAndika Triwidada
 
Recipe of a linux Live CD (archived)
Recipe of a linux Live CD (archived)Recipe of a linux Live CD (archived)
Recipe of a linux Live CD (archived)Bud Siddhisena
 
Lpreservereurobsd2014
Lpreservereurobsd2014Lpreservereurobsd2014
Lpreservereurobsd2014krispcbsd
 
Deploying And Scaling Rails
Deploying And Scaling RailsDeploying And Scaling Rails
Deploying And Scaling RailsJonathan Weiss
 
Libvirt and bhyve under FreeBSD
Libvirt and bhyve under FreeBSDLibvirt and bhyve under FreeBSD
Libvirt and bhyve under FreeBSDCraig Rodrigues
 

What's hot (20)

vbsd2013
vbsd2013vbsd2013
vbsd2013
 
FUSE Filesystems
FUSE FilesystemsFUSE Filesystems
FUSE Filesystems
 
Linux fundamental - Chap 12 Hardware Management
Linux fundamental - Chap 12 Hardware ManagementLinux fundamental - Chap 12 Hardware Management
Linux fundamental - Chap 12 Hardware Management
 
Linux
LinuxLinux
Linux
 
Life Preserver - AsiaBSDCon2014
Life Preserver - AsiaBSDCon2014Life Preserver - AsiaBSDCon2014
Life Preserver - AsiaBSDCon2014
 
Porting Puppet to OpenBSD
Porting Puppet to OpenBSD Porting Puppet to OpenBSD
Porting Puppet to OpenBSD
 
eurobsd2013
eurobsd2013eurobsd2013
eurobsd2013
 
MongoDB Replication Cluster
MongoDB Replication ClusterMongoDB Replication Cluster
MongoDB Replication Cluster
 
LSA2 - PostgreSQL
LSA2 - PostgreSQLLSA2 - PostgreSQL
LSA2 - PostgreSQL
 
Look Into Libvirt Osier Yang
Look Into Libvirt Osier YangLook Into Libvirt Osier Yang
Look Into Libvirt Osier Yang
 
redis-benchmark with AMD RYZEN 1800X Intel Kaby Lake (i7-7700K) memo
redis-benchmark with AMD RYZEN 1800X Intel Kaby Lake (i7-7700K) memoredis-benchmark with AMD RYZEN 1800X Intel Kaby Lake (i7-7700K) memo
redis-benchmark with AMD RYZEN 1800X Intel Kaby Lake (i7-7700K) memo
 
Qemu x86 BIOS @ https://youtu.be/F71LGSrj9cc
Qemu x86 BIOS @ https://youtu.be/F71LGSrj9ccQemu x86 BIOS @ https://youtu.be/F71LGSrj9cc
Qemu x86 BIOS @ https://youtu.be/F71LGSrj9cc
 
BlankOn Server - Lesson Learned
BlankOn Server - Lesson LearnedBlankOn Server - Lesson Learned
BlankOn Server - Lesson Learned
 
MongoDB Shard Cluster
MongoDB Shard ClusterMongoDB Shard Cluster
MongoDB Shard Cluster
 
Recipe of a linux Live CD (archived)
Recipe of a linux Live CD (archived)Recipe of a linux Live CD (archived)
Recipe of a linux Live CD (archived)
 
Lpreservereurobsd2014
Lpreservereurobsd2014Lpreservereurobsd2014
Lpreservereurobsd2014
 
Deploying And Scaling Rails
Deploying And Scaling RailsDeploying And Scaling Rails
Deploying And Scaling Rails
 
Self 2013
Self 2013Self 2013
Self 2013
 
Cluster filesystems
Cluster filesystemsCluster filesystems
Cluster filesystems
 
Libvirt and bhyve under FreeBSD
Libvirt and bhyve under FreeBSDLibvirt and bhyve under FreeBSD
Libvirt and bhyve under FreeBSD
 

Similar to NetBSD workshop

The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012Philip Polstra
 
Android for Embedded Linux Developers
Android for Embedded Linux DevelopersAndroid for Embedded Linux Developers
Android for Embedded Linux DevelopersOpersys inc.
 
Qt native built for raspberry zero
Qt native built for  raspberry zeroQt native built for  raspberry zero
Qt native built for raspberry zeroSoheilSabzevari2
 
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013dotCloud
 
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013Docker, Inc.
 
Joomla on Raspberry Pi using Nginx - Nederlandse Linux Gebruikers Group novem...
Joomla on Raspberry Pi using Nginx - Nederlandse Linux Gebruikers Group novem...Joomla on Raspberry Pi using Nginx - Nederlandse Linux Gebruikers Group novem...
Joomla on Raspberry Pi using Nginx - Nederlandse Linux Gebruikers Group novem...Peter Martin
 
Bundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMBundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMAlexander Shopov
 
Qemu - Raspberry | while42 Singapore #2
Qemu - Raspberry | while42 Singapore #2Qemu - Raspberry | while42 Singapore #2
Qemu - Raspberry | while42 Singapore #2While42
 
qemu + gdb: The efficient way to understand/debug Linux kernel code/data stru...
qemu + gdb: The efficient way to understand/debug Linux kernel code/data stru...qemu + gdb: The efficient way to understand/debug Linux kernel code/data stru...
qemu + gdb: The efficient way to understand/debug Linux kernel code/data stru...Adrian Huang
 
Installing nagios core_from_source
Installing nagios core_from_sourceInstalling nagios core_from_source
Installing nagios core_from_sourcelaonap166
 
Bsdtw17: lightning talks/wip sessions
Bsdtw17: lightning talks/wip sessionsBsdtw17: lightning talks/wip sessions
Bsdtw17: lightning talks/wip sessionsScott Tsai
 
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Opersys inc.
 
openbsd-as-nas.pdf
openbsd-as-nas.pdfopenbsd-as-nas.pdf
openbsd-as-nas.pdfssuserabc40f
 
High Availability != High-cost
High Availability != High-costHigh Availability != High-cost
High Availability != High-costnormanmaurer
 
Hacking and Forensics on the Go - 44CON 2012
Hacking and Forensics on the Go - 44CON 2012Hacking and Forensics on the Go - 44CON 2012
Hacking and Forensics on the Go - 44CON 201244CON
 

Similar to NetBSD workshop (20)

The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012
 
An Introduction To Linux
An Introduction To LinuxAn Introduction To Linux
An Introduction To Linux
 
Android for Embedded Linux Developers
Android for Embedded Linux DevelopersAndroid for Embedded Linux Developers
Android for Embedded Linux Developers
 
Qt native built for raspberry zero
Qt native built for  raspberry zeroQt native built for  raspberry zero
Qt native built for raspberry zero
 
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
 
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
 
Joomla on Raspberry Pi using Nginx - Nederlandse Linux Gebruikers Group novem...
Joomla on Raspberry Pi using Nginx - Nederlandse Linux Gebruikers Group novem...Joomla on Raspberry Pi using Nginx - Nederlandse Linux Gebruikers Group novem...
Joomla on Raspberry Pi using Nginx - Nederlandse Linux Gebruikers Group novem...
 
Bundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMBundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPM
 
Qemu - Raspberry | while42 Singapore #2
Qemu - Raspberry | while42 Singapore #2Qemu - Raspberry | while42 Singapore #2
Qemu - Raspberry | while42 Singapore #2
 
qemu + gdb: The efficient way to understand/debug Linux kernel code/data stru...
qemu + gdb: The efficient way to understand/debug Linux kernel code/data stru...qemu + gdb: The efficient way to understand/debug Linux kernel code/data stru...
qemu + gdb: The efficient way to understand/debug Linux kernel code/data stru...
 
Installing nagios core_from_source
Installing nagios core_from_sourceInstalling nagios core_from_source
Installing nagios core_from_source
 
Bsdtw17: lightning talks/wip sessions
Bsdtw17: lightning talks/wip sessionsBsdtw17: lightning talks/wip sessions
Bsdtw17: lightning talks/wip sessions
 
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
 
RamDisk
RamDiskRamDisk
RamDisk
 
openbsd-as-nas.pdf
openbsd-as-nas.pdfopenbsd-as-nas.pdf
openbsd-as-nas.pdf
 
testing-nfs
testing-nfstesting-nfs
testing-nfs
 
High Availability != High-cost
High Availability != High-costHigh Availability != High-cost
High Availability != High-cost
 
Adhocr T-dose 2012
Adhocr T-dose 2012Adhocr T-dose 2012
Adhocr T-dose 2012
 
Polstra 44con2012
Polstra 44con2012Polstra 44con2012
Polstra 44con2012
 
Hacking and Forensics on the Go - 44CON 2012
Hacking and Forensics on the Go - 44CON 2012Hacking and Forensics on the Go - 44CON 2012
Hacking and Forensics on the Go - 44CON 2012
 

Recently uploaded

Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 

Recently uploaded (20)

Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 

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