Commit graph

53 commits

Author SHA1 Message Date
Jean-Baptiste Boric 69eead77ff New image framework generation
The CD now boots directly from the ISO 9660 filesystem instead of using
MBR partitioning with Minix file systems. This saves some space on the
CD and reduces memory requirements by some unknown amount as the root
ramdisk is completely eliminated.

The x86 hard drive image creation is also rewritten in the same
fashion.

The setup is modified to be more NetBSD-like (unpacking sets
tarballs instead of blindly copying the CD contents). Splitting MINIX
into sets is done in another commit due to it being a nightmare to
rebase.

Since MINIX lacks union mounts for now, a bunch of ramdisks are
generated at run-time to make parts of the filesystem writeable for the
CD. This solution isn't ideal, but it's enough for an installation CD.

Change-Id: Icbd9cca4dafebf7b42c345b107a17679a622d5cd
2015-10-10 19:09:35 +02:00
David van Moolenbroek 3b0299dd65 bootloader: pass memory map to kernel
Previously, the bootloader would only provide a single memory range.
At least on VirtualBox, this memory range includes the ACPI tables,
which the kernel then happily overwrites when executing VM.  Much of
the infrastructure to use a fullblown memory map is already in place;
this patch adds the last (and strangely missing) bit of generating
the memory map in a multiboot-compatible way.

It should be noted that both the bootloader and the kernel actually
violate the multiboot specification by not packing the structure for
the memory ranges.  This is a NetBSD bug, but it is also a nonissue
for (our) practical purposes.  It can be fixed without changing the
code added in this patch.

Change-Id: I7c0a307a8a8133239531e1d2b80f376849f90247
2015-02-10 13:47:28 +00:00
Ben Gras ad8bffad67 ARM: remove minix type exception
. clean fix for minix/arm llvm build problem
	. was needed for gcc but isn't any more it seems

Change-Id: Iea1edffbe3149c5c954ae009a388b7ea492f3d1a
2014-12-10 16:46:29 +01:00
Lionel Sambuc 433d6423c3 New sources layout
Change-Id: Ic716f336b7071063997cf5b4dae6d50e0b4631e9
2014-07-31 16:00:30 +02:00
Lionel Sambuc 4684ddb6aa LLVM Minix changes
- import libcxx
 - reduce targets to the one when compiled as a tools

Change-Id: Iabb8427f80ff8e89463559a28bcb8b4f2bdbc496
2014-07-28 17:05:59 +02:00
Ben Gras 6611dddc31 gold -Ttext=.. workaround
replace invocations of -Ttext=.. with --section-start=.text=.. for
gnu gold-ld. it was giving very weird results when given page-rounded
values. --section-start=.text=.. works for both bfd-ld and gold.
2014-07-28 17:05:50 +02:00
Kees Jongenburger ec92655ec2 remove __BIT_TYPES_DEFINED__ because they are actually not defined.
Change-Id: Iae6489c013ff92042f001d50e9a9983a409c268e
2014-07-28 17:05:24 +02:00
Ben Gras 3f38115c7b _MINIX_SYSTEM - fixes for in-minix crossbuild
. define _MINIX_SYSTEM for all system code from minix.service.mk
	. hide some system-level declarations and definitions
	  behind _MINIX_SYSTEM to cleanly fix host tool build problems on
	  Minix (such as: NONE being defined and paddr_t being used but not
	  declared)
	. the similar definition _SYSTEM is unsuitable as it changes the
	  values of errno definitions

Change-Id: I407de79e2575115243a074b16e79546a279cfa3e
2014-07-28 17:05:14 +02:00
Lionel Sambuc 84d9c625bf Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC)
- Fix for possible unset uid/gid in toproto
 - Fix for default mtree style
 - Update libelf
 - Importing libexecinfo
 - Resynchronize GCC, mpc, gmp, mpfr
 - build.sh: Replace params with show-params.
     This has been done as the make target has been renamed in the same
     way, while a new target named params has been added. This new
     target generates a file containing all the parameters, instead of
     printing it on the console.
 - Update test48 with new etc/services (Fix by Ben Gras <ben@minix3.org)
     get getservbyport() out of the inner loop

Change-Id: Ie6ad5226fa2621ff9f0dee8782ea48f9443d2091
2014-07-28 17:05:06 +02:00
Ben Gras ff10274392 i386 param.h
Change-Id: I880dbe83ad611cc0736d2a76a9f67b133f2fc025
2014-03-03 20:47:07 +01:00
Ben Gras 7597f4a8fc <machine/signal.h>
. use netbsd sigframe, sigcontext struct
	. netbsd sigframe *contains* sigcontext; use that directly
	  in kernel sigsend
	. drop two fields from minix x86 stackframe.h (process context)
	  that were unused, retadr and st

use in-sigframe sigcontext

Change-Id: Ib59d699596dc3a78163dee59f19730482fdddf11
2014-03-03 20:47:07 +01:00
Ben Gras 66a4f9a240 i386 cpu.h
Change-Id: Iae6d8727ba6e005a8b6e3bed4008f3f3282a1a81
2014-03-03 20:47:06 +01:00
Ben Gras 0222260628 import / small alignment of many arm includes
Change-Id: I4a7631409190474546c0ba03312c23454c99d62a
2014-03-03 20:47:05 +01:00
Ben Gras be9fe09e97 x86 multiboot.h
Change-Id: I245564a98fb9e2572b88f8feb7411ad6800a543c
2014-03-03 20:47:05 +01:00
Ben Gras 9c031c9d7f <sys/ptrace.h>
Change-Id: Ib930c661c1e6de05b2e0d5fce4ffc1ae2269fc6a
2014-03-03 20:47:04 +01:00
Ben Gras f4f382d8c0 align ARM cpu.h importing & using armreg.h
Change-Id: I4793517d936f71b0bb7088fbfe67e73a65fafb11
2014-03-03 20:47:04 +01:00
Ben Gras 81473dbba0 <vmparam.h>
Change-Id: I941ea3111703ed089bfdaf87d26158ab8697a80d
2014-03-03 20:47:04 +01:00
Ben Gras 5cecdfcb3e <machine/mcontext.h>
Change-Id: I2ad64018f3f402e7ccc5c4dc037dd0a3fe56a929
2014-03-03 20:47:03 +01:00
Lionel Sambuc df23a7e418 sys/arch/{arm,i386}/include: merges
The follwoing file have been merged as far as reasonably possible:

 * sys/arch/arm/include/:
   - ansi.h
   - asm.h

 * sys/arch/arm/include/:
   - ansi.h
   - asm.h
   - cdef.h

Unlike on NetBSD, the definition of size_t, ssize_t and ptrdiff_t are
the same as the ones on intel.

Change-Id: I3b52e9c03991e575450ca42567877cd4fd14976a
2014-03-03 20:47:00 +01:00
Lionel Sambuc 55d9e9954b Extending time_t to 64bits.
Change-Id: Ia96b8bfba19cb8179a0237a7d2122d415c24d73f
2014-03-03 20:45:28 +01:00
Ben Gras 8ccb12bb5a use netbsd <sys/signal.h> and sigset_t
. create signals-related struct message type to store sigset_t
	  directly
	. create notify-specific message types, so the generic NOTIFY_ARG
	  doesn't exist anymore
	. various related test expansions, improvements, fixes
	. add a few error-checks to sigismember() calls
	. rename kernel call specific signals fields to SYS_*

Change-Id: I53c18999b5eaf0cfa0cb25f5330bee9e7ad2b478
2014-03-02 12:28:31 +01:00
Lionel Sambuc c3fc9df84a Adding ipc_ prefix to ipc primitives
* Also change _orig to _intr for clarity
 * Cleaned up {IPC,KER}VEC
 * Renamed _minix_kernel_info_struct to get_minix_kerninfo
 * Merged _senda.S into _ipc.S
 * Moved into separate files get_minix_kerninfo and _do_kernel_call
 * Adapted do_kernel_call to follow same _ convention as ipc functions
 * Drop patches in libc/net/send.c and libc/include/namespace.h

Change-Id: If4ea21ecb65435170d7d87de6c826328e84c18d0
2014-03-01 09:05:01 +01:00
Ben Gras 6c8f7fc3ba netbsd dirent.h, import sys/sys *.h, mfs cleanup
. add all sys/sys headers not already present to help compiling
	. take netbsd dirent.h and struct dirent; main result is
	  introducing d_type and d_namlen that have to be set by getdents()
	  in all FS code implementing it
	. d_off is gone
	. alignment of the struct has become 8 bytes instead of 4
	. remove _MAX_BLOCK_SIZE, _MIN_BLOCK_SIZE, _STATIC_BLOCK_SIZE
	. libminlib: cleanup unused yet duplicate code
	. mfs: throw out the long-broken v1, v2 support
	. new test for dirent contents filled by getdents()

Change-Id: I1459755c7ba5e5d1c9396d3a587ce6e63ddc283e
2014-03-01 09:04:59 +01:00
Lionel Sambuc 9fab85c2de Replacing timer_t by netbsd's timer_t
* Renamed struct timer to struct minix_timer
 * Renamed timer_t to minix_timer_t
 * Ensured all the code uses the minix_timer_t typedef
 * Removed ifdef around _BSD_TIMER_T
 * Removed include/timers.h and merged it into include/minix/timers.h
 * Resolved prototype conflict by renaming kernel's (re)set_timer
   to (re)set_kernel_timer.

Change-Id: I56f0f30dfed96e1a0575d92492294cf9a06468a5
2014-03-01 09:04:54 +01:00
Lionel Sambuc 744378194d Alignement on netbsd types, part 1
The following types are modified (old -> new):
 * _BSD_USECONDS_T_ int       -> unsigned int
 * __socklen_t      __int32_t -> __uint32_t
 * blksize_t        uint32_t  -> int32_t
 * rlim_t           uint32_t  -> uint64_t
On ARM:
 * _BSD_CLOCK_T_    int       -> unsigned int
On Intel:
 * _BSD_CLOCK_T_    int       -> unsigned long

bin/cat is also updated in order to fix warnings.

_BSD_TIMER_T_ has still to be aligned.

Change-Id: I2b4fda024125a19901120546c4e22e443ba5e9d7
2014-02-18 11:25:01 +01:00
Ben Gras c8f3b10909 fix a few more minix specific warnings
. also disable stack protection feature for gcc,
	  causes build errors for pkgsrc gcc on minix

Change-Id: I1c6e2bcb4d948098d642543d7b2711284ee55c72
2013-08-27 16:16:03 +00:00
Anton Kuijsten 2e3046757a LLVM bitcode for almost the whole source tree
Change-Id: Ibc6f89de112e0649c3a3bfe49c2baa2ed0746212
2013-06-18 10:49:53 +02:00
Anton Kuijsten 1d71e39b73 Gold linker support for entire source tree 2013-06-11 22:51:02 +02:00
Lionel Sambuc 435f2b0095 Downgrading to netbsd zlib version
Change-Id: I83cf73d8357ea34ab5e49fe15bd4c45ce54cac01
2013-04-09 16:43:13 +02:00
Lionel Sambuc fc39546350 Adapt ARM print macro to match used types
Change-Id: I987c669dce30d97ff67e33a50106a07163f7d7f1
2013-03-13 13:51:56 +01:00
Lionel Sambuc 8e4736f2df Removing obsolete _MINIX define
Change-Id: Id33ac7e973d1c0e249b690fe44a597474fac6076
2013-02-26 09:44:20 +00:00
Lionel Sambuc b1c4ba4ab6 ARM updates
Due to the ABI we are using we have to use the earm architecture
moniker for the build system to behave correctly. This involves
then some headers to move around.

There is also a few related Makefile updates as well as minor
source code corrections.
2013-01-17 10:03:58 +01:00
Ben Gras 1cd76c7513 sys/arch/x86/include updates
. primary purpose is to synchronize with <ieeefp.h> which
	  expects a fp_prec from sys/arch/x86/include/ieeefp.h
2013-01-15 12:14:01 +00:00
Lionel Sambuc f14fb60209 Libraries updates and cleanup
* Updating common/lib
 * Updating lib/csu
 * Updating lib/libc
 * Updating libexec/ld.elf_so
 * Corrected test on __minix in featuretest to actually follow the
   meaning of the comment.
 * Cleaned up _REENTRANT-related defintions.
 * Disabled -D_REENTRANT for libfetch
 * Removing some unneeded __NBSD_LIBC defines and tests

Change-Id: Ic1394baef74d11b9f86b312f5ff4bbc3cbf72ce2
2013-01-14 11:36:26 +01:00
Lionel Sambuc f6aac1c3b5 Moving all NetBSD headers back where they belong.
Moving include/sys NetBSD headers to /sys/sys
Moving include/arch/*/ NetBSD headers to /sys/arch/*/include

Change-Id: Ia1a45d4e83ab806c84093ec2b61bdbea9bed65a0
2013-01-14 11:36:25 +01:00
Lionel Sambuc 9152e1c5a7 Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
 * tools
 * distribution
 * sets
 * release

The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.

For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.

Regarding new or modifications of Makefiles a few things:
 * Read share/mk/bsd.README
 * If you add a subdirectory, add a Makefile in it, and have it called
   by the parent through the SUBDIR variable.
 * Do not add arbitrary inclusion which crosses to another branch of
   the hierarchy; If you can't do without it, put a comment on why.
   If possible, do not use inclusion at all.
 * Use as much as possible the infrastructure, it is here to make
   life easier, do not fight it.

Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-11-15 16:07:29 +01:00
David van Moolenbroek 9733fcdb43 bootloader: usability improvements
- add "edit" menu option, to edit menu commands before executing them;
- add "menu" boot command, to return to the menu from the prompt;
- provide more line editing features when getting input;
- fix a few potential buffer overflows as a side effect.
2012-10-12 01:03:36 +02:00
Ben Gras e4ac80eb60 various warning/errorwarning fixes for gcc47
. warnings (sometimes promoted to errors) in servers/ and kernel/
 . -Os for ext2 boot module to make it small enough
2012-08-27 16:19:18 +02:00
Ben Gras 41ab295654 hide block_t behind _MINIX (for gcc) 2012-08-24 18:07:37 +02:00
Dirk Vogt c735b0bb2c Makefile fixups for cross compilation 2012-06-18 10:53:24 +00:00
Thomas Veerman 3f775404d9 boot: use high baud rate by default 2012-03-28 08:57:38 +00:00
Antoine Leca adb5107e26 Cosmetic boot fix.
The NetBSD boot loader loads automatically the kernel module appropriate
for the detected root file system; it is preset at "ffs".  The MINIX3fs
support does not reset the underlying global variable, since there are
no use for this on MINIX.  As a result, the boot loader searches for
/ffs.kmod, and issues two warnings about "module failure to open/load."
2012-02-24 13:30:09 +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
Antoine Leca f87b9a3d2d sys: move some include dirs
. sys/machine should be sys/arch/i386
2012-02-10 17:02:47 +01:00
Evgeniy Ivanov 60a2ce010a Integrate new boot stuff into build scheme.
- Build sys with everything else.
- Gitignore files built by new boot stuff.
2012-02-09 18:54:43 +01:00
Evgeniy Ivanov 7f2d47d84c Remove libkern, leave just header.
Boot stuff dependencies from NetBSD.

Patch by Antoine Leca. Relocated to src/sys.

The port is using the same libminc.a as usual MINIX services (and does
not use NetBSD libkern); the headers imported from NetBSD sys/ tree
have been kept to a minimum (still numbers higher than 30 though.)

Note the peculiar way to use libraries (libsa, libi386, etc.): the
source code is shared, but each component builds its own copy of the
library, with its own set of preprocessor defines.
2012-02-09 18:54:42 +01:00
Evgeniy Ivanov 002fecdd9e Port cdboot. 2012-02-09 18:54:41 +01:00
Evgeniy Ivanov 174e3c15af Import cdboot. 2012-02-09 18:54:40 +01:00
Evgeniy Ivanov 81d26afebe Port MBR.
Patch by Antoine LECA.
2012-02-09 18:54:39 +01:00
Evgeniy Ivanov 6acebc04b6 Import sys/arch/i386/stand/mbr. 2012-02-09 18:54:39 +01:00