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.
Thomas Cort [Mon, 14 Oct 2013 14:02:42 +0000 (10:02 -0400)]
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.
- exclude .git instead of .svn when using local source (-c);
- put the git tag (or "copy") in /etc/version rather than something
outdated related to SVN;
- remove SVN-specific -s flag (suggested by Erik).
Ben Gras [Thu, 3 Oct 2013 15:22:07 +0000 (17:22 +0200)]
avoid alloc_contig() for iovec, mfs superblock
. initial workaround for assert() firing on iovec
size on ARM. likely due to alloc_contig() allocating
unusually mapped memory in STATICINIT.
. for the same reason use the regular cache i/o functions
to read the superblock in mfs - avoid the alloc_contig()
that STATICINIT does.
Thomas Cort [Fri, 11 Oct 2013 14:29:16 +0000 (10:29 -0400)]
ipc: add missing printf argument.
A printf statement that only gets compiled when DEBUG_SEM is
defined had a '%' conversion without a corresponding argument.
This patch adds the argument.
Change-Id: I469fbbe6f49802cb86d81b059cb454d967f47079
Reason: Introduces new device nodes and removes old devices nodes which where unintended at this point.
Ben Gras [Fri, 27 Sep 2013 14:29:08 +0000 (14:29 +0000)]
test75: force child to use a minimum of cpu time
test75 sometimes false-fails if something else is going on
at the same time, presumably because the child doesn't spin
enough to register a nonzero getrusage() cpu time value, as
spin() uses the real time to limit the spinning.
this change forces spin() to do a minimum amount of spinning
before exiting, regardless of scheduling.
Ben Gras [Thu, 26 Sep 2013 11:42:31 +0000 (13:42 +0200)]
arm_sdimage.sh: use native minix partition util
. make filesystems on primary partitions to make it
easier on the minix partition util
. so sfdisk isn't required as an external tool
. also make partition and hitherto x86-only utilities
arch-independent
arm:ensure read_tsc_64 always returns a valid value.
Before this change overflowing the free running clock counter
between the time the timer was read and the time the overflow
check was done resulted in read_tsc_64 returning a to high value.
arm:caching access the l1 pages over cacheable memory.
When we start using a new pagetable (for a new process)
the last part is to ensure the pagetable itself can be
accessed by VM. This is done in pt_bind by updating
the "pagetable of pagetables" and we want this mapping
to match other mappings to the l1 pagetable.
* Allow to change the timer frequency using the hz paramter.
* Unmask the interrupt only after registering the handler.
* Pass the hz parameter in the command line.
Ben Gras [Tue, 24 Sep 2013 13:15:55 +0000 (15:15 +0200)]
x86 hd image creator
A script that creates a HD image ready to be booted by an x86
emulator, ready to work in a crossbuild environment.
It's really just for qemu/kvm as there's no boot code in
the MBR and no bootloader installed so we rely on the in-kvm
multiboot implementation for now. This is very convenient for
passing args too.
To minimize reliance on external tools, we use the Minix
'partition' utility to write the partition table of the HD
image, which therefore has to be compiled natively.
. new script releasetools/x86_hdimage.sh
. natively compile minix 'partition' utility
. make <machine/partition.h> 64-bit safe for it
Thomas Cort [Mon, 16 Sep 2013 23:16:12 +0000 (19:16 -0400)]
i2c: increase read/write timeout
The sht21 temperature and humidity sensor holds the i2c bus while
an ADC conversion is in progress. For example, a temperature
measurement is requested, a read operation is started, and the
sht21 doesn't respond to the read request until the result of
the measurement is ready. The conversion time isn't constant.
On rare occations (one in hundreds of samples) the timeout in the
i2c driver expires returning an error.
The example code from Sensirion, the sht21's manufacturer, suggests
a bus timeout of 1 second to accommodate the sht21. This commit
increases the bus timeout to 1 second. The timeout is only reached
when chips do not respond normally, so the change doesn't affect the
performance of any other drivers.
Thomas Cort [Mon, 16 Sep 2013 17:33:00 +0000 (13:33 -0400)]
libi2cdriver: add functions for IC register access
Many i2c device drivers used similar code to access registers on
the ICs they drive. This commit implements that functionality in
libi2cdriver and updates the drivers to use the library instead of
their own register access functions. The net result is 375+ fewer
lines of code and less work for people developing new drivers.
The two exceptions were cat24c256 and parts of tda19988. They access
the bus in uncommon ways. It doesn't make sense at this time to
move their read/write functions into libi2cdriver.
Thomas Cort [Sun, 15 Sep 2013 23:48:29 +0000 (19:48 -0400)]
tda19988: add missing blockdriver_announce() call
To provide EDID to fb, the TDA19988 implements the block device
protocol with libblockdriver. To properly use the library,
blockdriver_announce() should be called by the driver.