#5754 closed enhancement (fixed)
[pc_serial] [PATCH] Fix build for Haiku
Reported by: | andreasf | Owned by: | mmu_man |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Drivers | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | #35 | Blocking: | |
Platform: | x86 |
Description
Here's an initial stab at making the pc_serial
driver compile for Haiku target:
- Clean up the BONE/R5/Haiku
tty_module_info
mess a little. - The functions either need to be
static
in both header and source, or not at all. - Haiku does not seem to have a
ddbackground
function.
With these changes, I can successfully do the following in my UserBuildConfig
:
AddDriversToHaikuImage ports : pc_serial ;
It does not yet work for my card though.
Attachments (1)
Change History (11)
by , 15 years ago
Attachment: | pc_serial.diff added |
---|
comment:1 by , 15 years ago
Cc: | removed |
---|---|
Component: | Drivers/TTY → Drivers |
Owner: | changed from | to
Status: | new → assigned |
follow-up: 3 comment:2 by , 15 years ago
Of course it does not work because there is no tty module yet. The header only describes a BeOS-compatible module but it will probably not be done this way.
comment:3 by , 15 years ago
I don't fully understand. Is something apart from the static
issue wrong with my patch? What do you mean with "tty module"? There appears to be a tty
add-on that gets installed by default.
I'm looking for a short-term way of testing my serial-related patches for Mono, whether with my built-in serial port (that the kernel uses by default) or with a PCI card (OxfordSemi 950a
) or with a USB adapter (067b:2303
). None are listed as /dev/ports/serial
X at this time, so any pointers how to improve things would be appreciated.
follow-up: 7 comment:4 by , 15 years ago
The tty
binary is the tty driver, which publishes /dev/tt/*
, not the tty manager. As such we do not have any in Haiku yet, so this only fixes the build but doesn't make it usable. Though it should be possible to use the BeOS tty manager for testing. But the current API is not the one which will be used later on.
comment:6 by , 15 years ago
I'm currently working on the tty module. It will have a different API than the old ones though, pretty much like the internal API the tty driver currently uses. So the drivers will need to be ported to it. I've already done that for usb_serial, however it is not yet complete and does not yet fully work, so I won't commit it right now.
comment:7 by , 15 years ago
I've tried copying the R5.0.3 /beos/system/add-ons/kernel/bus_managers/tty
to hrev36576 /system/add-ons/kernel/bus_managers/tty
.
There's still nothing under /dev/ports/
and no mention of pc_serial
in syslog.
Is my way of adding them to the image wrong? Anything else I need to copy or symlink?
comment:8 by , 14 years ago
Blocked By: | 35 added |
---|
comment:9 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The driver is working now. However to get it to use your serial port you must make sure the kernel does not use it for serial debug. Disabling serial debug is not enough, you must actually change the serial port to an unused one in the kernel settings file.
comment:10 by , 10 years ago
This reminds me we don't have man like pages for drivers, where to put such useful information...
proposed patch