]> Zhao Yanbai Git Server - minix.git/log
minix.git
11 years agoenable fatal warnings 94/794/14
Ben Gras [Mon, 26 Aug 2013 16:43:16 +0000 (16:43 +0000)]
enable fatal warnings

. kernel: fix some arm warnings
. turn of fatal warnings for texinfo

Change-Id: I71e228c87a7226adbbd940ccb1439e042d7b6e9a

11 years agolibarchive: use -isystem for /usr/include 97/797/2
Ben Gras [Fri, 30 Aug 2013 13:44:47 +0000 (13:44 +0000)]
libarchive: use -isystem for /usr/include

. 'fixes' warnings that are in these headers, but normally aren't
   emited as they're system headers

Change-Id: Ibd20343eae51770cef71116bbda0d9141441ec54

11 years agokernel: move do_padconf and add a test case 96/796/1
Thomas Cort [Thu, 29 Aug 2013 12:56:27 +0000 (08:56 -0400)]
kernel: move do_padconf and add a test case

padconf is specific to arm, so it's being moved to kernel/arch/earm.

Add a test case to ensure the proper error is returned on non-ARM
systems.

Change-Id: I07ebbe64825d59bc0ef9c818d3d54891dafb4419

11 years agokernel: add padconf kernel call 95/795/1
Thomas Cort [Wed, 28 Aug 2013 04:43:45 +0000 (00:43 -0400)]
kernel: add padconf kernel call

On the AM335X, writes to the padconf registers must be done in privileged
mode. To allow userspace drivers to dynamically change the padconf at
runtime, a kernel call has been added.

Change-Id: I4b25d2879399b1785a360912faa0e90b5c258533

11 years agofix a few more minix specific warnings 93/793/8
Ben Gras [Mon, 26 Aug 2013 16:43:05 +0000 (16:43 +0000)]
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

11 years agoweatherstation: BeagleBone Weather Cape demo app. 91/791/3
Thomas Cort [Mon, 26 Aug 2013 02:07:42 +0000 (22:07 -0400)]
weatherstation: BeagleBone Weather Cape demo app.

The BeagleBone Weather cape enhances the BeagleBone's capabilities
by providing environment sensors (temperature, humidity, pressure,
and ambient light level).

The weatherstation demo is a port of the bonescript weatherstation
to Minix. It provides a nice visual display of the sensor data in
a web browser.

The code is installed to /usr/share/beaglebone/weather on 'earm'
and an embedded web server is started at boot time on port 80
when the cape is attached. Further details are provided in the
README.txt file.

Change-Id: I1596a2b66b213762ace26c0c750c8154c76b5c6e

11 years agogcc: realize gas supports visibility 92/792/2
Ben Gras [Mon, 26 Aug 2013 16:31:54 +0000 (16:31 +0000)]
gcc: realize gas supports visibility

. solution for "warning: visibility attribute not supported in
  this configuration"
. needed to make warnings fatal, -Werror

Change-Id: If972300a82df570093f2d89825935483ff69fb18

11 years agoImporting usr.bin/tr 89/789/1
Lionel Sambuc [Sat, 24 Aug 2013 20:11:19 +0000 (22:11 +0200)]
Importing usr.bin/tr

Change-Id: I4563198f111f2ec3687f6a5084edd05f243c2263

11 years agoImporting usr.bin/xargs 87/787/3
Lionel Sambuc [Fri, 23 Aug 2013 22:59:39 +0000 (00:59 +0200)]
Importing usr.bin/xargs

Change-Id: I6a8ce6a8eee31942abb4db797672da7d00dfa43d

11 years agoImporting usr.bin/unexpand 86/786/3
Lionel Sambuc [Fri, 23 Aug 2013 22:15:19 +0000 (00:15 +0200)]
Importing usr.bin/unexpand

Change-Id: I2bab349ebccc28b14db446689171bce7dede8a9d

11 years agoImporting usr.bin/expand 85/785/3
Lionel Sambuc [Fri, 23 Aug 2013 21:51:18 +0000 (23:51 +0200)]
Importing usr.bin/expand

Change-Id: I4089d86d4ae1dcade0c82ed30ecd5685802acfd3

11 years agoImporting usr.bin/basename 84/784/3
Lionel Sambuc [Fri, 23 Aug 2013 17:35:37 +0000 (19:35 +0200)]
Importing usr.bin/basename

Change-Id: I2c71c83bc6a420390c4aed015373f78ebf425903

11 years agoImporting usr.bin/dirname 83/783/3
Lionel Sambuc [Fri, 23 Aug 2013 17:10:16 +0000 (19:10 +0200)]
Importing usr.bin/dirname

Change-Id: I83263576440c2040fb8ccd1e952abd53495fcb70

11 years agoImporting usr.bin/wc 82/782/2
Lionel Sambuc [Fri, 23 Aug 2013 16:42:14 +0000 (18:42 +0200)]
Importing usr.bin/wc

Change-Id: If174bd2bfc3ef38f21d45b5ba0567ac7d99dc608

11 years agoFix testsh1 execution in /usr/tests/minix-posix 88/788/2
Lionel Sambuc [Sat, 24 Aug 2013 12:15:05 +0000 (14:15 +0200)]
Fix testsh1 execution in /usr/tests/minix-posix

Change-Id: Ib9ee7d9af72b5da2c6585cc11f80feefd4de5844

11 years agoFix e_f to print the saved errno. 76/776/2
Lionel Sambuc [Thu, 22 Aug 2013 12:09:30 +0000 (14:09 +0200)]
Fix e_f to print the saved errno.

Change-Id: I1ee366717759429f4c62432395344aa924f03183

11 years agorc: start drivers for attached BeagleBone Capes 81/781/2
Thomas Cort [Thu, 22 Aug 2013 15:22:01 +0000 (11:22 -0400)]
rc: start drivers for attached BeagleBone Capes

BeagleBone Capes add additional hardware to the BeagleBone to
improve functionality.

This patch probes the third i2c bus for capes and loads the
appropriate drivers for each detected cape. Currently only
the 'BeagleBone Weather' cape is supported.

Change-Id: Id8c133810db6de7c21625c2d5a794b8874673a0f

11 years agoeepromread: add board info for BeagleBone Capes 80/780/2
Thomas Cort [Thu, 22 Aug 2013 15:16:08 +0000 (11:16 -0400)]
eepromread: add board info for BeagleBone Capes

Capes (i.e. expansion boards for the BeagleBone and BeagleBone Black)
each have their own cat24c256 EEPROM with information about the cape
such as the name of the cape, pins used, power requirements, etc.

This patch adds support for displaying the cape data fields. It
can be used in shell scripts to detect and identify attached capes.

Change-Id: I4bfa7aae634a7bacfa5e25afcba773d9fbc2316c

11 years agobmp085: driver for the BMP085 temp&pressure sensor 79/779/2
Thomas Cort [Tue, 20 Aug 2013 14:43:51 +0000 (10:43 -0400)]
bmp085: driver for the BMP085 temp&pressure sensor

Change-Id: I5c297a7f4f8cea2549e537df30a5c7bf5b9d8b51

11 years agosht21: driver for the SHT21 humidity & temp sensor 78/778/2
Thomas Cort [Mon, 19 Aug 2013 13:54:20 +0000 (09:54 -0400)]
sht21: driver for the SHT21 humidity & temp sensor

Change-Id: Ia71168e394a7b260019e74973db6c9d75d3d4482

11 years agotsl2550: driver for the TSL2550 light sensor 77/777/2
Thomas Cort [Mon, 19 Aug 2013 10:57:27 +0000 (06:57 -0400)]
tsl2550: driver for the TSL2550 light sensor

Change-Id: I9e1c87132404509ffec8bf22a8c6cc993df1aa73

11 years agoincrease -Werror resilience 38/738/7
Ben Gras [Wed, 14 Aug 2013 12:29:26 +0000 (12:29 +0000)]
increase -Werror resilience

for bin/, commands/, libexec/, sbin/, test/, usr.bin/ and usr.sbin/.

Change-Id: I8fa12c3cd86865311cef71b7faa7cf4fa785174f

11 years agoPFS: unblock the child when unsuspending an accept 74/774/3
David van Moolenbroek [Tue, 20 Aug 2013 23:05:05 +0000 (01:05 +0200)]
PFS: unblock the child when unsuspending an accept

Previously, PFS would incorrectly try to unsuspend the parent (i.e.,
the listening socket), resulting in the child hanging until the other
side performed another action. Test56 started failing on this now.

Change-Id: I231ac5481c83ac45951d33aeecc8149273f48b11

11 years agoarm-build:force sfdisk to format like we want it. 70/770/2
Kees Jongenburger [Tue, 20 Aug 2013 12:10:14 +0000 (14:10 +0200)]
arm-build:force sfdisk to format like we want it.

Change-Id: Iaa3c994a30bb3df6129e85e0a5591b88b5b93973

11 years agolibaudiodriver: handle interrupt only once 54/754/2
Arne Welzel [Thu, 15 Nov 2012 11:05:51 +0000 (12:05 +0100)]
libaudiodriver: handle interrupt only once

Apparently, qemu's sb16 doesn't reset the interrupt register
of the mixer and the driver ends up in an endless loop when
playing a "multi-fragment" sample.

Change-Id: I47633b99a0d79ba201aec785da69fb3950e026bf

11 years agosb16: Don't confuse pv_set() 53/753/2
Arne Welzel [Wed, 14 Nov 2012 21:59:38 +0000 (22:59 +0100)]
sb16: Don't confuse pv_set()

Change-Id: Ib7b528aa3a369b54dda3bbceb498db4a600c4cb4

11 years agolibaudiodriver: allocate mem lower 16 MB and 64K aligned 52/752/2
Arne Welzel [Wed, 14 Nov 2012 21:43:42 +0000 (22:43 +0100)]
libaudiodriver: allocate mem lower 16 MB and 64K aligned

Righ now, the DMA controller will access some random memory below 16 MB,
as the physical address returned by alloc_contig() is simply truncated
when given to the DMA controller.

Yes, it's bad...

11 years agolibminixfs: allow non-page-multiple blocksizes 43/743/3
LiQiong Lee [Wed, 7 Aug 2013 10:09:41 +0000 (18:09 +0800)]
libminixfs: allow non-page-multiple blocksizes

. this is OK (although it wastes some memory) as
  long as the VM interface isn't used, which has its
  own checks in libsys

Change-Id: I28decd367b2cd5c01482bdc71615c65ab61c9a71

11 years agoa bit more -Werror compatability 37/737/2
Ben Gras [Wed, 14 Aug 2013 12:27:39 +0000 (12:27 +0000)]
a bit more -Werror compatability

for clang, fix warnings in drivers/, lib/, servers/, sys/, common/.
by turning off fatal warnings (takes effect if the default is on),
fixing warnings or reducing the warning level.

Change-Id: Ia1b4bc877c879ba783158081b59aa6ebb021a50f

11 years agobeaglebone ethernet improvements 42/742/3
Michal Maka [Tue, 13 Aug 2013 15:01:14 +0000 (17:01 +0200)]
beaglebone ethernet improvements

. added enable interrupts routine at the HW init stage
. remove workaround, obsoleted by libnetdriver change
. change netconf.sh to allow configuring this driver,
  changed README.txt to reflect this

Change-Id: Ib659d5a55be96022b5e9013caa556dca5092ce89

11 years agoUse ARM_VM_SECTION_MASK to determine kernel base address 40/740/2
Igor Smolyar [Fri, 16 Aug 2013 14:58:29 +0000 (17:58 +0300)]
Use ARM_VM_SECTION_MASK to determine kernel base address

To map kernel we use 1M sections therefore we should use
ARM_VM_SECTION_MASK to determine base address.

Change-Id: I0b97fe459f2325d702aad9b7b1e8e066d9721b87

11 years agolibnetdriver: only block datalink messages 41/741/1
David van Moolenbroek [Sun, 18 Aug 2013 10:04:25 +0000 (12:04 +0200)]
libnetdriver: only block datalink messages

Previously, all incoming messages would be blocked before a DL_CONF
message arrives from the TCP/IP stack. This however makes it impossible
for a driver to process interrupts before the DL_CONF initialization.
This patch blocks only datalink messages before the initial DL_CONF,
and lets through all other messages to the driver.

Change-Id: I89988958c0bff9bb38e0379b66f6142491a67b61

11 years agoloadramdisk: bug fix for bad fprintf() format 31/731/5
Thomas Cort [Sat, 10 Aug 2013 16:47:35 +0000 (12:47 -0400)]
loadramdisk: bug fix for bad fprintf() format

An fprintf() has two %s formats but only one additional argument.

Include the name of the device file in the fprintf() call to
balance the arguments and format.

Change-Id: I62e702cf0bc9935897c2f85b0acc3b62b41d654a

11 years agomined: K&R to ANSI, fix function sigs & warnings 28/728/4
Thomas Cort [Fri, 9 Aug 2013 20:41:13 +0000 (20:41 +0000)]
mined: K&R to ANSI, fix function sigs & warnings

 - Re-write function declarations from K&R style to ANSI style.
 - Change declaration of write_char(), S(), in_list() to match ptotos.
 - Resolve clang warnings about assignments in conditionals.

Change-Id: I61624b18afbefe1ff29941233d274bd6c0f12520

11 years agoi2c: general clean-up 36/736/1
Thomas Cort [Mon, 12 Aug 2013 17:39:54 +0000 (13:39 -0400)]
i2c: general clean-up

Implement changes based on Kees comments on the code review:
http://gerrit-minix.few.vu.nl/#/c/676/

Changes:
 - use spin API instead of micro_delay() for busy-wait loops.
 - use read16/write16/set16 from mmio.h to access I2C registers.
 - reduce the timeout for soft reset.
 - in read/write, don't mix variable declaration and initialization.
 - after transfer, wait for access ready instead of blindly delaying.
 - rename constants am335x, dm37xx to AM335X_I2C_BUS, DM37XX_I2C_BUS.
 - rename ADDRESS_MASK to MAX_I2C_SA_MASK for clairity.
 - rename omap_i2c_claim_bus() to omap_i2c_bus_is_free().

Change-Id: Ic221e6134e024ea0a6690f21cff208a728286948

11 years agommio: add 16-bit variants of read/write/set 35/735/1
Thomas Cort [Mon, 12 Aug 2013 17:33:13 +0000 (13:33 -0400)]
mmio: add 16-bit variants of read/write/set

Change-Id: If4fb5585865768daa151bd4aa343ac5c84d2e9c3

11 years agobackup: bug fix for improper struct dirent usage 29/729/3
Thomas Cort [Sat, 10 Aug 2013 05:22:48 +0000 (05:22 +0000)]
backup: bug fix for improper struct dirent usage

Between Minix 3.1.2 and Minix 3.1.3, the d_name member of struct
dirent was reduced from 61 characters to 1 character. backup(8)
blindly copies the result of readdir() into an array of dirent
structs. As a consequence, the structs in the array only contain
the first letter of the name and the name string was not null
terminated. This caused the backup utility to always fail.

Remedy the situation by adding room for the full d_name.

Change-Id: I2a7b4630f1bb727825a95a6095a7a543fc2f08f6

11 years agoVMWare poweroff magic cli;hlt sequence 27/727/3
Antoine Leca [Fri, 1 Mar 2013 18:59:18 +0000 (18:59 +0000)]
VMWare poweroff magic cli;hlt sequence

Change-Id: I9d8f96cc2e6423b89eb743e27550225d8759ee1d

11 years agofb: auto-configure with EDID 34/734/2
Thomas Cort [Mon, 29 Jul 2013 17:01:38 +0000 (13:01 -0400)]
fb: auto-configure with EDID

Use EDID when available to configure the frame buffer driver with
good settings for the attached display.

Change-Id: I69a78155a93e55ffa1ca3ff6621a879a56cdbceb

11 years agoImporting sys/dev/videomode 33/733/2
Thomas Cort [Mon, 29 Jul 2013 16:21:48 +0000 (12:21 -0400)]
Importing sys/dev/videomode

NetBSD provides an in-kernel EDID parser, validator, and printer
along with other useful functions. This code will be re-used by
the Minix fb driver as it is a complete and well tested
implementation.

Change-Id: I46fe3005d9957cd90d4972030ddcce7bc3bd7924

11 years agoreadclock/tda19988: fix compiler/cppcheck warnings 32/732/1
Thomas Cort [Sat, 10 Aug 2013 18:30:42 +0000 (18:30 +0000)]
readclock/tda19988: fix compiler/cppcheck warnings

readclock:
 - the setup function for readclock on i386 was missing a return.
 - the message field for RTCDEV_GRANT wasn't the right type.

tda19988:
 - position variable was used without being initialized.

Change-Id: I3f78dd0a9d44f35eb38cb7da0974909f066b7007

11 years agoreadclock.drv: add support for the TPS65950 RTC 22/722/3
Thomas Cort [Wed, 7 Aug 2013 01:34:08 +0000 (21:34 -0400)]
readclock.drv: add support for the TPS65950 RTC

On the BeagleBoard-xM, the RTC is located on the Power Management IC
(PMIC). To keep things consistent, access to the PMIC's RTC is done
through the readclock driver. The readclock driver forwards the request
on to the TPS65950 driver which does the work of manipulating the
registers on the chip.

Change-Id: I53cefbb59c5a9ab87fab90df3cc1a75a6e430f58

11 years agoreadclock: code clean-up, add -q, manpage updates 21/721/3
Thomas Cort [Thu, 8 Aug 2013 00:06:47 +0000 (20:06 -0400)]
readclock: code clean-up, add -q, manpage updates

 - Simplify the message passing between readclock and the driver.

 - Add a -q command line option to suppress warning messages. This
 cuts down on the noise when readclock is called early in the boot
 sequence and a secondary RTC driver (ex TPS95650) isn't up yet.

 - Update the man page to be less i386 centric and add details about
 the new -q option.

Change-Id: If8d7c50a217ca98c1e9fae0ca92521e2e7c893e4

11 years agotps65950: driver for the TPS65950 PMIC 20/720/3
Thomas Cort [Tue, 6 Aug 2013 13:52:46 +0000 (09:52 -0400)]
tps65950: driver for the TPS65950 PMIC

Change-Id: I6b6163e59233d1f823f03550b949d53e1738a7f4

11 years agolibc: make MINIX assembly code position-independent 16/716/4
Antoine Leca [Fri, 1 Feb 2013 09:39:47 +0000 (09:39 +0000)]
libc: make MINIX assembly code position-independent

While here, simplify ucontext.S

. makes libc link without the messy DT_TEXTREL warning.

Change-Id: I4656d9068eab5ed2fa1e391242883d5dd9d93644

11 years agoRemove VM_VFS_REPLY from VM_BASIC_CALLS 24/724/2
David van Moolenbroek [Wed, 7 Aug 2013 12:14:40 +0000 (14:14 +0200)]
Remove VM_VFS_REPLY from VM_BASIC_CALLS

Change-Id: I0a03f1c95fd7ef87cecb01a028f59696a8447738

11 years agoVM: support for shared call mask ACLs 17/717/3
David van Moolenbroek [Wed, 7 Aug 2013 20:03:47 +0000 (22:03 +0200)]
VM: support for shared call mask ACLs

The VM server now manages its call masks such that all user processes
share the same call mask. As a result, an update for the call mask of
any user process will apply to all user processes. This is similar to
the privilege infrastructure employed by the kernel, and may serve as
a template for similar fine-grained restrictions in other servers.

Concretely, this patch fixes the problem of "service edit init" not
applying the given VM call mask to user processes started from RC
scripts during system startup.

In addition, this patch makes RS set a proper VM call mask for each
recovery script it spawns.

Change-Id: I520a30d85a0d3f3502d2b158293a2258825358cf

11 years agoAdd VM_GETRUSAGE to VM_BASIC_CALLS 23/723/2
David van Moolenbroek [Wed, 7 Aug 2013 12:17:10 +0000 (14:17 +0200)]
Add VM_GETRUSAGE to VM_BASIC_CALLS

This unbreaks test75.

Change-Id: I71539f941b9a4ee5e7f57de2ee9adaeab4d2730e

11 years agoblocktest: make 64-bit native 12/712/2
David van Moolenbroek [Thu, 1 Aug 2013 12:24:13 +0000 (14:24 +0200)]
blocktest: make 64-bit native

11 years agoahci: make 64-bit native 11/711/2
David van Moolenbroek [Thu, 1 Aug 2013 12:38:33 +0000 (14:38 +0200)]
ahci: make 64-bit native

11 years agoEnv_memory_parse: move into VM 14/714/1
Antoine Leca [Wed, 3 Apr 2013 13:14:34 +0000 (15:14 +0200)]
Env_memory_parse: move into VM

Only possible user of that function.
While here, fix bug about NR_MEMS vs MAXMEMMAP
NR_MEMS=16 is currently less than MAXMEMMAP=40; avoid overriding

11 years agoDrop obsolete <minix/compiler.h> and <minix/crtso.h> 15/715/1
Antoine Leca [Thu, 28 Mar 2013 18:44:45 +0000 (18:44 +0000)]
Drop obsolete <minix/compiler.h> and <minix/crtso.h>

Change-Id: I05da32bd2bdf014b6fd5c39d6e808d3c73812dc0

11 years agoFix file permissions 13/713/1
Antoine Leca [Fri, 1 Feb 2013 12:53:02 +0000 (12:53 +0000)]
Fix file permissions

11 years agoSome more 64bit function eradication. 10/710/1
Lukasz Hryniuk [Wed, 7 Aug 2013 10:17:09 +0000 (12:17 +0200)]
Some more 64bit function eradication.

  . Replace 64bit funcions with operators in arch_clock.c
  . Replace 64bit funcions with operators in proc.c
  . Replace 64bit funcions with operators in vbox.c
  . Replace 64bit funcions with operators in driver.c
  . Eradicates is_zero64, make_zero64, neg64

Change-Id: Ie4e1242a73534f114725271b2e2365b2004cb7b9

11 years agoPM: remove obsolete sys_getkinfo() 05/705/2
Antoine Leca [Wed, 3 Apr 2013 13:21:37 +0000 (15:21 +0200)]
PM: remove obsolete sys_getkinfo()

11 years agolibexec: bug in debugging code 08/708/2
Antoine Leca [Thu, 4 Apr 2013 11:42:23 +0000 (13:42 +0200)]
libexec: bug in debugging code

Change-Id: I8988a6a2d680e1afd0966bc8c90f1c34aee938ed

11 years agoVM: added missing dependency 04/704/2
Antoine Leca [Thu, 4 Apr 2013 11:29:00 +0000 (13:29 +0200)]
VM: added missing dependency

11 years agoAudio drivers: use correct build receipt 03/703/2
Antoine Leca [Thu, 28 Feb 2013 22:59:55 +0000 (23:59 +0100)]
Audio drivers: use correct build receipt

11 years agodec21140A: remove ACK option in Makefile 02/702/2
Antoine Leca [Sat, 23 Feb 2013 22:40:55 +0000 (23:40 +0100)]
dec21140A: remove ACK option in Makefile

11 years ago<a.out.h>, MINIX style: remove as obsolete 07/707/2
Antoine Leca [Thu, 4 Apr 2013 10:21:23 +0000 (12:21 +0200)]
<a.out.h>, MINIX style: remove as obsolete

Change-Id: Icc8b7210d60a93ac9cc4610d676dcba270756410

11 years agoRemove unmaintained "ack" size nm mdb 06/706/2
Antoine Leca [Fri, 25 Jan 2013 13:15:14 +0000 (13:15 +0000)]
Remove unmaintained "ack" size nm mdb

Change-Id: Iba84fd51f16577e6123148d4505c7687ea1c071d

11 years agolibm Makefile: typo (from NetBSD) 01/701/2
Antoine Leca [Fri, 25 Jan 2013 13:20:35 +0000 (13:20 +0000)]
libm Makefile: typo (from NetBSD)

11 years agokernel: implement reboot for am335x/dm37xx 00/700/2
Thomas Cort [Sat, 3 Aug 2013 12:40:59 +0000 (08:40 -0400)]
kernel: implement reboot for am335x/dm37xx

Change-Id: Ied288326b9af8f31223b2dd76a064e32c9a03c45

11 years agopm: notify readclock of reboot(RBT_POWEROFF) 99/699/2
Thomas Cort [Fri, 2 Aug 2013 14:10:59 +0000 (10:10 -0400)]
pm: notify readclock of reboot(RBT_POWEROFF)

Some ARM chips handle power-off with RTC alarms. PM notifies
readclock (the driver for RTCs) about the impending power-off.
If the power-off mechanism is an RTC alarm, readclock will
set the alarm. If not, there is no effect.

Change-Id: Iee00066def2a0f742cdf0dbde8e32b376edf1b78

11 years agokernel: add support for am335x PMIC-base power-off 98/698/2
Thomas Cort [Fri, 2 Aug 2013 14:10:55 +0000 (10:10 -0400)]
kernel: add support for am335x PMIC-base power-off

AM335X SoCs support power-off via a power management
chip (PMIC). An alarm in the real time clock is used
to trigger the PMIC to cut the power.

To ensure the alarm goes off when the system is in
a safe state, the RTC is frozen when the alarm is
set. At the last moment, the kernel unfreezes the RTC
to let the alarm go off.

This patch adds a mini driver for unfreezing the RTC
as well as code to handle RBT_POWEROFF on Minix/arm.

Change-Id: I7d48e75791e3a81bdd2f7704997193a269409fe8

11 years agotps65217: driver for the TPS65217 PMIC 97/697/2
Thomas Cort [Fri, 2 Aug 2013 14:10:48 +0000 (10:10 -0400)]
tps65217: driver for the TPS65217 PMIC

Change-Id: Ic2259c15645816627d757c9c45560cb4c5c0156c

11 years agolibminc: add reboot() 96/696/2
Thomas Cort [Fri, 2 Aug 2013 14:10:39 +0000 (10:10 -0400)]
libminc: add reboot()

Change-Id: Ia604e3d57dbcdc25c96c1aa0a263384982311d09

11 years agoreadclock: add support for am335x RTC 95/695/1
Thomas Cort [Fri, 2 Aug 2013 14:10:30 +0000 (10:10 -0400)]
readclock: add support for am335x RTC

Add support for getting/setting the am335x SoC's internal real
time clock. Also, allow the power off alarm to be set.

Make readclock an "always on" driver. This is needed for setting
power-off alarms whenever the power button is pressed on the BBB.

Replace the readclock.sh script & single run driver with a
readclock program that takes the same arguments and forwards
the requests on to the always up readclock driver.

Change-Id: Ifd6c2acd80ae4b5e79d83df510df445c24e24a71

11 years agoVFS: fix access bits in device reopen calls 94/694/1
David van Moolenbroek [Sun, 4 Aug 2013 12:39:02 +0000 (14:39 +0200)]
VFS: fix access bits in device reopen calls

11 years agoremoved some 64-bit functions 91/691/3
Gregg Hernandez [Tue, 16 Jul 2013 17:56:57 +0000 (11:56 -0600)]
removed some 64-bit functions

Change-Id: Idbafdbf13714f984f03770bd3b39521cb1014cdb

11 years agoLan8710 driver initial version, after first review 87/687/6
Michal Maka [Wed, 24 Jul 2013 13:07:28 +0000 (15:07 +0200)]
Lan8710 driver initial version, after first review

Change-Id: If00cf1e098da5875eb040f8765273a6fa5e43e33

11 years agofxp: Add code for PCI_REV 0x83 92/692/1
James T. Sprinkle [Sun, 4 Aug 2013 20:31:52 +0000 (20:31 +0000)]
fxp: Add code for PCI_REV 0x83

Change-Id: I44456c72ebc041ed31327d7c4a8cb77dacaee990

11 years agotda19988: driver for the TDA19988 HDMI Transmitter 89/689/1
Thomas Cort [Mon, 29 Jul 2013 16:21:33 +0000 (12:21 -0400)]
tda19988: driver for the TDA19988 HDMI Transmitter

Change-Id: Ia7750df3dd4ec4bd68624c800a0241c70eea7ca4

11 years agoi2c: increase BUFLEN/CMDLEN to 128, add page flag. 88/688/2
Thomas Cort [Fri, 26 Jul 2013 23:44:52 +0000 (19:44 -0400)]
i2c: increase BUFLEN/CMDLEN to 128, add page flag.

128 byte reads are much more common than 32 byte reads. The message
passing + setup/teardown for a read is much more expensive, in terms
of time, than the reading itself. A slightly bigger struct is well
worth the time savings. This reduces read times for /dev/eeprom
from 57 seconds per 4KB to 14 seconds.

Additionally, make sending the page address in the eeprom driver
and utility optional. This can save a little time when reading
within the same page and allows support for smaller devices that
don't support pages (example: chips containing EDID).

Change-Id: Ie48087caee40c11fa241d1555fce9309ddd27b43

11 years agoImporting NetBSD "Kyua" test framework 81/681/4
Lionel Sambuc [Tue, 26 Feb 2013 08:24:42 +0000 (09:24 +0100)]
Importing NetBSD "Kyua" test framework

To do so, a few dependencies have been imported:

 * external/bsd/lutok
 * external/mit/lua
 * external/public-domain/sqlite
 * external/public-domain/xz

The Kyua framework is the new generation of ATF (Automated Test
Framework), it is composed of:

 * external/bsd/atf
 * external/bsd/kyua-atf-compat
 * external/bsd/kyua-cli
 * external/bsd/kyua-tester
 * tests

Kyua/ATF being written in C++, it depends on libstdc++ which is
provided by GCC. As this is not part of the sources, Kyua is only
compiled when the native GCC utils are installed.

To install Kyua do the following:

 * In a cross-build enviromnent, add the following to the build.sh
   commandline: -V MKBINUTILS=yes -V MKGCCCMDS=yes

WARNING:
  At this point the import is still experimental, and not supported
  on native builds (a.k.a make build).

Change-Id: I26aee23c5bbd2d64adcb7c1beb98fe0d479d7ada

11 years agoRevert "drivers/fbd/action.c: removed some 64-bit functions" 86/686/2
Lionel Sambuc [Tue, 23 Jul 2013 15:49:11 +0000 (17:49 +0200)]
Revert "drivers/fbd/action.c: removed some 64-bit functions"

This reverts commit 85e7d849c804ae9df50e29dc9c81057a83e16726.

This introduce a bug in position computing for disk bigger than 4GB.

Change-Id: I281e60e9644d995cc4643006b50c05693f939b44

11 years agoReplace 64bit funcions with operators in at_wini.c 83/683/1
Lukasz Hryniuk [Mon, 15 Jul 2013 19:12:28 +0000 (21:12 +0200)]
Replace 64bit funcions with operators in at_wini.c

Change-Id: I5d4f85a55f9f9d4c2a26daca6957be8f57ba9164

11 years agodrivers/fbd/action.c: removed some 64-bit functions 82/682/1
Gregg Hernandez [Tue, 16 Jul 2013 17:56:57 +0000 (11:56 -0600)]
drivers/fbd/action.c: removed some 64-bit functions

Change-Id: I6a041f7dabad3e849d868c94c4fbd0edb7fc88b7

11 years agoeepromread: simple program to view eeprom contents 80/680/2
Thomas Cort [Mon, 15 Jul 2013 14:29:37 +0000 (10:29 -0400)]
eepromread: simple program to view eeprom contents

This program uses the i2c /dev interface to read the
contents of EEPROMs and display it to the user in
HEX and ASCII. It also has a mode that can display
data in label:value pairs. That mode is used for
board detection in the rc script to start the right
i2c drivers for the board.

Change-Id: I0bf5b13ffab5a89533c762d6881a145cf7f14914

11 years agocat24c256: driver for the cat24c256 i2c eeprom 79/679/2
Thomas Cort [Mon, 15 Jul 2013 14:29:31 +0000 (10:29 -0400)]
cat24c256: driver for the cat24c256 i2c eeprom

Change-Id: I682d136c80fc868d3f0a5edb0cf6c33c0f3a28ea

11 years agolibi2cdriver: library for i2c device drivers 78/678/2
Thomas Cort [Mon, 15 Jul 2013 14:29:24 +0000 (10:29 -0400)]
libi2cdriver: library for i2c device drivers

Change-Id: Ib6d5617e4b62e0bc5b25e6fa92b44baf536b1961

11 years agoImporting usr.sbin/i2cscan 77/677/1
Thomas Cort [Mon, 15 Jul 2013 14:29:16 +0000 (10:29 -0400)]
Importing usr.sbin/i2cscan

Change-Id: I7b776d6e5f3fe4f7a1af353b995ef9e2e752c7ea

11 years agoi2c: initial bus drivers for am335x and dm37xx 76/676/1
Thomas Cort [Mon, 15 Jul 2013 14:29:09 +0000 (10:29 -0400)]
i2c: initial bus drivers for am335x and dm37xx

Change-Id: I478704fbf30dbf6d3382bcbfb11e75b512c032a1

11 years agokernel: i2c padconf workaround 75/675/1
Thomas Cort [Mon, 15 Jul 2013 14:28:58 +0000 (10:28 -0400)]
kernel: i2c padconf workaround

The padconf library runs in user mode, but to actually affect the
padconf register contents, the processor has to be in privileged
mode. A full server based solution will be developed, but for now
just set the pinmux in the kernel at boot.

Change-Id: I170ed54dae64b27cd9bd8807445231598fb8e3e1

11 years agoreleasetools/release.sh: cleanup & enhancements 73/673/2
Lionel Sambuc [Fri, 12 Jul 2013 16:27:05 +0000 (18:27 +0200)]
releasetools/release.sh: cleanup & enhancements

 - use the proper  make variable to ignore file lists
   SLOPPY_FLIST instead of CHECKFLIST, which was a minix hack.

 - Add BUILDOPTIONS such that the users can activate optional
   features without editing the script.

Change-Id: Id731db96c38c2118c4c58e007f2804008a7a893f

11 years agolibc: revert inadvertent removal of O_CLOEXEC #ifndefs 74/674/1
Thomas Veerman [Fri, 12 Jul 2013 16:38:17 +0000 (18:38 +0200)]
libc: revert inadvertent removal of O_CLOEXEC #ifndefs

Change-Id: I15005181388280363f7aee546bd2ecc0cd5b37e6

11 years agoreleasetools/arm_sdimage.sh 72/672/2
Lionel Sambuc [Fri, 28 Jun 2013 18:27:53 +0000 (20:27 +0200)]
releasetools/arm_sdimage.sh

 - adapt usr partition size
 - reformulate partition sizes for easier adaptations
 - ensure 4k-block alignement of the partitions

Change-Id: I88787614163a7be177acb5dbf454b26387376a47

11 years agoEnable optional GCC install and GCC improvements 71/671/2
Lionel Sambuc [Wed, 24 Apr 2013 16:57:59 +0000 (18:57 +0200)]
Enable optional GCC install and GCC improvements

 -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)

 -Correct minix.h header sequence, cleanup spec headers.

 -Fix cross-compilation from a 32bit host targeting MINIX/arm

Change-Id: I1b234af18eed4ab5675188244e931b2a2b7bd943

11 years agoAllow install of binutils and import texinfo 82/482/9
Lionel Sambuc [Wed, 10 Apr 2013 16:13:48 +0000 (18:13 +0200)]
Allow install of binutils and import texinfo

 - 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.

Warning: This patch has an entry in docs/UPDATING

Change-Id: Ib781734e8fd7f9c6265fa65d62ba2cf3fccbc5ba

11 years agoUpgrading to binutils-2.22 83/483/6
Lionel Sambuc [Mon, 8 Apr 2013 21:11:36 +0000 (23:11 +0200)]
Upgrading to binutils-2.22

 * Added --with-ld=default
 * Added --with-lto
 * Fixed ld script for ARM
 * Options are prepared for future activation of gold.

Change-Id: Id9618904055e18d1b37f5e9585f775c367ff356e

11 years agoImplement getrusage 69/669/2
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 */

test75.c is the unit test for this new function

Change-Id: I3f1eb69de1fce90d087d76773b09021fc6106539

11 years agoinclude: Import dev/i2c/i2c_io.h 70/670/1
Thomas Cort [Wed, 29 May 2013 18:40:16 +0000 (14:40 -0400)]
include: Import dev/i2c/i2c_io.h

Change-Id: Icb754891349b7f571863f3a87b0318c28c35ac79

11 years agotest42: skip single step test 68/668/1
Ben Gras [Tue, 25 Jun 2013 11:31:40 +0000 (11:31 +0000)]
test42: skip single step test

Change-Id: If57fc467b0ad28e0e9db27c6dadbe49e59dbc463

11 years agokernel: high-hz workaround for do_settime
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

11 years agokernel: maintain stack alignment
Ben Gras [Mon, 24 Jun 2013 12:35:25 +0000 (14:35 +0200)]
kernel: maintain stack alignment

. 'fixes' 64-bit varargs (i.e. printf("%llu", ..)) argument
  retrieval bug

11 years agore-import makewhatis 67/667/2
Ben Gras [Mon, 24 Jun 2013 14:41:30 +0000 (14:41 +0000)]
re-import makewhatis

. to benefit from the contribution found by rjkovacic@gmail.com
  in the minix makewhatis and submitted upstream, see NetBSD
  PR/47958

Change-Id: I147e1afe0088ab16e7b171f74330d1c6f44a13cf

11 years agokernel, arm ucontext: ARM DBG=-g run fixes 64/664/3
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

vfs:
. improve TLL pointer sanity check a bit

Change-Id: I0e3cfc367fdc14477e40d04b5e044f288ca4cc7d

11 years agoretire 64-bit conversion functions 51/651/2
Ben Gras [Mon, 17 Jun 2013 08:31:12 +0000 (10:31 +0200)]
retire 64-bit conversion functions

Change-Id: Ib6b81403f877c363a286c654e0524fa1cb781b80

11 years agoarm:use the 4 bit mmc data bus if supported by the card. 63/663/2
Kees Jongenburger [Fri, 21 Jun 2013 13:52:52 +0000 (15:52 +0200)]
arm:use the 4 bit mmc data bus if supported by the card.

Change-Id: I55de05db23ad1766e5faec93252e8410cbf59001

11 years agobuild:arm remove "start usb" from u-boot command line. 62/662/2
Kees Jongenburger [Fri, 21 Jun 2013 11:20:53 +0000 (13:20 +0200)]
build:arm remove "start usb" from u-boot command line.

Removed "start usb" from u-boot command line as it is not needed and
speeds up tftp booting.

Change-Id: I416f7eb0467888d1b69ef3dad09df0639fb63f10