Lionel Sambuc [Fri, 23 Aug 2013 18:27:27 +0000 (20:27 +0200)]
Adapt the type used for adjtime_delta
clock_t is currently a signed type, but in NetBSD this is not the
case. As we plan on aligning our types we have to change this as this
prevents negative delta from being correctly used.
Ben Gras [Wed, 8 Jan 2014 16:43:19 +0000 (17:43 +0100)]
VM bugfix & regression test
The bug in the offset correction code for the 'shrink region from
below' case can easily case an assert(foundregion->offset == offset)
to trigger (if the blocks are touched afterwards, e.g. on fork())
as the offsets become wrong. This commit is a fix & regression test.
We currently have a few of the POSIX tests failing because filemmap
is enabled by default. The working assumption is that these program
pass a pointer to the file server that points to a not yet loaded
data segment. When the file server tries to access that data it
therefore generates a pagefault and a call to itself it can not
handle because it is unable to first return the current call.
arm:make the kernel server and driver binaries identical.
Make the kernel server and driver binaries indentical for the different
ARM platforms. We no longer need to define the AM335X or DM37XX flags
during compilation. The remaining differences are all located in u-boot.
arm:refactor replace cmdline.txt by bootargs passed to the kernel.
Put the boot arguments in uEnv.txt and not in cmdline.txt to allow
a more dynamic configuration of the system. We now also pass the
u-boot board_name parameter to the kernel.
arm:manage versioning of u-boot and upgrade u-boot
Replaced the wget download of u-boot by a versioned git checkout
this allows us to better manage the u-boot and MLO version we ship
while still allowing us to build ofline.
This changes replaces the BASE_URL setting by U_BOOT_BIN_DIR and
also updates to a newer build of u-boot.
arm:add board_id to machine to enable runtime configuration.
Modified the machine struct in include/minix/type.h to have an
additional field called board_id. This fields can be read out
by userland and drivers at runtime to enable automatic
configuration. The board_id field contains information about
the hardware architecture / board and such.
Ben Gras [Tue, 19 Nov 2013 16:01:23 +0000 (16:01 +0000)]
testmfs, testisofs: MFS format, ISO functionality
testmfs: catch MFS format changes
This test tests mkfs.mfs will generate the same FS image given the same
input files. mkproto creates a proto file (normalizing directory entry
order). The assumption is that a change in the output flags a tacit
change in FS format, and that a FS format change will cause the image
to change.
. Changes to mkfs.mfs that innocently change the format can
change the sha1 output in the script along with it.
. The assumption is that corresponding versions of mkfs.mfs and
MFS will always work together; otherwise a lot breaks (ramdisk etc.)
. Therefore, as long as a generated FS image stays the same with the
same input now, incompatible MFS changes will still be flagged,
even if they work together with the current mkfs.mfs.
testisofs: test ISO filesystem
. to test isofs: prepare an ISO FS image using writeisofs, copy it
to a RAM device, mount it using the iso9660fs server, compare the
SHA1 contents of the files on the ISO with the inputs.
. use su to run certain commands in the script as root
run script: run shell script tests
. they are installed without .sh so should be
searched for as such
. add diagnostic when tests are skipped
Ben Gras [Tue, 19 Nov 2013 15:59:52 +0000 (15:59 +0000)]
libminixfs: allow non-pagesize-multiple FSes
The memory-mapped files implementation (mmap() etc.) is implemented with
the help of the filesystems using the in-VM FS cache. Filesystems tell it
about all cached blocks and their metadata. Metadata is: device offset and,
if any (and known), inode number and in-inode offset. VM can then map in
requested memory-mapped file blocks, and request them if necessary.
A limitation of this system is that filesystem block sizes that are not
a multiple of the VM system (and VM hardware) page size are not possible;
we can't map blocks in partially. (We can copy, but then the benefits of
mapping and sharing the physical pages is gone.) So until before this
commit various pieces of caching code assumed page size multiple
blocksizes. This isn't strictly necessary as long as mmap() needn't be
supported on that FS.
This change allows the in-FS cache code (libminixfs) to allocate any-sized
blocks, and will not interact with the VM cache for non-pagesize-multiple
blocks. In that case it will also signal requestors, by failing 'peek'
requests, that mmap() should not be supported on this FS. VM and VFS
will then gracefully fail all file-mapping mmap() calls, and exec() will
fall back to copying executable blocks instead of mmap()ping executables.
As a result, 3 diagnostics that signal file-mapped mmap()s failing
(hitherto an unusual occurence) are disabled, as ld.so does file-mapped
mmap()s to map in objects it needs. On FSes not supporting it this situation
is legitimate and shouldn't cause so much noise. ld.so will revert to its own
minix-specific allocate+copy style of starting executables if mmap()s fail.
Ben Gras [Tue, 19 Nov 2013 15:58:05 +0000 (15:58 +0000)]
mkfs.mfs, mkproto: minor features
. mkfs.mfs: -T option to set timestamp of files on FS
. mkproto: normalize (sort) order of directory entries
. mkproto bugfix: always print mode in 3 digits (%03o)
Thomas Cort [Mon, 18 Nov 2013 23:00:57 +0000 (18:00 -0500)]
usr.bin/calendar: re-sync with upstream.
Jenkins was failing on usr.bin/calendar/calendar.c:386:6: with
"error: 'fd' may be used uninitialized in this function"
when the level of error checking was turned up.
The error was recently fixed upstream. This commit updates
calendar.c to upstream rev 1.50, updates calendar files too.
Thomas Cort [Sun, 10 Nov 2013 17:06:27 +0000 (12:06 -0500)]
eepromread: support for reading from /dev/eeprom
eepromread could only read EEPROMs through the /dev/i2c interface.
Once the cat24c256 driver is started and claims/reserves the
device, it can no longer be read through the /dev/i2c interface.
This patch adds support for reading from EEPROMs through the
/dev/eeprom interface. For example, to read the on-board eeprom
on the BBB, one would do `eepromread -f /dev/eepromb1s50 -i`.
Ben Gras [Tue, 5 Nov 2013 14:43:44 +0000 (15:43 +0100)]
x86_hdimage.sh -i: crossbuild x86 release CD
. build writeisofs as a native tool too for it
. also mkfs.mfs: make missing file in proto nonlethal
. make setup script a little more self-sufficient
. hdboot: use INSTALL_FILE instead of INSTALL so that the
results get added to the METALOG
Defined register offsets and device configurations in structs to
allow more flexibility. This change will allow to support multiple
instances of a driver using a different bus. This is needed for the
BeagleBone Black.
Thomas Cort [Fri, 25 Oct 2013 19:25:55 +0000 (15:25 -0400)]
Importing usr.bin/write
Replaces commands/write. No Minix-specific changes needed.
The NetBSD version lacks a few features that were present
in the Minix version: cbreak mode, verbose, and shell escapes,
but the main write(1) functionality is there and working.