Page MenuHomeFreeBSD

This adds wulf7 / iichid on github to ports
ClosedPublic

Authored by koobs on Tue, Feb 11, 5:25 AM.

Details

Summary

As suggested on twitter here is a port for iichid maintained at https://github.com/wulf7/iichid. How to use it can be found at https://larastechlab.blogspot.com/2020/01/i2c-touchpads-on-freebsd-130-current.html.

I'm more than willing to give maintainership to someone who uses it. Documentation is sketchy, hence very little here. I don't plan to put much more work into this than what is already here; anyone can claim the port for care and feeding.

Test Plan

Someone will need to test it as I don't have the hardware.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

cy created this revision.Tue, Feb 11, 5:25 AM
cy updated this revision to Diff 68103.Tue, Feb 11, 5:32 AM

Replaced MAINTAINER= cy@freebsd.org with ports@freebsd.org. I don't have the hardware and I'm not interested in maintaining it. Anyone else can.

imp added a comment.Tue, Feb 11, 5:48 AM

I'm up for this... you can add me as a maintainer

koobs added a comment.Tue, Feb 11, 6:39 AM

I'll help to get this landed in ports and can make the MAINTAINER change if Cy doesn't have cycles

koobs added a comment.Tue, Feb 11, 7:03 AM

Just adding review comments for posterity.

I'll take this and land it with my commented changes this evening

sysutils/iichid-devel/Makefile
7 ↗(On Diff #68103)

I'll remove this and mark the port (Experimental) in COMMENT. -devel is usually only used when there is already an existing 'stable release' port and maintainer wants to provide newer/development branch code. It also saves us a port move and MOVED entry later.

8 ↗(On Diff #68103)

I'll move this to GH_TAGNAME

9 ↗(On Diff #68103)

I'll ask upstream for x.y.z version tags and use DISTVERSION=gYYYYMMDD [1] in the meantime

[1] https://www.freebsd.org/doc/en/books/porters-handbook/book.html#makefile-master_sites-github-ex4

11 ↗(On Diff #68103)

I'll switch this to imp@

12 ↗(On Diff #68103)

I'll add (Experimental) here and in pkg-descr

koobs commandeered this revision.Tue, Feb 11, 7:03 AM
koobs edited reviewers, added: cy; removed: koobs.
lwhsu added subscribers: wulf, lwhsu.Tue, Feb 11, 9:29 AM

@wulf : Do you think it's time to put this into base or let's add this as a port first?

wulf added a comment.Tue, Feb 11, 11:04 AM

@wulf : Do you think it's time to put this into base or let's add this as a port first?

Putting it to base requires D22901 and some extra work to separate HID into own subsystem. First is currently stalled due to my new year vacations lasted too long and second is not started yet and will make iichid non MFC-able.

So it definitely must be added as a port.

wulf added a comment.Tue, Feb 11, 11:11 AM

I recommend to disable USB backend by default and leave it as build-time option as it is not completed yet and interferes with existing USB drivers.

It can be disabled with

sed -i'' -e '/usbhid.c/s/^/#/' Makefile
cy added a comment.Tue, Feb 11, 12:48 PM
In D23615#518357, @wulf wrote:

I recommend to disable USB backend by default and leave it as build-time option as it is not completed yet and interferes with existing USB drivers.
It can be disabled with

sed -i'' -e '/usbhid.c/s/^/#/' Makefile

files/patch-Makefile removing usbhid.c is preferred.

koobs added a comment.Wed, Feb 12, 5:05 AM

Landing this today

imp added a comment.Wed, Feb 12, 5:12 AM

If you make the changes you say, this looks good to me

koobs added inline comments.Wed, Feb 12, 5:22 AM
sysutils/iichid-devel/Makefile
18 ↗(On Diff #68103)

Not needed after PORTNAME change to iichid

22 ↗(On Diff #68103)

Adding the following here (remove -Werror from ports)

# Strip -Werror from sys/conf/kmod.mk
MAKE_ENV=       WERROR=""
23 ↗(On Diff #68103)

Use ${KMODDIR} here (cant use %%VARIABLES%%}

koobs added a comment.EditedWed, Feb 12, 5:23 AM

@imp @wulf This appears to build/package (poudriere) fine on 12amd64, should we leave it open for any version/arch, or should we limit it. If limiting, I need a list of archs for ONLY_FOR_ARCHS and OSVERSIONS we shouldn't set IGNORE for

sysutils/Makefile
498 ↗(On Diff #68103)

Changing this to iichid (after PORTNAME change to the same)

koobs added a comment.Wed, Feb 12, 5:33 AM

Fails building in 11amd64 with the following, so will at least set OSVERSION > 12* unless its expected or desirable for iichid to be test on 11:

cc -O2 -pipe -fno-strict-aliasing -DHID_DEBUG -DIICHID_DEBUG -DEVDEV_SUPPORT  -D_KERNEL -DKLD_MODULE -nostdinc   -I. -I/usr/src/sys -fno-common  -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer   -MD  -MF.depend.hms.o -MThms.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-error-address-of-packed-member  -mno-aes -mno-avx  -std=iso9899:1999 -c hms.c -o hms.o
hms.c:489:1: error: conflicting types for 'hms_ev_open'
hms_ev_open(struct evdev_dev *evdev)
^
hms.c:126:21: note: previous declaration is here
static evdev_open_t hms_ev_open;
                    ^
hms.c:491:26: warning: implicit declaration of function 'evdev_get_softc' is invalid in C99 [-Wimplicit-function-declaration]
        struct hms_info *info = evdev_get_softc(evdev);
                                ^
hms.c:491:26: warning: this function declaration is not a prototype [-Wstrict-prototypes]
hms.c:491:19: warning: incompatible integer to pointer conversion initializing 'struct hms_info *' with an expression of type 'int' [-Wint-conversion]
        struct hms_info *info = evdev_get_softc(evdev);
                         ^      ~~~~~~~~~~~~~~~~~~~~~~
hms.c:505:1: error: conflicting types for 'hms_ev_close'
hms_ev_close(struct evdev_dev *evdev)
^
hms.c:127:22: note: previous declaration is here
static evdev_close_t hms_ev_close;
                     ^
hms.c:507:26: warning: implicit declaration of function 'evdev_get_softc' is invalid in C99 [-Wimplicit-function-declaration]
        struct hms_info *info = evdev_get_softc(evdev);
                                ^
hms.c:507:19: warning: incompatible integer to pointer conversion initializing 'struct hms_info *' with an expression of type 'int' [-Wint-conversion]
        struct hms_info *info = evdev_get_softc(evdev);
                         ^      ~~~~~~~~~~~~~~~~~~~~~~
5 warnings and 2 errors generated.
*** [hms.o] Error code 1

make[1]: stopped in /wrkdirs/usr/ports/sysutils/iichid/work/iichid-699a41b
--- iichid.o ---
iichid.c:184:11: warning: implicit declaration of function 'acpi_EvaluateDSM' is invalid in C99 [-Wimplicit-function-declaration]
        status = acpi_EvaluateDSM(handle, dsm_guid, 1, 1, NULL, &acpi_buf);
                 ^
iichid.c:184:11: warning: this function declaration is not a prototype [-Wstrict-prototypes]
2 warnings generated.
1 error
wulf added a comment.Wed, Feb 12, 7:57 AM

Fails building in 11amd64 with the following, so will at least set OSVERSION > 12* unless its expected or desirable for iichid to be test on 11:

Only 12.1+ is supported.

11 requires some ig4 and ACPI bits to be MFC-ed.

wulf added a comment.Wed, Feb 12, 10:11 AM

should we leave it open for any version/arch, or should we limit it. If limiting, I need a list of archs for ONLY_FOR_ARCHS and OSVERSIONS we shouldn't set IGNORE for

I2C part depends on ACPI. It limits ARCHS to amd64, i386 and aarch64

koobs added a comment.Fri, Feb 14, 3:23 AM
In D23615#518777, @wulf wrote:

Fails building in 11amd64 with the following, so will at least set OSVERSION > 12* unless its expected or desirable for iichid to be test on 11:

Only 12.1+ is supported.
11 requires some ig4 and ACPI bits to be MFC-ed.

Roger that thank you.

Will set OSREL > 12.1 for now and ONLY_FOR_ARCHS=amd64 i386 aarch64

Port landing shortly

One question though. Since packages are build on 12.0 for all subsequent releases, wont this cause the package not to be built (since its on 12.0 host) ?

This revision was not accepted when it landed; it landed in state Needs Review.Fri, Feb 14, 6:46 AM
This revision was automatically updated to reflect the committed changes.
koobs added a comment.Fri, Feb 14, 6:49 AM

Additional changes:

  • Limited to 12.1+ & amd64/i386/aarch64 (including reason if arch doesnt match)
  • Disabled USB backend per @wulf comment with comment in port
  • Using 0.0.1, @wulf added git tags
  • Added pkg-message