Commit graph

6631 commits

Author SHA1 Message Date
Koustubha Bhat
5ba302fdea Bridging Minix & llvm-apps repos for instrumentating Minix
Allows instrumentation of Minix components using LLVM passes from
"llvm-apps" repository

In addition, the change does the following:
 1. Move releasetools/generate_gold_plugin.sh to minix/llvm
 2. Move external/bsd/llvm/passes to minix/llvm/passes
 3. libLTO.so, LLVMgold.so and WeakAliasModuleOverride.so files
    now get installed in minix/llvm/bin
2014-07-28 17:06:03 +02:00
Ben Gras
33c4e94990 Empty libgcc_s.
This library is built just so that something is present in
/usr/lib/libgcc_s.so.1.  This is needed for dynamically programs built
with gcc, which might reference that library at runtime (i.e. all pkgsrc
packages). The necessary symbols are in libc however, so when built on a
clang-only system, so an empty library is a working stopgap.
2014-07-28 17:06:03 +02:00
Lionel Sambuc
ac74a77a40 Remove obsolete commands/cpp
Change-Id: Ib5335286bb6f1895f9c6006aeee8828bc9f58a45
2014-07-28 17:06:02 +02:00
Lionel Sambuc
4359ff87e0 Replace cc, c++ & cpp with symlinks
In case of installation of both clang and GCC, we want to be able to
switch which one is the default by adapting the cc, c++ & cpp symlinks.

The default behaviour implemented here is to prefer clang over gcc if
they are both installed.

Change-Id: Ic14720cd876d2bf934d345a955cb5789378209e6
2014-07-28 17:06:02 +02:00
Lionel Sambuc
b811a43401 default CC to clang
Change-Id: I5a4e6bfebd0b283f8f025fa91d27b1ac832f7b81
2014-07-28 17:06:01 +02:00
Ben Gras
b029fb598a new libunwind, updated to netbsd b1f513eedd
existing libunwind used '0' in lsda_encoding as 'not present,'
whereas that is a valid encoding and does occur and would be
ignored. a missing encoding is actually 0xff.

The commit that addresses this is:

commit 8d4b51028d1a12b58d616f4b605254a877caafcf
Author: joerg <joerg>
Date:   Tue Mar 11 23:52:17 2014 +0000

    0 is a valid LSDA encoding and can be seen in statically linked
    programs. Initialize lsdaEncoding to DW_EH_PE_omit and check for that
    value to decide whether a value should be decoded.

more bugfixes are necessary. this update is up to:

commit b1f513eedd332426d88acbb118b6e9070966dcb9
Author: joerg <joerg>
Date:   Wed May 14 22:13:36 2014 +0000

    Lazy VFP processing works a lot better if the functions contain a return
    instruction.
2014-07-28 17:06:01 +02:00
Lionel Sambuc
472758f313 Importing sys/libunwind for clang
Change-Id: Ib073b27e3b883837e682414ef7df56c84ca10816
2014-07-28 17:06:01 +02:00
Lionel Sambuc
fed2e50bd7 Compile gold as a tool on MINIX/llvm-only system
This patch is mostly copy-past from answers found in:
  http://www.marshut.com/ikhnkn/compiling-gold-with-libc-and-stl-hash-string.html

This combines the first submitted patch, but applied on gold/gold.h
instead of gold/system.h, as well as the freebsd changes.
2014-07-28 17:06:00 +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
Lionel Sambuc
fe5a129a88 I should not have been born.
This patch is a ugly, but a this moment I have no better alternatives to
offer.

 - Add a script to compile the llvm sources through the standard
   makefiles instead of the bsd build system. The produced gold plugin
   is then copied into the source tree and used from there by the BSD
   Makefiles.

Change-Id: I7fd7ad80be8efcedf27a047b872930ed602d7874
2014-07-28 17:05:58 +02:00
Lionel Sambuc
c03229e600 LLVM Passe which fixes weak aliases overriden from bitcode 2014-07-28 17:05:58 +02:00
Lionel Sambuc
f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00
David van Moolenbroek
83a31a3592 Kernel: fix getrusage microsecond computation
Change-Id: I5e443ddbed1bcd49ed81721afda3aa3c1880ad52
2014-07-28 17:05:56 +02:00
David van Moolenbroek
87d31b0645 Correct a few library dependency tracking mistakes
Change-Id: I3d509db3946ca6c284be64c92c4cec313cc4ca1b
2014-07-28 17:05:56 +02:00
Zachary Storer
a8492e9397 Import NetBSD mv command.
Change-Id: I08cd4e866685080f7b4d617ee150f5b9d7626e7e
2014-07-28 17:05:55 +02:00
Jan Kobler
29fe671680 arm: clear highly mapped kernel bss
. added bss range values for the high (paged) kernel and
	  clear it in pre_init
	. this changes the meaning of the current _edata end _end in the
	  pre_init phase to mean: highly mapped bss; and the new symbols
	  _kern_unpaged_edata ... _kern_unpaged_edata to mean directly
	  mapped (pre_init) bss. This was previously _edata and _end.
	. added a sanity check in kmain (ben@)

The values can be verified by:

${CROSS_TOOLS}/arm-elf32-minix-objdump -xD ${OBJ}/kernel/kernel

Signed-off-by: Jan Kobler <eng1@koblersystems.de>
2014-07-28 17:05:55 +02:00
Ben Gras
f80046feea size_t declaration 2014-07-28 17:05:55 +02:00
Wojciech Zajac
78cd341562 Fixed usb_storage to support more USB sticks
More TEST UNIT READY calls, as some sticks seem to require them, while others are indifferent.

Mass storage 'reset recovery' is disabled by default, as it broke communication with some sticks.

Minor fixes.
2014-07-28 17:05:55 +02:00
Wojciech Zajac
3316064b29 USB bulk only transport 'reset recovery' added
Control URB formatting for mass storage driver was also fixed.
2014-07-28 17:05:55 +02:00
Wojciech Zajac
6763c425bb Corrected invalid URBs handling 2014-07-28 17:05:55 +02:00
Wojciech Zajac
e858b9b5e9 Make MUSB use 'interval' for bulk transfers 2014-07-28 17:05:54 +02:00
Wojciech Zajac
e0f92bef05 More endpoint descriptor data held by usb_storage
Makes usb_storage remember endpoint interval and other parameters, instead of endpoint number only.
2014-07-28 17:05:54 +02:00
Wojciech Zajac
d2cf1e60b4 Removed unused transfer flags for usb_storage 2014-07-28 17:05:54 +02:00
Wojciech Zajac
cbaad3ed4b Graceful exiting for USBD 2014-07-28 17:05:54 +02:00
Wojciech Zajac
7df0836d35 USBD return value for wrong URB submit 2014-07-28 17:05:54 +02:00
Wojciech Zajac
5655b1f1a4 Graceful exiting for mass storage driver
Exit signal is now correctly handled and allocated memory is freed, before exiting.
2014-07-28 17:05:53 +02:00
Wojciech Zajac
c1ba580ae2 Generalization of USB transfer's error handling
No longer assumes EP0 for control transfer, in general HCD code.

Some additional cleanup.
2014-07-28 17:05:53 +02:00
David van Moolenbroek
69cba46141 libc: make ttyname(3) use devname(3)
There was an off-by-one in the old MINIX-specific implementation,
which caused ttyname(3) to fail at random. Since we now have a working
devname(3), there is no need for MINIX-specific code anymore here.

Change-Id: I27d8b6c4f66c84f383156ed494b740d071af02a7
2014-07-28 17:05:53 +02:00
Ben Gras
fcce231cb7 Fix passwd entries, from old format to new.
Change-Id: I78278f0cdc6b9b87bf9b3a14970a462037589d87
2014-07-28 17:05:53 +02:00
Ben Gras
cbb688a05d pty range improvement 2014-07-28 17:05:53 +02:00
Lionel Sambuc
b41d3ab74e Message type for CDEV_{READ,WRITE,IOCTL}
Change-Id: Ia89c98410d3775fe3b6621576eadd186d60ec894
2014-07-28 17:05:52 +02:00
Lionel Sambuc
ca7231fbef Message type for CDEV_SELECT
Change-Id: I74e67ef2206102fe4686efb35d1aaf42db5cd236
2014-07-28 17:05:52 +02:00
Lionel Sambuc
3e6f0b3e98 Message type for CDEV_CANCEL
Change-Id: I4a58f314e140c043392503c079e3d9b994c50b2f
2014-07-28 17:05:52 +02:00
Lionel Sambuc
e7f5493031 Message type for CDEV_{OPEN,CLOSE}
Change-Id: Ie58511aef2da968129a405a4ad44d0330a2adcb2
2014-07-28 17:05:52 +02:00
Lionel Sambuc
0edd2b252a Message type for CDEV_SEL{1,2}
Change-Id: I4857363a62eeede2e137f3354566699b08cb235d
2014-07-28 17:05:52 +02:00
Lionel Sambuc
79b594a2e9 Message type for CDEV_REPLY
Change-Id: I555bf35a43c59e7d7b6180b625021b3c13bbeaa3
2014-07-28 17:05:52 +02:00
Lionel Sambuc
4091fdf5c4 Message type for TTY_FKEY_CONTROL
Change-Id: Ic7a8901089f14f65e840bd88b087b733c3e3bdee
2014-07-28 17:05:51 +02:00
Lionel Sambuc
e2e57d387f FKEY_EVENTS cleanups
- Fix a bug where an FKEY_EVENT request would always return EINVAL

 - Replace two manual usage of FKEY_EVENT messages by a call to
   fkey_events which is mapped to fkey_ctl.

Change-Id: I7bc54cade45a29f14c89313b3ec4c28d81a4ec93
2014-07-28 17:05:51 +02:00
Wojciech Zajac
bfff07c918 Memory related fixes for DDE/USBD
DDEKit has proper thread termination now. No more memory leaks on usb stick removal.

MUSB fixes for IRQ and memory mapping.
2014-07-28 17:05:51 +02:00
Wojciech Zajac
789aa37866 Upgraded HCD transfers
Types for data request are fixed and commented.

Control transfer has additional call for proper completion validation.
2014-07-28 17:05:51 +02:00
Wojciech Zajac
1858789bf6 Unification of various HCD types.
DDEKit URB's are no longer directly handled by HCD but rather translated and validated to avoid type conversion issues and illegal values.
2014-07-28 17:05:51 +02:00
Ben Gras
e576602d9e set NETBSDSRCDIR in kyua-atf-compat 2014-07-28 17:05:50 +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
Wojciech Zajac
4a71196e69 Linking blocktest without libc to allow terminal output 2014-07-28 17:05:50 +02:00
Thomas Cort
7b1dfc682a Importing games/colorbars
No Minix specific changes needed.

Change-Id: Id853551c7d19adc68cfc76ddc353bccf0510387a
2014-07-28 17:05:50 +02:00
Wojciech Zajac
7896beeeca Fixed setup packet configuration for USBD and disconnection cleanup 2014-07-28 17:05:50 +02:00
Wojciech Zajac
f73cacc767 Fix for usbd-usb_storage pairing and URB handling. Additional cleanup. 2014-07-28 17:05:50 +02:00
Wojciech Zajac
9f2204a8ad Resolution of some currently fixable TODOs 2014-07-28 17:05:50 +02:00
Lionel Sambuc
310904bf12 Message type for TTY_INPUT_EVENT
Change-Id: I2bae0a2c8326b36c438f9b340c394ec66189c1c8
2014-07-28 17:05:49 +02:00
Lionel Sambuc
5277fbe9f6 Message type for SYS_CLEAR
Change-Id: I3d894edcf672d180aee38fd84bd06339bdf7fa9b
2014-07-28 17:05:49 +02:00