-By adding MKGCC=yes and MKGCCCMDS=yes on the make commandline
it is now possible to compile and install GCC on the system.
Before doing this, if you are not using the build.sh script,
you will need to call the fetch scripts in order to retrieve
the sources of GCC and its dependencies.
-Reduce difference with NetBSD share/mk
Move Minix-specific parameters from bsd.gcc.mk to bsd.own.mk,
which is anyway patched, so that bsd.gcc.mk is now aligned
on the NetBSD version.
-Clean libraries dependencies, compiles stdc++ only if gcc is
also compiled (it is part of the gcc sources)
- Enable installing binutils from the base system.
- Import texinfo which is required for the binutils tools
to be compiled.
- Also adapted the fetch rules to correctly generate the
gitignore files for gcc, and allow the case of multiple
modules in the same directory, as found in gnu/dist.
Xiaoguang Sun [Tue, 25 Jun 2013 12:41:01 +0000 (20:41 +0800)]
Implement getrusage
Implement getrusage.
These fields of struct rusage are not supported and always set to zero at this time
long ru_nswap; /* swaps */
long ru_inblock; /* block input operations */
long ru_oublock; /* block output operations */
long ru_msgsnd; /* messages sent */
long ru_msgrcv; /* messages received */
long ru_nvcsw; /* voluntary context switches */
long ru_nivcsw; /* involuntary context switches */
Ben Gras [Mon, 24 Jun 2013 13:46:20 +0000 (15:46 +0200)]
kernel: high-hz workaround for do_settime
. with hz=1000, clock_t only lasts a few years.
whenever we can't express the desired realtime
in ticks because the distance with boottime is
too high, simply adjust bootime like we do for
otherwise negative values.
. fixes test 2 on ARM
Ben Gras [Sun, 23 Jun 2013 16:37:57 +0000 (18:37 +0200)]
kernel, arm ucontext: ARM DBG=-g run fixes
kernel:
. modules can be as big as the space (8MB) between them
instead of 4MB; memory is slightly bigger with DBG=-g
arm ucontext:
. r4 is clobbered by the restore function, as it's
used as a scratch register, causing problems for the
DBG=-g build
. r1-r3 are safe for scratch registers, as they are
caller-save, so use r3 instead; and don't bother
restoring r1-r3, but preserve r4
Increase driver process priority to prevent starvation. Without
special attribute drivers will have the same priority as other
userland processes this. Posix test 1 was taking so much resources
that it triggered alarms in the MMC driver.
arm:mmc driver refactor and timeout fix for BeagleBoneBlack.
When we send MMC commads that contain data the controller provides no
description of the order of events and we need to be able to send data
from and to the controller "when needed". Changed the code to react
on buffer read and buffer write ready based on interrupts.
Ben Gras [Wed, 19 Jun 2013 09:39:05 +0000 (11:39 +0200)]
arm timer fix
. set 'done' once initialized so 32-bit read frc works,
thanks to keesj
. make sure the software-implemented upper 32 bit of the 64-bit
"tsc" value works OK by adding an assert in one of its calls
Ben Gras [Sun, 16 Jun 2013 22:33:47 +0000 (00:33 +0200)]
kernel, libsys: make it arm-target-independent
. by making the address and frequency of the
free running clock kinfo members, set at runtime
in the kernel, instead of compile time constants
in libsys
Ben Gras [Sat, 15 Jun 2013 23:43:39 +0000 (23:43 +0000)]
a few DBG=-g build fixes, both arches
- setlogin() not available
- softfloat needed in -lminc for arm
- libminc: we have to set LIBCDIR for the included files,
so use that instead of LIBCSRCDIR
Ben Gras [Thu, 13 Jun 2013 13:08:26 +0000 (15:08 +0200)]
some arm uart fixes
. always keep reading data from uart so the interrupt is
not continually asserted if data is sent but no process
reads it
. increase tx & rx fifo trigger levels -> reduces the number
of interrupts necessary
. bigger rx/tx buffers
Ben Gras [Wed, 12 Jun 2013 18:42:41 +0000 (18:42 +0000)]
vfs: patch for unpause()/revive() race condition
. unpause() and revive() can race - revive() can run during
a device i/o unblock, causing two sendnb()s to occur, and the
2nd one to fail
. this can easily happen when a process is blocking on tty and
is then killed by a signal - tty cancels the i/o and then
kills the process by a signal
Ben Gras [Tue, 11 Jun 2013 14:11:57 +0000 (14:11 +0000)]
tty: i386: rs232 fix
. ignore interrupt (stop interrupt check loop) if
interrupt bit not set; limit loop too
. mask off other bits when testing bits in the status register
. this fixes rs232 output that would otherwise never get re-triggered
as too many bits were set in the status byte to match the
possibilities.
Ben Gras [Sat, 16 Mar 2013 03:19:47 +0000 (03:19 +0000)]
ld.elf_so, grep, make: use mmap()
. let the dynamic linker use a real file mmap(), reverting
most of the minix-specific changes
. except for a fallback mode for systems or filesystems that
do not support mmap() on files
. make, grep: let them use mmap() too, with fallback
Ben Gras [Tue, 7 May 2013 12:36:09 +0000 (12:36 +0000)]
vm: mmap support
. test74 for mmap functionality
. vm: add a mem_file memory type that specifies an mmap()ped
memory range, backed by a file
. add fdref, an object that keeps track of FD references within
VM per process and so knows how to de-duplicate the use of FD's
by various mmap()ped ranges; there can be many more than there can
be FD's
. turned off for now, enable with 'filemap=1' as boot option
Ben Gras [Tue, 7 May 2013 12:41:07 +0000 (12:41 +0000)]
vfs: mmap support
. libc: add vfs_mmap, a way for vfs to initiate mmap()s.
This is a good special case to have as vfs is a slightly
different client from regular user processes. It doesn't do it
for itself, and has the dev & inode info already so the callback
to VFS for the lookup isn't necessary. So it has different info
to have to give to VM.
. libc: also add minix_mmap64() that accepts a 64-bit offset, even
though our off_t is still 32 bit now.
. On exec() time, try to mmap() in the executable if available.
(It is not yet available in this commit.)
. To support mmap(), add do_vm_call that allows VM to lookup
(to ino+dev), do i/o from and close FD's on behalf of other
processes.
build:arm allow to store build settings in a .settings file.
If present a file called .settings will be sourced when
calling the arm_sdimage.sh script. This allows to configure
the build setting for arm build without the need to specify
the flags each time arm_sdimage.sh is called.
For example to configure arm_sdimage.sh to target the
beaglebone put the following content in your .settings file.
Thomas Cort [Tue, 28 May 2013 19:07:10 +0000 (15:07 -0400)]
syslog.conf: correct PID file path in comments.
The syslogd.pid file has moved from /usr/run to /var/run. The comments
in syslog.conf direct the user to restart syslogd using the old PID
file location. This patch updates the comment to match the code.
Omap timers remove hardcoded base address and add some initial
support for the beaglebone's timers. Frclock_util will need
refactoring to remain independent of the ARM flavour.
We are planning on using the NetBSD config system to perform build
system configuration when targeting different hardware variants.
This functionality however is not integrated yet and we currently
rely on using ifdef's in the code. This commit add the DDM37XX flag.
Lionel Sambuc [Thu, 23 May 2013 16:09:19 +0000 (18:09 +0200)]
releasetools/arm_sdimage.sh: Improvements
- Added the possibility to define the number of parallel jobs from the
command line with (example, default is 1):
$ JOBS=8 ./releasetools/arm_sdimage.sh
- Generate filesystem filling the reserved partition area, instead of
being smaller.
- Added a possibility to specify additional parameter to the build.sh
script from the command line with (example):
$ BUILDVARS='-N0 -V MYVAR=yes' ./releasetools/arm_sdimage.sh
Lionel Sambuc [Thu, 23 May 2013 16:00:34 +0000 (18:00 +0200)]
Fix symlink issue when generating an ARM image
A few symlinks were pointing to a nonexistent file named '(null)'
instead of their intended target. This was only seen when using the
arm_sdimage.sh script.
There is two ways of specifying links and directories. the first one
using an entry in one of the mtree files, and the second one in
/etc/Makefile.
Those entries where doubled, and one of them would specify some rights,
while the other had the target.
By removing those entries, I make sure there is only one definition of
these symlinks, which solves the problem I was seeing on an ARM image.
These symlinks are still present on a generated system, as they are
required.
Ben Gras [Thu, 23 May 2013 00:43:33 +0000 (02:43 +0200)]
mkfs: only complain about failing stat with -d
mkfs -d is a feature that needs a stat() of the mkfs binary, which
often fails (as mkfs is often not invoked with a full path or from
the same directory). it makes setup look a bit messy as the error
is always printed while installing the system, for each created FS,
even though the situation is harmless. This change only complains
when the stat is actually needed (-d).
Ben Gras [Tue, 21 May 2013 12:57:57 +0000 (14:57 +0200)]
arm: recognize instruction fetch pagefault
. an instruction fetch pagefault generates a prefetch
abort exception, this should also be a source of
a pagefault event
. the saved_lr argument to the C exception handler was
sometimes an address, sometimes a pointer to that address;
the kernel sometimes dereferences it, so it should always be
an in-kernel address, never a userspace address. fix in mpx.S
makes it always a pointer.
. move dumping of all processes over serial out of
the arch-specific arch_system.c