<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Freebsd on FreeBSD developer&#39;s notebook</title>
    <link>https://kernelnomicon.org/tags/freebsd/</link>
    <description>Recent content in Freebsd on FreeBSD developer&#39;s notebook</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 04 Jun 2020 00:03:01 +0000</lastBuildDate>
    <atom:link href="https://kernelnomicon.org/tags/freebsd/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>yubikey-agent on FreeBSD</title>
      <link>https://kernelnomicon.org/posts/yubikey-agent-on-freebsd/</link>
      <pubDate>Thu, 04 Jun 2020 00:03:01 +0000</pubDate>
      <guid>https://kernelnomicon.org/posts/yubikey-agent-on-freebsd/</guid>
      <description>&lt;p&gt;Some time ago &lt;a href=&#34;https://filippo.io/&#34;&gt;Filippo Valsorda&lt;/a&gt; wrote &lt;a href=&#34;https://github.com/FiloSottile/yubikey-agent&#34;&gt;yubikey-agent&lt;/a&gt;, seamless SSH agent for YubiKeys. I really like YubiKeys and worked on the FreeBSD support for U2F in Chromium and pyu2f, getting yubikey-agent ported looked like an interesting project. It took some hacking to make it work but overall it wasn&amp;rsquo;t hard. Following is the roadmap on how to get it set up on FreeBSD. The actual details depend on your system (as you will see)&lt;/p&gt;</description>
    </item>
    <item>
      <title>Netbooting FreeBSD with PXE/UEFI</title>
      <link>https://kernelnomicon.org/posts/netbooting-freebsd-with-pxeuefi/</link>
      <pubDate>Thu, 29 Sep 2016 16:11:10 +0000</pubDate>
      <guid>https://kernelnomicon.org/posts/netbooting-freebsd-with-pxeuefi/</guid>
      <description>&lt;p&gt;Dear Future Me,&lt;/p&gt;
&lt;p&gt;I guess you came here googling for &amp;ldquo;FreeBSD PXE UEFI&amp;rdquo; trying to find out how to netboot your x86 dev box. Or arm64 box. Who knows what you&amp;rsquo;re hacking on in the future. To do that you need follow these simple steps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Put loader.efi to tftpboot dir&lt;/li&gt;
&lt;li&gt;Configure dhcpd along these lines:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-gdscript3&#34; data-lang=&#34;gdscript3&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;host amd64 {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        hardware ethernet  b8:ae:ed:&lt;span style=&#34;color:#ae81ff&#34;&gt;77&lt;/span&gt;:&lt;span style=&#34;color:#ae81ff&#34;&gt;88&lt;/span&gt;:&lt;span style=&#34;color:#ae81ff&#34;&gt;99&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        filename &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;loader.efi&amp;#34;&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        option root&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;path &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/src/FreeBSD/tftproot/amd64&amp;#34;&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        fixed&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;address &lt;span style=&#34;color:#ae81ff&#34;&gt;192.168&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;10.102&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        option routers &lt;span style=&#34;color:#ae81ff&#34;&gt;192.168&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;10.1&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;Make sure root-path is in /etc/exports.&lt;/li&gt;
&lt;li&gt;If you use MINIMAL-derived config add your NIC driver to /boot/loader.conf:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-gdscript3&#34; data-lang=&#34;gdscript3&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;if_re_load&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;YES&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That&amp;rsquo;s pretty much it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>VirtualBox Shared Folders: progress report</title>
      <link>https://kernelnomicon.org/posts/virtualbox-shared-folders-progress-report/</link>
      <pubDate>Mon, 12 Sep 2016 15:59:05 +0000</pubDate>
      <guid>https://kernelnomicon.org/posts/virtualbox-shared-folders-progress-report/</guid>
      <description>&lt;p&gt;I spent Labor Day weekend laboring on VBox shared folders support for FreeBSD. It&amp;rsquo;s been some time since I worked on it last time so I had to refresh my memory first. Things have moved on since then - VBox in ports was updated to version 5, but fortunately Li-Wen synced up &lt;a href=&#34;https://github.com/lwhsu/freebsd-vboxfs&#34;&gt;freebsd-vboxfs&lt;/a&gt; repo to the latest version. After three days of laid-back hacking I am glad to announce that following VOPs are kind of implemented (in no particular order): lookup, access, readdir, read, getattr, readlink, remove, rmdir, symlink, close, create, open, write. &amp;ldquo;Kind of implemented&amp;rdquo; means that I was able to mount directory, traverse it, read file, calculate md5 sums and compare with host&amp;rsquo;s md5sum, create/remove directories, unzip zip file, etc but I doubt it would survive stress-test. Locking is all wrong at the moment and read/write VOPs allocate buffers for every operation.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Jetson TK1, FreeBSD, and SSD</title>
      <link>https://kernelnomicon.org/posts/jetson-tk1-freebsd-and-ssd/</link>
      <pubDate>Fri, 19 Aug 2016 13:30:39 +0000</pubDate>
      <guid>https://kernelnomicon.org/posts/jetson-tk1-freebsd-and-ssd/</guid>
      <description>&lt;p&gt;Looks like my attempt to cheap out on SSD for TK1 has backfired. I went for the cheapest SSD available in local store (Toshiba Q300) but when I tried to checkout FreeBSD sources to the drive I got bunch of WRITE_FPDMA_QUEUED timeouts and system locked up. The same thing happened when I tried to perform checkout on Linux. The drive itself was OK, it survived &amp;ldquo;svn co &amp;hellip;/head&amp;rdquo; and dd when connected using USB-to-SATA adapter.&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeBSD on Jetson TK1</title>
      <link>https://kernelnomicon.org/posts/freebsd-on-jetson-tk1/</link>
      <pubDate>Tue, 28 Jun 2016 13:33:41 +0000</pubDate>
      <guid>https://kernelnomicon.org/posts/freebsd-on-jetson-tk1/</guid>
      <description>&lt;p&gt;I finally got around to BSDify my Jetson TK1. Here is short summary of what is involved. And to save you some scrolling here are artifacts obtained from whole ordeal: &lt;a href=&#34;https://people.freebsd.org/~gonzo/arm/jetson-tk1/&#34;&gt;https://people.freebsd.org/~gonzo/arm/jetson-tk1/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://kernelnomicon.org/uploads/2016/06/IMG_2064-e1467143789207.jpg&#34;&gt;&lt;img alt=&#34;Jetson TK1&#34; loading=&#34;lazy&#34; src=&#34;https://kernelnomicon.org/uploads/2016/06/IMG_2064-e1467143789207-768x1024.jpg&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;u-boot&#34;&gt;U-Boot&lt;/h2&gt;
&lt;p&gt;First of all - my TK1 didn&amp;rsquo;t have U-Boot. Type of bootloader depends on the version of Linux4Tegra TK1 comes with. Mine had L4T R19, with some kind of &amp;ldquo;not u-boot&amp;rdquo; bootloader. My first attempt was to use tegrarcm tool, it uses libusb, so it&amp;rsquo;s possible to build it on FreeBSD with some elbow grease, but once I tried to run it - it gave me cryptic errors and USB is not my strong skill so I took low road and installed Ubuntu VM. For what is&amp;rsquo;s worth I got the same kind of error on Ubuntu.&lt;/p&gt;</description>
    </item>
    <item>
      <title>bsdfb platform plugin merged to Qt dev branch</title>
      <link>https://kernelnomicon.org/posts/bsdfb-platform-plugin-merged-to-qt-dev-branch/</link>
      <pubDate>Mon, 13 Jun 2016 17:28:22 +0000</pubDate>
      <guid>https://kernelnomicon.org/posts/bsdfb-platform-plugin-merged-to-qt-dev-branch/</guid>
      <description>&lt;p&gt;Few weeks back Ralf Nolden, who is *BSD champion in Qt community, urged me to clean-up and submit my Qt5-related projects to upstream and &lt;a href=&#34;https://github.com/gonzoua/qt-platform-scfb&#34;&gt;scfb platform plugin&lt;/a&gt; was picked as a test dummy. It took  &lt;a href=&#34;https://codereview.qt-project.org/#/c/159316/&#34;&gt;12 iterations&lt;/a&gt; to get things right, along the way plugin was renamed to bsdfb, but eventually patch has been &lt;a href=&#34;https://github.com/qtproject/qtbase/commit/1542d8881fc5ccbc5918cd4acbe4091ebbd24508&#34;&gt;merged&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Next two candidates are &lt;a href=&#34;https://github.com/gonzoua/qt5-bsd-input&#34;&gt;bsdkeyboard and bsdsysmouse input plugins&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>VirtualBox Shared Folders: One VOP at a Time</title>
      <link>https://kernelnomicon.org/posts/virtualbox-shared-folders-one-vop-at-a-time/</link>
      <pubDate>Sun, 12 Jun 2016 18:31:32 +0000</pubDate>
      <guid>https://kernelnomicon.org/posts/virtualbox-shared-folders-one-vop-at-a-time/</guid>
      <description>&lt;p&gt;Two months ago I tried to setup dev environment using FreeBSD Vagrant box just to find out that FreeBSD does not support VirtualBox shared folders. After some googling I found Li-Wen Hsu&amp;rsquo;s github &lt;a href=&#34;https://github.com/lwhsu/freebsd-vboxfs&#34;&gt;repository&lt;/a&gt; with some work in this area. Li-Wen and Will Andrews has already done major chunk of work: patches to VirtualBox build system, skeleton VFS driver, API to talk to hypervisor but hit a block with some implementation details in VirtualBox&amp;rsquo;s virtual-memory compatibility layer. Will provided &lt;a href=&#34;https://github.com/lwhsu/freebsd-vboxfs/blob/master/vboxvfs/vboxvfs_prov.c#L131&#34;&gt;very comprehensive analysis&lt;/a&gt; of the problem.&lt;/p&gt;</description>
    </item>
    <item>
      <title>gpiokeys support committed</title>
      <link>https://kernelnomicon.org/posts/gpiokeys-support-committed/</link>
      <pubDate>Fri, 20 May 2016 17:10:36 +0000</pubDate>
      <guid>https://kernelnomicon.org/posts/gpiokeys-support-committed/</guid>
      <description>&lt;p&gt;To those who do not track FreeBSD commit messages: I committed gpiokeys driver to -CURRENT as &lt;a href=&#34;https://svnweb.freebsd.org/base?view=revision&amp;amp;revision=299475&#34;&gt;r299475&lt;/a&gt;. The driver is not enabled in any of the kernels but can be built as a loadable module.&lt;/p&gt;
&lt;p&gt;For now it stays disconnected from main build because it breaks some MIPS kernel configs. Configs in question include &amp;ldquo;modules/gpio&amp;rdquo; as part of MODULES_OVERRIDE variable and since gpiokeys can be built only with FDT-enabled kernel the build fails.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Qt5 for FreeBSD/Pi</title>
      <link>https://kernelnomicon.org/posts/qt5-for-freebsdpi/</link>
      <pubDate>Wed, 14 Jan 2015 20:26:55 +0000</pubDate>
      <guid>https://kernelnomicon.org/posts/qt5-for-freebsdpi/</guid>
      <description>&lt;p&gt;Build SD card image using crochet-freebsd with &lt;code&gt;option VideoCore&lt;/code&gt; enabled. Mount either SD card itself of image to build host&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mount /dev/mmcsd0s2a /pi
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Checkout Qt5 sources and patch them&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd /src
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone git://gitorious.org/qt/qt5.git qt5
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd qt5
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git checkout 5.4.0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;MODULES=qtbase,qtdeclarative,qtgraphicaleffects,qtimageformats,qtquick1,qtquickcontrols,qtscript,qtsvg,qtxmlpatterns
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;./init-repository --module-subset=$MODULES
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;fetch -q -o - http://people.freebsd.org/~gonzo/arm/rpi/qt5-freebsd-pi.diff | patch -p1
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Configure, build and install Qt5 to SD card&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;./configure -platform unsupported/freebsd-clang -no-openssl -opengl es2 -device freebsd-rasp-pi-clang -device-option CROSS_COMPILE=/usr/armv6-freebsd/usr/bin/ -sysroot /pi/ -no-gcc-sysroot -opensource -confirm-license -optimized-qmake -release -prefix /usr/local/Qt5 -no-pch -nomake tests -nomake examples -plugin-sql-sqlite
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;gmake -j `sysctl -n hw.ncpu`
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo gmake install
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You need BSD-specific plugins to enable mouse and keyboard input in EGLFS mode&lt;/p&gt;</description>
    </item>
    <item>
      <title>Audio on Raspberry Pi</title>
      <link>https://kernelnomicon.org/posts/audio-on-raspberry-pi/</link>
      <pubDate>Fri, 09 Jan 2015 23:25:08 +0000</pubDate>
      <guid>https://kernelnomicon.org/posts/audio-on-raspberry-pi/</guid>
      <description>&lt;p&gt;With stable VCHIQ driver next obvious target was to add VCHIQ-based audio support. So let me introduce to you: vchiq_audio, first take. It&amp;rsquo;s part of vchiq-freebsd repo so if you use Crochet to build SD card image just enable &lt;code&gt;option VideoCore&lt;/code&gt; in config file and module will be automatically included.&lt;/p&gt;
&lt;p&gt;From shell run &lt;code&gt;kldload vchiq_audio&lt;/code&gt; and you&amp;rsquo;re good to do. I believe that audio output is picked up automatically by VideoCore so if you have HDMI connected it&amp;rsquo;s probably going to be HDMI. I do not have device to confirm this. Adding knob to control audio output (auto, headphones, HDMI) is on my ToDo list.&lt;/p&gt;</description>
    </item>
    <item>
      <title>RaspberryPi, FreeBSD and ioquake3</title>
      <link>https://kernelnomicon.org/posts/raspberrypi-freebsd-and-ioquake3/</link>
      <pubDate>Wed, 07 Jan 2015 15:37:55 +0000</pubDate>
      <guid>https://kernelnomicon.org/posts/raspberrypi-freebsd-and-ioquake3/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: &lt;a href=&#34;http://kernelnomicon.org/?p=455&#34;&gt;support for keyboard/mouse&lt;/a&gt; has been added&lt;/p&gt;
&lt;p&gt;After New Year I got back to hacking the VCHIQ stuff (thanks to adrian@ for prodding). Since last time I touched NetBSD folks got it merged to main tree, syncing with latest upstream code and fixing some stupid bugs in my codebase. So I partially merged things back, spent some time on fixing more bugs introduced by yours truly, merged userland bits from latest Broadcom&amp;rsquo;s bits (and fixing some bugs introduced by them). And as a result VCHIQ got stable enough to run ioquake3d on raspberry pi. Well, you can&amp;rsquo;t play it because there is no sound and no mouse support and keyboard support is severely crippled but you can navigate menus and watch demoes.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
