misc: Makefile: Add condition on build i2c_eeprom
PATCH 1/1 misc: Makefile: Add condition on build i2c_eeprom
The i2c_eeprom isn't always necessary when building for SPL, add the condition on build i2c_eeprom.
---
drivers/misc/Makefile | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/misc/Makefile +6 -0
@@ -20,7 +20,13 @@ obj-$(CONFIG_CROS_EC_SPI) += cros_ec_spi.o endif obj-$(CONFIG_FSL_IIM) += fsl_iim.o obj-$(CONFIG_LED_STATUS_GPIO) += gpio_led.o +ifdef CONFIG_SPL_BUILD +ifneq ($(CONFIG_SPL_I2C_SUPPORT),) +obj-$(CONFIG_I2C_EEPROM) += i2c_eeprom.o +endif +else obj-$(CONFIG_I2C_EEPROM) += i2c_eeprom.o +endif obj-$(CONFIG_FSL_MC9SDZ60) += mc9sdz60.o obj-$(CONFIG_MXC_OCOTP) += mxc_ocotp.o obj-$(CONFIG_MXS_OCOTP) += mxs_ocotp.o
Signature · 1 line
2.13.0
PATCH 1/1 misc: Makefile: Add condition on build i2c_eeprom
Quoted 17 lines · Wenyou Yang
The
i2c_eepromisn't always necessary when building for SPL, add the condition on buildi2c_eeprom.Signed-off-by Wenyou Yang <[email protected]>---
drivers/misc/Makefile | 6 ++++++ 1 file changed, 6 insertions(+)drivers/misc/Makefile +0
-0@@ -20,7 +20,13 @@ obj-$(CONFIG_CROS_EC_SPI) += cros_ec_spi.o endif obj-$(CONFIG_FSL_IIM) += fsl_iim.o obj-$(CONFIG_LED_STATUS_GPIO) += gpio_led.o
drivers/misc/Makefile obj-$(CONFIG_CROS_EC_SPI) += cros_ec_spi.o · line 32
Quoted 10 lines
drivers/misc/Makefile +6
-0+ifdef CONFIG_SPL_BUILD +ifneq ($(CONFIG_SPL_I2C_SUPPORT),) +obj-$(CONFIG_I2C_EEPROM) += i2c_eeprom.o +endif +else obj-$(CONFIG_I2C_EEPROM) += i2c_eeprom.o +endif obj-$(CONFIG_FSL_MC9SDZ60) += mc9sdz60.o obj-$(CONFIG_MXC_OCOTP) += mxc_ocotp.o obj-$(CONFIG_MXS_OCOTP) += mxs_ocotp.o
What's wrong with building this when not required? Build failure? If so, we should add SPL_I2C_EEPROM and then the above becomes obj-$(CONFIG_$(SPL_)I2C_EEPROM) += i2c_eeprom.o
or so. Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170802/c572df81/attachment.sig>
Yang
PATCH 1/1 misc: Makefile: Add condition on build i2c_eeprom
Hi Tom,
Quoted 25 lines · Tom Rini
Quoted 23 lines · Wenyou Yang
The
i2c_eepromisn't always necessary when building for SPL, add the condition on buildi2c_eeprom.Signed-off-by Wenyou Yang <[email protected]>---
drivers/misc/Makefile | 6 ++++++ 1 file changed, 6 insertions(+)drivers/misc/Makefile +5
-0@@ -20,7 +20,13 @@ obj-$(CONFIG_CROS_EC_SPI) += cros_ec_spi.o endif obj-$(CONFIG_FSL_IIM) += fsl_iim.o obj-$(CONFIG_LED_STATUS_GPIO) += gpio_led.o +ifdef CONFIG_SPL_BUILD +ifneq ($(CONFIG_SPL_I2C_SUPPORT),) +obj-$(CONFIG_I2C_EEPROM) += i2c_eeprom.o +endif +else obj-$(CONFIG_I2C_EEPROM) += i2c_eeprom.o
Quoted 8 lines
drivers/misc/Makefile obj-$(CONFIG_CROS_EC_SPI) += cros_ec_spi.o · line 32
Quoted 4 lines
drivers/misc/Makefile +1
-0+endif obj-$(CONFIG_FSL_MC9SDZ60) += mc9sdz60.o obj-$(CONFIG_MXC_OCOTP) += mxc_ocotp.o obj-$(CONFIG_MXS_OCOTP) += mxs_ocotp.oWhat's wrong with building this when not required? Build failure? If so, we should add
SPL_I2C_EEPROMand then the above becomes obj-$(CONFIG_$(SPL_)I2C_EEPROM) += i2c_eeprom.o
or so. Thanks!
Yes, build failure.
if CONFIG_SPL_I2C_SUPPORT isn't enabled, it failed to build u-boot-spl with the following error.
---8<---drivers/built-in.o: In function `i2c_eeprom_std_read':/home/wyang/work/linux4sam/u-boot-at91/drivers/misc/i2c_eeprom.c:36:
undefined reference to `dm_i2c_read' scripts/Makefile.spl:333: recipe for target 'spl/u-boot-spl' failed --->8---
Add SPL_I2C_EEPROM is a good idea, I will send a patch.
Thank you.
Best Regards,
Wenyou Yang