Re: installboot(8): copy apple-boot to ESP

2022-11-21 Thread Klemens Nanni
On Mon, Nov 21, 2022 at 07:01:44PM +0100, Tobias Heider wrote: > + if (verbose) This block could use braces. > + fprintf(stderr, "%s %s to %s\n", > + (nowrite ? "would copy" : "copying"), > + src, dst); > +

Re: installboot(8): copy apple-boot to ESP

2022-11-21 Thread Klemens Nanni
On Mon, Nov 21, 2022 at 07:01:44PM +0100, Tobias Heider wrote: > On Mon, Nov 21, 2022 at 03:09:25PM +, Klemens Nanni wrote: > > On Mon, Nov 21, 2022 at 03:42:37PM +0100, Tobias Heider wrote: > > > Here is a more cleaned up version of the previous diff. I moved all the > > > firmware logic to a

Re: installboot(8): copy apple-boot to ESP

2022-11-21 Thread Tobias Heider
On Mon, Nov 21, 2022 at 03:09:25PM +, Klemens Nanni wrote: > On Mon, Nov 21, 2022 at 03:42:37PM +0100, Tobias Heider wrote: > > Here is a more cleaned up version of the previous diff. I moved all the > > firmware logic to a new write_firmware() function. This should be easy > > to extend if w

Re: installboot(8): copy apple-boot to ESP

2022-11-21 Thread Klemens Nanni
On Mon, Nov 21, 2022 at 03:42:37PM +0100, Tobias Heider wrote: > Here is a more cleaned up version of the previous diff. I moved all the > firmware logic to a new write_firmware() function. This should be easy > to extend if we decide to ship more firmware this way. This seems more tidy. > > T

Re: installboot(8): copy apple-boot to ESP

2022-11-21 Thread Mark Kettenis
t; > > Here is the promised last diff we need to enable Apple M* > > > > > > bootloader updates. > > > > > > > > > > > > With this, installboot(8) will pick up apple-boot.bin from the > > > > > > firmware > > &

Re: installboot(8): copy apple-boot to ESP

2022-11-21 Thread Tobias Heider
Kettenis wrote: > > > > > Date: Sat, 19 Nov 2022 18:26:36 +0100 > > > > > From: Tobias Heider > > > > > > > > > > Here is the promised last diff we need to enable Apple M* bootloader > > > > > updates. > > > >

Re: installboot(8): copy apple-boot to ESP

2022-11-19 Thread Tobias Heider
> From: Tobias Heider > > > > > > > > Here is the promised last diff we need to enable Apple M* bootloader > > > > updates. > > > > > > > > With this, installboot(8) will pick up apple-boot.bin from the firmware > > > >

Re: installboot(8): copy apple-boot to ESP

2022-11-19 Thread Mark Kettenis
eed to enable Apple M* bootloader > > > updates. > > > > > > With this, installboot(8) will pick up apple-boot.bin from the firmware > > > directory and writes it to $ESP/m1n1/boot.bin if both file and target > > > directory exist. > > > Crea

Re: installboot(8): copy apple-boot to ESP

2022-11-19 Thread Tobias Heider
On Sat, Nov 19, 2022 at 06:33:51PM +0100, Mark Kettenis wrote: > > Date: Sat, 19 Nov 2022 18:26:36 +0100 > > From: Tobias Heider > > > > Here is the promised last diff we need to enable Apple M* bootloader > > updates. > > > > With this, installbo

Re: installboot(8): copy apple-boot to ESP

2022-11-19 Thread Mark Kettenis
> Date: Sat, 19 Nov 2022 18:26:36 +0100 > From: Tobias Heider > > Here is the promised last diff we need to enable Apple M* bootloader updates. > > With this, installboot(8) will pick up apple-boot.bin from the firmware > directory and writes it to $ESP/m1n1/boot.bin if

installboot(8): copy apple-boot to ESP

2022-11-19 Thread Tobias Heider
Here is the promised last diff we need to enable Apple M* bootloader updates. With this, installboot(8) will pick up apple-boot.bin from the firmware directory and writes it to $ESP/m1n1/boot.bin if both file and target directory exist. Creation of the m1n1/ directory is expected to happen during

boot_*.8: reference installboot.8, rectify FFS note on sparc64

2022-08-29 Thread Klemens Nanni
On sparc64, installboot does not deal with any file system; its -p is a NOOP and the old sys/arch/sparc64/installboot/ never prepared a file system, either, according to CVS history. Remove this single misleading mention alltogether and rely on the now consistently cross-linked MI installboot(8

Re: Use installboot(8) in armv7 install.md

2022-02-18 Thread Theo de Raadt
Lovely. Visa Hankala wrote: > Use installboot(8) in armv7 install.md. > > OK? > > Index: distrib/armv7/ramdisk/install.md > === > RCS file: src/distrib/armv7/ramdisk/install.md,v > retrieving revision

Re: Use installboot(8) in armv7 install.md

2022-02-18 Thread Mark Kettenis
> Date: Fri, 18 Feb 2022 14:20:03 + > From: Visa Hankala > > Use installboot(8) in armv7 install.md. > > OK? ok kettenis@ > Index: distrib/armv7/ramdisk/install.md > === > RCS file: src/distrib

Use installboot(8) in armv7 install.md

2022-02-18 Thread Visa Hankala
Use installboot(8) in armv7 install.md. OK? Index: distrib/armv7/ramdisk/install.md === RCS file: src/distrib/armv7/ramdisk/install.md,v retrieving revision 1.51 diff -u -p -r1.51 install.md --- distrib/armv7/ramdisk/install.md7

Re: Use installboot(8) in install.md of riscv64

2022-02-03 Thread Theo de Raadt
Visa Hankala wrote: > > I'd prefer to keep the names in the .c file, especially if the result > > is that they're scatter though the Makefile instead of in a single > > block. > > I agree. Putting definitions in a Makefile also sort of hides them. This is already an ugly Makefile, and I suppose

Re: Use installboot(8) in install.md of riscv64

2022-02-03 Thread Visa Hankala
On Thu, Feb 03, 2022 at 03:43:00PM +0100, Mark Kettenis wrote: > > Date: Thu, 3 Feb 2022 13:58:21 + > > From: Visa Hankala > > > > On Wed, Feb 02, 2022 at 01:23:56PM -0700, Theo de Raadt wrote: > > > Miod Vallat wrote: > > > > > > > > Index: usr.sbin/installboot/armv7_installboot.c > > > >

Re: Use installboot(8) in install.md of riscv64

2022-02-03 Thread Mark Kettenis
> Date: Thu, 3 Feb 2022 13:58:21 + > From: Visa Hankala > > On Wed, Feb 02, 2022 at 01:23:56PM -0700, Theo de Raadt wrote: > > Miod Vallat wrote: > > > > > > Index: usr.sbin/installboot/armv7_installboot.c > > > > === > > > > R

Re: Use installboot(8) in install.md of riscv64

2022-02-03 Thread Visa Hankala
On Wed, Feb 02, 2022 at 01:23:56PM -0700, Theo de Raadt wrote: > Miod Vallat wrote: > > > > Index: usr.sbin/installboot/armv7_installboot.c > > > === > > > RCS file: src/usr.sbin/installboot/armv7_installboot.c,v > > > retrieving rev

Re: Use installboot(8) in install.md of riscv64

2022-02-02 Thread Theo de Raadt
Miod Vallat wrote: > > Index: usr.sbin/installboot/armv7_installboot.c > > === > > RCS file: src/usr.sbin/installboot/armv7_installboot.c,v > > retrieving revision 1.11 > > diff -u -p -r1.11 armv7_installboot.c > > --- usr.sbin/insta

Re: Use installboot(8) in install.md of riscv64

2022-02-02 Thread Miod Vallat
> Index: usr.sbin/installboot/armv7_installboot.c > === > RCS file: src/usr.sbin/installboot/armv7_installboot.c,v > retrieving revision 1.11 > diff -u -p -r1.11 armv7_installboot.c > --- usr.sbin/installboot/armv7_installboot.c 20 Ju

Re: Use installboot(8) in install.md of riscv64

2022-02-02 Thread Theo de Raadt
That's a good step. Visa Hankala wrote: > On Tue, Feb 01, 2022 at 10:55:03AM -0700, Theo de Raadt wrote: > > Mark Kettenis wrote: > > > > > Maybe we should rename the file to efi_installboot.c and/or rearrange > > > the code slightly such that is becomes more obvious that the name of > > > the

Re: Use installboot(8) in install.md of riscv64

2022-02-02 Thread Mark Kettenis
> Date: Wed, 2 Feb 2022 14:16:03 + > From: Visa Hankala > > On Tue, Feb 01, 2022 at 10:55:03AM -0700, Theo de Raadt wrote: > > Mark Kettenis wrote: > > > > > Maybe we should rename the file to efi_installboot.c and/or rearrange > > > the code slightly such that is becomes more obvious that

Re: Use installboot(8) in install.md of riscv64

2022-02-02 Thread Visa Hankala
On Tue, Feb 01, 2022 at 10:55:03AM -0700, Theo de Raadt wrote: > Mark Kettenis wrote: > > > Maybe we should rename the file to efi_installboot.c and/or rearrange > > the code slightly such that is becomes more obvious that the name of > > the file is indeed the only difference. > > And obviously

Re: Use installboot(8) in install.md of riscv64

2022-02-01 Thread Theo de Raadt
Mark Kettenis wrote: > So yes, it would be good if visa@ could add the startup.sh creation > code to installboot for arm64, armv7 and riscv64. That would help. The non-efi setups will remain pretty stupid, lots of special cases. The long term idea is to have all that the installboot(8)

Re: Use installboot(8) in install.md of riscv64

2022-02-01 Thread Mark Kettenis
> > I think a new file is better, if this addition is made, rather than > > > hiding it > > > behind a #ifdef inside a .if file > > > > I disagree. Apart from the name of the bootloader file, the code is > > identical and this is by design! > > >

Re: Use installboot(8) in install.md of riscv64

2022-02-01 Thread Theo de Raadt
echo bootriscv64.efi > /mnt/mnt/efi/boot/startup.nsh OK let's call it write "boot%s.efi\n" to efi/boot/startup.nsh On all architectures. Always. Where %s is a rather strange substitution. The unfinished goal is for installboot(8) to do everything on all

Re: Use installboot(8) in install.md of riscv64

2022-02-01 Thread Theo de Raadt
t; identical and this is by design! > > Maybe we should rename the file to efi_installboot.c and/or rearrange > the code slightly such that is becomes more obvious that the name of > the file is indeed the only difference. The code cannot be the same, because installboot is supposed to

Re: Use installboot(8) in install.md of riscv64

2022-02-01 Thread Mark Kettenis
> From: "Theo de Raadt" > Date: Tue, 01 Feb 2022 09:28:59 -0700 > > A few comments. > > I think this approach is increasingly fragile, because a change for one > architecture will affect others. > > > -.elif ${MACHINE} == "armv7" || ${MACHINE} == "arm64" > > +.elif ${MACHINE} == "armv7" || ${MA

Re: Use installboot(8) in install.md of riscv64

2022-02-01 Thread Theo de Raadt
A few comments. I think this approach is increasingly fragile, because a change for one architecture will affect others. > -.elif ${MACHINE} == "armv7" || ${MACHINE} == "arm64" > +.elif ${MACHINE} == "armv7" || ${MACHINE} == "arm64" || ${MACHINE} == > "riscv64" > SRCS += armv7_installboot.c Ho

Use installboot(8) in install.md of riscv64

2022-02-01 Thread Visa Hankala
This makes the installer use installboot(8) on riscv64. OK? Index: riscv64/ramdisk/install.md === RCS file: src/distrib/riscv64/ramdisk/install.md,v retrieving revision 1.3 diff -u -p -r1.3 install.md --- riscv64/ramdisk/install.md

arm64 installboot(8) support

2017-05-06 Thread Mark Kettenis
Diff below makes installboot(8) work on arm64. It reuses the armv7 code just like amd64 reuses the i386 code. ok? Index: usr.sbin/installboot/Makefile === RCS file: /cvs/src/usr.sbin/installboot/Makefile,v retrieving revision 1.19

installboot(8) form armv7

2016-05-31 Thread Mark Kettenis
Since the armv7 installer now creates an msdos filesystem for the bootloader, here's an updated installboot(8) diff. Besides FAT32 LBA partitions (created by the installer), it also recognizes FAT16 LBA and EFI System partitions. Not sure whether we actually need to support FAT16, but

Re: installboot.8

2010-03-06 Thread Jason McIntyre
On Thu, Mar 04, 2010 at 06:56:30PM -0800, J.C. Roberts wrote: > The deleted statement is not true for i386 (probably "no longer" true) > and similar statements are in the BUGS section (rather than the main > body) of the installboot.8 man pages for other archs. The statements

Re: installboot.8

2010-03-05 Thread Jason McIntyre
ode (`boot> boot -s`), your disk > will be mounted read only on startup. Well, to be accurate, only the > root partition will be mounted, and it will be read-only. > > On the hand, if you use another way to drop the securelevel, such as > booting multi-user normally and then

Re: installboot.8

2010-03-05 Thread J.C. Roberts
> for i386, it seems this "bug" got fixed somewhere along the lines > > but the man page was not updated to reflect reality. > > > > just to check: installboot(8) says: > > Note that you must be in single-user mode or have your > kernel in insecure mode

Re: installboot.8

2010-03-04 Thread Jason McIntyre
On Thu, Mar 04, 2010 at 06:56:30PM -0800, J.C. Roberts wrote: > The deleted statement is not true for i386 (probably "no longer" true) > and similar statements are in the BUGS section (rather than the main > body) of the installboot.8 man pages for other archs. The statements

installboot.8

2010-03-04 Thread J.C. Roberts
The deleted statement is not true for i386 (probably "no longer" true) and similar statements are in the BUGS section (rather than the main body) of the installboot.8 man pages for other archs. The statements about securelevel requirements in the other archs are often somewhat different

Re: installboot(8) and fdisk(8) discrepancy in extended partition handling.

2009-09-03 Thread Hyjial Irldar
Hi ! After investigating a bit further the issue, I believe that the appended patch makes installboot(8) behave correctly. I removed extended partition numbering, since in would always print '1'. Last hunk is merely a typo fix. Comments are welcome. Cheers, hyjial. Index: ins