Commit Graph

5571 Commits

Author SHA1 Message Date
maya 1eb4f57936 Add amdgpu firmware build goo (disabled) 2021-12-12 20:33:21 +00:00
brad bf53d44167 A driver and user land utility for the Sparkfun Serial Controlled Motor
Driver module as illustrated here:

https://www.sparkfun.com/products/13911

A SCMD module is a ARM SOC simular to a Arduino in front of a motor
driver chip.  The single SCMD module can control two motors and up to
16 additional modules can be chained together using an internal I2C
bus.  One can interface with the SCMD using tty uart commands, SPI or
I2C.  The driver in this commit adds a kernel driver for the I2C and
SPI interfaces.  The command line utility provides a set of
convenience commands that support most of the functions of the SCMD
and is able to use the tty uart mode, SPI user land or the included
kernel driver in a uniform manor.

The use of the SCMD module is mostly for small robots and the like,
but it can control anything that is controllable by voltage.
2021-12-07 17:39:53 +00:00
sborrill 956275fd6a Revert previous. Explicitly load the value of npf or pf 2021-11-30 11:00:29 +00:00
simonb 79395b1711 Add /etc/sshd/ssh_host_ed25519_key* . 2021-11-30 06:21:58 +00:00
uwe ccd5c3ac25 /etc/shells - Add tmux.
We ship tmux in base and tmux can be used as user's default shell.
2021-11-27 18:39:15 +00:00
sborrill bf76deaf12 Load rc configuration based on rcvar, not name, so that correct settings
in /etc/rc.conf.d are loaded.

Usually this does not matter as rcvar and name are set to the same value.
For pf_boot and npf_boot, rcvar is set to pf and npf respectively.

Prior to the change, if:
rc.conf contains nfp=YES
rc.conf.d/npf does not exist

Then:
/etc/rc.d/npf_boot rcvar
outputs:
# npf_boot
$npf=YES

If:
rc.conf contains npf=NO (or is not set)
rc.conf.d/npf contains npf=YES

Then:
/etc/rc.d/npf_boot rcvar
outputs:
# npf_boot
$npf=NO

This means that in the latter case, at boot time the npfctl start command
is never run and the firewall is not operational.
2021-11-26 13:11:36 +00:00
sborrill 1438126a18 Use rcvar=$name syntax consistently in rc.d scripts which makes it easier to
search for rc.d scripts where rcvar differs from name. No functional change.
2021-11-26 12:51:24 +00:00
christos 0a50b87edf Set the path unconditionally to what rc sets it to, so that when running
individual scripts like 'env - /etc/rc.d/syslogd restart' programs like
rcorder are found.
2021-11-06 23:11:43 +00:00
brad 1f3d8cb8fe Driver for the Sensirion SHT30/SHT31/SHT35 temperature and humidity
sensor such as:

https://www.adafruit.com/product/2857

This is a higher priced sensor with a lot of features, including the
ability to do sub-second periodic updates.  The driver supports
everything about the sensor except for the alert pin.
2021-11-06 13:34:39 +00:00
nia 8e79eccae6 Recognize argon2 passwords as valid in daily security reports.
from RVP in misc/56486
2021-11-04 12:40:00 +00:00
skrll c31b12547a Add MIPSSIM{,64} as appropriate 2021-11-03 08:05:39 +00:00
kim 074604b560 Fix grammar in comment (affect vs. effect) 2021-10-28 07:24:40 +00:00
nia 0e837f732b passwd.conf(5): switch default cipher for new user accounts to Argon2id
As well as offering a dynamic amount of iterations and memory usage,
which fits well with NetBSD's goal of running on a diverse range of
hardware devices, Argon2id offers improved resistance to GPU-based
password cracking and side channel attacks.
2021-10-26 20:44:45 +00:00
christos da1070e967 PR/56452: RVP: MAKEDEV should also create /dev/dri/renderD* devices 2021-10-12 17:19:20 +00:00
jmcneill c3146444be efi: Add /dev/efi character device
Introduce a /dev/efi character device that provides a means for accessing
UEFI RT variable services from userland. Compatible with the FreeBSD ioctl
interface for ease of porting their libefivar and associated tools.

The ioctl interface is defined in sys/efiio.h.

To enable support for this on an arch, the kernel needs `pseudo-device efi`
and the MD EFI implementation needs to register its backend by calling
efi_ops_register(). This commit includes an implementation for Arm.
2021-10-10 13:03:08 +00:00
nia 2da9f9a665 Change the default shell of the "toor" user to /rescue/sh
toor is a backup account to be used in case of trouble.

When root's default shell was changed to from /bin/csh to /bin/sh,
toor lost its purpose.

/rescue/sh is an ideal choice here because it's a static binary,
while we've moved to dynamic linking for the rest of the system.

Discussed a few times over the years on tech-userlevel.
2021-10-08 18:02:57 +00:00
skrll dac6eef826 Don't include bsd.own.mk here - none of the other etc.<foo>/Makefile.inc
files do.
2021-10-04 06:50:35 +00:00
jmcneill 582345a779 riscv: Include kernel and bootloader in releasedir.
This change adds a kern-GENERIC set and distributes an INSTALL kernel
along with bootriscv64.efi as part of a standard release build.
2021-10-01 10:38:03 +00:00
maya f9d97969cb Restore MKNOUVEAUFIRMWARE and MKRADEONFIRMWARE and make gpufw set unconditional
Simplifies logic.
(Second commit - first one was partial)

Restoring MK* requested by mrg on tech-kern discussion
https://mail-index.netbsd.org/tech-kern/2021/09/25/msg027695.html
2021-09-26 15:52:40 +00:00
martin 39237b4ead If key generation happens with not enough entropy in the system, add
a warning to motd pointing at entropy(7) and give instructions how to
re-generate the (weak) keys after fixing up entropy.

Add a "keyregen" command, which forces regeneration of all host keys
to simplify the replacement of weak keys.
2021-09-26 10:53:20 +00:00
maya f54624bd74 Move DRM-driver firmware from base to its own set, gpufw
This set is only installed on amd64,i386,evbarm.
This set is installed on minimal installs and on install media, in
case someone needs it for basic driver functionality.

Comments:
Switched to a single MK tunable for it - that is probably unneeded.

An upcoming DRM update will include even fatter firmware, and we'd
like to minimize the impact of it.
2021-09-25 08:54:29 +00:00
christos 79d5820b5e Move the sanitizer libraries from 9.0.0 -> 13.0.0 to match our current clang
version.
2021-09-16 23:32:49 +00:00
rin 62012fa3c6 Build KUROBOX_PRO for evbarmv5eb.
Other marvell-based machines may also work, but not tested yet.
2021-08-30 00:14:45 +00:00
christos 2557380693 Inetd enhancements by James Browning, Gabe Coffland, Alex Gavin, Solomon Ritzow
Described in:
    https://www.mail-archive.com/tech-userlevel@netbsd.org/msg03114.html
And developed in:
    https://github.com/ritzow/src/pull/1

From their notes:

All new functionality should be explained by the updated manpage.

The manpage has been refactored a bit: A new section "Directives"
has been added and the information about default hostnames and
IPsec directives has been moved there, and the new file include
directive information is also there.

getconfigent has the most major changes. A newline is no longer
read immediately, but is called only by a "goto more" (inside an
if(false) block). This allows multiple definitions or directives
to exist on a single line for anything that doesn't terminate using
a newline. This means a key-values service definition can be followed
by another key-values service definition, a positional definition,
or an ipsec, hostname, or .include directive on the same line.

memset is no longer used explicitly to clear the servtab structure,
a function init_servtab() is used instead, which uses a C struct
initializer.

The servtab se_group field is its own allocation now, and not just
a pointer into the user:group string.

Refactored some stuff out of getconfigent to separate functions
for use by parse_v2.c. These functions in inetd.c are named with
the form parse_*()

parse_v2.c only has code for parsing a key-values service definition
into a provided servtab. It should not have anything that affects
global state other than line and line_number.

Some function prototypes, structures, and #defines have been moved
from inetd.c to inetd.h.

The function config_root replaces config as the function called on
a config file load/reload. The code removed from the end of
config(void) is now called in config_root, so it is not run on each
recursive config call.

setconfig(void) was removed and its code added into config_root
because that is the only place it is called, and redundant checks
for non-null globals were removed because they are always freed by
endconfig. The fseek code was also removed because the config files
are always closed by endconfig.

Rate limiting code was updated to add a per-service per-IP rate
limiting form. Some of that code was refactored out of other places
into functions with names in the form rl_*()

We have not added any of the license or version information to the
new files parse_v2.c, parse_v2.h, and inetd.h and we have not
updated the license or version info for inetd.c.

Security related:

The behavior when reading invalid IPsec strings has changed. Inetd
no longer exits, it quits reading the current config file instead.
Could this impact program security?

We have not checked for memory leaks. Solomon tried to use dmalloc
without success. getconfigent seemed to have a memory leak at each
"goto more". It seems like inetd has never free'd allocated strings
when throwing away erroneous service definitions during parsing
(i.e. when "goto more" is called when parsing fields). OpenBSD's
version calls freeconfig on "goto more"
(c5eae130d6/usr.sbin/inetd/inetd.c (L1049))
but NetBSD only calls it when service definitions are no longer
needed. This has been fixed. freeconfig is called immediately before
any "goto more". There shouldn't be any time when a servtab is in
an invalid state where freeconfig would break.
2021-08-29 09:54:18 +00:00
andvar c69f42d323 fix mainly same typos as in my previous commit but outside sys/dev/dm. 2021-08-21 23:00:30 +00:00
mrg 22cfb1f2ea install experimental/* and ext/opt_random.h. they're expected to
be there (and the latter was removed by accident.)

regen for everyone (also picks up missing tgmath.h for many ports.)

fixes build of pkgsrc/databases/mongodb for me.
2021-08-16 06:56:20 +00:00
martin 80f935560b Add directory for new mkdep test binaries 2021-08-12 11:50:42 +00:00
rillig 2e1c5b53fe tests/lint: add test skeletons for messages from lint2 2021-08-05 22:36:07 +00:00
mlelstv c413ec6508 Reverse devpubd dependeny to avoid dangling reference to zfs which is
an optional part of the build.
2021-08-03 05:15:20 +00:00
mlelstv ad07108f16 Run devpubd before volume managers and pseudo disks. 2021-07-31 14:47:04 +00:00
jmcneill 7451feb941 aarch64: Restrict KERNEL_SUFFIXES to img only 2021-07-24 17:07:59 +00:00
jmcneill 065fe7e8c6 smbios: Add character device for accessing SMBIOS tables
The /dev/smbios character device gives an aperture into physical memory
that allows read-only access to the SMBIOS header and tables.
2021-07-24 11:39:18 +00:00
ozaki-r 83b6f2d1d3 tests: add tests for ALTQ CBQ 2021-07-14 03:22:33 +00:00
tsutsui 78a0766dec Create rd3 device nodes, for HPDisk. 2021-07-09 19:01:29 +00:00
nia f3c68eb2b0 Remove uscanner(4) driver
This exists for compatibility with a Linux interface which was apparently
deprecated in Linux 2.6. There are various mailing list threads going
back to 2004 where the usefulness of this driver is discussed, but
the conclusion is that scanner software has all moved to using ugen(4)
instead, and enabling this driver will not help you scan things.
2021-06-29 10:22:33 +00:00
mlelstv b259e1d9fc run sysctl early enough. 2021-06-13 10:14:40 +00:00
joerg 53d1339bf7 Update LLVM build system for 249b40b558955afe5ac2b549edcf2d7f859c8cc9
This enables the use of modules for a significant build performance gain
when building with clang as host compiler or when using HAVE_LLVM=yes.
Switch libc++ to using the copy from the mono-repo.
2021-05-30 01:56:44 +00:00
thorpej 2d410374f0 Provide a binary/kernel/netbsd-GENERIC.QEMU.gz in the Alpha release
hierarchy.  This is identical to netbsd-GENERIC, except it has been
dbsym'd so that the kernel symbols are available when running under
Qemu (which loads the kernel directly, but does not load the symbol
table).
2021-05-29 18:48:45 +00:00
rin 759be7cf05 Switch arm64.img to big-endian for aarch64eb, as libsa/efiboot support
bi-endian FFS/disklabel now.

Many thanks to mrg@ for working on this!!
2021-05-27 08:43:02 +00:00
christos cb128adb3d use the date tool 2021-05-26 20:22:28 +00:00
yamaguchi f0101d0e08 Add a new link-aggregation pseudo interface named lagg(4)
- FreeBSD's lagg(4) based implementation
 - MP-safe and MP-scalable
2021-05-17 04:07:41 +00:00
rin 0c720f9cde Turn on constty instead of ttyE0 as done for majority of other ports
in order to make both framebuffer and serial consoles happy.

Also, change TERM from vt220 to vt100 for console and constty
in accordance with other ports.
2021-05-08 10:08:33 +00:00
mrg 3a8103109b update for libX11 1.7.0. 2021-04-27 06:51:49 +00:00
christos d25e0fedfb Handle mipsn64 2021-04-25 23:40:51 +00:00
mrg af9b7ed461 create the gcc-10 subdirs, and don't create the gcc-8 ones. 2021-04-12 02:09:27 +00:00
christos 637547d0a7 refresh with latest 2021-04-08 19:03:43 +00:00
rin 385a602eeb - Hook DHT kernel
- Add bin and ub to KERNEL_SUFFIXES
- Group and sort kernels
2021-04-02 07:08:36 +00:00
christos 5e0abed52f add named plugin dir 2021-03-31 04:58:01 +00:00
christos d80018d9b8 handle copying of plugins to the chroot 2021-03-31 04:57:25 +00:00
sborrill 4f6c3ffcd1 Need to explicitly load value of zfs variable as zfs=YES may be set in
/etc/rc.conf.d/zfs, not /etc/rc.conf.
2021-03-09 12:42:46 +00:00