Discussion:
Asking for help, to locally compile FreeBSD source code for ARM cpu for Raspberry Pi 4B with 8 Gigs
Fred Finster via freebsd-arm
2021-05-13 17:32:41 UTC
Permalink
Hello fellow  FreeBSD ARM developers,

I wish to setup a duplicate environment that you have on your local
machine to compile the FreeBSD kernel for a Raspberry Pi 4B with 8 Gigs
Dram memory, on my local AMD64 machine.   ( does this same image work
directly with the Raspberry Pi 400 keyboard?  Is there a different
configuration file to use for the Raspi Keyboard 400?).

Can you share any configuration files that you have created with me?  
Is it simple as following the FreeBSD  Handbook chapters 8,24 for
compiling  and adding "Target_Arch=aarch64" to the Makefile? I think I
found my answer in the personal website URL links below.  Like abnevme

https://docs.freebsd.org/en/books/handbook/kernelconfig/ Chapter 8

https://docs.freebsd.org/en/books/handbook/cutting-edge/ Chapter 24


URL links to Read: and increase our knowledge

http://www.mrp3.com/fbsd_rpi.html  Using FreeBSD on a Raspberry Pi 3

https://ogris.de/howtos/freebsd-raspberry.html  50 step howto

https://abnevme.wordpress.com/2014/06/21/84/ 2nd take

06.21.14 <https://abnevme.wordpress.com/2014/06/21/84/>
by abnev <https://abnevme.wordpress.com/author/abnev/>


Building a custom FreeBSD image for the RaspberryPi from source

https://abnevme.wordpress.com/2014/06/18/building-a-custom-freebsd-raspberrypi-image/
Building a custom image for Raspberry Pi

https://medium.com/swlh/freebsd-usb-boot-on-raspberry-pi-4-765cb6e75570
Alan Thompson Nove 2020 medium article.

https://a-delacruz.github.io/ubuntu/rpi3-setup-64bit-uboot.html Rpi3
setup 64bit Uboot



So many specific questions,  I have.  Probably have included too much
information here. Sorry.  Will try to setup mail app to send text only
format.

Thank you for helping a new participant, to build the same as you.


Is there a reason to use the gcc over clang compiler?   I like using
the  clang compiler.


Here is a search on the freebsd buglist for "raspberry"
<https://bugs.freebsd.org/bugzilla/buglist.cgi?quicksearch=raspberry&list_id=420179>

https://bugs.freebsd.org/bugzilla/buglist.cgi?quicksearch=raspberry&list_id=420179


BUGS:

TL-WN823N  rtl8188eu RealTek chip set.  Works on x64-86 GhostBSD 13.0
(based on FreeBSD 13.0 sources absorbed/transferred into GhostBSD
sources.  Does the ports need to be updated for the FreeBSD ARM build
kernel?   tested on snapshot version April 1, 2021 RPI FreeBSD 14.0
CURRENT kernel.   Will try again with the May 6 or later date snapshot.
Maybe it got fixed since April 1 2021 snapshot version.
<https://download.freebsd.org/ftp/snapshots/arm64/aarch64/ISO-IMAGES/13.0/>

https://download.freebsd.org/ftp/snapshots/arm64/aarch64/ISO-IMAGES/13.0/

Same chip USB Wifi Dongle,  can  "ifconfig wlan0 up scan" and list local
access points.

yet using   "wpa_supplicant -d -K -i wlan0 -c /etc/wpa_supplicant.conf "
fails during the "ifconfig wlan0 down" sequence of powering down the
chip rtl8192eu.  Was testing a wifi usb dongle replacement for the
Broadcom Wifi chipset on the Raspberry Pi board.


ADDITIONAL RESOURCES:

I am testing building FreeBSD ARM kernel from source, then moving on to
building GhostBSD.org from source code.  I have a blog and telegram
group associated with those activities.

https://ghostbsd_arm64.blogspot.com My Blog about compiling GhostBSD for
ARM and testing on Raspberry Pi.

https://t.me/joinchat/ST6N61pnu3Di8zgk Telegram Group  "GhostBSD ARM port"


CONFIGURATION SETUP:

I am trying to keep track of (or audit)  which files work to boot up
RaspberryPi 4B with 8 gigs.

I found this audit tool md5deep and installed from pkgs

pkg install md5deep

md5deep -z -b * > ~/audit_bootfiles_raspi4b_may12.md5

My Config.txt  file supports  1920x1080 pixel HDMI output to TV / screen
monitor.

https://ghostbsd-arm64.blogspot.com/2021/04/april-1-2021-configtxt-changes-raspi.html

Modify config.txt file to match the following:  comment out #hdmi_safe=1

[pi4]
#hdmi_safe=1
#overscan_left=1
# 1080p screen  1920x1080 pixel screen size
hdmi_group=1
hdmi_mode=16

cat /media/BOOT/config.txt
[all]
arm_64bit=1
dtparam=audio=on,i2c_arm=on,spi=on
dtoverlay=mmc
dtoverlay=disable-bt
device_tree_address=0x4000
kernel=u-boot.bin

[pi4]
hdmi_safe=1
armstub=armstub8-gic.bin


NEW VERSION:

cat /media/BOOT/config.txt
[all]
arm_64bit=1
dtparam=audio=on,i2c_arm=on,spi=on
dtoverlay=mmc
dtoverlay=disable-bt
device_tree_address=0x4000
kernel=u-boot.bin

[pi4]
#hdmi_safe=1

#overscan_left=1
# 1080p screen  1920x1080 pixel screen size
hdmi_group=1
hdmi_mode=16armstub=armstub8-gic.bin

Loading...