Commit graph

246 commits

Author SHA1 Message Date
Thomas Cort 8357e3a442 Importing usr.sbin/rdate
Import the NetBSD rdate command and remove the Minix rdate command.
The default behaviour for both is the same. The NetBSD version adds
options to just display the time, adjust the time using adjtime(),
and set the time without printing the time.

Porting Notes:
 - Compiles cleanly out of the box without any warnings
 - Path changes from /usr/bin/rdate to /usr/sbin/rdate
 - checked pkgsrc for any usages of rdate (none found)
 - checked src for any usages of rdate (none found)

Testing:
 - all command line options work (tested with time.nist.gov server)
 - Native and cross build OK

Change-Id: I613449763891a896527f337999c006a970c3924c
2013-04-08 08:37:04 +02:00
Thomas Cort 04203a83a6 Importing usr.bin/ftp 2013-04-05 19:02:06 +00:00
Thomas Cort ab046ee6ea Importing usr.bin/head 2013-03-23 14:37:39 +01:00
David Höppner 4de64f892a Importing NetBSD banner 2013-03-22 10:15:11 +01:00
Thomas Cort a99e83a2dc Importing usr.bin/cal 2013-03-18 11:27:44 +01:00
Thomas Cort 85468eb5c8 Importing usr.bin/yes
Change-Id: Ia76d7ce9c6b2bf7523d2ecbc6470e3e1e7ab5ee5
2013-03-18 11:27:25 +01:00
Thomas Cort b6d4a4c155 Importing usr.bin/who 2013-03-18 11:23:59 +01:00
Thomas Veerman ba49a155b5 fb: introduce framebuffer support to Minix
This patch introduces a framebuffer to Minix. It's written for the ARM
port of Minix, but has an architectural split that separates the
hardware dependent part from the non-hardware dependent part. Futhermore,
this driver was developed using a screen that has a native resolution of
1024x600 pixels and having lack of support for obtaining EDID from the
screen. Consequently, it uses a hardcoded resolution of 1024x600.

The driver uses an interface based on the Linux ioctl API, but supports
only a very limited subset.
2013-02-21 10:29:08 +00:00
Ben Gras d6be9725c9 pkgin_all: script to auto-install all packages
Change-Id: I858c6d2b1c117c1fb5f702ab9c4921e86fb0cec5
2013-02-14 22:58:29 +00:00
Lionel Sambuc 5f59a986e2 Upgrading sync
Change-Id: Ied34ebd1d2dc963f5a2af8fc3bbf8e6c94df61cf
2013-02-02 01:20:09 +01:00
Lionel Sambuc b7ef8cfb52 Upgrading ls
Change-Id: Ie0bacf04e727fac5c6df7b2bcf5039e9ce800616
2013-02-02 01:20:09 +01:00
Lionel Sambuc 7104bb23a9 Upgrading kill
Change-Id: I9ad71f08998ac17651d243afecbcc362e0f91b56
2013-02-01 11:41:48 +01:00
Lionel Sambuc 06f3970b9e Upgrading pwd
Change-Id: I3bab8335ac58f2d0af20c5cee4b772b1175c2ede
2013-02-01 11:41:48 +01:00
Lionel Sambuc 2c96f0541b Upgrading printf
Change-Id: I78dbbf0d14e4d61f5dfbec53d3938453b3e03ee6
2013-02-01 11:41:47 +01:00
Antoine Leca 1999c518b6 import tput from NetBSD
Posix tool to allow direct use of the terminfo database.
The clear script is adjusted accordingly.
The (MINIX-specific) clr equivalent is now gone.
2013-01-25 20:09:20 +01:00
Lionel Sambuc 3e1db26a5a Termcap update, replacing elvis by nvi.
Removing elvis, importing nvi, ctags, updating libedit.

Change-Id: I881eb04d2dc64cf112facd992de1114e1a59107f
2013-01-24 07:44:38 +01:00
Lionel Sambuc 8e5df35e84 Importing NetBSD tsort
Change-Id: I110de8037b9253f4fe53cbe13dc8fc281aeea2ec
2012-12-07 13:58:07 +01:00
Lionel Sambuc 6e0ed9c90c Replacing join with NetBSD join
Change-Id: I1257736f755eab0ce39124f0d78bfa48426ba820
2012-12-07 13:58:07 +01:00
Lionel Sambuc 0fbbaa43e9 Upgrading sort, which is needed by lorder
Change-Id: I64ac0509f4360c947a677600db77e7612a7cbebd
2012-12-07 13:58:07 +01:00
Thomas Veerman c248e23d93 Remove obsolete sum 2012-11-26 15:20:18 +00:00
Ben Gras cf6fa5ad92 mkfs, mkproto: minor improvements
. mkfs: -x feature for extra space
	. rename manpage to mkfs.mfs.1 to follow the binary
	. move mkproto so it can become part of the tools easily
2012-11-07 23:15:52 +01:00
Ben Gras 62aac7f191 retire nonsymbolic rootdev, dev2name 2012-11-06 12:22:12 +01:00
Lionel Sambuc 0ab81d2491 Upgrading bsdtar
* Removing commands/tar
 * Updated external/bsd/libarchive
 * Adding external/bsd/libarchive/bin/tar compiled bsdtar instead
   of just tar
 * (tar is taken care of through the pax utility)

Change-Id: Ie773b4502fbf4e3880f28f01bb528b063a60c668
2012-10-24 13:42:44 +02:00
Lionel Sambuc 85fee539f4 Upgrading pax.
This also means importing librmt.

Change-Id: Ie5b314aeaad28dca46acb64f20f2d70746ea52d0
2012-10-24 13:42:44 +02:00
Ben Gras a8ef09103d mtree mknod
Change-Id: I887437c7b84839fc644da4c55bd59b6a414408ef
2012-10-24 13:42:44 +02:00
Lionel Sambuc 280d8c668e Importing cksum (needed by NetBSD build system)
Change-Id: I47308635f6307066643f83f07b6751b1f2a05eb4
2012-10-23 12:02:51 +02:00
David van Moolenbroek de58c13271 Retire checkhier(8) 2012-10-17 23:00:59 +02:00
David van Moolenbroek 638cb5b3c2 Retire badblocks(8) and readall(1) 2012-10-17 23:00:44 +02:00
Erik van der Kouwe ad898517ac sprofdiff for comparing sprofile results
This patch adds the sprofdiff tool, which compares two sets of profiling
output files. It sorts processes and symbols by difference in average
number of samples, placing those that took more time on the left first
and those that took more time on the right last. If multiple runs are
combined, a standard deviation is computed and this is used to compute
the significance level, which gives an indication of which differences
are likely to be due to chance.

This tool is run not on the raw profiling files, but on the output of
sprofalyze -d (a new option). Though having to use two tools and an
intermediate file seems a bit awkward, the advantage is that the
original source tree is not needed to resolve the symbols. For
comparisons, this is very useful. Also, the intermediate file is in a
text format that can easily be processed by scripts, which may be useful
for other purposes as well.
2012-08-11 22:09:42 +00:00
Erik van der Kouwe fc42f78836 Re-write sprofalyze in C for better performance, more options and to fix problems with the gap the kernel now has 2012-08-07 13:09:02 +00:00
Ben Gras 50e2064049 No more intel/minix segments.
This commit removes all traces of Minix segments (the text/data/stack
memory map abstraction in the kernel) and significance of Intel segments
(hardware segments like CS, DS that add offsets to all addressing before
page table translation). This ultimately simplifies the memory layout
and addressing and makes the same layout possible on non-Intel
architectures.

There are only two types of addresses in the world now: virtual
and physical; even the kernel and processes have the same virtual
address space. Kernel and user processes can be distinguished at a
glance as processes won't use 0xF0000000 and above.

No static pre-allocated memory sizes exist any more.

Changes to booting:
        . The pre_init.c leaves the kernel and modules exactly as
          they were left by the bootloader in physical memory
        . The kernel starts running using physical addressing,
          loaded at a fixed location given in its linker script by the
          bootloader.  All code and data in this phase are linked to
          this fixed low location.
        . It makes a bootstrap pagetable to map itself to a
          fixed high location (also in linker script) and jumps to
          the high address. All code and data then use this high addressing.
        . All code/data symbols linked at the low addresses is prefixed by
          an objcopy step with __k_unpaged_*, so that that code cannot
          reference highly-linked symbols (which aren't valid yet) or vice
          versa (symbols that aren't valid any more).
        . The two addressing modes are separated in the linker script by
          collecting the unpaged_*.o objects and linking them with low
          addresses, and linking the rest high. Some objects are linked
          twice, once low and once high.
        . The bootstrap phase passes a lot of information (e.g. free memory
          list, physical location of the modules, etc.) using the kinfo
          struct.
        . After this bootstrap the low-linked part is freed.
        . The kernel maps in VM into the bootstrap page table so that VM can
          begin executing. Its first job is to make page tables for all other
          boot processes. So VM runs before RS, and RS gets a fully dynamic,
          VM-managed address space. VM gets its privilege info from RS as usual
          but that happens after RS starts running.
        . Both the kernel loading VM and VM organizing boot processes happen
	  using the libexec logic. This removes the last reason for VM to
	  still know much about exec() and vm/exec.c is gone.

Further Implementation:
        . All segments are based at 0 and have a 4 GB limit.
        . The kernel is mapped in at the top of the virtual address
          space so as not to constrain the user processes.
        . Processes do not use segments from the LDT at all; there are
          no segments in the LDT any more, so no LLDT is needed.
        . The Minix segments T/D/S are gone and so none of the
          user-space or in-kernel copy functions use them. The copy
          functions use a process endpoint of NONE to realize it's
          a physical address, virtual otherwise.
        . The umap call only makes sense to translate a virtual address
          to a physical address now.
        . Segments-related calls like newmap and alloc_segments are gone.
        . All segments-related translation in VM is gone (vir2map etc).
        . Initialization in VM is simpler as no moving around is necessary.
        . VM and all other boot processes can be linked wherever they wish
          and will be mapped in at the right location by the kernel and VM
          respectively.

Other changes:
        . The multiboot code is less special: it does not use mb_print
          for its diagnostics any more but uses printf() as normal, saving
          the output into the diagnostics buffer, only printing to the
          screen using the direct print functions if a panic() occurs.
        . The multiboot code uses the flexible 'free memory map list'
          style to receive the list of free memory if available.
        . The kernel determines the memory layout of the processes to
          a degree: it tells VM where the kernel starts and ends and
          where the kernel wants the top of the process to be. VM then
          uses this entire range, i.e. the stack is right at the top,
          and mmap()ped bits of memory are placed below that downwards,
          and the break grows upwards.

Other Consequences:
        . Every process gets its own page table as address spaces
          can't be separated any more by segments.
        . As all segments are 0-based, there is no distinction between
          virtual and linear addresses, nor between userspace and
          kernel addresses.
        . Less work is done when context switching, leading to a net
          performance increase. (8% faster on my machine for 'make servers'.)
	. The layout and configuration of the GDT makes sysenter and syscall
	  possible.
2012-07-15 22:30:15 +02:00
Thomas Veerman bb226763a0 Make mkfs.mfs cross compilable 2012-06-18 10:54:54 +00:00
Thomas Veerman 2ed11343a6 Remove duplicate sed 2012-06-18 10:54:51 +00:00
Thomas Veerman 9d04c193d2 Import NetBSD xinstall
Also, fix mk files for cross compilation.
2012-06-18 10:54:50 +00:00
Thomas Veerman 0b2db08aec Import NetBSD mktemp 2012-06-18 10:54:48 +00:00
Thomas Veerman 2e2caf5919 Import NetBSD make 2012-06-18 10:54:48 +00:00
Thomas Veerman 357f105029 Import NetBSD flex 2012-06-18 10:54:47 +00:00
Thomas Veerman 4a17663c14 Import NetBSD byacc 2012-06-18 10:54:17 +00:00
Thomas Veerman 5ea9e707be Import NetBSD nawk 2012-06-18 10:53:38 +00:00
Thomas Veerman f09c2e014f Use MACHINE_ARCH instead of ARCH 2012-06-18 10:53:35 +00:00
Kees Jongenburger ade7dc8ded Upgrade libddekit and introduce devmand.
Devmand (Device manager daemon) is the daemon that will
dynamically manage services based on events received from
the system.
2012-06-18 09:23:42 +02:00
Ben Gras b332803b6f release fixes
. make ramdisk buildable without ../etc having pwd.db
	. add cat to release bootstrap cmds
	. support running dynamically linked executables for
	  release bootstrap cmds
	. import netbsd chroot to help
2012-04-17 16:58:58 +02:00
Ben Gras 53f94f8ed4 dynamic executables on ramdisk support
See UPDATING about upgrading clang for dynamic linking.

	. allow executables on ramdisk to be dynamically linked; this means
	  putting a few required shared libraries and ld.elf_so on the ramdisk.
	. this makes the ramdisk (usage) smaller when they are dynamic, but
	  bigger when they're not.
	. also we can safely ditch newroot and call mount directly as that is
	  all newroot does.
	. create proto.common to share a bunch of entries between
	  small/nonsmall cases
2012-04-16 14:06:09 +02:00
Thomas Veerman 8dd0880985 Add a simple utility to send control messages
The svrctl utility allows you to send control messages to VFS or PM.
This way you can retrieve runtime information or alter behavior.
2012-04-13 12:58:41 +00:00
Ben Gras a2d1372680 Import NetBSD usr.bin/login 2012-04-11 20:02:15 +02:00
Ben Gras ef01931f76 Import NetBSD file(1) 2012-04-03 01:15:36 +02:00
Ben Gras 4de51eedad import NetBSD su 2012-03-27 02:19:46 +02:00
Ben Gras 6a73e85ad1 retire _PROTOTYPE
. only good for obsolete K&R support
	. also remove a stray ansi.h and the proto cmd
2012-03-25 16:17:10 +02:00
Ben Gras 6af9856d4a libcompat_minix-centric cleanup
remove some old minix-userland-specific stuff

	. /etc/ttytab as a file, and minix-compat function (fftyslot()),
	  replaced by /etc/ttys and new libc functions
	. also remove minix-specific nlist(), cuserid(), fttyslot(), v8 regex
	  functions and <compat/regex.h>
	. and remaining minix-only utilities that use them
	. also unused <compat/pwd.h> and <compat/syslog.h> and
	  redundant <sys/sigcontext.h>
2012-03-16 17:06:24 +01:00
Evgeniy Ivanov 72eca0eb1e update_bootcfg improvements.
- Fix a glitch (don't glob '*' in for).
- update_bootcfg should be a /bin command.
- update_bootcfg should not add menu entries for missing kernels.
2012-03-14 18:19:28 +01:00
Andy Kosela 24f1e18846 Import NetBSD cat(1) 2012-03-14 16:54:30 +01:00
Andy Kosela 7e81b07cc5 Import NetBSD ed(1) 2012-03-14 16:52:31 +01:00
David van Moolenbroek 4aaa5377b3 Import NetBSD du(1) 2012-03-05 22:32:33 +01:00
Ben Gras 957f4181c0 /usr/lib/cpp script to invoke clang -E
. mainly to keep X working
2012-02-17 15:15:31 +00:00
Antoine Leca 3fb8cb760c More cleaning up 2012-02-15 19:04:58 +00:00
Evgeniy Ivanov 9ab3cf37ce updateboot script for netbsd bootloader 2012-02-15 03:51:27 +01:00
David van Moolenbroek 342171fa9e Remove elle(1) editor, due to an incompatible license 2012-02-14 19:13:17 +01:00
Ben Gras 2fe8fb192f Full switch to clang/ELF. Drop ack. Simplify.
There is important information about booting non-ack images in
docs/UPDATING. ack/aout-format images can't be built any more, and
booting clang/ELF-format ones is a little different. Updating to the
new boot monitor is recommended.

Changes in this commit:

	. drop boot monitor -> allowing dropping ack support
	. facility to copy ELF boot files to /boot so that old boot monitor
	  can still boot fairly easily, see UPDATING
	. no more ack-format libraries -> single-case libraries
	. some cleanup of OBJECT_FMT, COMPILER_TYPE, etc cases
	. drop several ack toolchain commands, but not all support
	  commands (e.g. aal is gone but acksize is not yet).
	. a few libc files moved to netbsd libc dir
	. new /bin/date as minix date used code in libc/
	. test compile fix
	. harmonize includes
	. /usr/lib is no longer special: without ack, /usr/lib plays no
	  kind of special bootstrapping role any more and bootstrapping
	  is done exclusively through packages, so releases depend even
	  less on the state of the machine making them now.
	. rename nbsd_lib* to lib*
	. reduce mtree
2012-02-14 14:52:02 +01:00
Thomas Veerman e35528ae79 New zoneinfo port from NetBSD 2012-01-16 11:03:25 +00:00
Thomas Veerman e257c999b8 Replace rm and rmdir with NetBSD version 2012-01-16 10:46:14 +00:00
David van Moolenbroek e7db2d3588 Add fbd -- Faulty Block Device driver
This driver can be loaded as an overlay on top of a real block
device, and can then be used to generate block-level failures for
certain transfer requests. Specifically, a rule-based system allows
the user to introduce (overt and silent) data corruption and errors.

It exposes itself through /dev/fbd, and a file system can be mounted
on top of it. The new fbdctl(8) tool can be used to control the
driver; see ``man fbdctl'' for details. It also comes with a test
set, located in test/fbdtest.
2011-12-11 22:45:46 +01:00
David van Moolenbroek fd4c2b74f3 Add block device tracing facility
The implementation is in libblockdriver, and works transparently for
all block drivers. The new btrace(8) tool can be used to control block
tracing; see ``man btrace'' for details.
2011-11-25 13:47:21 +01:00
Adriana Szekeres c30f014a89 gcore command to coredump a process 2011-11-22 22:07:41 +01:00
Ben Gras f379b3eecb remove ftpd200 2011-11-18 12:19:50 +01:00
Vivek Prakash 79bfef9aab import NetBSD bzip2 and libbz2 2011-11-18 11:11:04 +01:00
Ben Gras 5c00743626 Switch to NetBSD passwd format
Based on work by Vivek Prakash and Gianluca Guida.

See UPDATING about caveats on currently existing accounts.

	. restores netbsd libc pwcache functions
2011-11-14 14:47:42 +00:00
Ben Gras cedeabb357 mainstream-format fstab format
. detect both formats in /etc/rc
	. generate new format in setup
	. obsoletes /etc/fstab.local: everything can go in /etc/fstab
	. put shutdown/reboot/halt and a copy of /usr/adm/wtmp
	  (/etc/wtmp) on root FS so that we can do shutdown checks before
	  mounting /usr
	. new fstab format makes getfsent() and friends work
2011-11-14 14:47:28 +00:00
Ben Gras 0c3983b25a update/fix manpage support
. add bsd-style MLINKS to minix man set, restoring aliases
	  (e.g. man add64 -> int64)
	. update daily cron script to run makewhatis and restore makewhatis
	  in man Makefile (makedb), restores functionality of man -k
	. netbsd imports of man, mdocml, makewhatis, libutil, apropos
	. update man.conf with manpage locations, restoring man [-s] <section>
	. throws out some obsolete manpages
2011-09-28 15:24:15 +00:00
Ben Gras bc0a39238e worldstone benchmark script
. also imports seq(1) to help it
	. add -C option to time(1) to print tsc difference
	. increase col width for ministat for tsc numbers
2011-09-24 14:49:55 +00:00
Vivek Prakash 12d9a08f0d import NetBSD mkdir
. add symlink from old location /usr/bin/mkdir for
	  for compatability
2011-08-25 14:35:12 +00:00
Ben Gras f984dbba70 increase system-wide filename limit to 255
. move mfs-specific struct, constants to mfs/, so
	  mfs-specific, on-disk format structs and consts are
	  fully isolated from generic structs and functions
	. removes de and readfs utils
2011-08-17 16:00:01 +00:00
Arun Thomas 3ca141ab81 Remove legacy swapfs utility 2011-07-27 17:16:17 +02:00
Arun Thomas 93bb4036ce Remove bigmake, binsizes, packman 2011-07-26 13:38:27 +02:00
Arun Thomas 2a9322a117 Remove advent and ttt 2011-07-26 11:37:18 +02:00
Ben Gras 51ffecc181 import elf-only -lcurses
. abandons mixer, gomoku, talk, talkd, top from base system
	. compile top with clang so no ack-compiled program
	  needs -lcurses any more
2011-07-25 11:08:17 +02:00
Vivek Prakash 1ea07af9da Replace uniq with NetBSD version 2011-07-24 21:40:02 +02:00
Arun Thomas 06617e7fdf Import NetBSD mkdep 2011-07-22 17:28:27 +02:00
Arun Thomas db5c83c918 Remove strings(1) 2011-07-21 19:06:06 +02:00
Ben Gras 1341e4aa02 rename size to acksize
.  in keeping with the pattern: elf/binutils tools have
	   regular names, ack tools have 'exceptional' names
2011-07-21 14:31:17 +02:00
Vivek Prakash 49cab1c73c import NetBSD stat 2011-07-18 16:16:57 +02:00
Vivek Prakash 97c7d358ea Replace indent with NetBSD version
- minix-port.patch is empty as it compiles unchanged
2011-07-05 12:37:57 +02:00
Arun Thomas 2e8d1eda1b Replace m4 with NetBSD version
-Create usr.bin hierarchy
-Update minix-port.patch to include m4
2011-06-29 09:33:30 +02:00
Arun Thomas 67c2d2fa54 Remove obsolete mkdist script 2011-06-22 11:15:00 +02:00
Ben Gras 659dd75c78 elf2out from netbsd (ported for minix aout) 2011-02-23 12:21:21 +00:00
Ben Gras e912f6ac38 take pkg_install out of the base system and pre-install it using the
pkgsrc binary packages.

rationale:
  . pkg_install (which is the pkg_* tools) is entangled with pkgsrc,
    not with minix, so tracking it from pkgsrc (easier than with
    base system) makes more sense
  . simplifies upstreaming minix specific changes for pkg_* tools
  . reduce pkgsrc-in-basesystem maintenance burden
2011-01-28 00:02:27 +00:00
David van Moolenbroek 561acfb618 remove fsck1 altogether 2010-12-21 11:00:13 +00:00
Arun Thomas 8f0846e68c Import mktemp(1) from NetBSD 2010-11-06 20:41:51 +00:00
Ben Gras 98ddbffe6e dis386 - a disassembler for ack
- it can disassemble object files (dis386o) and executables
    (dis386a)
  - only useful for as long as we still have ack
2010-10-04 13:26:53 +00:00
Arun Thomas 677d80b781 Remove urlget
This patch gets rid of urlget. It's not used for anything now, since pkgin
uses fetch.

Arun
2010-10-02 18:24:53 +00:00
Arun Thomas 207e88d3c4 Update release script for pkgsrc 2010-09-10 17:00:30 +00:00
Erik van der Kouwe 18ad0b52d3 Make hexdump ACK-compilable and add it to the base system 2010-09-03 07:37:31 +00:00
Arun Thomas 9e4e26e0c8 No more packman, easypack, packit
-Create a dummy packman script that tells users about pkgin
2010-09-03 07:27:39 +00:00
Ben Gras 5d6c2aae0a gcov support, based on work contributed by Anton Kuijsten. 2010-08-25 13:06:43 +00:00
Arun Thomas c9d500e9fd Import hexdump(1) from NetBSD 2010-08-21 13:24:09 +00:00
David van Moolenbroek 5a377144b0 diskctl(8) into commands makefile 2010-08-12 14:21:55 +00:00
Ben Gras 56770462c2 merge datasizes and unstack 2010-08-05 14:09:06 +00:00
Thomas Veerman 5bf3967f26 Rename mkfs to mkfs.mfs and fsck to fsck.mfs. Add /sbin to root's PATH. 2010-08-05 12:35:00 +00:00
Ben Gras 453be3b530 rename nm and strip to acknm and ackstrip
this is to force invocations of these utils for ack to be
explicitly named such, so in the future binutils can be installed
in /usr/pkg without the g- prefix.
2010-08-02 16:09:19 +00:00
Erik van der Kouwe 9212eab21f Add padtext utility (needed for Multiboot) 2010-07-23 14:22:49 +00:00
Ben Gras 7e8ed05df4 pkgsrc pkg_install tools, ported by Gautam Tirumala. 2010-07-16 00:15:25 +00:00