* [PATCH 1/1] sandbox: allow building sandbox_spl with CONFIG_DEBUG
@ 2023-02-18 8:33 Heinrich Schuchardt
2023-02-21 19:35 ` Simon Glass
0 siblings, 1 reply; 5+ messages in thread
From: Heinrich Schuchardt @ 2023-02-18 8:33 UTC (permalink / raw)
To: Simon Glass; +Cc: Michal Simek, u-boot, Heinrich Schuchardt
Building sandbox_spl with CONFIG_DEBUG leads to errors due to missing
symbols:
/usr/bin/ld: common/spl/spl_fit.o: in function `spl_fit_upload_fpga':
common/spl/spl_fit.c:595: undefined reference to `fpga_load'
/usr/bin/ld: test/test-main.o: in function `dm_test_post_run':
test/test-main.c:124: undefined reference to `crc8'
/usr/bin/ld: test/test-main.o: in function `dm_test_pre_run':
test/test-main.c:95: undefined reference to `crc8'
collect2: error: ld returned 1 exit status
This is due to -Og not eliminating unused functions.
Add FPGA and CRC8 support to the defconfig. Sandbox tests for
SPL_FPGA and CRC8 should be created. So enabling these setting
is advised anyway.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
configs/sandbox_spl_defconfig | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/configs/sandbox_spl_defconfig b/configs/sandbox_spl_defconfig
index 4e0021a76f..851c3b687a 100644
--- a/configs/sandbox_spl_defconfig
+++ b/configs/sandbox_spl_defconfig
@@ -33,6 +33,7 @@ CONFIG_SPL_NO_BSS_LIMIT=y
CONFIG_HANDOFF=y
CONFIG_SPL_BOARD_INIT=y
CONFIG_SPL_ENV_SUPPORT=y
+CONFIG_SPL_FPGA=y
CONFIG_SPL_I2C=y
CONFIG_SPL_RTC=y
CONFIG_CMD_CPU=y
@@ -126,6 +127,8 @@ CONFIG_DM_DEMO=y
CONFIG_DM_DEMO_SIMPLE=y
CONFIG_DM_DEMO_SHAPE=y
CONFIG_SPL_FIRMWARE=y
+CONFIG_DM_FPGA=y
+CONFIG_SANDBOX_FPGA=y
CONFIG_GPIO_HOG=y
CONFIG_QCOM_PMIC_GPIO=y
CONFIG_SANDBOX_GPIO=y
@@ -237,6 +240,7 @@ CONFIG_FS_CRAMFS=y
CONFIG_CMD_DHRYSTONE=y
CONFIG_RSA_VERIFY_WITH_PKEY=y
CONFIG_TPM=y
+CONFIG_SPL_CRC8=y
CONFIG_LZ4=y
CONFIG_ZSTD=y
CONFIG_ERRNO_STR=y
--
2.38.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] sandbox: allow building sandbox_spl with CONFIG_DEBUG
2023-02-18 8:33 [PATCH 1/1] sandbox: allow building sandbox_spl with CONFIG_DEBUG Heinrich Schuchardt
@ 2023-02-21 19:35 ` Simon Glass
2023-02-24 13:59 ` Eugen Hristev
0 siblings, 1 reply; 5+ messages in thread
From: Simon Glass @ 2023-02-21 19:35 UTC (permalink / raw)
To: Heinrich Schuchardt; +Cc: Michal Simek, u-boot
On Sat, 18 Feb 2023 at 01:34, Heinrich Schuchardt
<heinrich.schuchardt@canonical.com> wrote:
>
> Building sandbox_spl with CONFIG_DEBUG leads to errors due to missing
> symbols:
>
> /usr/bin/ld: common/spl/spl_fit.o: in function `spl_fit_upload_fpga':
> common/spl/spl_fit.c:595: undefined reference to `fpga_load'
> /usr/bin/ld: test/test-main.o: in function `dm_test_post_run':
> test/test-main.c:124: undefined reference to `crc8'
> /usr/bin/ld: test/test-main.o: in function `dm_test_pre_run':
> test/test-main.c:95: undefined reference to `crc8'
> collect2: error: ld returned 1 exit status
>
> This is due to -Og not eliminating unused functions.
>
> Add FPGA and CRC8 support to the defconfig. Sandbox tests for
> SPL_FPGA and CRC8 should be created. So enabling these setting
> is advised anyway.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
> configs/sandbox_spl_defconfig | 4 ++++
> 1 file changed, 4 insertions(+)
>
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] sandbox: allow building sandbox_spl with CONFIG_DEBUG
2023-02-21 19:35 ` Simon Glass
@ 2023-02-24 13:59 ` Eugen Hristev
2023-02-26 14:56 ` Simon Glass
2023-03-01 20:14 ` Simon Glass
0 siblings, 2 replies; 5+ messages in thread
From: Eugen Hristev @ 2023-02-24 13:59 UTC (permalink / raw)
To: Simon Glass, Heinrich Schuchardt; +Cc: Michal Simek, u-boot
On 2/21/23 21:35, Simon Glass wrote:
> On Sat, 18 Feb 2023 at 01:34, Heinrich Schuchardt
> <heinrich.schuchardt@canonical.com> wrote:
>>
>> Building sandbox_spl with CONFIG_DEBUG leads to errors due to missing
>> symbols:
>>
>> /usr/bin/ld: common/spl/spl_fit.o: in function `spl_fit_upload_fpga':
>> common/spl/spl_fit.c:595: undefined reference to `fpga_load'
>> /usr/bin/ld: test/test-main.o: in function `dm_test_post_run':
>> test/test-main.c:124: undefined reference to `crc8'
>> /usr/bin/ld: test/test-main.o: in function `dm_test_pre_run':
>> test/test-main.c:95: undefined reference to `crc8'
>> collect2: error: ld returned 1 exit status
>>
>> This is due to -Og not eliminating unused functions.
>>
>> Add FPGA and CRC8 support to the defconfig. Sandbox tests for
>> SPL_FPGA and CRC8 should be created. So enabling these setting
>> is advised anyway.
>>
>> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
>> ---
>> configs/sandbox_spl_defconfig | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Hello Heinrich, Simon,
I am facing similar issues on different defconfig when enabling
OPTIMIZE_DEBUG.
I don't think enabling SPL_FPGA and DM_FPGA is the solution there.
Do you know why is the drivers/fpga/fpga.c built all the time, with no
Kconfig selected ?
I think that maybe spl_fit_upload_fpga and fpga_load should be built
conditionally , I would like to have SPL load a FIT, but not anything
related to FPGA in my config.
Thanks,
Eugen
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] sandbox: allow building sandbox_spl with CONFIG_DEBUG
2023-02-24 13:59 ` Eugen Hristev
@ 2023-02-26 14:56 ` Simon Glass
2023-03-01 20:14 ` Simon Glass
1 sibling, 0 replies; 5+ messages in thread
From: Simon Glass @ 2023-02-26 14:56 UTC (permalink / raw)
To: Eugen Hristev; +Cc: Heinrich Schuchardt, Michal Simek, u-boot
Hi Eugen,
On Fri, 24 Feb 2023 at 06:59, Eugen Hristev <eugen.hristev@collabora.com> wrote:
>
> On 2/21/23 21:35, Simon Glass wrote:
> > On Sat, 18 Feb 2023 at 01:34, Heinrich Schuchardt
> > <heinrich.schuchardt@canonical.com> wrote:
> >>
> >> Building sandbox_spl with CONFIG_DEBUG leads to errors due to missing
> >> symbols:
> >>
> >> /usr/bin/ld: common/spl/spl_fit.o: in function `spl_fit_upload_fpga':
> >> common/spl/spl_fit.c:595: undefined reference to `fpga_load'
> >> /usr/bin/ld: test/test-main.o: in function `dm_test_post_run':
> >> test/test-main.c:124: undefined reference to `crc8'
> >> /usr/bin/ld: test/test-main.o: in function `dm_test_pre_run':
> >> test/test-main.c:95: undefined reference to `crc8'
> >> collect2: error: ld returned 1 exit status
> >>
> >> This is due to -Og not eliminating unused functions.
> >>
> >> Add FPGA and CRC8 support to the defconfig. Sandbox tests for
> >> SPL_FPGA and CRC8 should be created. So enabling these setting
> >> is advised anyway.
> >>
> >> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> >> ---
> >> configs/sandbox_spl_defconfig | 4 ++++
> >> 1 file changed, 4 insertions(+)
> >>
> >
> > Reviewed-by: Simon Glass <sjg@chromium.org>
>
> Hello Heinrich, Simon,
>
> I am facing similar issues on different defconfig when enabling
> OPTIMIZE_DEBUG.
> I don't think enabling SPL_FPGA and DM_FPGA is the solution there.
> Do you know why is the drivers/fpga/fpga.c built all the time, with no
> Kconfig selected ?
That's because the fpga/ directory itself is guarded.
> I think that maybe spl_fit_upload_fpga and fpga_load should be built
> conditionally , I would like to have SPL load a FIT, but not anything
> related to FPGA in my config.
Sounds right. Overall the FPGA subsystem could use some work, i.e. a
proper uclass API with methods, etc. There is discussion about it
elsewhere on the mailing list.
Regards,
Simon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] sandbox: allow building sandbox_spl with CONFIG_DEBUG
2023-02-24 13:59 ` Eugen Hristev
2023-02-26 14:56 ` Simon Glass
@ 2023-03-01 20:14 ` Simon Glass
1 sibling, 0 replies; 5+ messages in thread
From: Simon Glass @ 2023-03-01 20:14 UTC (permalink / raw)
To: Simon Glass; +Cc: Heinrich Schuchardt, Michal Simek, u-boot, Eugen Hristev
Hi Eugen,
On Fri, 24 Feb 2023 at 06:59, Eugen Hristev <eugen.hristev@collabora.com> wrote:
>
> On 2/21/23 21:35, Simon Glass wrote:
> > On Sat, 18 Feb 2023 at 01:34, Heinrich Schuchardt
> > <heinrich.schuchardt@canonical.com> wrote:
> >>
> >> Building sandbox_spl with CONFIG_DEBUG leads to errors due to missing
> >> symbols:
> >>
> >> /usr/bin/ld: common/spl/spl_fit.o: in function `spl_fit_upload_fpga':
> >> common/spl/spl_fit.c:595: undefined reference to `fpga_load'
> >> /usr/bin/ld: test/test-main.o: in function `dm_test_post_run':
> >> test/test-main.c:124: undefined reference to `crc8'
> >> /usr/bin/ld: test/test-main.o: in function `dm_test_pre_run':
> >> test/test-main.c:95: undefined reference to `crc8'
> >> collect2: error: ld returned 1 exit status
> >>
> >> This is due to -Og not eliminating unused functions.
> >>
> >> Add FPGA and CRC8 support to the defconfig. Sandbox tests for
> >> SPL_FPGA and CRC8 should be created. So enabling these setting
> >> is advised anyway.
> >>
> >> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> >> ---
> >> configs/sandbox_spl_defconfig | 4 ++++
> >> 1 file changed, 4 insertions(+)
> >>
> >
> > Reviewed-by: Simon Glass <sjg@chromium.org>
>
> Hello Heinrich, Simon,
>
> I am facing similar issues on different defconfig when enabling
> OPTIMIZE_DEBUG.
> I don't think enabling SPL_FPGA and DM_FPGA is the solution there.
> Do you know why is the drivers/fpga/fpga.c built all the time, with no
> Kconfig selected ?
That's because the fpga/ directory itself is guarded.
> I think that maybe spl_fit_upload_fpga and fpga_load should be built
> conditionally , I would like to have SPL load a FIT, but not anything
> related to FPGA in my config.
Sounds right. Overall the FPGA subsystem could use some work, i.e. a
proper uclass API with methods, etc. There is discussion about it
elsewhere on the mailing list.
Regards,
Simon
Applied to u-boot-dm, thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-03-01 20:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-18 8:33 [PATCH 1/1] sandbox: allow building sandbox_spl with CONFIG_DEBUG Heinrich Schuchardt
2023-02-21 19:35 ` Simon Glass
2023-02-24 13:59 ` Eugen Hristev
2023-02-26 14:56 ` Simon Glass
2023-03-01 20:14 ` Simon Glass
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.