Edit

IABSD.fr/src/distrib/special/installboot

Branch :

  • Show log

    Commit

  • Author : miod
    Date : 2022-08-31 18:46:06
    Hash : 0ea62af5
    Message : Make installboot on landisk aware of a possible MBR on the disk, and in this case install the first level bootstrap at the beginning of the of the wd0a filesystem, rather than at the beginning of the disk. Both locations work but the previous behaviour overwriting an existing MBR is a violation of POLA. tweaks & ok krw@

  • Makefile
  • #	$OpenBSD: Makefile,v 1.18 2022/08/31 18:46:06 miod Exp $
    
    .PATH: ${.CURDIR}/../../../usr.sbin/installboot
    
    PROG=		installboot
    SRCS=		installboot.c util.c
    
    CPPFLAGS=	-I${.CURDIR}/../../../usr.sbin/installboot
    LDADD=		-lutil
    DPADD=		${LIBUTIL}
    
    .if ${MACHINE} == "amd64" || ${MACHINE} == "i386"
    CFLAGS += -DSOFTRAID
    SRCS += i386_installboot.c
    SRCS += i386_nlist.c
    SRCS += i386_softraid.c
    .elif ${MACHINE} == "armv7" || ${MACHINE} == "arm64" || ${MACHINE} == "riscv64"
    .  if ${MACHINE} == "arm64"
    CFLAGS += -DSOFTRAID
    SRCS += efi_softraid.c
    .  endif
    SRCS += efi_installboot.c
    .elif ${MACHINE} == "hppa"
    CFLAGS += -DBOOTSTRAP
    SRCS += hppa_installboot.c
    .elif ${MACHINE} == "landisk"
    SRCS += landisk_installboot.c
    .elif ${MACHINE} == "loongson"
    SRCS += loongson_installboot.c
    .elif ${MACHINE} == "macppc"
    SRCS += macppc_installboot.c
    .elif ${MACHINE} == "powerpc64"
    SRCS += powerpc64_installboot.c
    .elif ${MACHINE} == "octeon"
    SRCS += octeon_installboot.c
    .elif ${MACHINE} == "sparc64"
    CFLAGS += -DSOFTRAID
    SRCS += sparc64_installboot.c
    SRCS += sparc64_softraid.c
    .else
    SRCS += stubs.c
    .endif
    
    .if !empty(CFLAGS:M-DBOOTSTRAP)
    SRCS += bootstrap.c
    .endif
    
    .if !empty(CFLAGS:M-DSOFTRAID)
    SRCS += softraid.c
    .endif
    
    .include <bsd.prog.mk>