# FreeBSD Desktop for PineBook Pro



## SleepWalker (Jan 2, 2021)

Hello!

This forum thread is about FreeBSD on the Pinebook Pro.

I was able to build a custom FreeBSD image running on the Pinebook Pro.
Moreover, in two versions Minimal and Desktop XFCE.

Verified that it boots from eMMC.
Booting from SD card is not guaranteed.

Here are the links to download the boot images.

FreeBSD-aarch64-13.0-RELEASE-Pinebook-Pro-20210420.img.xz

If you are unable to start with an SD card, you are very
would like to have FreeBSD DESKTOP on Pinebook Pro you can.

Option 1.
Block eMMC flash using switch 24  and launch will happen with SD card.

Option 2.
And using any bootable Linux SD card.
Burn FreeBSD image directly to eMMC flash.

Good luck everyone.


----------



## philkrylov (Jan 5, 2021)

Hi. Not sure how helpful is that, but:
1. The download speed was so-so but OK. The first image was unavailable for some time today, I managed to wget it later.
2. The card was a 8 GB Hama, class 10. The 13.0 image did not even fit on the card, but I still tried to boot it.
The PineBook Pro never booted with either image, the only reaction is blinking green LED.
Thanks a lot for your work!


----------



## SleepWalker (Jan 5, 2021)

philkrylov said:


> Hi. Not sure how helpful is that, but:
> 1. The download speed was so-so but OK. The first image was unavailable for some time today, I managed to wget it later.
> 2. The card was a 8 GB Hama, class 10. The 13.0 image did not even fit on the card, but I still tried to boot it.
> The PineBook Pro never booted with either image, the only reaction is blinking green LED.
> Thanks a lot for your work!


Thanks for your feedback.
I really want to understand why only me can do it.

The most important thing for a successful install of my image is what OS you have on the eMMC.
Because first U-boot starts from eMMC and everything depends on it.

If you lock the  eMMC switch inside the Pinebook Pro, the SD boot is successful.
Therefore, be sure to report what image you have installed on the eMMC.
I can install it and determine why my image is not loading.


----------



## Samuel Venable (Jan 5, 2021)

My microsd slot stopped working shortly after getting my pbp.

That said, should it work by any chance on the EMMC directly?


----------



## SleepWalker (Jan 6, 2021)

Samuel Venable said:


> My microsd slot stopped working shortly after getting my pbp.
> 
> That said, should it work by any chance on the EMMC directly?


For this you need to use USB Adapter For eMMC Module.









						USB Adapter for eMMC Module - PINE STORE
					

USB adapter for eMMC Module




					pine64.com


----------



## Samuel Venable (Jan 6, 2021)

I have one and have been using it, my question was whether it would work with the EMMC, or only the microsd.

Also are you saying i'd need to boot from the USB adapter, or can i replace the internal EMMC? (i'd prefer the latter, but whatever works im good with)


----------



## SleepWalker (Jan 8, 2021)

Samuel Venable said:


> I have one and have been using it, my question was whether it would work with the EMMC, or only the microsd.
> 
> Also are you saying i'd need to boot from the USB adapter, or can i replace the internal EMMC? (i'd prefer the latter, but whatever works im good with)


This adapter is only for eMMC!!!


----------



## SleepWalker (Jan 10, 2021)

Samuel Venable said:


> I'm aware of that, and amidst you not understanding my question for the second time of trying to rephrase my question I guess the only way I can know whether replacing the internal emmc works with this written to it by spending a good half hour on doing that, which I was trying to avoid and why I asked if your image worked on emmc and not just the microsd. I've tried installing NetBSD with it written to emmc and it had errors, I assume because it was designed for microsd. I wasnt sure if this would do the same thin.


Yes my image works great on eMMC


----------



## pfarrelly (Jan 10, 2021)

I flashed your FreeBSD-CURRENT image on the eMMC of my Pinebook Pro, and it is AWESOME! VERY well done, EXCELLENT work!

*For those of you who are interested in flashing the eMMC without using a USB<->eMMC adapter:* I used gnome-disk-utility on Manjaro SD Card to "Restore" the FreeBSD image to the eMMC.

*What was the download speed of the image?*
For a few hours today the download site was inaccessible, when it did download it was ~500kb/s or less.

UPDATE: Downloading the most recent image from your site was very quick, 4mb/sec+

*How long did the first loading take?*
Not long at all, faster than Manjaro loads up on it's first boot.

*What does not work?
20210101*:
Networking. I tried WiFi and using a USB-C <-> Ethernet adapter and neither one of them seemed to work, the only network device that shows up is lo0 (Loopback)

Shutdown - poweroff in terminal as root causes the system to hang after "Uptime:" message and does not actually power off

*20210110*:

No GUI, also shutdown + network problems as above


*What works?*
Everything else seems to work perfectly. It even boots to a nice XFCE desktop.


Apart from the networking this seems pretty much ready for prime time! Very well done and congratulations SleepWalker, keep up the excellent work and I'll keep doing what i can to test it for you!


----------



## SleepWalker (Jan 11, 2021)

pfarrelly said:


> I flashed your FreeBSD-CURRENT image on the eMMC of my Pinebook Pro, and it is AWESOME! VERY well done, EXCELLENT work!
> 
> *For those of you who are interested in flashing the eMMC without using a USB<->eMMC adapter:*





pfarrelly said:


> I used gnome-disk-utility on Manjaro SD Card to "Restore" the FreeBSD image to the eMMC.


Yes, this is a simple and straightforward way.
But those who know how to use the dd command can use it, for example.


> `xzcat -T0 FreeBSD-aarch64-13.0-DESKTOP-Pinebook-Pro-20210111.img.xz | dd of=/path/to/emmc bs=128m status=progress`





pfarrelly said:


> *What does not work?
> 20210101*:
> Networking. I tried WiFi and using a USB-C <-> Ethernet adapter and neither one of them seemed to work, the only network device that shows up is lo0 (Loopback)
> Shutdown - poweroff in terminal as root causes the system to hang after "Uptime:" message and does not actually power off
> ...



Built-in WiFi modules don't work on FreeBSD for ARM SBCs yet, but you can use WiFi USB stick.
That's what I do.
My image has a template for this case.
The /etc/rc.conf file contains these lines.

# USB WiFi
# wlans_rsu0 = "wlan0"
# wlans_rtwn0 = "wlan0"
# ifconfig_wlan0 = "WPA DHCP"

You need to see how your WiFi USB stick is determined
`sysctl -n net.wlan.devices`

My WiFi USB stick is detected in the system as rsu0, so I remove the comment symbol #, and do so.

# USB WiFi
wlans_rsu0 = "wlan0"
ifconfig_wlan0 = "WPA DHCP"

After that I add the description of my access point and restart the network.

`wpa_passphrase ssid passphrase >> /etc/wpa_supplicant.conf`
`service netif restart`
`ping google.com`

You can read about it here https://wiki.freebsd.org/WiFi/FAQ

PS: FreeBSD DESKTOP image 20210111 supports audio.
Personal thanks to gonzo@freebsd.org for the sound.
https://github.com/gonzoua/freebsd-src


Good luck everyone.


----------



## pfarrelly (Jan 12, 2021)

*20210111*
No Internal WiFi - As stated above, built-in WIFI modules not working yet in FreeBSD.  Use a USB WiFi adapter.
Shutdown- Options for Shutdown/Reboot in GUI are not selectable, reboot works from console but poweroff from a console causes the system to hang.
Boot Logo - Previous versions would show FreeBSD logo on boot, now not displaying before startup log messages
USB-C - the Pine dock with ethernet/HDMI is not detected, and neither the ethernet/HDMI/additional USBs work. Every USB-C device i tried not detected, no dice.

Do not let this list discourage you from using this build! If you're willing to work with an external wirelesss card then this is basically good enough to use as a daily driver!  Keep up the excellent work SleepWalker!


----------



## jsm (Jan 12, 2021)

I also own the Pinebook Pro. I copied the image https://personalbsd.org/images/FreeBSD-aarch64-13.0-DESKTOP-Pinebook-Pro-20210111.img
to sd-card with dd. I opened the pinebook and locked emmc with switch 24 here https://wiki.pine64.org/wiki/Pinebook_Pro#Mainboard_Switches_and_Buttons
I do not see anything but a red LED that later turns off, no video output on the panel. Any hints? And thanks for your work!


----------



## jsm (Jan 12, 2021)

I tried from an usb memory stick instead, my sd-card was dying.
https://pastebin.com/raw/PVh29GvN it ends with link_elf: symbol backlight_get_info_desc undefined.


----------



## pfarrelly (Jan 12, 2021)

with the Pinebook Pro the SD has boot priority over the eMMC so if you're trying to boot an operating system from SD it is not necessary to use switch 24 to disable the eMMC. Boot order for PBP is SD, USB, then eMMC.  I would try either a new SD card and/or possibly try using something like Etcher to write the image to the SD and see if that works.  I have not tried booting from USB so i'm not sure if that works, but from a cursory glance your boot messages seem totally fine, nothing stands out to me as being particularly wrong.

The PBP is "finnicky" on boot, sometimes it fails to load the proper CPU firmware and causes the boot process to fail or hang. If this happens i just power off the machine and then turn it back on and keep doing that until eventually it "catches". This isn't a FreeBSD problem, it seems to happen with every PBP OS (something to do with uboot maybe?)

If your PBP goes through the boot and stops at that place could it be that it's hanging while trying to start X+XFCE?  Can you ctrl-alt-f2 into a console session after it gets to link_elf: symbol backlight_get_info_desc undefined ? (username admin / password admin)


----------



## jsm (Jan 12, 2021)

I booted the FreeBSD-13.0-CURRENT-arm64-aarch64-ROCKPRO64-20210107-f2b794e1e90-255641.img.xz
from usb following the README of u-boot-pinebookpro-2020.10_1. emmc was enabled and has manjaro.
the dmesg.boot from this experiment is here https://pastebin.com/raw/KQC963sz


----------



## SleepWalker (Jan 13, 2021)

pfarrelly said:


> *20210111*
> No Internal WiFi - As stated above, built-in WIFI modules not working yet in FreeBSD.  Use a USB WiFi adapter.
> Shutdown- Options for Shutdown/Reboot in GUI are not selectable, reboot works from console but poweroff from a console causes the system to hang.


Software power off does not work yet. Will be corrected in the next image. Then you can add it to XFCE.


pfarrelly said:


> Boot Logo - Previous versions would show FreeBSD logo on boot, now not displaying before startup log messages


Yes, this is my mistake, I forgot to insert the file with the FreeBSD logo.
You can try to fix it. Start the console and run the commands.
`su -
mount /boot/efi
cp /usr/local/share/u-boot/u-boot-pinebook-pro/splash.bmp /boot/efi
sync
umount /boot/efi
reboot`


pfarrelly said:


> USB-C - the Pine dock with ethernet/HDMI is not detected, and neither the ethernet/HDMI/additional USBs work. Every USB-C device i tried not detected, no dice.


I don't have PINEBOOK Pro USB-C Docking Deck yet, I just ordered it yesterday 
I will test another Docking Deck.
I have practically no USB-C devices yet, I know that USD-C SSD does not work. This is true.


pfarrelly said:


> Do not let this list discourage you from using this build! If you're willing to work with an external wirelesss card then this is basically good enough to use as a daily driver!  Keep up the excellent work SleepWalker!


Of course I will continue to publish my custom builds because I use Pinebook Pro myself.
And I want to get the maximum hardware support.

But I can only make them better with your help.

I really want to have a way not only of what does not work, a list of what you have checked and it works.

Thanks for the feedback, you can ask me stupid questions through the system of private messages. 

PS:
A *huge* request to everyone who publishes posts here -
"Please format your posts so that it is convenient for visitors to read them, use the preview button before sending, you can edit already published posts using the Edit button"


----------



## SleepWalker (Jan 13, 2021)

jsm said:


> I tried from an usb memory stick instead, my sd-card was dying.
> https://pastebin.com/raw/PVh29GvN it ends with link_elf: symbol backlight_get_info_desc undefined.


I looked at your boot log. And where is the log of u-boot itself.
I understand you have a console cable!
Submit a complete log, with messages u-boot.
If you have blocked eMMC and did not insert sd card, where did u-boot from USB start from?
Or do you have u-boot in SPI flash?

It is not written here that USB is generally interrogated when u-boot starts.
So it is not my u-boot that works for you, which one and where does it start from?

The first thing my u-boot does is draw the FreeBSD logo on the screen, if there is no logo, it’s not my u-boot !!!


----------



## SleepWalker (Jan 13, 2021)

I have successfully tested the HP USB-C Universal Dock with my Pinebook Pro. 

https://support.hp.com/us-en/document/c05639574 

Here is the boot log https://dmesgd.nycbug.org/index.cgi?do=view&id=5877 

Keyboard - works 
Mouse - works 
Network - works 
USB flash drive - works 
USB audio - determined if there were no headphones 

The impression is excellent.


----------



## jsm (Jan 13, 2021)

SleepWalker said:


> I looked at your boot log. And where is the log of u-boot itself.
> I understand you have a console cable!
> Submit a complete log, with messages u-boot.
> If you have blocked eMMC and did not insert sd card, where did u-boot from USB start from?
> ...


Thanks. unfortunately I do not have an consolecable. I removed the usb stick and read /var/run/dmesg.boot
I might have u-boot in SPI flash. I'll do some more research. I've also got myself some new sd-cards..


----------



## jsm (Jan 13, 2021)

SUCCESS!! THANKS. New sd-card. Copied splash.bmp to efi partion as noted above. and BLOCKED EMMC.
Thanks again!


----------



## spikerguy (Jan 15, 2021)

This is great, I will try this over sd card and see if it works  

Thanks for the hardwork SleepWalker


----------



## pfarrelly (Jan 16, 2021)

Need networking with this build, but have no USB wifi adapter?  It's very easy to enable Tethering on this build, as if_urndis is loaded into the kernel at boot.

Step 1) connect your phone and enable tethering
Step 2) open terminal and run *ifconfig *to verify that the PineBookPro finds your device (mine shows up as *ue0*)
Step 4) enable the interface by running *ifconfig ue0 up*
Step 5) collect an IP address over DHCP by running *dhclient ue0*
Step 6) enjoy networking using your tethered phone!  Remember to change *ue0 *in those commands to your interface if the name is different.  Remember that *lo0 *is a loopback device that is always present and is NOT the network interface you are trying to configure for networking.


----------



## jsm (Jan 18, 2021)

Is it only me or is me or is the internal microphone very low as if it misses a mic boost setting?
tested with arecord.
And a question for SleepWalker, do you have a repo with the kernel and/or your patches, if one wants to try to hack along?
Thanks.


----------



## Mjölnir (Jan 19, 2021)

Samuel Venable said:


> I'm aware of that, and amidst you not understanding my question for the second time of trying to rephrase my question I guess the only way I can know whether replacing the internal emmc works with this written to it by spending a good half hour on doing that, which I was trying to avoid and why I asked if your image worked on emmc and not just the microsd.  [...]


With all respect, dear Samuel, whereas I was able to understand your post after reading it twice and some minutes of careful re-examination of my limited vocabulary, please be aware that here on the forum there are many members participating who are non-native english speakers and thus would you mind to restrict the length of your sentences to a count of words below some reasonable number which you could also quickly estimate by keeping the number of lines of one sentence below three which would mean it is far easier to get the point without reading all through to the end of the post even for non-native english speakers and I think that's a good thing, isn't it?


----------



## jsm (Jan 19, 2021)

jsm said:


> Is it only me or is me or is the internal microphone very low as if it misses a mic boost setting?
> tested with arecord.


Answering my self here
sysctl dev.es8316codec.0.recsrc: 1
uses internal mic. No driver issues. Sorry about the *noise*..


----------



## jsm (Jan 20, 2021)

apply https://github.com/gonzoua/freebsd-src/commit/1b9ed02b138e9418a280b6c95a7877798db504be.patch for sound
and


```
diff c1a3d7f20696ab5b72eee45863f3e04410d81fc8 /usr/src
blob - 595085862e13d9e1f9c260a63c8500f1bdbb9fb8
file + sys/arm64/rockchip/clk/rk3399_cru.c
--- sys/arm64/rockchip/clk/rk3399_cru.c
+++ sys/arm64/rockchip/clk/rk3399_cru.c
@@ -618,7 +618,6 @@ static struct rk_clk_pll_rate rk3399_pll_rates[] = {
     PLL_RATE( 864000000,  1,  72, 2, 1, 1),
     PLL_RATE( 840000000,  1,  70, 2, 1, 1),
     PLL_RATE( 816000000,  1,  68, 2, 1, 1),
-    PLL_RATE( 800000000,  1, 100, 3, 1, 1),
     PLL_RATE( 700000000,  6, 350, 2, 1, 1),
     PLL_RATE( 696000000,  1,  58, 2, 1, 1),
     PLL_RATE( 676000000,  3, 169, 2, 1, 1),
```

And you can compile the kernel. I used got to fetch src.git YMMV
FreeBSD pinebook-pro 13.0-ALPHA1 FreeBSD 13.0-ALPHA1 #3: Wed Jan 20 05:12:08 UTC 2021     admin@pinebook-pro:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC-NODEBUG  arm64


----------



## jsm (Jan 25, 2021)

__ https://twitter.com/i/web/status/1282072548549758976_View: https://twitter.com/S199pWa1k9r/status/1282072548549758976_


----------



## nrgmilk (Jan 27, 2021)

SleepWalker said:


> I have successfully tested the HP USB-C Universal Dock with my Pinebook Pro.
> 
> https://support.hp.com/us-en/document/c05639574
> 
> ...


Webcam works too.
I tested Firefox and pwcview (webcamd).


----------



## Samuel Venable (Jan 29, 2021)

SleepWalker I am really sorry about how rude I initially came off in this topic but that aside....

This is really cool! If it wasn't for you, I'd never have (any) of the BSD's running on my PBP, let alone my favorite one; FreeBSD. Thank you so much for putting this all together, it means a lot! If I only had a job right now, I'd donate to you generously to keep things like this going.

I tried installing OpenBSD but their website layout is so confusing I spent collectively a good hour just trying to figure out where the freaking download link even is. Tried NetBSD only to discover it doesn't work on the eMMC and I can't use my SD card slot because it stopped working for some unknown reason. Now I have FreeBSD on it. Super happy.

Did anyone manage to fix the shutdown button causing a restart / shutdown and restart items greyed out in the menu? I tried the method to enable those options by updating the policies, which I know from experience works if you use SLiM as the display manager. However I'm not sure if that same method will work with whatever display manager this image uses, at least in my testing it didn't seem to work.

I have Desktop installed, haven't tried the minimal yet.


----------



## obsigna (Jan 29, 2021)

Samuel Venable said:


> … and I can't use my SD card slot because it stopped working for some unknown reason. ...


Yesterday, I took an older BeagleBone Black out of the drawer, in order to install a newer FreeBSD version on it. Unfortunately, the SD card slot did not work anymore. When compared to inserting cards into another BBB, it turned out that the cards in the defective SD slot didn’t sit as firmly. Then with my thumb, I carefully pressed the backside metal sheet of the slot housing somewhat inside, and guess what, the SD slot started working again.


----------



## jsm (Jan 29, 2021)

Samuel Venable said:


> SleepWalker I am really sorry about how rude I initially came off in this topic but that aside....
> 
> This is really cool! If it wasn't for you, I'd never have (any) of the BSD's running on my PBP, let alone my favorite one; FreeBSD. Thank you so much for putting this all together, it means a lot! If I only had a job right now, I'd donate to you generously to keep things like this going.
> 
> ...


If consolekit is involved you might want to check that your primary console is vidconsole
/boot/loader.conf comment out boot_serial="YES" and add console="vidconsole,comconsole"


----------



## Samuel Venable (Jan 29, 2021)

Thanks guys, I'll give those things a shot. In the meantime, I want to say I really like the default wallpaper






jsm I tried what you mentioned and the buttons are no longer greyed out, but unfortunately, shutdown still doesn't work when I click the shutdown button, it goes to the console and at a certain point hangs indefinitely, forcing me to hold the power button to shutdown.


----------



## sos (Mar 6, 2021)

Hi gang
Got in here a little late, but you can find updated rk80x driver that supports RTC and proper shutdown/poweroff, a cw2015 driver that allows access to battery charge level etc and an updated rk_gpio driver with interrupt support (needed for power button and lid switch support).
Still have other things in the works, but time is limited for now...


			Index of /~sos/PinebookPro/
		

Let me know if things doesn't work out....


----------



## Mjölnir (Mar 7, 2021)

... starting to throw the small €-notes into my hardware-piggybank once a week.


----------



## jsm (Mar 7, 2021)

sos said:


> Hi gang
> Got in here a little late, but you can find updated rk80x driver that supports RTC and proper shutdown/poweroff, a cw2015 driver that allows access to battery charge level etc and an updated rk_gpio driver with interrupt support (needed for power button and lid switch support).
> Still have other things in the works, but time is limited for now...
> 
> ...


For convenience (hopefully) I uploaded https://people.freebsd.org/~jsm/pinebookpro/3fca90af438ac4232d6b33ee4874297089997dd6-main.diff which contains the work of sos and the sound drivers by gonzo. It is to the latest main as of now. (And the enable display clock hack by me, also in some u-boot patches) U-boot does not have the cw2015 code so in order for the right dtb I did  (with cw2015 working and with ACLK_VOP1 at the "right" freq for display) 
/usr/src/sys/contrib/device-tree # gmake src/arm64/rockchip/rk3399-pinebook-pro.dtb and copied it to /boot/efi/dtb/rockchip/
Hope this is helpful now poweroff powers off and sysctl dev.cwfg show battery status. and sound and display works. also see https://reviews.freebsd.org/D28456

Thanks, and have fun..!


----------



## sos (Mar 8, 2021)

Excellent 
I have a rk_gpiokeys driver that allows power off by pressing the power button for at least 1 sec.
It also gets the lid state (open/close) but I cannot decide on calling the pwm driver somehow or if the regulator driver can just yank power accordingly.
Any preferred / standard way for this that I should be aware of ?
At any rate I'll get it finished up and posted with the other drivers...

Edit: looking at the schematic there is a lcd_enable gpio connection, works nice and easy... Just need to clean up the code...


----------



## sos (Mar 10, 2021)

Uploaded rk_gpiokeys.c to the usual place:



			Index of /~sos/PinebookPro/
		


That allows the system to shutdown and power off when the power button is pressed for more than a second (safeguard), it also makes the LCD backlight go off when the lid is closed, this should be looked into further when we have real sleep support.

Enjoy!


----------



## jsm (Mar 11, 2021)

Seems like https://reviews.freebsd.org/D22692 also did a RTC-driver..


----------



## sos (Mar 15, 2021)

Anybody played with getting the bootloader into the spi-flash ?
The simple solution to just copy in the bootloader like:

gpart create -s GPT /dev/flash/spi0
dd if=u-boot-rockpro64/idbloader.img of=/dev/flash/spi0 seek=64 conv=notrunc,sync
dd if=u-boot-rockpro64/u-boot.itb of=/dev/flash/spi0 seek=16384 conv=notrunc,sync

Does not do the trick at least...
Anyone have info on how the layout of the spi-flash should be for it to get picked up by the bootrom ?


----------



## jsm (Mar 16, 2021)

Have not tested but https://gist.github.com/hxmuller/f1091f9b04b583db0d56b6f893747482 could be useful,
it does not use gpt it seems, do not if it makes a difference


----------



## sos (Mar 19, 2021)

That recipe seems to be right on the nose. Both the pinebookpro and the rockpro64 boots nice and dandy from the spi using this.
Finally I'm now able to boot directly from the nvme drive with no emmc/sdcard, yay!  
PS: we have support for the spi device so it is a matter of simply dd'ing the image in place no need for special tools.


----------



## sos (Mar 20, 2021)

Update:
I've added support for generating the spi flash image to the pinebookpro u-boot and also upgraded to u-boot.2021.01
With that installed in the SPI flash we can now boot from eMMC, SDcard, USB and NVMe with screen and kbd/mouse enabled from the start so one can chose what to boot etc.
Same place as usual: Index of /~sos/PinebookPro/

Enjoy!


----------



## pkubaj (Apr 1, 2021)

sos said:


> Update:
> I've added support for generating the spi flash image to the pinebookpro u-boot and also upgraded to u-boot.2021.01
> With that installed in the SPI flash we can now boot from eMMC, SDcard, USB and NVMe with screen and kbd/mouse enabled from the start so one can chose what to boot etc.
> Same place as usual: Index of /~sos/PinebookPro/
> ...


Why don't you send your changes to reviews.freebsd.org?


----------



## jsm (Apr 2, 2021)

See https://lists.freebsd.org/pipermail/freebsd-arm/2021-March/023305.html the whole thread. I Hope that I personally can find some time to help mainline some of the work done for pinebook pro.


----------



## hobbitus (Apr 12, 2021)

SleepWalker said:


> FreeBSD-aarch64-13.0-CURRENT-Pinebook-Pro-20210110.img.xz
> 
> FreeBSD-aarch64-13.0-DESKTOP-Pinebook-Pro-20210111.img.xz


Hello, are these images still available?
I couldn't connect to the domain name personalbsd.org at all.


----------



## SleepWalker (Apr 13, 2021)

I'm sorry, I'll fix it soon
and there will be a new image 13.0-RELEASE


----------



## hobbitus (Apr 14, 2021)

SleepWalker said:


> I'm sorry, I'll fix it soon
> and there will be a new image 13.0-RELEASE


yes, 13.0-RELEASE is out! 
Thank you for the time and effort


----------



## evantaylor (Apr 25, 2021)

SleepWalker said:


> I'm sorry, I'll fix it soon
> and there will be a new image 13.0-RELEASE


E-mail registration isn't working for me (i'm assuming download links are only available once logged in).  Would love to try an an sd card image.


----------



## SleepWalker (Apr 26, 2021)

New images can be downloaded without any registration, Here is the link!
https://personalbsd.org/?page_id=2


----------



## Pbowen (May 5, 2021)

I've been trying to get FreeBSD running on the Pinebook Pro and have met with zero luck. Went the route of using the Rockpro64 image and overwriting as per the README for the u-boot-pinebookpro pkg with no joy. But your images boot and work fine for me! Is there anywhere where you have documented what you did to get it to work?


----------



## jsm (May 5, 2021)

This thread contains most of what has to be done to make a FreeBSD image from scratch that runs on Pinebook Pro. In short U-Boot should be patched a long the lines of https://reviews.freebsd.org/D28456 and then one could add some other not mainlined patches the sound work of gonzo@ and perhaps some of the work of sos@ I also have some slightly outdated instructions here http://build.schmitz.computer/build/notes.txt. You'll have to use the patched u-boot's idbloader.img and u-boot.itb


----------



## SleepWalker (May 13, 2021)

Pbowen said:


> I've been trying to get FreeBSD running on the Pinebook Pro and have met with zero luck. Went the route of using the Rockpro64 image and overwriting as per the README for the u-boot-pinebookpro pkg with no joy. But your images boot and work fine for me! Is there anywhere where you have documented what you did to get it to work?


I am using my own custom build u-boot-2020.07
And that solves all the problems









						GitHub - S199pWa1k9r/ports: Unofficial FreeBSD u-boot ports
					

Unofficial FreeBSD u-boot ports. Contribute to S199pWa1k9r/ports development by creating an account on GitHub.




					github.com
				




This repository contains the u-boot versions for many devices on Rockchip.
Many ports allow u-boot to be built for SPI flash as well.

u-boot-helios64-2020.07
u-boot-khadas-edge-v-2020.07
u-boot-nanopc-t4-2020.07
u-boot-nanopi-r4s-2020.07
u-boot-pinebook-pro-2020.07
u-boot-roc-rk3399-pc-plus-2020.07
u-boot-rock-pi-4-2020.07
u-boot-rock-pi-4c-2020.07
u-boot-rock-pi-e-2020.07
u-boot-rock-pi-n10-2020.07

Installation images for all these devices can be downloaded from my website
https://personalbsd.org/?page_id=2

All of these images contain a modified bsdinstall.
It allows you to install the system as zfs root on eMMC, USB or NVMe.


----------



## evantaylor (Jun 8, 2021)

Sleepwalker, any chance you could package up your custom uboot for the SPI-flash?  my emmc uboot doesn't fully boot your image correctly, and if I'm not mistaken your uboot can boot everything.


----------



## evantaylor (Jul 3, 2021)

evantaylor said:


> Sleepwalker, any chance you could package up your custom uboot for the SPI-flash?  my emmc uboot doesn't fully boot your image correctly, and if I'm not mistaken your uboot can boot everything.


Hey, I got a spare emmc and am really enjoying the image.  Having weird mouse/keyboard crashing issue, is that fixed in the new 7/02 release?  The link isn't working and I'd like to give it a spin.


----------



## Samuel Venable (Sep 16, 2021)

I just wanted to pop in here again and say a big thank you to SleepWalker for making FreeBSD work on the Pinebook Pro. Thanks to the image you made, I managed to correct a problem with my ENIGMA dev fork installer script and the software can now run on arm64 FreeBSD, not just amd64 and i386. I also have a raspberry pi 4 I could do this on, but unfortunately the screen resolution was just way too small to get any kind of real work done on it, so doing it on the Pinebook Pro was a much better option.






Thank you!!


----------



## SleepWalker (Oct 13, 2021)

Hi guys!
What do you think of helloSystem for Pinebook-Pro?


----------



## grahamperrin@ (Oct 13, 2021)

SleepWalker said:


> helloSystem for Pinebook-Pro?



PINEBOOK Pro | PINE64



> > … *ARM* 64-Bit …



<https://github.com/helloSystem/ISO/releases/tag/r0.6.0>

there's source code, however hello-0.6.0_0F54-FreeBSD-12.2-amd64.iso is for *AMD*64
expanding upon the listed known issues, <https://old.reddit.com/r/freebsd/comments/q0hn5w/-/hfaqtdf/?context=2>


----------



## eternal_noob (Oct 13, 2021)

Samuel Venable said:


> I also have a raspberry pi 4 I could do this on, but unfortunately the screen resolution was just way too small to get any kind of real work done on it


Using the xf86-video-scfb driver only is not enough. The trick is to edit /boot/msdos/config.txt and disable the `hdmi_safe=1` entry.
Once done, you'll get a 1080p resolution which is sufficient. (Tested on Raspberry Pi 400)


----------



## diizzy (Oct 13, 2021)

SleepWalker 
If possible please upstream u-boot patches so they're maintained in the long run


----------



## Samuel Venable (Oct 14, 2021)

SleepWalker said:


> Hi guys!
> What do you think of helloSystem for Pinebook-Pro?


Will be checking it out tonight and will post my thoughts afterward. Thank you for everything!

Edit: oh, I gotcha. You haven't done it yet and was asking whether we'd want it. I'm kinda pleased with XFCE personally, but I may be willing to at least give it a try if and when the time comes.


----------



## SleepWalker (Oct 14, 2021)

Samuel Venable said:


> Will be checking it out tonight and will post my thoughts afterward. Thank you for everything!
> 
> Edit: oh, I gotcha. You haven't done it yet and was asking whether we'd want it. I'm kinda pleased with XFCE personally, but I may be willing to at least give it a try if and when the time comes.


Yes, I've almost done it, I want to know if anyone needs it.


----------



## Samuel Venable (Oct 15, 2021)

SleepWalker said:


> Yes, I've almost done it, I want to know if anyone needs it.


I'd say it's definitely worth sharing. I'm sure someone will use it. Heck, I might. I've been busy as of late but I'm interested in it none the less. Excellent work!


----------



## evantaylor (Oct 20, 2021)

Samuel Venable said:


> I'd say it's definitely worth sharing. I'm sure someone will use it. Heck, I might. I've been busy as of late but I'm interested in it none the less. Excellent work!


I'd tinker around with it for sure.


----------



## johnslobbe (Oct 29, 2021)

Hi there Sleepwalker, thanks for your work on the Pinebook Pro!

I am using FreeBSD-aarch64-13.0-RELEASE-Pinebook-Pro-20211012.img on it (dd to the internal mmcsd0) and I am trying to get wifi connectivity through an ASUS N10 Nano dongle. 
Since this is the new B1 version of the dongle which uses a different USB ProductID & chipset I need to recompile the kernel / rtwn module.

Can you point me to the kernel configuration used in this image?

Thanks in advance, John


----------



## SleepWalker (Oct 29, 2021)

johnslobbe said:


> Hi there Sleepwalker, thanks for your work on the Pinebook Pro!
> 
> I am using FreeBSD-aarch64-13.0-RELEASE-Pinebook-Pro-20211012.img on it (dd to the internal mmcsd0) and I am trying to get wifi connectivity through an ASUS N10 Nano dongle.
> Since this is the new B1 version of the dongle which uses a different USB ProductID & chipset I need to recompile the kernel / rtwn module.
> ...





			https://personalbsd.org/images/EXPERT.txt


----------



## SleepWalker (Oct 29, 2021)

johnslobbe said:


> Hi there Sleepwalker, thanks for your work on the Pinebook Pro!
> 
> I am using FreeBSD-aarch64-13.0-RELEASE-Pinebook-Pro-20211012.img on it (dd to the internal mmcsd0) and I am trying to get wifi connectivity through an ASUS N10 Nano dongle.
> Since this is the new B1 version of the dongle which uses a different USB ProductID & chipset I need to recompile the kernel / rtwn module.
> ...


You can send me a patch and I will prepare a new boot image


----------



## johnslobbe (Oct 30, 2021)

The patch I used can be found here: Bugzila 254280. (reported by mickey242)

I can conform it is working for the ASUS N10 Nano dongle, B1 version


----------



## SleepWalker (Oct 31, 2021)

johnslobbe said:


> The patch I used can be found here: Bugzila 254280. (reported by mickey242)
> 
> I can conform it is working for the ASUS N10 Nano dongle, B1 version


New installation images are ready!
I remind you that for installation on eMMC or NVMe, you can
use bsdinstall utility and then you will get ZFS root and
will be able to use the bectl utility.


----------



## hergerson (Nov 23, 2021)

I'll just leave that here: https://freebsdfoundation.org/wp-content/uploads/2021/08/The-Panfrost-Driver.pdf and https://github.com/evadot/drm-subtree

TL;DR: driver for the Mali Midgard GPU on RK3399.


----------



## jsm (Nov 23, 2021)

Yes and I tried to get it to work, without luck, but edp is working. I might get time to improve style and edid retrieval code.


----------



## jsm (Nov 30, 2021)

Just to share some news only code will follow in the next few days,
I got panfrost runinng on the pbp based on the work of




Ruslan Bukin bukinr


----------



## jsm (Dec 15, 2021)

I made a small compilation for brave testers: http://build.schmitz.computer/build/pbp/ 
Please post comments and ideas here, as I ask for in README.txt 
Thanks.


----------



## SleepWalker (Dec 16, 2021)

jsm said:


> I made a small compilation for brave testers: http://build.schmitz.computer/build/pbp/
> Please post comments and ideas here, as I ask for in README.txt
> Thanks.


Hello Jesper!
Thank you very much for the kind opportunity to test
DRM and Panfrost on RockChip and Pinebook-Pro.


----------



## pbp_jackd (Dec 25, 2021)

Is any one else getting a blank black screen with some white horizonal stripes (flickering) on the top of the LCD screen ?
I'm using your u-boot SleepWalker  + 20210702  image. From the serial console I can see the image boots just fine and I can login.


----------



## SleepWalker (Dec 25, 2021)

FreeBSD-aarch64-13.0-RELEASE-Pinebook-Pro-20211031.img.xz


----------



## Samuel Venable (Jan 6, 2022)

SleepWalker said:


> Yes, I've almost done it, I want to know if anyone needs it.


Any news on this?

Also, how do I change it to use the official FreeBSD pkg repository and not PersonalBSD's repository, which has significantly less packages available?


----------



## SleepWalker (Jan 7, 2022)

I am still testing helloDesktop for aarch64.

I have built all the required packages in my repository.
If you want to disable my repository you need to edit or remove the configuration files
in the /usr/local/etc/pkg/repos/ directory. This is easy to do.

If you want to join testing helloDesktop,
you need to leave my repository connected and run the following commands:

pkg update
pkg install hellodesktop hellodesktop-apps openbox

Then you need to create a test user account with the following command
adduser -k /usr/local/share/skel

After that, you need to do the following:

cd /usr/local/share/helloSystem/Utilities/ 
cp -rv /

After that, everything is ready to run helloDesktop.
Log in as a test user and run the command:

startx

Happy 2022 year to everyone!
I wish you good luck in the new year.


----------



## Samuel Venable (Jan 10, 2022)

SleepWalker said:


> I am still testing helloDesktop for aarch64.
> 
> I have built all the required packages in my repository.
> If you want to disable my repository you need to edit or remove the configuration files
> ...


Thank you very very much! This is awesome news!! 

I have your pbp image backed up to my Google Drive, and was wondering if you wanted/needed me to share a backup download mirror for it.


----------



## jsm (Jan 25, 2022)

Hi
Two tips for the Pinebook Pro,  /usr/bin/proccontrol -m aslr -s disable /usr/local/bin/firefox for far more stable firefox on my drm / panfrost branch.
USB-C Take care and reread  the dts files. gpioctl -f /dev/gpioc1 3 1 It turns on the power for usb-c, the driver does not automatically only on rockpro64
EDIT: firefox only works under sway for me. in X11 it does not render correctly


----------



## jrg (Jun 9, 2022)

I grabbed your image which seems to be fairly recent (2022-03). Wrote it to SD. It boots fine but I do not get video past initial boot. I'm using the mainline uboot 2021.10 from manjaro on emmc. I have a serial cable and can make it to using it in a term. I just don't quite understand why I have a blank screen though. The screen is on, just nothing else being displayed. It seems to happen right after VT(efifb)... 

---<<BOOT>>---
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2021 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 13.0-RELEASE-p8 #0: Wed Mar 16 18:58:57 MSK 2022
root@honeycomb.local:/usr/crochet/work/obj/usr/crochet/src-release-13.0/arm64.aarch64/sys/EXPER4
FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe)
VT(efifb): resolution 1920x1080

*** NO VIDEO PAST THIS POINT ***

Here is the entirety of the boot process in case it is relevant: 

U-Boot TPL 2021.07-3 (May 14 2022 - 10:12:59)
Channel 0: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
Channel 1: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
256B stride
lpddr4_set_rate: change freq to 400000000 mhz 0, 1
lpddr4_set_rate: change freq to 800000000 mhz 1, 0
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2021.07-3 (May 14 2022 - 10:12:59 +0000)
Trying to boot from MMC1


U-Boot 2021.07-3 (May 14 2022 - 10:12:59 +0000) Manjaro ARM

SoC: Rockchip rk3399
Reset cause: POR
Model: Pine64 Pinebook Pro
DRAM:  3.9 GiB
PMIC:  RK808 
Consoles: EFI console  
    Reading loader env vars from /efi/freebsd/loader.env
Setting currdev to disk0p1:
FreeBSD/arm64 EFI loader, Revision 1.1

   Command line arguments: loader.efi
   Image base: 0xf3dd6000
   EFI version: 2.80
   EFI Firmware: Das U-Boot (rev 8225.1792)
   Console: comconsole (0)
   Load Path: /efi\boot\bootaa64.efi
   Load Device: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(1)/SD(1)/HD(1,GPT,5f2a1f62-a542-11e)
Trying ESP: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(1)/SD(1)/HD(1,GPT,5f2a1f62-a542-11ec-a0)
Setting currdev to disk0p1:
Trying: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(1)/SD(1)/HD(2,GPT,5f2a1f62-a542-11ec-a016-d)
Setting currdev to disk0p2:
Trying: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(1)/SD(1)/HD(3,GPT,5f2a1f62-a542-11ec-a016-d)
Setting currdev to disk0p3:
\



Loading /boot/defaults/loader.conf
Loading /boot/defaults/loader.conf
Loading /boot/device.hints
Loading /boot/loader.conf
Loading /boot/loader.conf.local
cLoading kernel...
/boot/kernel/kernel text=0x2a8 text=0x7bfc00 text=0x1c9ecc data=0x184040 data=0x0+0x384000 syms=[0]/
Loading configured modules...
/boot/kernel/wmt.ko text=0x1d20 text=0x1790 data=0x608+0x10 syms=[0x8+0xde0+0x8+0x98b]
/boot/kernel/usbhid.ko text=0x2080 text=0x12c0 data=0x6e8+0x10 syms=[0x8+0x1008+0x8+0xbcc]
loading required module 'hidbus'
/boot/kernel/hidbus.ko text=0x2206 text=0x20f8 data=0x648+0x8 syms=[0x8+0x10c8+0x8+0xc30]
/boot/entropy size=0x1000
/etc/hostid size=0x25
/boot/kernel/hkbd.ko text=0x5688 text=0x3658 data=0x6a8+0x8 syms=[0x8+0x12a8+0x8+0xc63]
/boot/kernel/uhid.ko text=0x1aa0 text=0x13a0 data=0x5d8+0x8 syms=[0x8+0xd68+0x8+0x930]
/boot/kernel/ums.ko text=0x2215 text=0x1ee8 data=0x698+0x8 syms=[0x8+0xff0+0x8+0xadc]

Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel]...               
Using DTB provided by EFI at 0x80eb000.
EFI framebuffer information:
addr, size     0xf7800000, 0x3f4800
dimensions     1920 x 1080
stride         1920
masks          0x0000f800, 0x000007e0, 0x0000001f, 0x00000000
---<<BOOT>>---
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2021 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 13.0-RELEASE-p8 #0: Wed Mar 16 18:58:57 MSK 2022
root@honeycomb.local:/usr/crochet/work/obj/usr/crochet/src-release-13.0/arm64.aarch64/sys/EXPER4
FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe)
VT(efifb): resolution 1920x1080
real memory  = 4150063104 (3957 MB)
avail memory = 4025843712 (3839 MB)
Starting CPU 1 (1)
Starting CPU 2 (2)
Starting CPU 3 (3)
Starting CPU 4 (100)
Starting CPU 5 (101)
FreeBSD/SMP: Multiprocessor System Detected: 6 CPUs
random: unblocking device.
random: entropy device external interface
MAP f3f12000 mode 2 pages 4
MAP f3f17000 mode 2 pages 4
MAP f6f40000 mode 2 pages 16
WARNING: Device "kbd" is Giant locked and may be deleted before FreeBSD 14.0.
kbd0 at kbdmux0
WARNING: Device "openfirm" is Giant locked and may be deleted before FreeBSD 14.0.
ofwbus0: <Open Firmware Device Tree>
clk_fixed0: <Fixed clock> on ofwbus0
simplebus0: <Flattened device tree simple bus> on ofwbus0
rk_grf0: <RockChip General Register Files> mem 0xff320000-0xff320fff on ofwbus0
rk3399_pmucru0: <Rockchip RK3399 PMU Clock and Reset Unit> mem 0xff750000-0xff750fff on ofwbus0
rk3399_cru0: <Rockchip RK3399 Clock and Reset Unit> mem 0xff760000-0xff760fff on ofwbus0
rk_grf1: <RockChip General Register Files> mem 0xff770000-0xff77ffff on ofwbus0
regfix0: <Fixed Regulator> on ofwbus0
regfix1: <Fixed Regulator> on ofwbus0
regfix2: <Fixed Regulator> on ofwbus0
regfix3: <Fixed Regulator> on ofwbus0
regfix4: <Fixed Regulator> on ofwbus0
regfix5: <Fixed Regulator> on ofwbus0
regfix6: <Fixed Regulator> on ofwbus0
regfix7: <Fixed Regulator> on ofwbus0
regfix8: <Fixed Regulator> on ofwbus0
regfix9: <Fixed Regulator> on ofwbus0
regfix10: <Fixed Regulator> on ofwbus0
regfix11: <Fixed Regulator> on ofwbus0
simple_mfd0: <Simple MFD (Multi-Functions Device)> mem 0xff310000-0xff310fff on ofwbus0
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
gic0: <ARM Generic Interrupt Controller v3.0> mem 0xfee00000-0xfee0ffff,0xfef00000-0xfefbffff,0xfff0
its0: <ARM GIC Interrupt Translation Service> mem 0xfee20000-0xfee3ffff on gic0
rk_iodomain0: <RockChip IO Voltage Domain> mem 0-0xff31ffff,0-0xfff on rk_grf0
rk_iodomain1: <RockChip IO Voltage Domain> mem 0-0xff76ffff,0-0xffff on rk_grf1
rk_pinctrl0: <RockChip Pinctrl controller> on ofwbus0
gpio0: <RockChip GPIO Bank controller> mem 0xff720000-0xff7200ff irq 71 on rk_pinctrl0
gpiobus0: <OFW GPIO bus> on gpio0
gpio1: <RockChip GPIO Bank controller> mem 0xff730000-0xff7300ff irq 72 on rk_pinctrl0
gpiobus1: <OFW GPIO bus> on gpio1
gpio2: <RockChip GPIO Bank controller> mem 0xff780000-0xff7800ff irq 73 on rk_pinctrl0
gpiobus2: <OFW GPIO bus> on gpio2
gpio3: <RockChip GPIO Bank controller> mem 0xff788000-0xff7880ff irq 74 on rk_pinctrl0
gpiobus3: <OFW GPIO bus> on gpio3
gpio4: <RockChip GPIO Bank controller> mem 0xff790000-0xff7900ff irq 75 on rk_pinctrl0
gpiobus4: <OFW GPIO bus> on gpio4
rk_i2c0: <RockChip I2C> mem 0xff110000-0xff110fff irq 20 on ofwbus0
iicbus0: <OFW I2C bus> on rk_i2c0
rk_i2c1: <RockChip I2C> mem 0xff130000-0xff130fff irq 22 on ofwbus0
iicbus1: <OFW I2C bus> on rk_i2c1
rk_i2c2: <RockChip I2C> mem 0xff3c0000-0xff3c0fff irq 38 on ofwbus0
iicbus2: <OFW I2C bus> on rk_i2c2
syr8270: <Silergy SYR827 regulator> at addr 0x80 on iicbus2
rk_i2c3: <RockChip I2C> mem 0xff3d0000-0xff3d0fff irq 39 on ofwbus0
iicbus3: <OFW I2C bus> on rk_i2c3
rk805_pmu0: <RockChip RK805 PMIC> at addr 0x36 irq 76 on iicbus2
generic_timer0: <ARMv8 Generic Timer> irq 2,3,4,5 on ofwbus0
Timecounter "ARM MPCore Timecounter" frequency 24000000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 24000000 Hz quality 1000
rk_tsadc0: <RockChip temperature sensors> mem 0xff260000-0xff2600ff irq 35 on ofwbus0
rk_usb2phy0: <Rockchip RK3399 USB2PHY> mem 0-0xff76ffff,0-0xffff on rk_grf1
rk_usb2phy1: <Rockchip RK3399 USB2PHY> mem 0-0xff76ffff,0-0xffff on rk_grf1
rk_emmcphy0: <Rockchip RK3399 eMMC PHY> mem 0-0xff76ffff,0-0xffff on rk_grf1
rk_pcie_phy0: <Rockchip RK3399 PCIe PHY> mem 0-0xff76ffff,0-0xffff on rk_grf1
rk_typec_phy0: <Rockchip RK3399 PHY TYPEC> mem 0xff7c0000-0xff7fffff on ofwbus0
rk_typec_phy1: <Rockchip RK3399 PHY TYPEC> mem 0xff800000-0xff83ffff on ofwbus0
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> on cpulist0
cpufreq_dt0: <Generic cpufreq driver> on cpu0
cpu1: <Open Firmware CPU> on cpulist0
cpufreq_dt1: <Generic cpufreq driver> on cpu1
cpu2: <Open Firmware CPU> on cpulist0
cpufreq_dt2: <Generic cpufreq driver> on cpu2
cpu3: <Open Firmware CPU> on cpulist0
cpufreq_dt3: <Generic cpufreq driver> on cpu3
cpu4: <Open Firmware CPU> on cpulist0
cpufreq_dt4: <Generic cpufreq driver> on cpu4
cpu5: <Open Firmware CPU> on cpulist0
cpufreq_dt5: <Generic cpufreq driver> on cpu5
pmu0: <Performance Monitoring Unit> irq 0 on ofwbus0
pmu1: <Performance Monitoring Unit> irq 1 on ofwbus0
pcib0: <Rockchip PCIe controller> mem 0xf8000000-0xf9ffffff,0xfd000000-0xfdffffff irq 6,7,8 on ofwb0
pci0: <PCI bus> on pcib0
pcib1: <PCI-PCI bridge> at device 0.0 on pci0
pcib0: failed to reserve resource for pcib1
pcib1: failed to allocate initial memory window: 0-0xfffff
pci1: <PCI bus> on pcib1
nvme0: <Generic NVMe Device> at device 0.0 on pci1
rockchip_dwmmc0: <Synopsys DesignWare Mobile Storage Host Controller (RockChip)> mem 0xfe310000-0xf0
rockchip_dwmmc0: Hardware version ID is 270a
rockchip_dwmmc1: <Synopsys DesignWare Mobile Storage Host Controller (RockChip)> mem 0xfe320000-0xf0
rockchip_dwmmc1: Hardware version ID is 270a
mmc0: <MMC/SD bus> on rockchip_dwmmc1
sdhci_fdt0: <Rockchip RK3399 fdt SDHCI controller> mem 0xfe330000-0xfe33ffff irq 12 on ofwbus0
rk_emmcphy0: got emmcclk clock
sdhci_fdt0-slot0: Hardware doesn't specify timeout clock frequency, setting BROKEN_TIMEOUT quirk.
sdhci_fdt0: 1 slot(s) allocated
mmc1: <MMC/SD bus> on sdhci_fdt0
ehci0: <Generic EHCI Controller> mem 0xfe380000-0xfe39ffff irq 13 on ofwbus0
usbus0: EHCI version 1.0
usbus0 on ehci0
ohci0: <Generic OHCI Controller> mem 0xfe3a0000-0xfe3bffff irq 14 on ofwbus0
usbus1 on ohci0
ehci1: <Generic EHCI Controller> mem 0xfe3c0000-0xfe3dffff irq 15 on ofwbus0
usbus2: EHCI version 1.0
usbus2 on ehci1
ohci1: <Generic OHCI Controller> mem 0xfe3e0000-0xfe3fffff irq 16 on ofwbus0
usbus3 on ohci1
rk_dwc30: <Rockchip RK3399 DWC3> on ofwbus0
xhci0: <Synopsys Designware DWC3> mem 0xfe800000-0xfe8fffff irq 84 on rk_dwc30
xhci0: 64 bytes context size, 32-bit DMA
usbus4: trying to attach
usbus4 on xhci0
rk_dwc31: <Rockchip RK3399 DWC3> on ofwbus0
xhci1: <Synopsys Designware DWC3> mem 0xfe900000-0xfe9fffff irq 85 on rk_dwc31
xhci1: 64 bytes context size, 32-bit DMA
usbus5: trying to attach
usbus5 on xhci1
es8316codec0: <Everest Semi ES8316 CODEC> at addr 0x22 on iicbus0
iic0: <I2C generic I/O> on iicbus0
iic1: <I2C generic I/O> on iicbus1
uart0: <16750 or compatible> mem 0xff180000-0xff1800ff irq 26 on ofwbus0
uart1: <16750 or compatible> mem 0xff1a0000-0xff1a00ff irq 28 on ofwbus0
uart1: console (1500000,n,8,1)
spi0: <Rockchip SPI> mem 0xff1d0000-0xff1d0fff irq 31 on ofwbus0
spibus0: <OFW SPI bus> on spi0
spibus0: <unknown card> at cs 0 mode 0
iicbus2: <unknown card> at addr 0x82
iic2: <I2C generic I/O> on iicbus2
iicbus3: <unknown card> at addr 0x44
iic3: <I2C generic I/O> on iicbus3
pwm0: <Rockchip PWM> mem 0xff420000-0xff42000f on ofwbus0
pwmbus0: <OFW PWM bus> on pwm0
pwmc0: <PWM Control> channel 0 on pwmbus0
pwm1: <Rockchip PWM> mem 0xff420020-0xff42002f on ofwbus0
pwmbus1: <OFW PWM bus> on pwm1
pwmc1: <PWM Control> channel 0 on pwmbus1
i2s0: <Rockchip I2S> mem 0xff890000-0xff890fff irq 51 on ofwbus0
Cannot set frequency for clk: clkin_i2s, error: 34
Cannot set frequency for clk: xin24m, error: 34
pcm0: <simple-audio-card> on ofwbus0
gpioc0: <GPIO controller> on gpio0
gpioc1: <GPIO controller> on gpio1
gpioc2: <GPIO controller> on gpio2
gpioc3: <GPIO controller> on gpio3
gpioc4: <GPIO controller> on gpio4
pwm_backlight0: <PWM Backlight> on ofwbus0
gpioled0: <GPIO LEDs> on ofwbus0
pcm1: <simple-audio-card> on ofwbus0
simpleamp0: <Simple Amplifier> on ofwbus0
cryptosoft0: <software crypto>
Timecounters tick every 1.000 msec
rk805_pmu0: registered as a time-of-day clock, resolution 1.000000s
usbus0: 480Mbps High Speed USB v2.0
usbus1: 12Mbps Full Speed USB v1.0
ugen1.1: <Generic OHCI root HUB> at usbus1
uhub0 on usbus1
uhub0: <Generic OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
ugen0.1: <Generic EHCI root HUB> at usbus0
uhub1 on usbus0
uhub1: <Generic EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
usbus2: 480Mbps High Speed USB v2.0
usbus3: 12Mbps Full Speed USB v1.0
ugen2.1: <Generic EHCI root HUB> at usbus2
uhub2 on usbus2
uhub2: <Generic EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus2
ugen3.1: <Generic OHCI root HUB> at usbus3
uhub3 on usbus3
uhub3: <Generic OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus3
usbus4: 5.0Gbps Super Speed USB v3.0
uhub0: 1 port with 1 removable, self powered
ugen4.1: <Synopsys XHCI root HUB> at usbus4
uhub4 on usbus4
uhub4: <Synopsys XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus4
usbus5: 5.0Gbps Super Speed USB v3.0
nvme0: Allocated 16MB host memory buffer
ugen5.1: <Synopsys XHCI root HUB> at usbus5
uhub5 on usbus5
uhub5: <Synopsys XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus5
uhub3: 1 port with 1 removable, self powered
mmcsd0: 32GB <SDHC SU32G 8.0 SN E01F1671 MFG 02/2013 by 3 SD> at mmc0 20.0MHz/4bit/1021-block
uhub4: 2 ports with 2 removable, self powered
uhub1: 1 port with 1 removable, self powered
mmcsd1: 124GB <MMCHC A3A442 1.0 SN FEA0B529 MFG 07/2021 by 214 0x0003> at mmc1 25.0MHz/8bit/65535-bk
mmcsd1boot0: 4MB partition 1 at mmcsd1
mmcsd1boot1: 4MB partition 2 at mmcsd1
mmcsd1rpmb: 17MB partition 3 at mmcsd1
pcm0: no driver attached to cpu node
uhub2: 1 port with 1 removable, self powered
Cannot set frequency for clk: clkin_i2s, error: 34
Cannot set frequency for clk: xin24m, error: 34
pcm1: failed to set sysclk for aux node
pcm1: failed to set sysclk for aux node
pcm1: failed to set sysclk for aux node
pcm1: failed to set sysclk for aux node
uhub5: 2 ports with 2 removable, self powered
Release APs...done
CPU  0: ARM Cortex-A53 r0p4 affinity:  0  0
nda0 at nvme0 bus 0 scbus0 target 0 lun 1
                   Cache Type = <64 byte D-cacheline,64 byte I-cacheline,VIPT ICache,64 byte ERG,64>
Trying to mount root from ufs:/dev/gpt/install [rw,noatime]...
nda0:  Instruction Set Attributes 0 = <CRC32,SHA2,SHA1,AES+PMULL>
<Patriot M.2 P300 256GB SN07939 P300EDBB22030700057>
 Instruction Set Attributes 1 = <>
nda0: Serial Number P300EDBB22030700057
         Processor Features 0 = <GIC,AdvSIMD,FP,EL3 32,EL2 32,EL1 32,EL0 32>
nda0: nvme version 1.4 x4 (max x4) lanes PCIe Gen2 (max Gen3) link
         Processor Features 1 = <>
nda0: 244198MB (500118192 512 byte sectors)
      Memory Model Features 0 = <TGran4,TGran64,SNSMem,BigEnd,16bit ASID,1TB PA>
      Memory Model Features 1 = <8bit VMID>
      Memory Model Features 2 = <32bit CCIDX,48bit VA>
             Debug Features 0 = <2 CTX BKPTs,4 Watchpoints,6 Breakpoints,PMUv3,Debugv8>
             Debug Features 1 = <>
         Auxiliary Features 0 = <>
         Auxiliary Features 1 = <>
CPU  1: ARM Cortex-A53 r0p4 affinity:  0  1
                   Cache Type = <64 byte D-cacheline,64 byte I-cacheline,VIPT ICache,64 byte ERG,64>
      Memory Model Features 0 = <TGran4,TGran64,SNSMem,BigEnd,16bit ASID,1TB PA>
CPU  2: ARM Cortex-A53 r0p4 affinity:  0  2
                   Cache Type = <64 byte D-cacheline,64 byte I-cacheline,VIPT ICache,64 byte ERG,64>
      Memory Model Features 0 = <TGran4,TGran64,SNSMem,BigEnd,16bit ASID,1TB PA>
CPU  3: ARM Cortex-A53 r0p4 affinity:  0  3
                   Cache Type = <64 byte D-cacheline,64 byte I-cacheline,VIPT ICache,64 byte ERG,64>
      Memory Model Features 0 = <TGran4,TGran64,SNSMem,BigEnd,16bit ASID,1TB PA>
CPU  4: ARM Cortex-A72 r0p2 affinity:  1  0
                   Cache Type = <64 byte D-cacheline,64 byte I-cacheline,PIPT ICache,64 byte ERG,64>
      Memory Model Features 0 = <TGran4,TGran64,SNSMem,BigEnd,16bit ASID,16TB PA>
CPU  5: ARM Cortex-A72 r0p2 affinity:  1  1
                   Cache Type = <64 byte D-cacheline,64 byte I-cacheline,PIPT ICache,64 byte ERG,64>
      Memory Model Features 0 = <TGran4,TGran64,SNSMem,BigEnd,16bit ASID,16TB PA>
Unresolved linked clock found: clkin_gmac
rk805_pmu0: Read RTC: 22-06-03 05:57:40
Dual Console: Serial Primary, Video Secondary
Setting hostuuid: 32346333-3730-3832-6565-353462666539.
Setting hostid: 0x728edd47.
ZFS filesystem version: 5
ZFS storage pool version: features support (5000)
Starting file system checks:
/dev/gpt/install: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/gpt/install: clean, 7234191 free (1063 frags, 904141 blocks, 0.0% fragmentation)
Mounting local filesystems:.
ELF ldconfig path: /lib /usr/lib /usr/lib/compat
Setting hostname: pinebook-pro.
Setting up harvesting: [UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,[NET_ETHER],NET_TUN,MOUSE,KEYBOARD,ATTD
Feeding entropy: .
Autoloading module: dwwdt.ko
Autoloading module: mx25l.ko
dwwdt0: <Synopsys Designware watchdog timer> mem 0xff848000-0xff8480ff irq 47 on ofwbus0
mx25l0: <M25Pxx Flash Family> at cs 0 mode 0 on spibus0
mx25l0: device type gd25q128, size 16384K in 256 sectors of 64K, erase size 4K
lo0: link state changed to UP
Starting Network: lo0.
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
        inet 127.0.0.1 netmask 0xff000000
        groups: lo
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
Starting devd.
Autoloading module: mx25l.ko
Autoloading module: dwwdt.ko
add host 127.0.0.1: gateway lo0 fib 0: route already in table
add host ::1: gateway lo0 fib 0: route already in table
add net fe80::: gateway ::1
add net ff02::: gateway ::1
add net ::ffff:0.0.0.0: gateway ::1
add net ::0.0.0.0: gateway ::1
Creating and/or trimming log files.
Clearing /tmp (X related).
Updating motd:.
Updating /var/run/os-release done.
Starting syslogd.
Setting date via ntp.
Error resolving 0.freebsd.pool.ntp.org: Name does not resolve (8)
 3 Jun 05:57:49 ntpdate[895]: Can't find host 0.freebsd.pool.ntp.org: Name does not resolve (8)
 3 Jun 05:57:49 ntpdate[895]: no servers can be used, exiting
Starting local daemons:.
Mounting late filesystems:.
Security policy loaded: MAC/ntpd (mac_ntpd)
Starting ntpd.
Jun  3 05:57:50 pinebook-pro ntpd[957]: leapsecond file ('/var/db/ntpd.leap-seconds.list'): expiredo
Starting powerd.
Configuring vt: blanktime.
Starting cron.
Starting background file system checks in 60 seconds.
Performing sanity check on sshd configuration.
Starting sshd.

Fri Jun  3 05:57:50 UTC 2022

FreeBSD/arm64 (pinebook-pro) (ttyu1)

login:


----------



## SleepWalker (Jun 10, 2022)

My image is based on a custom u-boot that allows you to get video in FreeBSD without changing the kernel.
I haven't changed it in a while and it's quite old, but it performs. your task. I have a freebsd port to build it, you can see the meaning of the changes in the patch in the files directory.








						ports/sysutils/u-boot-pinebook-pro-2020.07 at master · S199pWa1k9r/ports
					

Unofficial FreeBSD u-boot ports. Contribute to S199pWa1k9r/ports development by creating an account on GitHub.




					github.com


----------



## jrg (Jun 11, 2022)

SleepWalker said:


> My image is based on a custom u-boot that allows you to get video in FreeBSD without changing the kernel.
> I haven't changed it in a while and it's quite old, but it performs. your task. I have a freebsd port to build it, you can see the meaning of the changes in the patch in the files directory.
> 
> 
> ...


Ah ok. So seems like it requires a different u-boot? I have been using the manjaro 2021.07 u-boot on emmc. eprom boots spi, emmc, sd, and (i think newer versions) nvme afaik. So sounds like I would need to put uboot on emmc or spi for this to work?


----------



## SleepWalker (Jun 12, 2022)

jrg You can try running my u-boot from sdcard if you enable musk rom mode
Block eMMC flash using switch 24 and launch will happen with SD card.


----------



## petersen77 (Aug 30, 2022)

Is your image working with Tow-boot on SPI?


----------



## SleepWalker (Sep 1, 2022)

petersen77 said:


> Is your image working with Tow-boot on SPI?


petersen77 
I don't know, I haven't tried this mode…


----------



## petersen77 (Sep 1, 2022)

It's booting but stops after a while with kernel panic... Didn't yet investigate why it's stopping


----------



## SleepWalker (Sep 2, 2022)

petersen77
My U-boot has a hacked DTB file that allows VIDEO to run on a standard FreeBSD kernel.
My boot image includes U-boot for SPI flash.
Therefore, you can use it instead of Tow-boot.
U-boot for SPI written to EFI partition of SD card u-boot-spi.bin
It can be written to SPI flash with the following commands

`> load mmc 0 ${kernel_addr_r} u-boot-spi.bin
> sf probe
> sf update  ${kernel_addr_r} 0 ${filesize}`

Need to clear SPI before writing....


----------



## JohnnySorocil (Oct 4, 2022)

People with working pinebook-pro could you share:
- u-boot flavor (vanilla, from ports, from jsm222, from SleepWalker etc)
- content of /boot/loader.conf
- FreeBSD version (uname -srKv)
- device tree from booted system (sysctl -b hw.fdt.dtb | dtc -I dtb -O dts > file.dts)
- dmesg from verbose boot (in FreeBSD loader press Esc and run "boot -v")

If you have working UART/serial console, could you share:
- u-boot version and env (in u-boot shell run: version; printenv)
- full boot log from u-boot to verbose FreeBSD


----------



## petersen77 (Oct 8, 2022)

I tried the August batch with image from https://github.com/jsm222/drm-subtree/releases but no success... Black screen at boot


----------



## jsm (Oct 9, 2022)

I am cooking up a image , which can turn on the screen from userspace with gpioctl. Only quirk is that backlight cannot be controlled.. I hopefully upload it today UTC.
[edit2]
The following is tested when booting with a manjaro u-boot from image Manjaro-ARM-kde-plasma-pbpro-20.12.img.xz
You can control backlight with pwm directly. the edp-panel has pwm@ff420000 as pwm, on my system it is /dev/pwm/pwmc0.0 you can check with sysctl dev.pwm.
The period is 740740 seen here https://github.com/freebsd/freebsd-...rc/arm64/rockchip/rk3399-pinebook-pro.dts#L35 so e.g

```
pwm -f /dev/pwm/pwmc0.0 -p 740740 -d 370370
```
dimms the backlight to 50% if I am not wrong. The higher -d the dimmer the display (I would have guessed opposite)
[edit]
Just uploaded:








						Release 947fcb84b77 · jsm222/drm-subtree
					

Turns on display if your u-boot does not. From rc.local so be patient on boot.




					github.com


----------



## petersen77 (Oct 12, 2022)

Something went wrong...


----------



## jsm (Oct 12, 2022)

Looks like a bad sd-card.. What image did you use? I have used sandisk ultra micro sdhc uhs-I 32 GB and kingston canvas select plus SD cards  with success. Unless they where worn out..


----------



## petersen77 (Oct 13, 2022)

I'll try another SD card but that card performed well all the time...


----------



## petersen77 (Oct 16, 2022)

petersen77 said:


> I'll try another SD card but that card performed well all the time...


Flickering screen after reboot until it goes black for some seconds and restarts screen, couldn't get sddm to work. No luck with panfrost


----------



## jsm (Oct 17, 2022)

The initial flickering on boot is expected. Also take care not to reboot since the u-boot in that image does *not*
have this patch https://gist.github.com/jsm222/5b9e110fce4e49d32667331e06428d23. So the lcd output on hot restart might go crazy..

Panfrost needs https://gist.github.com/jsm222/7df208cc5a72918a70cfbef8ee15b51b#file-patch-xf86drm-c or https://people.freebsd.org/~br/drm_hack_panfrost.patch (I have not tested the later) Note that panfrost uses continuous memory allocation because of a limtation in drm rockchip backend, so it is likely to go out of memory and return -ENOMEM (errno 12) Which crashes the system.. I have not tested sddm only startx with defaults after pkg install xorg.


----------



## jsm (Oct 18, 2022)

hw-probe of pbp with nvme https://bsd-hardware.info/?probe=20ff21d751, Btw I hacked upower to work with cw2015 of sos@ see https://github.com/jsm222/upower-pbp there are binary releases for my latest test image..


----------



## evantaylor (Oct 29, 2022)

I had to clear out the default uboot from both SPI and the Emmc to make the PersonalBSD image boot correctly.  Hint, if you don't see the FreeBSD Logo initially, its using the wrong uboot.


----------

