Page MenuHomeFreeBSD

nanobsd: Add SBC board configurations and CIDATA partition support
Needs ReviewPublic

Authored by senguptaangshuman17_gmail.com on Thu, Aug 27, 9:37 PM.
Tags
None
Referenced Files
F170019657: D59235.diff
Thu, Sep 3, 6:41 AM
F169984588: D59235.id185282.diff
Thu, Sep 3, 4:41 AM
F169971833: D59235.id185282.diff
Thu, Sep 3, 3:40 AM
F169925152: D59235.diff
Wed, Sep 2, 11:58 PM
Unknown Object (File)
Tue, Sep 1, 9:06 PM
Unknown Object (File)
Tue, Sep 1, 8:32 PM
Unknown Object (File)
Tue, Sep 1, 1:37 PM
Unknown Object (File)
Tue, Sep 1, 12:34 PM
Subscribers

Details

Reviewers
jlduran
jrm
ashish
Summary

Add board configuration files for ARM64 SBCs in sbc/ (PINE64, PINE64-LTS,
PINEBOOK, ROCK64, ROCKPRO64, RPI).

Add populate_cidata_partition hook in ufs.sh and use is_defined for
nanobsd_loader_conf_extra in defaults.sh.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 76316
Build 73199: arc lint + arc unit

Event Timeline

I believe we got the acronym wrong, shouldn't the directory name be sbc (Single-Board Computer)?

senguptaangshuman17_gmail.com retitled this revision from nanobsd: Add SoC board configurations and CIDATA partition support to nanobsd: Add SBC board configurations and CIDATA partition support.Sat, Aug 29, 9:54 AM
senguptaangshuman17_gmail.com edited the summary of this revision. (Show Details)

Let's examine release's functions one by one:

  • arm_create_user is handled by another function in NanoBSD.
  • arm_setup_usb_otg is somewhat handled by another function, but it is missing a few things.
  • arm64_setup_multicons is handled by another function in NanoBSD.
  • arm_setup_fdt_overlays is OK.
  • arm_setup_minimal_loader I think we can ignore this customization?
  • arm_do_quirk is achieved using nanobsd_loader_conf_extra (only used by PINEBOOK).

Some of these boards (RPI for example) also require:

if [ -n "${CONFIG_POWERD_ENABLE}" ]; then
	echo 'powerd_enable="YES" 	# Run powerd to lower our power usage.' >> ${NANO_WORLDDIR}/etc/defaults/rc.conf
fi

So I would suggest also adding a nanobsd_rc_conf_extra function (similar to nanobsd_loader_conf_extra) in the NanoBSD section, as a way to override/add more defaults into rc.conf.

tools/tools/nanobsd/sbc/PINE64-LTS.conf
2

When these files are used, we must check that the EMBEDDEDPORTS are actually installed (do not attempt to install the ports, just check if they are currently installed in the build system).
Maybe using pkg-info(8) -e, and an error message like the one currently in embedded/common (err "${PORT} not installed. Sadly, it must be.")

tools/tools/nanobsd/sbc/RPI.conf
1

This file should have a comment (something along the lines):

# Raspberry Pi 4 and newer (GPT supported)