Commit Graph

67 Commits

Author SHA1 Message Date
Kyle Evans
9245ced9c8 release: remove the RPI CM4s .dtb
This isn't actually packaged by the sysutils/rpi-firmware port, so we
cannot include it in the image.  Fix the RPI release build until an
interested party adds it to the port and packages are available.

Reported by:	cperciva
2024-04-25 17:10:32 -05:00
Klaus Küchemann
1bd4f769ca add dtb support for RPI CM4, CM4s, CM4_ioBoard
Signed-off-by: Klaus Küchemann <maciphone2@googlemail.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1182
2024-04-19 16:54:32 -06:00
Mike Karels
4347ef6050 arm64/RPI: enable powerd by default on arm64-aarch64-RPI images
Most 64-bit Raspberry Pi models have a variable processor clock
speed that defaults to a slow speed (e.g. 600 MHz for a nominal
1.5 GHz clock).  This results in everything running slowly unless
or until powerd is started, and FreeBSD is then thought to be slow.
Enable powerd by default in /etc/rc.conf on the arm64-aarch64-RPI
images.  Tested on Raspberry Pi 3B+ and 4B so far.

PR:		256836
MFC after:	1 month
Reviewed by:	rgrimes
Differential Revision:	https://reviews.freebsd.org/D43296
2024-01-05 13:41:24 -06:00
Warner Losh
d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Jessica Clarke
cefe58791b release: Support GNU stat in mkisoimages.sh
BSD stat and GNU stat differ significantly when it comes to using a
custom format string, both in the option name and in the format string
itself. Handle both here (assuming Linux means GNU stat rather than BSD
stat).

Reviewed by:	brooks, gjb
Obtained from:	CheriBSD
Differential Revision:	https://reviews.freebsd.org/D35814
2022-07-15 23:04:48 +01:00
Glen Barber
1dfcff294e release: increase IMAGE_SIZE for arm, arm64, riscv
Related to: 	PR 264032
MFC after:	5 minutes
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-07-13 14:36:22 -04:00
Jessica Clarke
1a9b1c367f release: Add support for building on non-FreeBSD
This requires two sets of changes. Firstly, for non-FreeBSD, we do not
know where tools are in PATH (and it is likely that some are not in
system directories and have been built as bootstrap tools during the
build), so we should leave PATH alone and trust the user. Secondly,
makefs needs a master.passwd for building images from a METALOG file, so
pass the directory in the image tree to makefs's -N option in order to
pick up a valid FreeBSD master.passwd; this is unnecessary on FreeBSD
(except in the edge case of building an image that refers to users or
groups not present in the host's database, which is unlikely but
technically possible) but harmless so can be done unconditionally.

Reviewed by:	brooks, emaste, gjb
Differential Revision:	https://reviews.freebsd.org/D34001
2022-02-28 22:37:37 +00:00
Jessica Clarke
13cb004130 release: Support -DNO_ROOT image building
This requires a bunch of METALOG mangling to include the files we inject
into the tree. The mkisoimages.sh and make-memstick.sh scripts are now
called with the current directory inside the tree so that the relative
paths in the METALOG match up with the current directory. The scripts do
not require this when not using a METALOG, but for simplicity we always
do so. The Makefile mangles the real METALOG created from the install,
as those files are shared across all uses of the tree, but the shell
scripts create a temporary copy of the METALOG that they mangle as their
tree modifications are specific to that image. We also need to pass -D
to makefs to turn any duplicate METALOG entry errors into warnings, as
we have many (harmless) instances of those.

Whilst dvd1.iso should work, the !NOPKG code will need more work to
support this.

All media will also lack mergemaster and etcupdate trees, since more
work is needed to add -DNO_ROOT modes to them. Users of install media
built this way will have to manually bootstrap them.

Reviewed by:	brooks, gjb
Differential Revision:	https://reviews.freebsd.org/D33999
2022-02-28 22:37:03 +00:00
Jessica Clarke
045c8f5264 mkisoimages.sh: Avoid creating temporary files in the current directory
Currently the current directory is the parent of the rootfs directory,
but this will change in order to support NO_ROOT builds that use a
metalog manifest, since those need to have the current directory be the
rootfs itself in order for the relative paths to be correct, and we do
not want the non-METALOG case (which passes the directory to makefs) to
pick up leftover temporary .img files from a previous failed build.

Reviewed by:	brooks, emaste, gjb
Differential Revision:	https://reviews.freebsd.org/D33998
2022-02-28 22:36:51 +00:00
Emmanuel Vadot
735041a613 arm64: allwinner: Remove sun50i-a64-opp
This is unneeded now that the DTS have the opp.
MFC after:	1 week
Sponsored by:	Diablotin Systems
2021-07-24 17:59:35 +02:00
Max Stucchi
1976e07954 Add bcm2710-rpi-cm3.dtb to the list of DTBs being added.
This allows to boot out of the box on the RPI COmpute Module 3 with 32G
of eMMC.

Tested by:		imp confirmed .dtb is in the rpi-firmware pkg
Reviewed by:		gjb@, imp@
Pull Request:		https://github.com/freebsd/freebsd-src/pull/452

Sponsored by:		Netflix
2021-06-02 11:28:01 -06:00
Glen Barber
f61e92ca5a release: permanently remove the 'reldoc' target and associates
Following 7b1d1a1658, the structure
for the reldoc target has significantly changed as result of the
ASCIIDoctor/Hugo migration.  As the release notes related files
on the installation medium are inherently out of date, purge them
entirely.

Discussed within:	re, doceng
No objection:		re (silence), doceng (silence)
Timeout:		2 weeks
MFC after:		1 week
MFC to:			stable/13, stable/12, and stable/11 only
Sponsored by:		Rubicon Communications, LLC ("Netgate")
2021-02-17 23:00:03 -05:00
Emmanuel Vadot
183d6cc0e0 release: ROCKPRO64: Remove the quirk that disable the big cores
It's not needed anymore.
2021-01-27 23:31:18 +01:00
Emmanuel Vadot
ff9c6d3f09 release: Rename arm64/RPI3.conf to arm64/RPI.conf
We now have a u-boot port and config.txt for booting on all 64bits
variant of the RPI boards (RPI2v1.1, RPI3* and RPI4*) so use
the new u-boot-rpi-arm64 and the config_arm64.txt files.

Discussed with: karels, kevans
2020-12-15 15:13:06 +00:00
Emmanuel Vadot
5321a88409 release: rpi3: Copy the bcm2710 variant of the rpi2
This is the dtb intented to be used for booting RPI2 v1.2 in aarch64.
2020-11-22 18:42:08 +00:00
Emmanuel Vadot
44bef6729b release: Switch the Allwinner board to GPT
Allwinner bootrom have an alternate location for u-boot at 128k.
Work was made recently in u-boot to relocate correctly if loaded from
there.
The advantage of this offset is that we can now use a GPT scheme.
2020-11-19 14:27:01 +00:00
Mitchell Horne
e0f9cec7d6 arm64: set the correct partition type in make-memstick.sh
We create a UFS root filesystem using makefs(8), and later pass it to
mkimg(1) when creating the final image. The correct partition type is
freebsd-ufs; the freebsd parition type is for partitions containing a
BSD disklabel.

Reviewed by:	emaste
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D26987
2020-10-30 18:22:46 +00:00
Glen Barber
bdccfea1ea Bump the ISO EFI partition size from 1024 to 2048, following r366732.
Suggested by:	imp
Sponsored by:	Rubicon Communications, LLC (netgate.com)
2020-10-15 23:05:13 +00:00
Glen Barber
a0da9a6272 Increase the amd64 ISO ESP file size from 800KB to 1024KB.
At some poing over the last week, the bootx64.efi file has grown
past the 800KB threshold, resulting in being unable to copy it to
the EFI/BOOT directory.

 # stat -f %z efiboot.znWo7m
 819200
 # stat -f %z stand-test.PIEugN/EFI/BOOT/bootx64.efi
 842752

The comment in the script that creates the ISOs suggests that 800KB
is the maximum allowed for the boot code, however I was able to
boot an ISO with a 1024KB boot partition.  Additionally, I verified
against an ISO from OtherOS, where the boot EFI partition is 2.4MB.

Sponsored by:	Rubicon Communications, LLC (netgate.com)
2020-10-15 17:12:58 +00:00
Mitchell Horne
6dadc5d1cd arm64: generate ISO release images
Some IPMI implementations on arm64 are reportedly unable to load our
memstick installer images, but support the older ISO format. Start
generating these for arm64.

Unlike installer ISOs for other platforms, these images are UEFI-only.

Reviewed by:	emaste
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D26452
2020-09-18 14:40:13 +00:00
Emmanuel Vadot
d7c8186d67 release: RPI3: Add the RPI2 DTB
The RPI2 v1.2 is using the same SoC as the RPI3 so it can boot this image
but needs the RPI2 dtb.

MFC after:	3 days
2020-08-08 16:56:20 +00:00
Emmanuel Vadot
56005e4b71 release: arm64: rockpro64: Set hw.ncpu to 4
Since there is known issue with big.LITTLE set the number of CPU to 4
which is the number present in the LITTLE cluster.
2020-04-25 20:00:44 +00:00
Emmanuel Vadot
b407a449ac Add PINE64 ROCK64 config for generation of release images 2020-04-24 16:33:07 +00:00
Emmanuel Vadot
0edb2e1d0c Add PINE64 ROCKPro64 config for generation of release images
Submitted by:	Daniel Engberg
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D22538
2020-04-24 16:32:25 +00:00
Emmanuel Vadot
c5e7aeedcf release: arm64: Remove DTSO for Allwinner boards
Both SID and THS dts node are now in the main dts and the DTSO have
been removed in r359935

MFC after:	2 month
X-MFC-With:	r359935
2020-04-19 10:50:29 +00:00
Kyle Evans
a0dc3f8626 RPI3: Add RPi4 firmware files to the FAT partition
I've discovered I have this local diff that never got committed -- this
should have been a part of r355424.

Reproted by:	Klaus Küchemann <maciphone2@googlemail.com>
2020-01-31 15:56:08 +00:00
Kyle Evans
324cdd9320 release: chase ports r519089 (rpi-firmware update)
The recent rpi-firmware update renamed "0" to "zero" in the RPi0 DTB
filename

It also included the components needed to boot the RPi4, so install those
now -- interested parties can install sysutils/u-boot-rpi4 and copy
config_rpi4.txt to config.txt on the FAT partition in order to boot the
board. Do note that we currently don't support ethernet/usb/pci.

Reviewed by:	manu
MFC after:	3 days
2019-12-05 16:17:56 +00:00
Glen Barber
6a9f9e9b95 Bump the IMAGE_SIZE for arm64 SoC images to prevent failures due
to full filesystem.  This makes the size of the arm64 SoC images
consistent with armv6 and armv7.

MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2019-03-21 14:17:55 +00:00
Emmanuel Vadot
90b924a12e release: arm64: pine64-lts: Use the newly created u-boot-pine64-lts port
In U-Boot 2019.01 there is now a config for this board, use it for the
release image.

MFC after:	1 week
2019-02-04 18:30:47 +00:00
Emmanuel Vadot
ee8a8076a2 release: arm64: rpi3: Install the RPI3B+ DTB file
We should use the correct DTB file otherwise the firmware uses
the RPI3B one.

MFC after:	1 week
2019-02-04 18:29:23 +00:00
Rebecca Cran
db8b561345 Rework UEFI ESP generation
Currently, the installer uses pre-created 800KB FAT12 filesystems that
it dd's onto the ESP partition.
This changeset improves that by having the installer generate a FAT32
filesystem directly onto the ESP using newfs_msdos and then copying
loader.efi into /EFI/freebsd.
For live installs it then runs efibootmgr to add a FreeBSD boot entry
in the BIOS.

Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D17947
2018-12-20 19:39:37 +00:00
Emmanuel Vadot
d6c31218b6 release: arm64: Add opp dtbo to PINE* boards
MFC after:	1 month
2018-11-29 22:36:36 +00:00
Emmanuel Vadot
9848333b6c release: arm64: Add PINEBOOK config
Add a configuration for PINEBOOK image.
Pinebook is a arm64 laptop based on a Pine64 board.

Since the usb trackpad need a quirk, add a common function for adding
quirk for arm board.
A default one is supplied as most board to not need quirks.

Reviewed by:	gjb
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D18337
2018-11-26 16:38:39 +00:00
Emmanuel Vadot
eeab916dad release: arm64: Enable overlays for PINE64 and PINE64-LTS
Approved by:	re (gjb)
2018-08-24 15:01:58 +00:00
Emmanuel Vadot
5a88ea3214 release: arm64: Add PINE64-LTS configuration file
Pine64 isn't produced anymore but Pine64-LTS is.
This image works on the LTS release and the Sopine module.

Reviewed by:	gjb
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D16487
2018-07-31 19:14:52 +00:00
Emmanuel Vadot
43e289df5a release: Add arm_install_boot to install the commit boot bits
This reduce the per-board arm_install_uboot to just install u-boot.
While here remove the installation of rpi.dtb and rpi2.dtb as we load
them from the UFS partition via ubldr.

Reviewed by:	gjb, imp (older version)
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D16239
2018-07-22 12:03:17 +00:00
Emmanuel Vadot
785724755a release: arm64: Use loader.efi as bootaa64.efi for RPI3 and PINE64
boot1.efi have some trouble to read MBR partitions, it needs them to be
aligned a certain way while loader.efi can cope with them either way.
We want to switch to loader.efi as the main efi loader everywhere, it seems
that arm64 using MBR partition will be the guinea pig.

Tested On: RPI3, Pine64
Reviewed by:	imp
Approved by:	gjb
2018-05-21 11:58:02 +00:00
Emmanuel Vadot
78f78afc70 release: rpi3: Copy the special rpi3 config.txt
RPI* 32bits and RPI* 64bits have a different config.txt
Copy to correct config.txt to the fat partition of the release image.
Also copy pwm.dtbo as some people want to use it.

Reviewed by:	gjb
2018-05-17 19:10:13 +00:00
Ed Maste
8ea90e075c make-memstick.sh: put partition args on separate lines
This makes it easier to identify the individual partition types and
facilitates comparisons across architectures.

Reviewed by:	gjb
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2018-04-10 19:49:04 +00:00
Glen Barber
32c434538a Following r331292, many of the files (such as the LICENSE file)
have moved from the u-boot-rpi3 share directory to the default
rpi-firmware share directory.  Remove the files from UBOOT_FILES
and append the DTB file to a DTB_FILES list so the correct path
is used, fixing a build failure.

Sponsored by:	The FreeBSD Foundation
2018-04-10 17:40:44 +00:00
Glen Barber
3377818679 Following ports commit r465175, avoid fetch(1) to obtain
overlays and DTB files for the RPI3.

Submitted by:	manu
Sponsored by:	The FreeBSD Foundation
2018-03-21 14:36:16 +00:00
Andrew Turner
e90c2c3638 Put the pine64 root filesystem on teh correct partition.
The Pine64 root filesystem was incorrectly created directly on the MBR
partition. This can cause the loader to get confused when loading the
kernel from this filesystem.

The loader will see this as a small partition meaning later checks to
ensure it doesn't read past the end of the disk incorrectly report a
failure. This seems to work mostly by accident with the released images as
they are smaller than the reported size, however after growfs has run the
image may no longer boot.

Reviewed by:	gjb, emaste, imp
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D14343
2018-02-16 16:22:54 +00:00
Glen Barber
2833897f35 Use chroot(8) when invoking realpath(1) when setting BOOTFILES,
otherwise realpath(1) exits due to a nonexistent directory.

Sponsored by:	The FreeBSD Foundation
2017-11-20 15:03:03 +00:00
Glen Barber
f295b9db79 Add general configuration files used by release/release.sh for
big-iron installation images.

MFC after:	3 days
MFC with:	r325948, r325949, r325950, r325951
Sponsored by:	The FreeBSD Foundation
2017-11-17 18:00:52 +00:00
Glen Barber
41edb6080c Fix indentation.
Sponsored by:	The FreeBSD Foundation
2017-11-17 17:40:53 +00:00
Glen Barber
d025cec625 Sort variables in arm64 SoC configurations.
Remove an unneeded UBLDR_LOADADDR from RPI3.conf.

Sponsored by:	The FreeBSD Foundation
2017-11-17 17:34:52 +00:00
Glen Barber
14dc747a10 Remove stray SRCBRANCH included by mistake.
Sponsored by:	The FreeBSD Foundation
2017-11-17 17:33:06 +00:00
Warner Losh
ca987d4641 Move sys/boot to stand. Fix all references to new location
Sponsored by:	Netflix
2017-11-14 23:02:19 +00:00
Glen Barber
760c3a19e2 Correct the path to the md(4)-backed UFS filesystem for pine64
images.

Boot-tested by:	lidl
Sponsored by:	The FreeBSD Foundation
2017-11-14 14:31:02 +00:00
Glen Barber
91fcd6f57c Fix an error in the PINE64.conf, where the ubldr is not needed
and the u-boot needs to be written to the partition with dd(1).

Reported by:	manu
Sponsored by:	The FreeBSD Foundation
2017-11-03 19:32:10 +00:00