Page MenuHomeFreeBSD

This adds wulf7 / iichid on github to ports
ClosedPublic

Authored by koobs on Feb 11 2020, 5:25 AM.
Tags
None
Referenced Files
F81642656: D23615.diff
Fri, Apr 19, 9:46 AM
F81618547: D23615.diff
Fri, Apr 19, 1:45 AM
Unknown Object (File)
Mar 12 2024, 3:44 AM
Unknown Object (File)
Jan 23 2024, 11:37 AM
Unknown Object (File)
Jan 13 2024, 11:17 AM
Unknown Object (File)
Dec 4 2023, 3:49 AM
Unknown Object (File)
Dec 2 2023, 11:40 PM
Unknown Object (File)
Nov 15 2023, 5:29 PM

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
Lint Skipped
Unit
Tests Skipped

Event Timeline

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.

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

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

Just adding review comments for posterity.

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

sysutils/iichid-devel/Makefile
7

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

I'll move this to GH_TAGNAME

9

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

I'll switch this to imp@

12

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

koobs edited reviewers, added: cy; removed: koobs.

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

@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.

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
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.

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

sysutils/iichid-devel/Makefile
18

Not needed after PORTNAME change to iichid

22

Adding the following here (remove -Werror from ports)

# Strip -Werror from sys/conf/kmod.mk
MAKE_ENV=       WERROR=""
23

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

@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

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

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

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.

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

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.Feb 14 2020, 6:46 AM
This revision was automatically updated to reflect the committed changes.

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