Commit graph

75 commits

Author SHA1 Message Date
Thomas Cort 6ea7f916db Importing usr.bin/pr
Replaces commands/pr. No Minix-specific changes needed.

Change-Id: I3c4c03b38fc8c654e7c54c3a8af0e07a0dfc9f67
2013-10-25 09:05:26 -04:00
Thomas Cort f0f2dcddaa Importing usr.bin/uuidgen
No Minix-specific changes needed.

Change-Id: I8ab26f911ff9af2a41c3866badd66c16ed82b509
2013-10-24 12:14:43 -04:00
Thomas Cort 2106ea4754 Importing usr.bin/units
No Minix-specific changes needed.

Change-Id: I2a3411bf78d5e31875d577dcd6df68f76da98137
2013-10-23 19:24:43 -04:00
Thomas Cort dbbd766d59 Importing usr.bin/leave
No Minix-specific changes needed.

Change-Id: I2cd3f75255168a553ec5f9dd722ba1c51c09a0c1
2013-10-18 23:16:59 -04:00
Thomas Cort ba6640c5fd Importing usr.bin/env
Replaces commands/env. No Minix-specific changes needed.

Change-Id: I1aefebe360962ae52241384c54f9466253d783c6
2013-10-18 09:16:20 -04:00
Thomas Cort 92b8e9ac1a Importing usr.bin/printenv
Replaces printenv from commands/env. No Minix-specific changes
needed.

Change-Id: I64e63c9d0ca94faadc71906cf78d18fed5905e90
2013-10-18 09:15:28 -04:00
Thomas Cort 2cb302057c Importing usr.bin/column
No Minix-specific changes needed.

Change-Id: Ia883c948f6b9e5602f29fbf28f87646529563a84
2013-10-17 17:22:40 -04:00
Thomas Cort 401bad1a4d Importing usr.bin/users
No Minix-specific changes needed.

Change-Id: I886ff43d1ec63c6c3393bc1307425676b107a274
2013-10-16 13:18:59 -04:00
Thomas Cort d091a404e8 Importing usr.bin/cut
Replaces commands/cut. No Minix-specific changes needed.

Change-Id: I4e8e203eb8aad18232364f05cbdc961a57afae51
2013-10-15 08:43:27 -04:00
Thomas Cort 40b23ce476 Importing usr.bin/unzip
No Minix-specific changes needed.

Change-Id: Ib0b2bf2254acf3d8704bd6acda83af997240ebcf
2013-10-14 23:53:26 -04:00
Thomas Cort 1e69cb63f4 Importing usr.bin/nl
* Add _SC_LINE_MAX to unistd.h (value of 15 from NetBSD).
 * Add _SC_LINE_MAX case to sysconf(3) in libc.
 * usr.bin/nl itself required no Minix specific changes.

Change-Id: I10f056ccdf4f212beb1272f735f41303e5036c05
2013-10-14 18:06:05 -04:00
Thomas Cort 982405fef1 Importing usr.bin/nohup
Replaces commands/nohup. No Minix-specific changes needed.

Change-Id: I2fb7c387833a8898cf30fc3ac25ea53ee1031bd1
2013-10-13 10:24:23 -04:00
Thomas Cort d37082b292 Importing usr.bin/nice
Replaces commands/nice. No Minix-specific changes needed.

Change-Id: I3e089497dcd86893aa28e3a973496af5b1689f45
2013-10-12 07:01:11 -04:00
Thomas Cort 916b872033 Importing usr.bin/tee
Replaces commands/tee. No Minix-specific changes needed.

Change-Id: I31481facfa9cd44860bf2b59ec779605dd8d2f2d
2013-10-09 10:58:14 +02:00
Thomas Cort b50dbb4d24 Importing usr.bin/machine
Change-Id: I7dd97073e94cbb75fdac7f15c73437c8ce44a606
2013-10-02 14:58:25 +02:00
Thomas Cort 79cc8b683f Importing usr.bin/rev
Change-Id: I73c661eb9d4cca5c17b969bb3831541c1f7f9319
2013-09-30 15:19:38 +02:00
Lionel Sambuc d5c6c6a51b Importing usr.bin/tr
Change-Id: I4563198f111f2ec3687f6a5084edd05f243c2263
2013-08-25 18:51:36 +02:00
Lionel Sambuc 00785f561f Importing usr.bin/xargs
Change-Id: I6a8ce6a8eee31942abb4db797672da7d00dfa43d
2013-08-25 18:51:36 +02:00
Lionel Sambuc 3dab66925c Importing usr.bin/unexpand
Change-Id: I2bab349ebccc28b14db446689171bce7dede8a9d
2013-08-25 18:51:36 +02:00
Lionel Sambuc 563dd2c8f4 Importing usr.bin/expand
Change-Id: I4089d86d4ae1dcade0c82ed30ecd5685802acfd3
2013-08-25 18:51:36 +02:00
Lionel Sambuc 0b8a9e801d Importing usr.bin/basename
Change-Id: I2c71c83bc6a420390c4aed015373f78ebf425903
2013-08-25 18:51:36 +02:00
Lionel Sambuc 211b53e442 Importing usr.bin/dirname
Change-Id: I83263576440c2040fb8ccd1e952abd53495fcb70
2013-08-25 18:51:35 +02:00
Lionel Sambuc 891fbc18d7 Importing usr.bin/wc
Change-Id: If174bd2bfc3ef38f21d45b5ba0567ac7d99dc608
2013-08-25 18:51:35 +02:00
Thomas Cort 3d257f8073 Importing usr.bin/shuffle 2013-06-10 10:51:49 +02:00
Thomas Cort 406cdd95a6 Importing usr.bin/finger 2013-06-02 09:52:40 +02:00
Thomas Cort 92f7a4ab20 Importing usr.bin/bdes 2013-06-02 09:52:35 +02:00
Thomas Cort d8b7bfdfe8 Importing usr.bin/logname 2013-05-31 16:13:41 +02:00
Kees Jongenburger fd7bb1786e build:add tool to convert from METALOG to proto files.
Change-Id: I5c4e15b1a2bac5a4ca3a0530f8d6aa2643ac720a
2013-04-21 21:36:30 +02:00
Thomas Cort 04203a83a6 Importing usr.bin/ftp 2013-04-05 19:02:06 +00:00
Thomas Cort 1d4c0ebe0f Importing usr.bin/from 2013-03-23 16:11:11 +01:00
Thomas Cort 66601c7f92 Importing usr.bin/whatis
- LSC: fixed missing entry in minix/mi

Change-Id: I5766dd72819e3b15ef24ab49c5ee3a5aa42049c4
2013-03-23 16:10:23 +01: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 Cort fe7b9c06f9 Importing usr.bin/getopt 2013-03-11 11:31:55 +01:00
Thomas Cort 7b9673cd55 Importing usr.bin/col 2013-03-05 16:44:54 +01:00
Lionel Sambuc 2c96f0541b Upgrading printf
Change-Id: I78dbbf0d14e4d61f5dfbec53d3938453b3e03ee6
2013-02-01 11:41:47 +01:00
Antoine Leca 5139afee6b Import infocmp from NetBSD
Convert the content of the terminfo database into human-readable
form, the same as used by the tic(1) command already present.
2013-01-25 20:11:01 +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 c75851fccb Importing nbperf
Change-Id: I87eb5bd3d0596370ade272f22c6df739d0483006
2012-12-07 13:58:07 +01:00
Lionel Sambuc d71cc7b9f6 Importing lorder
Change-Id: I0043c56a40a69ea809c909285c06de0273bada9f
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
Lionel Sambuc d19d7d58aa Toolchain upgrade and portability improvements.
upgrade to NetBSD CVS release from 2012/10/17 12:00:00 UTC

Makefiles updates to imporve portability

Made sure to be consistent in the usage of braces/parenthesis at
least on a per file basis. For variables, it is recommended to
continue to use braces.
2012-11-15 16:07:29 +01:00
Lionel Sambuc 280d8c668e Importing cksum (needed by NetBSD build system)
Change-Id: I47308635f6307066643f83f07b6751b1f2a05eb4
2012-10-23 12:02:51 +02: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