History log of /openbsd-current/usr.sbin/installboot/powerpc64_installboot.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.9 26-Apr-2023 kn

Fix confusing comments, no object change; with caspar


Revision tags: OPENBSD_7_3_BASE
# 1.8 06-Nov-2022 krw

Don't leak args.fspec in create_filesystem().

ok kn@


# 1.7 27-Sep-2022 kn

fix passing explicit stage files

This fixes installboot regress on powerpc64.

The exact same diff already landed for macppc; efi also has the same fix
for md_init() but without the string handling cleanup that entails.

macppc_installboot.c r1.6 "Fix passing explicit stage files":

Using `stage1' leads to a bit more cleanup since early MI installboot.c
handles `-r', i.e. write_filesystem() no longer has needs to do the
fileprefix() dance itself.

OK gkoehler


Revision tags: OPENBSD_7_2_BASE
# 1.6 14-Sep-2022 kn

Backout "Reflect script failure in exit code"

amd64 install using (G)PT seems busted as reported by tb


# 1.5 09-Sep-2022 kn

Reflect script failure in exit code

installboot(8) runs newfs(8) and fsck(8) via system(3) but only checks
failures of the function itself, always returning zero no matter what the
programs/shell returned.

This is bad for regress tests relying on correct return codes.

create_filesystem() itself must not exit as write_filesystem() calls it and
cleans up temporary files upon failure.

Make it return -1 if the script returned non-zero so write_filesystem()
handles it as error, cleans up and makes installboot exit 1.

Stop ignoring create_filesystem()'s return code in md_prepareboot() and
exit the same way.

Here's the change in behaviour on arm64 (newfs fails because of the
vnd/disklabel race, see "Race in disk_attach_callback?" on tech@):

# installboot -vp vnd0 ; echo $?
newfsing 6694ae5b0d7596ed.i
newfs_msdos: /dev/r6694ae5b0d7596ed.i: No such file or directory
0
# ./obj/installboot -vp vnd0 ; echo $?
newfsing 6694ae5b0d7596ed.i
newfs_msdos: /dev/r6694ae5b0d7596ed.i: No such file or directory
1

Tested on amd64 arm64 macppc octeon powerpc64 sparc64
OK millert


# 1.4 31-Aug-2022 krw

Replace "newfs_msdos" and "fsck_msdos" with "newfs -t msdos" and "fsck -t
msdos".

Add some missing spaces after "=".

Constify the static strings.

Prodded a while ago by deraadt@, tweaks from kn@, ok kn@


Revision tags: OPENBSD_7_0_BASE OPENBSD_7_1_BASE
# 1.3 20-Jul-2021 kettenis

Add -p option to "prepare" (newfs) a filesystem that will be used for
the bootloader. This is a no-op on architectures where such a filesystem
isn't needed.

ok krw@, deraadt@


Revision tags: OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.2 18-Jul-2020 deraadt

Create grub.cfg file as required
ok kettenis


# 1.1 17-Jul-2020 kettenis

Add powerpc64 support; straight copy from octeon.

ok deraadt@


# 1.8 06-Nov-2022 krw

Don't leak args.fspec in create_filesystem().

ok kn@


# 1.7 27-Sep-2022 kn

fix passing explicit stage files

This fixes installboot regress on powerpc64.

The exact same diff already landed for macppc; efi also has the same fix
for md_init() but without the string handling cleanup that entails.

macppc_installboot.c r1.6 "Fix passing explicit stage files":

Using `stage1' leads to a bit more cleanup since early MI installboot.c
handles `-r', i.e. write_filesystem() no longer has needs to do the
fileprefix() dance itself.

OK gkoehler


Revision tags: OPENBSD_7_2_BASE
# 1.6 14-Sep-2022 kn

Backout "Reflect script failure in exit code"

amd64 install using (G)PT seems busted as reported by tb


# 1.5 09-Sep-2022 kn

Reflect script failure in exit code

installboot(8) runs newfs(8) and fsck(8) via system(3) but only checks
failures of the function itself, always returning zero no matter what the
programs/shell returned.

This is bad for regress tests relying on correct return codes.

create_filesystem() itself must not exit as write_filesystem() calls it and
cleans up temporary files upon failure.

Make it return -1 if the script returned non-zero so write_filesystem()
handles it as error, cleans up and makes installboot exit 1.

Stop ignoring create_filesystem()'s return code in md_prepareboot() and
exit the same way.

Here's the change in behaviour on arm64 (newfs fails because of the
vnd/disklabel race, see "Race in disk_attach_callback?" on tech@):

# installboot -vp vnd0 ; echo $?
newfsing 6694ae5b0d7596ed.i
newfs_msdos: /dev/r6694ae5b0d7596ed.i: No such file or directory
0
# ./obj/installboot -vp vnd0 ; echo $?
newfsing 6694ae5b0d7596ed.i
newfs_msdos: /dev/r6694ae5b0d7596ed.i: No such file or directory
1

Tested on amd64 arm64 macppc octeon powerpc64 sparc64
OK millert


# 1.4 31-Aug-2022 krw

Replace "newfs_msdos" and "fsck_msdos" with "newfs -t msdos" and "fsck -t
msdos".

Add some missing spaces after "=".

Constify the static strings.

Prodded a while ago by deraadt@, tweaks from kn@, ok kn@


Revision tags: OPENBSD_7_0_BASE OPENBSD_7_1_BASE
# 1.3 20-Jul-2021 kettenis

Add -p option to "prepare" (newfs) a filesystem that will be used for
the bootloader. This is a no-op on architectures where such a filesystem
isn't needed.

ok krw@, deraadt@


Revision tags: OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.2 18-Jul-2020 deraadt

Create grub.cfg file as required
ok kettenis


# 1.1 17-Jul-2020 kettenis

Add powerpc64 support; straight copy from octeon.

ok deraadt@