Home | History | Annotate | Download | only in sshramdisk
History log of /src/distrib/evbarm/instkernel/sshramdisk/Makefile
RevisionDateAuthorComments
 1.31  17-Dec-2025  riastradh evbarm/instkernel/sshramdisk: Get libssh out of objdir now.

Should fix problems like:

--- ramdiskbin.link ---
# link sshramdisk/ramdiskbin.link
/home/builds/ab/HEAD/evbarm-earmv6hfeb/20251217070550Z-tools/bin/armv6eb--netbsdelf-eabihf-gcc --sysroot=/home/builds/ab/HEAD/evbarm-earmv6hfeb/20251217070550Z-dest -static -o ramdiskbin.link ramdiskbin.o -Wl,-rpath-link,/home/builds/ab/HEAD/evbarm-earmv6hfeb/20251217070550Z-dest/lib -L=/lib -L/home/builds/ab/HEAD/evbarm-earmv6hfeb/20251217070550Z-dest/usr/lib cat.cro chmod.cro cp.cro dd.cro df.cro ed.cro ln.cro ls.cro mkdir.cro mv.cro pax.cro pwd.cro rm.cro rmdir.cro sh.cro stty.cro sync.cro sleep.cro chown.cro disklabel.cro fdisk.cro fsck.cro fsck_msdos.cro fsck_ffs.cro gpt.cro ifconfig.cro init.cro mknod.cro mount.cro mount_cd9660.cro mount_ext2fs.cro mount_ffs.cro mount_kernfs.cro mount_msdos.cro mount_nfs.cro mount_tmpfs.cro newfs.cro newfs_ext2fs.cro ping.cro reboot.cro restore.cro route.cro shutdown.cro slattach.cro swapctl.cro umount.cro ftp.cro tip.cro gzip.cro less.cro sed.cro tset.cro chroot.cro sshd.cro sysinst.cro progress.cro dhcpcd.cro libhack.o -ledit -lutil -lcurses -lterminfo -lrmt -lcrypt -ll -lm -lz -lprop -lssh -lcrypto -lpthread
/home/builds/ab/HEAD/evbarm-earmv6hfeb/20251217070550Z-tools/lib/gcc/armv6eb--netbsdelf-eabihf/14.3.0/../../../../armv6eb--netbsdelf-eabihf/bin/ld: cannot find -lssh: No such file or directory
/home/builds/ab/HEAD/evbarm-earmv6hfeb/20251217070550Z-tools/lib/gcc/armv6eb--netbsdelf-eabihf/14.3.0/../../../../armv6eb--netbsdelf-eabihf/bin/ld: have you installed the static version of the ssh library ?
collect2: error: ld returned 1 exit status

*** Failed target: ramdiskbin.link
*** In directory: /home/builds/ab/HEAD/evbarm-earmv6hfeb/20251217070550Z-obj/home/source/ab/HEAD/src/distrib/evbarm/instkernel/sshramdisk
*** Failed commands:
${_MKTARGET_LINK}
=> @echo '# ' " link " sshramdisk/ramdiskbin.link
${_CCLINK.${:Uramdiskbin}} ${_LDFLAGS.${:Uramdiskbin}} ${_LDSTATIC.${:Uramdiskbin}} -o ${.TARGET} ${OBJS.${:Uramdiskbin}} ${_PROGLDOPTS} ${_LDADD.${:Uramdiskbin}}
=> /home/builds/ab/HEAD/evbarm-earmv6hfeb/20251217070550Z-tools/bin/armv6eb--netbsdelf-eabihf-gcc --sysroot=/home/builds/ab/HEAD/evbarm-earmv6hfeb/20251217070550Z-dest -static -o ramdiskbin.link ramdiskbin.o -Wl,-rpath-link,/home/builds/ab/HEAD/evbarm-earmv6hfeb/20251217070550Z-dest/lib -L=/lib -L/home/builds/ab/HEAD/evbarm-earmv6hfeb/20251217070550Z-dest/usr/lib cat.cro chmod.cro cp.cro dd.cro df.cro ed.cro ln.cro ls.cro mkdir.cro mv.cro pax.cro pwd.cro rm.cro rmdir.cro sh.cro stty.cro sync.cro sleep.cro chown.cro disklabel.cro fdisk.cro fsck.cro fsck_msdos.cro fsck_ffs.cro gpt.cro ifconfig.cro init.cro mknod.cro mount.cro mount_cd9660.cro mount_ext2fs.cro mount_ffs.cro mount_kernfs.cro mount_msdos.cro mount_nfs.cro mount_tmpfs.cro newfs.cro newfs_ext2fs.cro ping.cro reboot.cro restore.cro route.cro shutdown.cro slattach.cro swapctl.cro umount.cro ftp.cro tip.cro gzip.cro less.cro sed.cro tset.cro chroot.cro sshd.cro sysinst.cro progress.cro dhcpcd.cro libhack.o -ledit -lutil -lcurses -lterminfo -lrmt -lcrypt -ll -lm -lz -lprop -lssh -lcrypto -lpthread
${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ${OBJS.${:Uramdiskbin}}
=> /home/builds/ab/HEAD/evbarm-earmv6hfeb/20251217070550Z-tools/bin/nbctfmerge -t -g -L VERSION -g -o ramdiskbin.link ramdiskbin.o
*** [ramdiskbin.link] Error code 1

PR lib/58648: private shared libraries should go in
/usr/lib/private, not /usr/lib
 1.30  03-Dec-2025  brad The LLVM build is a bit larger than the GCC build. Bump the size up a bit.
 1.29  01-Dec-2025  brad Make the sshramdisk a bit bigger. Hopefully fixes the build.
 1.28  17-May-2024  christos branches: 1.28.4;
use IMAGESPECEXTRA to include libdata and don't include IMAGERUNTIME
 1.27  17-May-2024  christos use IMAGERUNTIME to copy extra data instead of random pax commands
 1.26  15-Mar-2024  riastradh evbarm/instkernel/sshramdisk: Put firmware in the right paths.

Maybe this should also be wired up to `release' to put the ramdisk in
the releasedir so we detect destdir path leakage like this had.

PR port-evbarm/58035
 1.25  26-Mar-2020  skrll branches: 1.25.6;
Bump IMAGESIZE
 1.24  23-Mar-2020  martin Bump image size - new firmware files need more space
 1.23  01-Mar-2020  christos Redo the sshsk_sign() stuff properly, but putting the helper in libssh.so
 1.22  28-Feb-2020  christos Deal with sshkey_sign. I am going to fix this properly at some point, but
it needs coordination from upstream (Patrick Welche)
 1.21  21-Jan-2020  mlelstv Was too slight a bump.
 1.20  21-Jan-2020  martin Bump image size slightly
 1.19  21-Nov-2019  martin Bump image size for gcc8
 1.18  14-Aug-2019  martin Update to newer sshd (the host key is the same as before, it already
was a rsa key). From Harold Gutch.
 1.17  08-Apr-2018  mlelstv branches: 1.17.2; 1.17.4;
increase sshramdisk from 24000k to 28000k.
 1.16  22-Oct-2017  joerg branches: 1.16.2;
Bump image size to 24MB, won't fit for plain evbarm otherwise.
 1.15  18-Mar-2017  sevan branches: 1.15.4;
Bump image size to unbreak builds.
nbmakefs: `work' size of 21610496 is larger than the maxsize of 20480000.

ok jakllsch
 1.14  11-Feb-2017  christos fix typo.
 1.13  11-Feb-2017  christos more MKREPRO_TIMESTAMP fixes (for pax/tar generated files)
 1.12  24-Jan-2017  christos += for MAKEFS_FLAGS
 1.11  19-Dec-2016  christos branches: 1.11.2;
give it a bit more room.
 1.10  19-Dec-2016  christos grow so that new intel firmware fits.
 1.9  15-Jul-2015  martin branches: 1.9.2;
Set IMAGEENDIAN properly for big endian builds.
From Rin Okuyama.
 1.8  23-Feb-2015  joerg Give LLVM a bit breathing room for the sshramdisk when building for
generic ARM.
 1.7  16-Feb-2015  skrll Bump size to fix build.
 1.6  31-Oct-2014  uebayasi Bump image size to compensate new iwn(4) firmwares.
 1.5  14-Aug-2014  joerg LLVM sshramdisk needs 8.9MB, so bump again.
 1.4  12-Aug-2014  martin Add firmware images to this image, as discussed on port-arm.
 1.3  02-Mar-2014  joerg branches: 1.3.4; 1.3.6;
Bump sshramdisk size to 3800k, reserve 4MB in the install kernel.
 1.2  28-Jun-2013  htodd Bump imagesize to fix build.
 1.1  19-Mar-2013  garbled branches: 1.1.6;
Add a new installer image for Raspberry PI to evbarm

Includes the following major changes:

1) Add new configmenu item to sysinst to allow creation of users at
post-install time.
2) Add an sshramdisk type to evbarm, which is a ramdisk with sshd
enabled, allowing users to install on a headless PI by sshing to the
device with the account "sysinst" password "netbsd" to begin the
installation. (Note, neither the account, nor the ssh setup are copied to
the finalized installation image)
3) Change mkimage to build a boot-only image, without the root filesystems.

Much of the sshramdisk code could be reused on other ports easily.
 1.1.6.3  19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.2  23-Jun-2013  tls resync from head
 1.1.6.1  19-Mar-2013  tls file Makefile was added on branch tls-maxphys on 2013-06-23 06:26:17 +0000
 1.3.6.2  09-May-2015  msaitoh Pull up following revision(s) (requested by snj in ticket #742):

distrib/evbarm/instkernel/sshramdisk/Makefile patch
sys/arch/evbarm/conf/RPI_INSTALL patch

Increase ramdisk size to fix build break.
 1.3.6.1  07-May-2015  riz Apply patch (requested by snj in ticket #738):

distrib/evbarm/instkernel/sshramdisk/Makefile patch

Bump ramdisk size.
[snj, ticket #738]
 1.3.4.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.4.1  02-Mar-2014  yamt file Makefile was added on branch yamt-pagecache on 2014-05-22 12:01:28 +0000
 1.9.2.2  20-Mar-2017  pgoyette Sync with HEAD
 1.9.2.1  07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.11.2.1  21-Apr-2017  bouyer Sync with HEAD
 1.15.4.2  18-Apr-2024  martin Pull up following revision(s) (requested by riastradh in ticket #1955):

distrib/evbarm/instkernel/sshramdisk/Makefile: revision 1.26

evbarm/instkernel/sshramdisk: Put firmware in the right paths.

Maybe this should also be wired up to `release' to put the ramdisk in
the releasedir so we detect destdir path leakage like this had.

PR port-evbarm/58035
 1.15.4.1  01-Nov-2018  martin Pull up the following trying to fix the build:

distrib/evbarm/instkernel/sshramdisk/Makefile 1.16,1.17

Bump image size to 28000k.
 1.16.2.1  16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.17.4.2  18-Apr-2024  martin Pull up following revision(s) (requested by riastradh in ticket #1829):

distrib/evbarm/instkernel/sshramdisk/Makefile: revision 1.26

evbarm/instkernel/sshramdisk: Put firmware in the right paths.

Maybe this should also be wired up to `release' to put the ramdisk in
the releasedir so we detect destdir path leakage like this had.

PR port-evbarm/58035
 1.17.4.1  23-Aug-2019  msaitoh Pullup the following revision (requested by martin in ticket #105):

distrib/evbarm/instkernel/sshramdisk/Makefile 1.18
distrib/evbarm/instkernel/sshramdisk/list 1.2
distrib/evbarm/instkernel/sshramdisk/sshd_config 1.2
distrib/evbarm/instkernel/sshramdisk/ssh_host_dsa_key delete
distrib/evbarm/instkernel/sshramdisk/ssh_host_rsa_key 1.1

Update to newer sshd (the host key is the same as before, it already
was a rsa key). From Harold Gutch
 1.17.2.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.17.2.1  08-Apr-2020  martin Merge changes from current as of 20200406
 1.25.6.1  18-Apr-2024  martin Pull up following revision(s) (requested by riastradh in ticket #657):

distrib/evbarm/instkernel/sshramdisk/Makefile: revision 1.26

evbarm/instkernel/sshramdisk: Put firmware in the right paths.

Maybe this should also be wired up to `release' to put the ramdisk in
the releasedir so we detect destdir path leakage like this had.

PR port-evbarm/58035
 1.28.4.1  22-Jan-2026  martin Pull up following revision(s) (requested by snj in ticket #150):

distrib/sets/lists/debug/shl.mi: revision 1.380
crypto/external/bsd/openssh/lib/Makefile: revision 1.45
distrib/sets/lists/debug/shl.mi: revision 1.381
crypto/external/bsd/openssh/lib/Makefile: revision 1.46
distrib/sets/lists/debug/shl.mi: revision 1.382
distrib/evbarm/instkernel/sshramdisk/list: revision 1.7
share/mk/bsd.lib.mk: revision 1.423
share/mk/bsd.lib.mk: revision 1.425
distrib/sets/lists/comp/mi: revision 1.2503
distrib/sets/lists/comp/mi: revision 1.2504
distrib/evbarm/instkernel/sshramdisk/Makefile: revision 1.31
distrib/sets/lists/base/shl.mi: revision 1.1019
rescue/list: revision 1.56
etc/mtree/NetBSD.dist.compat.in: revision 1.9
distrib/sets/lists/debug/mi: revision 1.494
distrib/sets/lists/debug/mi: revision 1.495
distrib/sets/lists/base/mi: revision 1.1371
distrib/sets/lists/base/mi: revision 1.1372
distrib/sets/lists/comp/shl.mi: revision 1.362
etc/mtree/NetBSD.dist.base: revision 1.262
lib/libpam/modules/pam_ssh/Makefile: revision 1.15
share/mk/bsd.prog.mk: revision 1.358
share/mk/bsd.prog.mk: revision 1.359
usr.sbin/wg-keygen/Makefile: revision 1.2
usr.sbin/wg-keygen/Makefile: revision 1.3
distrib/sets/lists/base/shl.mi: revision 1.1020
share/mk/bsd.README: revision 1.457
crypto/external/bsd/openssh/Makefile.inc: revision 1.18
distrib/sets/lists/xdebug/mi: revision 1.52
rescue/Makefile: revision 1.43

Add logic for /usr/lib/private libraries.

New variables for makefiles to define:
<bsd.lib.mk> LIBSUBDIR -- If nonempty, install library into
${LIBDIR}/${LIBSUBDIR} instead of ${LIBDIR}. Typically set
either to empty or to `private'.
<bsd.lib.mk> LIBDPSUBDIRS -- List of subdirectories _subdir_ to add
-L${SHLIBDIR}/${_subdir_} -Wl,-R${SHLIBDIR}/${_subdir_} to
ldflags when linking library. Note: Should only be used inside
private libraries, not inside public libraries to link against
private libraries, which can't work -- see comment.
<bsd.prog.mk> PROGDPSUBDIRS -- List of subdirectories _subdir_ to add
-L${SHLIBDIR}/${_subdir_} -Wl,-R${SHLIBDIR}/${_subdir_} to
ldflags when linking program.

(XXX bsd.lib.mk/bsd.prog.mk should figure LIBDPSUBDIRS/PROGDPSUBDIRS
out automatically by LIBDPLIBS/PROGDPLIBS, but for now we don't have
that mechanism -- TBD in subsequent work.)

Libraries that we want to install because we use them in binaries we
ship, but that we want to keep private from applications so we don't
have to worry about ABI breakage or leakage into pkgsrc builds,
should generally set:

LIBSUBDIR= private # Install into /usr/lib/private.
NOCOMPAT= # defined # Don't build compat lib.
NOLINKLIB= # defined # Don't install .so link or .a lib.

(XXX Maybe we should have a `LIBISPRIVATE= installed' or something
for this combination of options, but for now I'm putting in the
minimal mechanism to implement this and we can condense a common
pattern later.)

Programs using the library will also have to set
PROGDPSUBDIRS+= private
so that they will get the rpath /usr/lib/private.

PR lib/58648: private shared libraries should go in /usr/lib/private,
not /usr/lib


openssh: Install libssh.so in /usr/lib/private.

This way it doesn't get exposed to applications accidentally, and we
don't need to worry about breaking ABI when updating openssh in base.
PR lib/58648: private shared libraries should go in /usr/lib/private,
not /usr/lib

openssh: Do build and install compat libssh after all.

Even though it's not exposed for applications to _link_ against, it
is used by the dynamically _loadable_ pam_ssh module, which exists as
a compat module and therefore needs libssh as a compat library to be
installed somewhere. That somewhere will be
/usr/lib/${COMPAT_ARCH}/private.

Should fix problems like:
dependall ===> compat/sparc64/sparc/../../../lib/libpam/modules/pam_ssh
nbmake[11]: don't know how to make /home/source/ab/HEAD/src/crypto/external/bsd/openssh/lib/libssh.a. Stop
Verified in an amd64 build that the compat i386 pam_ssh.so is linked
correctly:
(chroot HEAD)# ldd /usr/lib/i386/security/pam_ssh.so.4
/usr/lib/i386/security/pam_ssh.so.4:
-lssh.50 => /usr/lib/i386/private/libssh.so.50
-lcrypto.16 => /usr/lib/i386/libcrypto.so.16
-lcrypt.1 => /usr/lib/i386/libcrypt.so.1
-lgcc_s.1 => /usr/lib/i386/libgcc_s.so.1
-lc.12 => /usr/lib/i386/libc.so.12
-lz.1 => /usr/lib/i386/libz.so.1

PR lib/58648: private shared libraries should go in /usr/lib/private,
not /usr/lib


wg-keygen(8): Find private libssh.so.
Should fix:
/usr/sbin/wg-keygen: Shared object "libssh.so.50" not found
PR lib/58648: private shared libraries should go in /usr/lib/private,
not /usr/lib


evbarm/instkernel/sshramdisk: Get libssh out of objdir now.
Should fix problems like:
--- ramdiskbin.link ---
# link sshramdisk/ramdiskbin.link
/home/builds/ab/HEAD/evbarm-earmv6hfeb/20251217070550Z-tools/bin/armv6eb--netbsdelf-eabihf-gcc --sysroot=/home/builds/ab/HEAD/evbarm-earmv6hfeb/20251217070550Z-dest -static -o
ramdiskbin.link ramdiskbin.o -Wl,-rpath-link,/home/builds/ab/HEAD/evbarm-earmv6hfeb/20251217070550Z-dest/lib -L=/lib -L/home/builds/ab/HEAD/evbarm-earmv6hfeb/20251217070550Z-dest/usr/lib cat.cro
chmod.cro cp.cro dd.cro df.cro ed.cro ln.cro ls.cro mkdir.cro mv.cro pax.cro pwd.cro rm.cro rmdir.cro sh.cro stty.cro sync.cro sleep.cro chown.cro disklabel.cro fdisk.cro fsck.cro fsck_msdos.cro
fsck_ffs.cro gpt.cro ifconfig.cro init.cro mknod.cro mount.cro mount_cd9660.cro mount_ext2fs.cro mount_ffs.cro mount_kernfs.cro mount_msdos.cro mount_nfs.cro mount_tmpfs.cro newfs.cro
newfs_ext2fs.cro ping.cro reboot.cro restore.cro route.cro shutdown.cro slattach.cro swapctl.cro umount.cro ftp.cro tip.cro gzip.cro less.cro sed.cro tset.cro chroot.cro sshd.cro sysinst.cro
progress.cro dhcpcd.cro libhack.o
-ledit -lutil -lcurses -lterminfo -lrmt -lcrypt -ll -lm -lz -lprop -lssh -lcrypto -lpthread
/home/builds/ab/HEAD/evbarm-earmv6hfeb/20251217070550Z-tools/lib/gcc/armv6eb--netbsdelf-eabihf/14.3.0/../../../../armv6eb--netbsdelf-eabihf/bin/ld: cannot find -lssh: No such file or directory
/home/builds/ab/HEAD/evbarm-earmv6hfeb/20251217070550Z-tools/lib/gcc/armv6eb--netbsdelf-eabihf/14.3.0/../../../../armv6eb--netbsdelf-eabihf/bin/ld: have you installed the static version of the
ssh library ?
collect2: error: ld returned 1 exit status
*** Failed target: ramdiskbin.link
*** In directory: /home/builds/ab/HEAD/evbarm-earmv6hfeb/20251217070550Z-obj/home/source/ab/HEAD/src/distrib/evbarm/instkernel/sshramdisk
*** Failed commands:
${_MKTARGET_LINK}
=> @echo '# ' " link " sshramdisk/ramdiskbin.link
${_CCLINK.${:Uramdiskbin}} ${_LDFLAGS.${:Uramdiskbin}} ${_LDSTATIC.${:Uramdiskbin}} -o ${.TARGET} ${OBJS.${:Uramdiskbin}} ${_PROGLDOPTS} ${_LDADD.${:Uramdiskbin}}
=> /home/builds/ab/HEAD/evbarm-earmv6hfeb/20251217070550Z-tools/bin/armv6eb--netbsdelf-eabihf-gcc --sysroot=/home/builds/ab/HEAD/evbarm-earmv6hfeb/20251217070550Z-dest -static -o
ramdiskbin.link ramdiskbin.o -Wl,-rpath-link,/home/builds/ab/HEAD/evbarm-earmv6hfeb/20251217070550Z-dest/lib -L=/lib -L/home/builds/ab/HEAD/evbarm-earmv6hfeb/20251217070550Z-dest/usr/lib cat.cro
chmod.cro cp.cro dd.cro df.cro ed.cro ln.cro ls.cro mkdir.cro mv.cro pax.cro pwd.cro rm.cro rmdir.cro sh.cro stty.cro sync.cro sleep.cro chown.cro disklabel.cro fdisk.cro fsck.cro fsck_msdos.cro
fsck_ffs.cro gpt.cro ifconfig.cro init.cro mknod.cro mount.cro mount_cd9660.cro mount_ext2fs.cro mount_ffs.cro mount_kernfs.cro mount_msdos.cro mount_nfs.cro mount_tmpfs.cro newfs.cro
newfs_ext2fs.cro ping.cro reboot.cro restore.cro route.cro shutdown.cro slattach.cro swapctl.cro umount.cro ftp.cro tip.cro gzip.cro less.cro sed.cro tset.cro chroot.cro sshd.cro sysinst.cro
progress.cro dhcpcd.cro
libhack.o -ledit -lutil -lcurses -lterminfo -lrmt -lcrypt -ll -lm -lz -lprop -lssh -lcrypto -lpthread
${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ${OBJS.${:Uramdiskbin}}
=> /home/builds/ab/HEAD/evbarm-earmv6hfeb/20251217070550Z-tools/bin/nbctfmerge -t -g -L VERSION -g -o ramdiskbin.link ramdiskbin.o
*** [ramdiskbin.link] Error code 1
PR lib/58648: private shared libraries should go in
/usr/lib/private, not /usr/lib


distrib/sets/lists/comp: libssh is private for lint too.
Might fix:
checkflist ===> distrib/sets
====== 1 missing files in DESTDIR ========
Files in flist but missing from DESTDIR.
File wasn't installed ?
------------------------------------------
./usr/libdata/lint/llib-lssh.ln
======== end of 1 missing files ==========
PR lib/58648: private shared libraries should go in /usr/lib/private,
not /usr/lib

PR/58648: Fix MKDEBUG=yes build:
1. if NOLINKLIB is set don't install libfoo_g.a and libfoo_p.a libraries.
libfoo.a, libfoo_p.a were not being installed already, just make the
testing consistent
2. Move .a libraries from shl.mi to mi where they belong.
3. Make stray libfoo_g.a libraries that were install accidentally before
obsolete.

rescue/list: Touch for CRUNCHGEN_FLAGS change for libssh.
PR lib/58648: private shared libraries should go in /usr/lib/private,
not /usr/lib

RSS XML Feed