Bug 253765 - [PATCH] link_elf: symbol backlight_get_info_desc undefined during boot on Pinebook
Summary: [PATCH] link_elf: symbol backlight_get_info_desc undefined during boot on Pin...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.0-STABLE
Hardware: arm64 Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-22 15:37 UTC by Brett Mastbergen
Modified: 2021-03-02 14:21 UTC (History)
2 users (show)

See Also:


Attachments
FreeBSD 13.0-BETA1 Pinebook dmesg (8.74 KB, text/plain)
2021-02-22 15:37 UTC, Brett Mastbergen
no flags Details
pwm_backlight patch (979 bytes, patch)
2021-02-22 15:38 UTC, Brett Mastbergen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 2021-02-24 16:41:37 UTC
Looks correct to me.
Comment 3 Emmanuel Vadot freebsd_committer 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 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 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 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(+)