Commit Graph

59888 Commits

Author SHA1 Message Date
Augustin Cavalier
ad38b80fd5 BMessage: Fix R5 checksum calculation on 64-bit.
Change-Id: I0d418883bb66c6ad9e351c955e213f5cbc975e56
Reviewed-on: https://review.haiku-os.org/c/1336
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-31 17:39:11 +00:00
Alexander von Gluck IV
72a021f516 login: Add libbsd for explicit_bzero libmultiuser_utils.a 2019-03-30 19:30:06 -05:00
Augustin Cavalier
18a8edbf0e docs/develop: More reorganization.
* There is now a 'busses' folder, and the extant USB/SDHCI/Bluetooth/etc.
   docs now live in it, instead of various other places.
 * kernel/ports is now kernel/arch, like it is in src/system.
   SPARC documentation is now in there, too.
 * VM files (these are rather outdated) are now in kernel/vm.
 * SCSI ASC info removed, this is easily available online and
   it doesn't seem to be very relevant.
2019-03-30 18:00:46 -04:00
Augustin Cavalier
454b04ca27 HaikuConfig: Change _BEOS_COMPATIBLE_TYPES to only be defined on i386.
Hopefully soon we will have our first 32-bit non-x86 architectures.
No functional change for x86 32- and 64-bit intended.
2019-03-30 16:57:05 -04:00
Augustin Cavalier
5c93058ad7 BuildSetup: Stop defining __INTEL__ for the host tools.
Nothing in the tree uses __INTEL__ anymore, so this is no longer
needed.
2019-03-30 16:55:27 -04:00
Augustin Cavalier
5ffbe7d778 Change all references to "__INTEL__" to "__i386__".
They are functionally identical, but the former is a BeOS/Haiku-specfic
macro that we include in the compiler specs, and the latter is defined
by GCC.
2019-03-30 16:54:01 -04:00
Augustin Cavalier
1e60bdeab6 Remove all invocations of SetSubDirSupportedPlatformsBeOSCompatible. 2019-03-30 15:19:38 -04:00
Augustin Cavalier
b357daa5c5 build: Deprecate SetSubDirSupportedPlatformsBeOSCompatible.
By default, all targets support the "haiku" platform, and we no longer
support building for BeOS, Dan0, Zeta, or other BeOS-compatible targets,
so this is no longer needed.

Also remove all references to the non-Haiku compatible platforms, and
change all BEOS_COMPATIBLE checks to HAIKU_COMPATIBLE. Removal of
all SetSubDirSupportedPlatformsBeOSCompatible invocations
will be in the next commit.
2019-03-30 14:54:14 -04:00
Augustin Cavalier
a1c2d3d653 uptime: Remove, in favor of the coreutils one.
This one had an uncertain "freeware" license, and the code quality
is not so great. BeOS didn't have an 'uptime' command, so we can
replace this with the coreutils one without worry.
2019-03-30 13:47:14 -04:00
Augustin Cavalier
3200e3bc42 pci & usb ids: Update.
Also remove the ReadMe as it's not accurate anymore. Fixes #14980.
2019-03-30 13:06:14 -04:00
Augustin Cavalier
041f46f392 u-boot: Use Haiku-style endian conversion functions.
Fixes #14987.
2019-03-30 13:01:33 -04:00
PulkoMandy
8ff82ee2d4 sparc: fix debug support
Declare and use the correct registers to define a stack frame.

Change-Id: Ice3ba8f8715313a715f6b1cb553a6883541f5cc4
Reviewed-on: https://review.haiku-os.org/c/1327
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2019-03-30 15:23:15 +00:00
PulkoMandy
3bfbec8336 sparc: More missing defines in platform headers
* Kernel is 64 bit, and we won't need a 32bit load base.

Change-Id: I729bab01c8f71083002db061e153b0e5052b9a1c
Reviewed-on: https://review.haiku-os.org/c/1326
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2019-03-30 15:23:15 +00:00
PulkoMandy
5ef707395a sparc: fix some 64bit intolerant code
Change-Id: I90bea483d7cf18696a6d5d2f18e8cada409884a2
Reviewed-on: https://review.haiku-os.org/c/1325
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2019-03-30 15:23:15 +00:00
PulkoMandy
ddf7e72f86 loader: Do not assume ELF32 for any non-EFI target.
sparc is 64bit even at the bootloader stage.

Change-Id: Idbf39497503aac08e72c691cf655e97f95347784
Reviewed-on: https://review.haiku-os.org/c/1324
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2019-03-30 15:23:15 +00:00
PulkoMandy
f23db0edb5 sparc: add to known architectures in configure script
Change-Id: Ic6cfdd2a94c8d6c0a7f4963fe892f8dc73e97afd
Reviewed-on: https://review.haiku-os.org/c/1323
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2019-03-30 15:23:15 +00:00
Jérôme Duval
633fbcf423 kernel: receive_data and send_data can be called with a NULL buffer.
Change-Id: Id2ac496524ad91f2830e8af12925e0e40ca9ab80
Reviewed-on: https://review.haiku-os.org/c/1333
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-03-30 15:19:51 +00:00
Jérôme Duval
03ed26b691 kernel/fs/vfs: apply CLOEXEC on the new fd instead of the old one.
fix a failure for test-cloexec.c of gltests.

Change-Id: I340cc88a787a59d55f93cc80883f57e6627f38cf
Reviewed-on: https://review.haiku-os.org/c/1332
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-03-30 15:19:51 +00:00
Jérôme Duval
532998ed1e kernel/fs/fd: fcntl(F_DUPFD) should return EINVAL for invalid fds.
fix a failure for test-fcntl.c of gltests.

Change-Id: Ied8effdee2ddd9868bf039dbf74a3057a2541cac
Reviewed-on: https://review.haiku-os.org/c/1331
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-03-30 15:19:51 +00:00
Augustin Cavalier
ebc14c9921 libroot: Restore the old __swap functions for x86_64.
They are needed in order to not break applications compiled against
them. Fixes the boot on x86_64 after PulkoMandy's commit.
2019-03-27 15:11:30 -04:00
Augustin Cavalier
569791be52 headers/posix: Define the byteswap macros unconditionally.
It helps if one tests GCC4+ fixes on GCC4+...
2019-03-27 10:19:50 -04:00
Augustin Cavalier
8e309168b9 headers/posix: Use separate naming for the byte-swap macros.
This avoids a compile error on GCC4 when ByteOrder.h is included
after it.
2019-03-27 00:25:34 -04:00
Augustin Cavalier
86ec5e3bf4 Convert some more endian conversions to Haiku-style. 2019-03-26 22:44:20 -04:00
Augustin Cavalier
6d5e91f0c9 headers/posix: Make casts in netinet byteswap functions uniform. 2019-03-26 22:31:33 -04:00
Augustin Cavalier
fcf0b31fb9 bootloader: Add the network endianness macros to NetDefs.h.
This file contains all the protocol- and interface-related
definitions, so this seems to be where they belong.

Required following previous commits.
2019-03-26 21:51:42 -04:00
Augustin Cavalier
fb52ab82d2 Minor tweaks to fix the build after the last commit.
* firewire and freebsd_network expect the macros come from
   sys/param.h, as this is one of the places FreeBSD defines them
 * All others are Haiku-native and can use Be-style macros.
2019-03-26 20:06:09 -04:00
Augustin Cavalier
9cb15d72bd netinet/in: Use the GCC4 builtin byteswap functions for htonl.
Fixes the build breakage caused by PulkoMandy's recent commit.
Remove these from ByteOrder.h now also, as per POSIX they should
come from netinet/in.h.

This is a small source compatibility breakage, but it will only
affect a small portion of non-POSIX, partially-Be applications.
2019-03-26 19:33:43 -04:00
Augustin Cavalier
204ec4dec6 build: Use the main ByteOrder.h.
The only differences between the two were whitespace and then the
GCC4 builtin byteswap functions.
2019-03-26 19:13:01 -04:00
Augustin Cavalier
d15fda2c7e build/BeBuild.h: Throw an error if the compatibility headers are not included.
If this triggers, it means something is using the "build" errors while
the build system thinks it is not, which is always an error. Nothing
triggers this at present, but some subtle bugs in the build system
a while back would have been caught by this.
2019-03-26 18:59:42 -04:00
PulkoMandy
1e4172254d sparc: fill in HaikuPorts file.
Change-Id: I7aef31e72a826936c45e3644a72eb0598386f1ae
Reviewed-on: https://review.haiku-os.org/c/1309
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2019-03-26 20:41:46 +00:00
PulkoMandy
464b202703 sparc: add float/double swapping functions.
Change-Id: I07590af796d689b5e97c03a97727edfd58f5a811
Reviewed-on: https://review.haiku-os.org/c/1183
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-26 20:41:46 +00:00
PulkoMandy
c3ba570c08 remove unused byteswap functions.
We need these only for gcc2, which doesn't have builtins.
Only swapping floats and doubles remains to implement for all
architectures.

Change-Id: I60e39ad42d4ef762f3324f934f2996dde1412f1a
Reviewed-on: https://review.haiku-os.org/c/1182
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-26 20:41:46 +00:00
PulkoMandy
4b2da9c371 glibc: cleanup long double support
- Add 128 bit long double support from current glibc and a few headers
  they need
- Move the existing 80 bit float support in a sub directory of generic,
  it is not universal to all archs (see file added in docs/develop/arch).
  Also include some new .h files for x86 that are needed after these
  changes (from newer versions of the glibc).
- Adjust Jamfiles for m68k, x86 and x86_64 to use the 80bit format
- Do not adjust arm jamfiles, it was wrongly using 80bit long double and
  should be fixed to use 64bit instead (which means the double functions
  can be used with aliases)
- Do not adjust powerpc jamfiles, because it uses yet another format and
  we build it without long double support anyways.

Note that I moved only the files that were creating compile errors,
quite likely more of the s_* and e_* files need to be moved to the
specific directories, see glibc list here:

https://sourceware.org/git/?p=glibc.git;a=tree;f=sysdeps/ieee754/ldbl-128
https://sourceware.org/git/?p=glibc.git;a=tree;f=sysdeps/ieee754/ldbl-96

Change-Id: Ic2d8a454ba9a3b99638e4fbb63daf02df0fea403
Reviewed-on: https://review.haiku-os.org/c/1143
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-26 20:40:50 +00:00
CodeforEvolution
134abee09e Added reboot button for after successful update
Change-Id: Ia444132bd8ffc2ccde53efcdbcbd9f31c3f2a439
Reviewed-on: https://review.haiku-os.org/c/968
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-26 20:39:44 +00:00
Andreas Faerber
e1b41d44a3 boot loader: Wire up net_stack_cleanup()
Add a platform cleanup hook before starting the kernel. The openfirmware
and PXE loaders clean up their network stack there, while the other
loaders currently do nothing.

This closes ticket #6166

Change-Id: I34765892dfd9b2310c6af97c9ff7d414afae49e5
Reviewed-on: https://review.haiku-os.org/c/50
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-26 20:25:19 +00:00
Adrien Destugues
8741bcf4f1 Add icon for postscript files.
Change-Id: I28bdd7abd8e8d5091104fff5a7a73787d45b1635
Reviewed-on: https://review.haiku-os.org/c/1313
Reviewed-by: humdinger <humdingerb@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-26 20:24:08 +00:00
Alexander von Gluck IV
c085f38639 riscv64: Fill in more bulk architecture items around libroot/kernel
Change-Id: Ia2a86d8814d06950ea2d2d19d966c642d26f81d6
Reviewed-on: https://review.haiku-os.org/c/1302
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-03-25 17:16:03 +00:00
Alexander von Gluck IV
7f94422796 docker/bootstrap: Add vim/nano to assist in bootstrap
Change-Id: I822e4af05754296a0c4415028230475ea7fb6be0
2019-03-19 13:33:12 -05:00
Adrien Destugues
9fef538b5b DHCP: fix timeout handling
We allowed a delay only for few DHCP states. As a result, DHCP requests
would timeout immediately after sending the initial discover, and
moreover the code would then switch to "renew" state, trying to renew
without an assigned address.

The result is a quick succession of DISCOVER and empty REQUEST messages.
Eventually, the server could send us an OFFER as reply to our DISCOVER,
unless it decided that the empty REQUEST means "I'm requesting from
another server", which would lead it to cancelling its lease.

This would only work by luck on unbusy networks unlike the one I'm using
today.

Change-Id: I86905b341dc70f7dbcc780b954005e39e7c39ee0
Reviewed-on: https://review.haiku-os.org/c/1296
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-18 17:00:13 +00:00
CodeforEvolution
e2c7bb900c Add Reboot Check to BPackageRoster
A bit of an explanation for these weirdly named functions:
LatestActivePackageInfos() returns the packages on the system that are
both installed and fully set up. When packages are in the middle of being
installed, LatestInactivePackageInfos() shows the packages in the process
of being installed. Once the installation process is done,
LatestInactivePackageInfos() returns nothing. If there are packages that
can't be fully activated without a reboot, CurrentlyActivePackageInfos()
will return the same information as LatestActivePackageInfos(), or if
everything has been installed and activated, it will return no packages.

Change-Id: Ia1814a5abda6d815c46e0b46dc812b4e7af81de3
Reviewed-on: https://review.haiku-os.org/c/1129
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-03-18 14:10:42 +00:00
Alexander von Gluck IV
3392267267 libroot/riscv32: Fix incorrect riscv64 reference 2019-03-18 08:18:59 -05:00
Alexander von Gluck IV
0e80d80a55 libroot/riscv64: Fix misplaced ppc 2019-03-18 08:18:55 -05:00
Augustin Cavalier
660dea3f6a net_server: Clean up authentication handling code.
Even if we find an authentication string, make sure it's not empty before
trying to use it; and use the other one if possible.
2019-03-17 15:34:04 -04:00
Augustin Cavalier
fef60ce6cc XHCI: Reworking locking behavior and check for lock failures.
Should fix #14959.
2019-03-17 15:33:17 -04:00
sushilhub
999c215e76 src/preferences: fixes break statement
* added break statement

Change-Id: I69125bd5af11e8a94b07a50601e6cebbace372d5
Reviewed-on: https://review.haiku-os.org/c/1298
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-16 17:29:02 +00:00
sushilhub
817902a223 src/preferences/bluetooth: fixes missing break statement
* Added break statement

Change-Id: I9ebb4b620db9f8ad1fbf919322425356384011b1
Reviewed-on: https://review.haiku-os.org/c/1297
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-16 17:29:02 +00:00
Lee Mon
d04d9b2519 BugFix 2: fix errors found by cppcheck
Change-Id: I262af4dcf3ad1dca9d7e7d88838ae90323303c1d
Reviewed-on: https://review.haiku-os.org/c/1294
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-16 17:28:06 +00:00
Lee Mon
446dc38f89 BugFix: fix some errors found by cppcheck
Fix coding style violations and minor errors (race condition in h2generic.cpp).

Change-Id: Iec58f2f431de79320579704ac449475f18deb731
Reviewed-on: https://review.haiku-os.org/c/1186
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-03-16 17:26:25 +00:00
Augustin Cavalier
b322554630 kernel: Check for uninitialized locks in mutex_trylock().
We already do this in mutex_lock() and variants.
2019-03-15 10:59:48 -04:00
François Revol
88255e0890 BFS: Add support for building big-endian BFS
I tried to use the feature stuff to relocate objects but didn't managed
to get it to work, having another subdir seems to be the simplest
solution.

I managed to mount a clone of my BeBox' drive, but it KDLed shortly when mouting
read-write.

Change-Id: Ia4f126673e553e4f3e524a40218e6c623527b96d
Reviewed-on: https://review.haiku-os.org/c/645
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-03-13 19:59:34 +00:00