2023-02-25 17:41:25

by Tom Rix

[permalink] [raw]
Subject: [PATCH] tty: serial: fsl_lpuart: select SERIAL_FSL_LPUART for SERIAL_FSL_LPUART_CONSOLE

A rand config causes this link error
ld: drivers/tty/serial/earlycon.o: in function `parse_options':
drivers/tty/serial/earlycon.c:99: undefined reference to `uart_parse_earlycon'

The rand config has
CONFIG_SERIAL_CORE=m
CONFIG_SERIAL_EARLYCON=y
CONFIG_SERIAL_FSL_LPUART=m
CONFIG_SERIAL_FSL_LPUART_CONSOLE=y

SERIAL_FSL_LPUART should have been selected instead of depends on-ed.

Signed-off-by: Tom Rix <[email protected]>
---
drivers/tty/serial/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 625358f44419..b24d74d389fc 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -1313,7 +1313,7 @@ config SERIAL_FSL_LPUART

config SERIAL_FSL_LPUART_CONSOLE
bool "Console on Freescale lpuart serial port"
- depends on SERIAL_FSL_LPUART
+ select SERIAL_FSL_LPUART
select SERIAL_CORE_CONSOLE
select SERIAL_EARLYCON
help
--
2.27.0



2023-02-25 17:46:52

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH] tty: serial: fsl_lpuart: select SERIAL_FSL_LPUART for SERIAL_FSL_LPUART_CONSOLE

Hi--

On 2/25/23 09:39, Tom Rix wrote:
> A rand config causes this link error
> ld: drivers/tty/serial/earlycon.o: in function `parse_options':
> drivers/tty/serial/earlycon.c:99: undefined reference to `uart_parse_earlycon'
>
> The rand config has
> CONFIG_SERIAL_CORE=m
> CONFIG_SERIAL_EARLYCON=y
> CONFIG_SERIAL_FSL_LPUART=m
> CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
>
> SERIAL_FSL_LPUART should have been selected instead of depends on-ed.
>
> Signed-off-by: Tom Rix <[email protected]>
> ---
> drivers/tty/serial/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
> index 625358f44419..b24d74d389fc 100644
> --- a/drivers/tty/serial/Kconfig
> +++ b/drivers/tty/serial/Kconfig
> @@ -1313,7 +1313,7 @@ config SERIAL_FSL_LPUART
>
> config SERIAL_FSL_LPUART_CONSOLE
> bool "Console on Freescale lpuart serial port"
> - depends on SERIAL_FSL_LPUART
> + select SERIAL_FSL_LPUART

Most other _CONSOLE Kconfig have:

depends on SERIAL_FSL_LPUART=y

e.g.

but I noticed a few others with a similar problem.

> select SERIAL_CORE_CONSOLE
> select SERIAL_EARLYCON
> help

--
~Randy

2023-02-25 17:52:28

by Tom Rix

[permalink] [raw]
Subject: Re: [PATCH] tty: serial: fsl_lpuart: select SERIAL_FSL_LPUART for SERIAL_FSL_LPUART_CONSOLE


On 2/25/23 9:46 AM, Randy Dunlap wrote:
> Hi--
>
> On 2/25/23 09:39, Tom Rix wrote:
>> A rand config causes this link error
>> ld: drivers/tty/serial/earlycon.o: in function `parse_options':
>> drivers/tty/serial/earlycon.c:99: undefined reference to `uart_parse_earlycon'
>>
>> The rand config has
>> CONFIG_SERIAL_CORE=m
>> CONFIG_SERIAL_EARLYCON=y
>> CONFIG_SERIAL_FSL_LPUART=m
>> CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
>>
>> SERIAL_FSL_LPUART should have been selected instead of depends on-ed.
>>
>> Signed-off-by: Tom Rix <[email protected]>
>> ---
>> drivers/tty/serial/Kconfig | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
>> index 625358f44419..b24d74d389fc 100644
>> --- a/drivers/tty/serial/Kconfig
>> +++ b/drivers/tty/serial/Kconfig
>> @@ -1313,7 +1313,7 @@ config SERIAL_FSL_LPUART
>>
>> config SERIAL_FSL_LPUART_CONSOLE
>> bool "Console on Freescale lpuart serial port"
>> - depends on SERIAL_FSL_LPUART
>> + select SERIAL_FSL_LPUART
> Most other _CONSOLE Kconfig have:
>
> depends on SERIAL_FSL_LPUART=y

commit 5779a072c248db7a40cfd0f5ea958097fd1d9a30 removed the =y. so it
could be built as a module.

Tom

>
> e.g.
>
> but I noticed a few others with a similar problem.
>
>> select SERIAL_CORE_CONSOLE
>> select SERIAL_EARLYCON
>> help


2023-02-25 18:03:48

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH] tty: serial: fsl_lpuart: select SERIAL_FSL_LPUART for SERIAL_FSL_LPUART_CONSOLE



On 2/25/23 09:51, Tom Rix wrote:
>
> On 2/25/23 9:46 AM, Randy Dunlap wrote:
>> Hi--
>>
>> On 2/25/23 09:39, Tom Rix wrote:
>>> A rand config causes this link error
>>> ld: drivers/tty/serial/earlycon.o: in function `parse_options':
>>> drivers/tty/serial/earlycon.c:99: undefined reference to `uart_parse_earlycon'
>>>
>>> The rand config has
>>> CONFIG_SERIAL_CORE=m
>>> CONFIG_SERIAL_EARLYCON=y
>>> CONFIG_SERIAL_FSL_LPUART=m
>>> CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
>>>
>>> SERIAL_FSL_LPUART should have been selected instead of depends on-ed.
>>>
>>> Signed-off-by: Tom Rix <[email protected]>
>>> ---
>>>   drivers/tty/serial/Kconfig | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
>>> index 625358f44419..b24d74d389fc 100644
>>> --- a/drivers/tty/serial/Kconfig
>>> +++ b/drivers/tty/serial/Kconfig
>>> @@ -1313,7 +1313,7 @@ config SERIAL_FSL_LPUART
>>>     config SERIAL_FSL_LPUART_CONSOLE
>>>       bool "Console on Freescale lpuart serial port"
>>> -    depends on SERIAL_FSL_LPUART
>>> +    select SERIAL_FSL_LPUART
>> Most other _CONSOLE Kconfig have:
>>
>>     depends on SERIAL_FSL_LPUART=y
>
> commit 5779a072c248db7a40cfd0f5ea958097fd1d9a30 removed the =y. so it could be built as a module.
>

uh. But it's still a bool, not a tristate. How does that work?

>
>>
>> e.g.
>>
>> but I noticed a few others with a similar problem.
>>
>>>       select SERIAL_CORE_CONSOLE
>>>       select SERIAL_EARLYCON
>>>       help
>

--
~Randy

2023-02-25 18:16:11

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH] tty: serial: fsl_lpuart: select SERIAL_FSL_LPUART for SERIAL_FSL_LPUART_CONSOLE



On 2/25/23 10:03, Randy Dunlap wrote:
>
>
> On 2/25/23 09:51, Tom Rix wrote:
>>
>> On 2/25/23 9:46 AM, Randy Dunlap wrote:
>>> Hi--
>>>
>>> On 2/25/23 09:39, Tom Rix wrote:
>>>> A rand config causes this link error
>>>> ld: drivers/tty/serial/earlycon.o: in function `parse_options':
>>>> drivers/tty/serial/earlycon.c:99: undefined reference to `uart_parse_earlycon'
>>>>
>>>> The rand config has
>>>> CONFIG_SERIAL_CORE=m
>>>> CONFIG_SERIAL_EARLYCON=y
>>>> CONFIG_SERIAL_FSL_LPUART=m
>>>> CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
>>>>
>>>> SERIAL_FSL_LPUART should have been selected instead of depends on-ed.
>>>>
>>>> Signed-off-by: Tom Rix <[email protected]>
>>>> ---
>>>>   drivers/tty/serial/Kconfig | 2 +-
>>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
>>>> index 625358f44419..b24d74d389fc 100644
>>>> --- a/drivers/tty/serial/Kconfig
>>>> +++ b/drivers/tty/serial/Kconfig
>>>> @@ -1313,7 +1313,7 @@ config SERIAL_FSL_LPUART
>>>>     config SERIAL_FSL_LPUART_CONSOLE
>>>>       bool "Console on Freescale lpuart serial port"
>>>> -    depends on SERIAL_FSL_LPUART
>>>> +    select SERIAL_FSL_LPUART
>>> Most other _CONSOLE Kconfig have:
>>>
>>>     depends on SERIAL_FSL_LPUART=y
>>
>> commit 5779a072c248db7a40cfd0f5ea958097fd1d9a30 removed the =y. so it could be built as a module.
>>
>
> uh. But it's still a bool, not a tristate. How does that work?

OK, I see. :)

Well, I don't see another decent solution ATM.

Tom, does your patch fix the build error?

What are the listed CONFIG settings after the patch?

Thanks.

>>> e.g.
>>>
>>> but I noticed a few others with a similar problem.
>>>
>>>>       select SERIAL_CORE_CONSOLE
>>>>       select SERIAL_EARLYCON
>>>>       help
>>
>

--
~Randy

2023-02-25 18:39:04

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH] tty: serial: fsl_lpuart: select SERIAL_FSL_LPUART for SERIAL_FSL_LPUART_CONSOLE



On 2/25/23 10:16, Randy Dunlap wrote:
>
>
> On 2/25/23 10:03, Randy Dunlap wrote:
>>
>>
>> On 2/25/23 09:51, Tom Rix wrote:
>>>
>>> On 2/25/23 9:46 AM, Randy Dunlap wrote:
>>>> Hi--
>>>>
>>>> On 2/25/23 09:39, Tom Rix wrote:
>>>>> A rand config causes this link error
>>>>> ld: drivers/tty/serial/earlycon.o: in function `parse_options':
>>>>> drivers/tty/serial/earlycon.c:99: undefined reference to `uart_parse_earlycon'
>>>>>
>>>>> The rand config has
>>>>> CONFIG_SERIAL_CORE=m
>>>>> CONFIG_SERIAL_EARLYCON=y
>>>>> CONFIG_SERIAL_FSL_LPUART=m
>>>>> CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
>>>>>
>>>>> SERIAL_FSL_LPUART should have been selected instead of depends on-ed.
>>>>>
>>>>> Signed-off-by: Tom Rix <[email protected]>
>>>>> ---
>>>>>   drivers/tty/serial/Kconfig | 2 +-
>>>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
>>>>> index 625358f44419..b24d74d389fc 100644
>>>>> --- a/drivers/tty/serial/Kconfig
>>>>> +++ b/drivers/tty/serial/Kconfig
>>>>> @@ -1313,7 +1313,7 @@ config SERIAL_FSL_LPUART
>>>>>     config SERIAL_FSL_LPUART_CONSOLE
>>>>>       bool "Console on Freescale lpuart serial port"
>>>>> -    depends on SERIAL_FSL_LPUART
>>>>> +    select SERIAL_FSL_LPUART
>>>> Most other _CONSOLE Kconfig have:
>>>>
>>>>     depends on SERIAL_FSL_LPUART=y
>>>
>>> commit 5779a072c248db7a40cfd0f5ea958097fd1d9a30 removed the =y. so it could be built as a module.
>>>
>>
>> uh. But it's still a bool, not a tristate. How does that work?
>
> OK, I see. :)
>
> Well, I don't see another decent solution ATM.
>
> Tom, does your patch fix the build error?
>
> What are the listed CONFIG settings after the patch?

OK, after I apply the patch, all of the listed config symbols are
changed to =y (builtin), so not built as a loadable module.

Do you see something different?


>>>> e.g.
>>>>
>>>> but I noticed a few others with a similar problem.
>>>>
>>>>>       select SERIAL_CORE_CONSOLE
>>>>>       select SERIAL_EARLYCON
>>>>>       help
>>>
>>
>

--
~Randy

2023-02-26 15:25:26

by Tom Rix

[permalink] [raw]
Subject: Re: [PATCH] tty: serial: fsl_lpuart: select SERIAL_FSL_LPUART for SERIAL_FSL_LPUART_CONSOLE


On 2/25/23 10:38 AM, Randy Dunlap wrote:
>
> On 2/25/23 10:16, Randy Dunlap wrote:
>>
>> On 2/25/23 10:03, Randy Dunlap wrote:
>>>
>>> On 2/25/23 09:51, Tom Rix wrote:
>>>> On 2/25/23 9:46 AM, Randy Dunlap wrote:
>>>>> Hi--
>>>>>
>>>>> On 2/25/23 09:39, Tom Rix wrote:
>>>>>> A rand config causes this link error
>>>>>> ld: drivers/tty/serial/earlycon.o: in function `parse_options':
>>>>>> drivers/tty/serial/earlycon.c:99: undefined reference to `uart_parse_earlycon'
>>>>>>
>>>>>> The rand config has
>>>>>> CONFIG_SERIAL_CORE=m
>>>>>> CONFIG_SERIAL_EARLYCON=y
>>>>>> CONFIG_SERIAL_FSL_LPUART=m
>>>>>> CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
>>>>>>
>>>>>> SERIAL_FSL_LPUART should have been selected instead of depends on-ed.
>>>>>>
>>>>>> Signed-off-by: Tom Rix <[email protected]>
>>>>>> ---
>>>>>>   drivers/tty/serial/Kconfig | 2 +-
>>>>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
>>>>>> index 625358f44419..b24d74d389fc 100644
>>>>>> --- a/drivers/tty/serial/Kconfig
>>>>>> +++ b/drivers/tty/serial/Kconfig
>>>>>> @@ -1313,7 +1313,7 @@ config SERIAL_FSL_LPUART
>>>>>>     config SERIAL_FSL_LPUART_CONSOLE
>>>>>>       bool "Console on Freescale lpuart serial port"
>>>>>> -    depends on SERIAL_FSL_LPUART
>>>>>> +    select SERIAL_FSL_LPUART
>>>>> Most other _CONSOLE Kconfig have:
>>>>>
>>>>>     depends on SERIAL_FSL_LPUART=y
>>>> commit 5779a072c248db7a40cfd0f5ea958097fd1d9a30 removed the =y. so it could be built as a module.
>>>>
>>> uh. But it's still a bool, not a tristate. How does that work?
>> OK, I see. :)
>>
>> Well, I don't see another decent solution ATM.
>>
>> Tom, does your patch fix the build error?
>>
>> What are the listed CONFIG settings after the patch?
> OK, after I apply the patch, all of the listed config symbols are
> changed to =y (builtin), so not built as a loadable module.
>
> Do you see something different?

No, all y's.

Since the showing the after state is useful, I added it to v2

>
>
>>>>> e.g.
>>>>>
>>>>> but I noticed a few others with a similar problem.
>>>>>
>>>>>>       select SERIAL_CORE_CONSOLE
>>>>>>       select SERIAL_EARLYCON
>>>>>>       help