Bug 253765

Summary: [PATCH] link_elf: symbol backlight_get_info_desc undefined during boot on Pinebook
Product: Base System Reporter: Brett Mastbergen <brett.mastbergen>
Component: kernAssignee: Emmanuel Vadot <manu>
Status: Closed FIXED    
Severity: Affects Some People CC: manu, markj
Priority: ---    
Version: 13.0-STABLE   
Hardware: arm64   
OS: Any   
Attachments:
Description Flags
FreeBSD 13.0-BETA1 Pinebook dmesg
none
pwm_backlight patch none

Description Brett Mastbergen 2021-02-22 15:37:26 UTC
Created attachment 222724 [details]
FreeBSD 13.0-BETA1 Pinebook dmesg

While booting FreeBSD 13.0-BETA1 on the Pine64 Pinebook the pwm_backlight module is unable to find the backlight interface symbols, resulting in the following dmesg output:

link_elf: symbol backlight_get_info_desc undefined

This prevents the backlight dev node from being created and as such, the backlight utility cannot be used to control the display backlight.

The attached patch adds MODULE_DEPEND on backlight to pwm_backlight.  With this change, the backlight device is correctly created and the backlight utility can successfully control the display backlight on the Pinebook.
Comment 1 Brett Mastbergen 2021-02-22 15:38:00 UTC
Created attachment 222725 [details]
pwm_backlight patch
Comment 2 Mark Johnston freebsd_committer freebsd_triage 2021-02-24 16:41:37 UTC
Looks correct to me.
Comment 3 Emmanuel Vadot freebsd_committer freebsd_triage 2021-02-24 16:44:26 UTC
Oh crap, I guess I didn't tested arm64 backlight for sometime ...
I'll commit and make sure that it's MFC to 13.0
Thanks.
Comment 4 commit-hook freebsd_committer freebsd_triage 2021-02-24 16:57:08 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=43d4dfac96f7f8285a27989f315c075d28aadb12

commit 43d4dfac96f7f8285a27989f315c075d28aadb12
Author:     Brett Mastbergen <brett.mastbergen@gmail.com>
AuthorDate: 2021-02-22 10:28:28 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2021-02-24 16:56:26 +0000

    pwm_backlight: Add MODULE_DEPEND on backlight

    Make the pwm_backlight module depend on backlight, so it
    has access to the backlight interface symbols.  Otherwise you'll
    get an error like:

    link_elf: symbol backlight_get_info_desc undefined

    Signed-off-by: Brett Mastbergen <brett.mastbergen@gmail.com>
    MFC after:      3 days
    PR:             253765

 sys/dev/pwm/pwm_backlight.c | 1 +
 1 file changed, 1 insertion(+)
Comment 5 commit-hook freebsd_committer freebsd_triage 2021-03-02 13:03:09 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=135fa1610fa177bb8c77aab951cfb4395edc249f

commit 135fa1610fa177bb8c77aab951cfb4395edc249f
Author:     Brett Mastbergen <brett.mastbergen@gmail.com>
AuthorDate: 2021-02-22 10:28:28 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2021-03-02 13:02:13 +0000

    pwm_backlight: Add MODULE_DEPEND on backlight

    Make the pwm_backlight module depend on backlight, so it
    has access to the backlight interface symbols.  Otherwise you'll
    get an error like:

    link_elf: symbol backlight_get_info_desc undefined

    Signed-off-by: Brett Mastbergen <brett.mastbergen@gmail.com>
    MFC after:      3 days
    PR:             253765
    (cherry picked from commit 43d4dfac96f7f8285a27989f315c075d28aadb12)

 sys/dev/pwm/pwm_backlight.c | 1 +
 1 file changed, 1 insertion(+)
Comment 6 commit-hook freebsd_committer freebsd_triage 2021-03-02 14:21:21 UTC
A commit in branch releng/13.0 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=90cf334642c234675a70721a8b06a7c92c014a8e

commit 90cf334642c234675a70721a8b06a7c92c014a8e
Author:     Brett Mastbergen <brett.mastbergen@gmail.com>
AuthorDate: 2021-02-22 10:28:28 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2021-03-02 14:19:51 +0000

    pwm_backlight: Add MODULE_DEPEND on backlight

    Make the pwm_backlight module depend on backlight, so it
    has access to the backlight interface symbols.  Otherwise you'll
    get an error like:

    link_elf: symbol backlight_get_info_desc undefined

    Approved by:    re (gjb)
    Signed-off-by: Brett Mastbergen <brett.mastbergen@gmail.com>
    MFC after:      3 days
    PR:             253765
    (cherry picked from commit 43d4dfac96f7f8285a27989f315c075d28aadb12)
    (cherry picked from commit 135fa1610fa177bb8c77aab951cfb4395edc249f)

 sys/dev/pwm/pwm_backlight.c | 1 +
 1 file changed, 1 insertion(+)
Comment 7 Mark Linimon freebsd_committer freebsd_triage 2021-05-31 17:38:01 UTC
^Triage: assign to committer that resolved.