1 # $NetBSD: Makefile.inc,v 1.5 2024/12/29 09:46:44 jmmv Exp $ 2 # 3 # etc.riscv/Makefile.inc -- riscv-specific etc Makefile targets 4 # 5 6 .if ${MACHINE_ARCH} == "riscv64" 7 KERNEL_SETS= GENERIC64 8 .else 9 KERNEL_SETS= GENERIC 10 .endif 11 12 # Support for mkimage 13 MKIMAGE= ${NETBSDSRCDIR}/distrib/utils/embedded/mkimage 14 IMAGE.rel= ${RELEASEDIR}/${RELEASEMACHINEDIR} 15 IMAGE.dir= ${IMAGE.rel}/binary/gzimg 16 IMAGE.kern= ${IMAGE.rel}/binary/kernel 17 18 # TOOL_MKUBOOTIMAGE=${TOOL_MKUBOOTIMAGE} \ 19 20 __mkimage: .USE 21 TOOL_MAKE=${MAKE} \ 22 TOOL_MAKEFS=${TOOL_MAKEFS} \ 23 TOOL_DISKLABEL=${TOOL_DISKLABEL} \ 24 TOOL_FDISK=${TOOL_FDISK} \ 25 TOOL_GPT=${TOOL_GPT} \ 26 TOOL_GZIP=${TOOL_GZIP} \ 27 TOOL_MKNOD=${TOOL_MKNOD} \ 28 TOOL_PAX=${TOOL_PAX} \ 29 TOOL_MTREE=${TOOL_MTREE} \ 30 HOST_SH=${HOST_SH} \ 31 KERNOBJDIR=${KERNOBJDIR} \ 32 MACHINE=${MACHINE} \ 33 MKDTB=${MKDTB} \ 34 MKPOSTFIX=${MKPOSTFIX} \ 35 ${HOST_SH} ${MKIMAGE} -h ${.TARGET:S/smp_//} -D ${DESTDIR} \ 36 -S ${NETBSDSRCDIR} ${MKI_OPTS.${.TARGET}} \ 37 ${IMAGE.dir}/${.TARGET:S/smp_//}.img.gz 38 39 40 .if ${MACHINE_ARCH} == "riscv64" 41 .if ${HAVE_UEFI} == "yes" 42 smp_efibootriscv64: 43 cd ${KERNSRCDIR}/stand/efiboot/bootriscv64 && ${MAKE} release 44 ${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc '*.efi' 45 SNAP_MD_POST_DEPS+= smp_efibootriscv64 46 INSTALLATION_DIRS+= installation/misc 47 .endif 48 49 smp_riscv64: __mkimage 50 MKI_OPTS.smp_riscv64= -K ${IMAGE.kern} 51 SNAP_MD_POST_DEPS+= smp_riscv64 52 .endif 53 54 55 .if ${MACHINE_ARCH} == "riscv32" 56 smp_riscv32: __mkimage 57 MKI_OPTS.smp_riscv32= -K ${IMAGE.kern} 58 SNAP_MD_POST_DEPS+= smp_riscv32 59 .endif 60 61 snap_md_post: check_DESTDIR check_RELEASEDIR snap_post .WAIT ${SNAP_MD_POST_DEPS} 62 63 INSTALLATION_DIRS+= binary/gzimg \ 64 installation/instkernel 65