History log of /freebsd-current/release/arm64/make-memstick.sh
Revision Date Author Comments
# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# 1a9b1c36 28-Feb-2022 Jessica Clarke <jrtc27@FreeBSD.org>

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


# 13cb0041 28-Feb-2022 Jessica Clarke <jrtc27@FreeBSD.org>

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


# e0f9cec7 30-Oct-2020 Mitchell Horne <mhorne@FreeBSD.org>

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


# db8b5613 20-Dec-2018 Rebecca Cran <bcran@FreeBSD.org>

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


# 8ea90e07 10-Apr-2018 Ed Maste <emaste@FreeBSD.org>

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


# 35553468 11-Sep-2017 Ed Maste <emaste@FreeBSD.org>

make-memstick.sh: use UFSv2

There's not much practical difference as far as install media is
concerned but newfs creates UFSv2 by default and it is sensible to use
the contemporary UFS version.

I also intend to change makefs to create UFSv2 by default (to match
newfs) so we'll want make-memstick.sh to be explicit, rather than
relying on the host tool's default.

Reviewed by: andrew, gjb, jhibbits
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D12231


# f20be204 11-Sep-2017 Ed Maste <emaste@FreeBSD.org>

revert unintentional changes from r323436


# e9346a94 11-Sep-2017 Ed Maste <emaste@FreeBSD.org>

boot1: remove BOOT1_MAXSIZE default value

This Makefile relies on Makefile.fat providing the correct value for
BOOT1_MAXSIZE and BOOT1_OFFSET. Since BOOT1_OFFSET had no default value
here the build would already fail if Makefile.fat did not provide
correct values.

Sponsored by: The FreeBSD Foundation


# 52c32434 01-Nov-2016 Ed Maste <emaste@FreeBSD.org>

arm64 make-memstick.sh: use 'set -e' to abort if any step fails

Also remove the now-redundant error handling that was only for makefs.

This script was run on an older FreeBSD host that lacked efi-on-mbr
support in makefs. A warning was emitted on the console (from makefs)
but the script continued running and exited with 0.

Reviewed by: gjb
Sponsored by: The FreeBSD Foundation


# af625dc9 06-Jul-2016 Wojciech Macek <wma@FreeBSD.org>

ARM64: move to GPT scheme in sysinstall

It's time to abandon MBR installations on
ARM64 platforms.

Obtained from: Semihalf
Submitted by: Dominik Ermel <der@semihalf.com>
Sponsored by: Cavium
Reviewed by: gjb, emaste, marcel
Approved by: re (gjb)
Differential Revision: https://reviews.freebsd.org/D6798


# 10c40dfa 04-Jan-2016 Glen Barber <gjb@FreeBSD.org>

Prevent memstick installation medium from attempting to mount
the root filesystem read-write. This causes problems booting
the memstick installation medium from write-protected USB flash
drives.

Submitted by: A.J. Kehoe IV [1], Oliver Jones [2]
PR: 187161 [1], 205886 [2]
MFC after: 1 week
Sponsored by: The FreeBSD Foundation


# 082a550b 27-Apr-2015 Glen Barber <gjb@FreeBSD.org>

Do not nest the BSD and MBR partitions, which produces
an unbootable image. Use just an MBR scheme instead.

Sponsored by: The FreeBSD Foundation


# 62e0fc04 27-Apr-2015 Glen Barber <gjb@FreeBSD.org>

Generate the arm64/aarch64 memstick image as MBR instead of
GPT.

Boot tested by: andrew
Sponsored by: The FreeBSD Foundation


# e19e6781 22-Apr-2015 Glen Barber <gjb@FreeBSD.org>

Remove the gptboot partition from the arm64 memory stick image,
which is not needed/used.

Sponsored by: The FreeBSD Foundation


# 47a5593e 20-Apr-2015 Glen Barber <gjb@FreeBSD.org>

Copy amd64/make-memstick.sh to arm64/make-memstick.sh for
aarch64 memory stick images.

Although arm64 does not yet have USB support, the memstick
image should be bootable with certain virtualization tools,
such as qemu.

Sponsored by: The FreeBSD Foundation