Commit Graph

62876 Commits

Author SHA1 Message Date
Augustin Cavalier
822ee1243a fs_shell: Detect 64-bit by comparing LONG_MAX and INT_MAX.
This is how we do it within the kernel itself. Should fix build of fs_shell
on 64-bit platforms that are not x86.
2021-08-27 13:51:41 -04:00
Augustin Cavalier
e3acf8917b Fix usage of Zstd build feature.
We do not actually need a SetupFeatureObjcetsDir here, as this build feature
is used unconditionally if it is available (unlike OpenSSL which is not,
and which needs a feature objects directory.) It appears FeatureObjectsDir
expects to be called unconditionally, i.e. in an "else" as well as "if",
so this actually caused some build oddities.

Additionally, since it is built unconditionally if available, we have
to put it outside the "regular" checks in the PackageInfo so that it
will be included in the images. This fixes booting @minimum images,
which was apparently broken at some point when "zstd" was inadvertently
removed.
2021-08-27 13:50:07 -04:00
Augustin Cavalier
ece327f106 Overhaul "haiku" PackageInfo.
* Merge all except the x86_gcc2 one into a single "generic" one.
   It is now exactly the same on all architectures, save a single
   ifdef for x86_64, which needs a different compat version, as there
   are still some packages built that far back and never rebuilt since!

 * Group the requires according to category: first any arch packages,
   then commands, then the GCC syslibs, then packages always depended
   upon if they are available, and finally packages only depended upon
   in "regular" builds.

 * Put all packages inside HAIKU_BUILD_FEATURE_* ifdef tests,
   and order them alphabetically within their category.

If I have done this all correctly, at least x86_64 should get an
identically generated haiku .PackageInfo as before this commit, save
the reordering changes. Others may differ based on package availability,
as they were missing the requisite #ifdef sections.
2021-08-27 13:40:10 -04:00
John Scipione
6211ae2575 BBitmap: Remove BeOS tweak to fix Spirograph 1.5
This is a BeOS app compatibility fix.

The comment in SetBits implementation said that B_RGB32 imports only
24 bits of the data, but that doesn't seem to be correct.

Fixes #12931

Change-Id: I826a7e358ea379b8bf1550c899e82b623e5c21b4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4319
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-08-27 14:43:55 +00:00
Pascal Abresch
1764036b15 Preferences/Time: Remove 32-bit UNIX time checks.
Change-Id: If974d441a932d54491024ba1a64688db513a57cb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4330
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-08-27 13:55:08 +00:00
Adrien Destugues
a5061ecec5 Generate developer docs with Sphinx
An effort was started some time ago to consolidate all internal
documentation in the git tree. However, this was just an accumulation of
files in various formats without any strucutre or way to browse it,
which results in no one even knowing that we have docs here.

This converts most of the files to restructuredtext and uses Sphinx to
generate an HTML browsable user manual (with a table of content and a
first attempt to put things in a global hierarchy).

There are almost no changes to the documentation content in this commit
(some obviously obsolete things were removed). The plan is to get the
toolchain up and running to make these docs easily available, and only
then see about improving the content. We can migrate some things off the
wiki and website, and rework the table of contents to have some more
hierarchy levels because currently it's a bit messy.

Change-Id: I924ac9dc6e753887ab56f18a09bdb0a1e1793bfd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4370
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
2021-08-27 11:41:17 +00:00
John Scipione
7f8195344a Tracker: Add thumbnail support
Define thumbnail attributes in Attributes.h:
  Media:Thumbnail to store the thumbnail,
  Media:Thumbnail:CreationTime to see if thumbs need to be regenerated.

Store 128x128 thumbnail in attribute, for icon sizes smaller than
128x128 down-scale the 128x128 thumbnail. Use B_FILTER_BITMAP_BILINEAR
to down-scale the image using the bilinear scaling algorithm which
creates nicer looking thumbnails than the default scaling algorithm.

Store thumbnails as WebP images which compress smaller than PNGs and
fit in the inode better at 128x128.

Check the file's modification time in GetFileIconFromAttr() and compare
it to the thumbnail creation time. If the file has not been modified
since the last time we generated thumbnails return the thumbnail from
the attribute, otherwise fetch a new thumbnail with GetThumbnailIcon().

Add "Generate image thumbnails" Tracker setting. Default is turned off
for now. To generate image thumbnails you must first turn this setting
on in Tracker Windows preferences.

Spawn a get_thumbnail() thread to generate thumbnails and retrieve them
later on from the window thread to fill out into the icon. This should
improve responsiveness of generating thumbnails from a folder with a
lot of images. The generator thread will write the thumbnail data to an
attribute if on writable BFS volume.

If not on writable BFS volume, the generator thread will send the data
back to the original thread through a port by calling write_port().

When the thread is finished creating the thumbnail it sends a message
back to the Tracker application thread to update the pose which
instructs the window thread to look for an thumbnail. It either finds a
thumbnail in an attribute, or picks up the thumbnail data that has been
sent through write_port() using read_port().

This works on both read-write and read-only BFS volumes but it still
depends on the presence of a BEOS:TYPE parameter to have been written
to the volume before it became read-only. Thumbnail generation does not
work on other read-only volumes for example an ISO-9660 CD, but it does
work on read-only BFS volumes for example the BeOS R5 CD.

Move BPrivate::CheckNodeIconHintPrivate() from BNodeInfo to Tracker
Model CheckNodeIconHint(). Create Model::CheckAppIconHint() and look
for a vector icon or mini and large icon in that method. Check that
the base type is directory, volume, trash, desktop, or if executable
call CheckAppIconHint().

Add 1 to temp_name to fix the following warning:
src/kits/tracker/FSUtils.cpp:2437:12: note: 'snprintf' output 3 or more
bytes (assuming 267) into a destination of size 266

Rename temp_name to tempName following our style guidelines. Use
strlcpy() and strlcat() instead of strcpy() to safely copy the string.
This fixes thumbnail generation on 64-bit Haiku.

Change-Id: I7f927a5a1f8cf65e4b1aa1e0eb55bbfae87fd969
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3163
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-08-27 11:39:13 +00:00
Fredrik Holmqvist
57a743987c ARM64: Linker script for bootloader 2021-08-25 22:59:12 +02:00
Fredrik Holmqvist
538bd986f9 ARM64 WIP: Fake PE header assembly
Can probably be done cleaner, but at least UEFI boots it atm
2021-08-25 22:58:00 +02:00
Fredrik Holmqvist
2d01a5378a ARM64 WIP arch_smp.cpp 2021-08-25 22:57:01 +02:00
Fredrik Holmqvist
b0f6c6303a ARM64 wip runtime_loader.ld
Probably needs work
2021-08-25 21:24:57 +02:00
Fredrik Holmqvist
a35a757def ARM64 kernel.ld WIP, some cleanup, remove pe header 2021-08-25 20:49:12 +02:00
Adrien Destugues
1c88f77dcc app_server: turn DPMS on only after setting a valid mode
It's not allowed to enable the screen before having set a mode. At least
in the case of the intel_extreme driver, this creates some problem. Move
the call just a bit later in the init process, where the mode is already
set.

Change-Id: Iaa665f0edc15316890032f1a5928f33634dc8749
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4362
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: François Revol <revol@free.fr>
Reviewed-by: <BeagleJoe13@gmail.com>
2021-08-24 15:05:45 +00:00
Andrew Lindesay
afe7affb47 HaikuDepot: Fix Local Pkg Install
Fixes #17186

Change-Id: I85e54c0261a7338ec2baeaff6b0905f77087171a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4358
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-08-24 08:27:34 +00:00
Fredrik Holmqvist
3b63fd000a WIP: Rewrote arm64 arch_kernel_args.h based on arm
FDT and UART is disabled until later in the port
2021-08-23 21:52:49 +02:00
Fredrik Holmqvist
f198587cc6 ConfigManager ARM64 Jamfile 2021-08-23 21:32:48 +02:00
Fredrik Holmqvist
5185ccdeb4 efi/arch_smp.h: use __aarch64__ for ARM64 defines 2021-08-23 21:28:15 +02:00
Fredrik Holmqvist
d691f1e181 WIP arm64 arch_cpu.cpp
Still needs work, opted to have arch files in tree to share
the burden of the port
2021-08-23 21:19:06 +02:00
Fredrik Holmqvist
01dad9378b Add ARM64 arch_cpu.h header 2021-08-23 21:10:34 +02:00
Lt-Henry
8df8655366 Updated HID code with Vector class instead of hand made growing arrays
Change-Id: Iec8cd3922d9c21a046d225181d326253ae88d395
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4324
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-08-23 18:31:50 +00:00
Panagiotis Vasilopoulos
4b12b16e8d Time: Add about window
The window is not easily accessible from the application itself, so this
change is practically not that useful, but it's still a good idea to continue
replacing old BAlert windows with BAboutWindow in order for the Haiku source
code to be exemplary as far as developing applications is concerned.

Change-Id: I05ea971ed0f8a996d5e168066b18eb7fe8bd5b3e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4331
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-08-23 18:31:10 +00:00
X512
3517616b39 kernel/vm_page: add vm_page table dump debugger command
Change-Id: I493228736f90f5e248f1d4fa3e354beb186546cb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4308
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-08-23 14:20:47 +00:00
X512
a267f17ca6 kernel/vm: fix several vm bugs in riscv64
team.cpp address_space change is needed in
arch_thread_init_kthread_stack to set initial thread page
translation map. It also allows to simplify some debugger code.

DEBUG_PAGE_ACCESS check is currently incorrectly implemented in
RISCV64VMTranslationMap and disabled to avoid panic.

gHtifRegs = 0 change is needed to avoid using HTIF when it is not
available. gHtifRegs != NULL check is used to detect that HTIF is
present. 0x40008000 is TinyEMU HTIF address. HTIF is emulator specific
device that provide serial IO and shutdown capability (and maybe
something else depending on virtual machine).

Change-Id: Ic4d567b28c49799ae0f55223dd983a752823bab4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4328
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-08-23 13:59:49 +00:00
Fredrik Holmqvist
ea208974b6 Branch instr on ARM64 is BR 2021-08-21 14:45:22 +02:00
Fredrik Holmqvist
5e567c1091 ARM64 Jamfiles, missed in previous commit
* Use generic c versions of memset and memcpy
   Wwrite fast asm for that later, therefore no need for arch_string.S
 * Disable FDT and DTB until ARM64 is ready
   (WIP: do it later)
 * use ELF64
2021-08-21 14:32:32 +02:00
Fredrik Holmqvist
763968b1a3 ARM64 Jamfiles:
* Use generic c versions of memset and memcpy
   Wwrite fast asm for that later, therefore no need for arch_string.S
 * Disable FDT and DTB until ARM64 is ready
   (WIP: do it later)
 * use ELF64
2021-08-21 14:06:51 +02:00
Fredrik Holmqvist
5ea726b93a Use PIC and shared flags on ARM64 2021-08-21 10:33:59 +02:00
Fredrik Holmqvist
91bf523f3a Update HaikuPortsCross for ARM64 2021-08-21 10:32:57 +02:00
X512
39ddb58870 build/jam: add virtio_mmio, virtio_input to images
* virtio_mmio for riscv64,arm,arm64
* enable new FDT bus for riscv64,arm,arm64

Change-Id: I5141de4e0bfcb44c5368dfafdf68ebf06ca5fb93
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4063
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-08-20 18:53:31 +00:00
X512
cc818f35c4 input_server/virtio: add new virtio input device
Change-Id: I9e55349717231a5b13f0bce351f349a54c1f643e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3978
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-08-20 18:47:18 +00:00
Fredrik Holmqvist
e28f7b8f95 Fixup dtb.cpp: For ARM64 we use official __aarch64__ define
It is easier if we switch compiler and reduces confusion,
other than the confusing name itself.
2021-08-20 17:57:02 +02:00
Alexander von Gluck IV
a03687553b platform/efi: platform_cpu_info
* This models the CpuInfo into a cross-architecture
  platform_cpu_info
* Originally I was looking at merging this with "arch_cpu_info"
  however that is "overall cpu" while CpuInfo is "indivial core
  information" packed into an array.
* Since every dtb platform will report individual cores in fdt,
  having a common cpu core info struct with at minimum the core
  id makes sense.
* This could likely be refined further to some kind of core info
  packed inside of arch_cpu_info, but this will fix arm,arm64,etc
  for now until someone wants to dive into that.

Change-Id: Ia18a352403cd0da7130c1e637fc205d4311478ef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4363
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-08-20 13:38:17 +00:00
Jérôme Duval
9e511d5342 atheros813x: import patch from stable FreeBSD13
alc(4): add support for Mikrotik 10/25G NIC

The new Mikrotik 10/25G NIC is mostly compatible with AR8151 hardware,
with few exceptions:

* card supports only 32bit DMA operations
* card does not support write-one-to-clear semantics for interrupt status
  register
* MDIO operations can take longer to complete

This patch adds support for Mikrotik 10/25G NIC to the alc driver
while maintaining support for all earlier HW.

The patch was tested with FreeBSD main branch as of commit
f4b38c360e63a6e66245efedbd6c070f9c0aee55

This was tested on Intel i7-4790K system with Mikrotik 10/25G NIC.
This was tested on Intel i7-4790K system with RB44Ge (AR8151 based 4-port NIC)
to verify backwards compatibility.

PR:	256000
Submitted by:	 Gatis Peisenieks  <gatis@mikrotik.com>
MFC after:	1 week
Change-Id: I83cdeb24caccad15a9647a72159d979ecbd647f0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4361
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-08-20 12:44:13 +00:00
X512
03fd479633 virtio_input: add new virtio input driver
Change-Id: I10af2b30c79d1e8ff890d45642988f362d3d0a1e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4012
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-08-20 12:43:16 +00:00
Jérôme Duval
b8862188f4 jmicron2x0: import patch from FreeBSD13
Revert r316820.

Despite appearing correct, r316820 breaks packet rx/tx for jme(4)
interfaces.  With 12.1 approaching, let's just revert the commit for now.

PR:		233952
Tested by:	Armin Gruner <ag-freebsd@muc.de>
MFC after:	3 days
Change-Id: Id64b6a3c57ddae2d1915c914b1c4b1ad51410ed4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4360
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-08-20 09:13:44 +00:00
Jérôme Duval
0a856fec02 iprowifi4965: import two patches from FreeBSD current
could help with #16238

1/ iwn: adjust EEPROM read timeout for Intel 4965AGN M2

Reading EEPROM from Intel 4965AGN M2 takes 60 us which was causing panic
on system startup.

2/ from 561d34d705
The value for field "barker_mrc" of struct iwn2030_sensitivity_limits
was obtained from linux 3.2 wireless/iwlwifi driver code (iwl-2000.c:115
.barker_corr_th_min_mrc = 390).

Change-Id: I730bd6106e0d76da89fff041672ccbc4ef607976
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4359
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-08-20 08:00:39 +00:00
Alexander von Gluck IV
d637e0bec1 system/kernel: Rework uart management
Change-Id: I6cb31760519c8ba4542d217d6e68439602eda558
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4356
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-08-20 03:03:25 +00:00
Alexander von Gluck IV
fbd2589b8c bus_manangers/fdt: Fix missing close curly
Change-Id: I2dd439ea7fc90bb149e7454b0d58a6fd383ab30b
2021-08-19 17:41:16 -05:00
Gerasim Troeglazov
270bb32f98 virtio: fix typo 2021-08-18 21:30:41 +10:00
X512
397c81a2b8 virtio_mmio: add new mmio interface
Change-Id: I2ca51d98e337d1e69a8e68d78ef0cfe33dc0d308
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3979
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-08-18 06:19:37 +00:00
Przemysław Buczkowski
5855a8e350 riscv: fix typo frequrency -> frequency
Change-Id: I7a2ed220ad96a9b18bff3ac5c115592c8ba87d89
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4334
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2021-08-17 15:41:18 +00:00
Alexander von Gluck IV
950f68e3b2 kernel/uart: Fix PPC, drop needless abstraction
Change-Id: I4b8f69271ede117701725f9cce30de5bb8ba30bb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4332
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2021-08-16 23:22:35 +00:00
Alexander von Gluck IV
1648ab5277 kernel/uart: Clean up uarts, make calling convention consistent
Change-Id: I36ef92ef13edb0b006344db74e9d1b3ae52e0127
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4327
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-08-16 23:22:35 +00:00
Semion Dimov
c39da9b7a0 Fix build on OSX host
FreeBSD's stat command doesn't support -c/--format option and use %z specifier for file size

Change-Id: I368b6eef0a692df0f16bc1c3d5b5399fcf91e051
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4326
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-08-16 11:17:29 +00:00
X512
dbd1ff0988 libroot: fix ffs for riscv64
Built-in function call ffs() causing infinite recursion.

Change-Id: I506c0301c3a19178ebca4478cbe2ea06a7aeb932
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4318
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-08-15 20:56:11 +00:00
Alexander von Gluck IV
ae5abb5826 3rdparty: A small script to setup an SD card for the Unmatched
Change-Id: I275f62b2b16017b1735f0b4319ebd1a596da0cdd
2021-08-15 10:11:27 -05:00
Adrien Destugues
c3abd58da6 BUrlRequest: reintroduce Pause/Resume API in the deprecated version
Fixes https://github.com/haikuports/haikuports/issues/6123
2021-08-15 11:47:17 +02:00
X512
756884ad48 radeon_hd: 64 bit PCI bus fixes
Change-Id: If14dc31bf4c9360b5e1d0b477ba375cec8f75ba7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4306
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-08-15 00:26:57 +00:00
X512
7508e28c4f virtio_net: set device name
Change-Id: I1606804ad45e34f6a745c39917ba113ba5e9ee7f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4313
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-08-15 00:07:52 +00:00
X512
73445bc413 virtio_block: set device name
Change-Id: Id96e0dd2247625b7b898316511da7f1d8d0e3ba0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4314
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-08-15 00:05:34 +00:00