Message ID | 20200311070320.21323-5-pragnesh.patel@sifive.com |
---|---|
State | New |
Headers | show |
Series | RISC-V SiFive FU540 support SPL | expand |
On Wed, Mar 11, 2020 at 3:04 PM Pragnesh Patel <pragnesh.patel at sifive.com> wrote: > > When build U-boot SPL, meet an issue of undefined reference to nits: U-Boot > 'crc7' for drivers/mmc/mmc_spi.c, so let's compile crc7.c when > CONFIG_MMC_SPI selected. > > Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com> > --- > common/spl/Kconfig | 7 +++++++ > lib/Makefile | 1 + > 2 files changed, 8 insertions(+) > > diff --git a/common/spl/Kconfig b/common/spl/Kconfig > index b03a476b9f..f93f552f5e 100644 > --- a/common/spl/Kconfig > +++ b/common/spl/Kconfig > @@ -401,6 +401,13 @@ config SPL_CRC32_SUPPORT > for detected accidental image corruption. For secure applications you > should consider SHA1 or SHA256. > > +config SPL_CRC7_SUPPORT > + bool "Support CRC7" > + default y if MMC_SPI This dependency should be set in the MMPC_SPI driver with a "select". The driver cannot work without it. > + help > + Enable CRC7 hashing for drivers which are using in SPL. > + This is a 32-bit checksum value that can be used to verify images. > + > config SPL_MD5_SUPPORT > bool "Support MD5" > depends on SPL_FIT > diff --git a/lib/Makefile b/lib/Makefile > index 15259d0473..7a50aa56ef 100644 > --- a/lib/Makefile > +++ b/lib/Makefile > @@ -78,6 +78,7 @@ endif > > ifdef CONFIG_SPL_BUILD > obj-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16.o > +obj-$(CONFIG_SPL_CRC7_SUPPORT) += crc7.o > obj-$(CONFIG_$(SPL_TPL_)HASH_SUPPORT) += crc16.o > obj-y += net_utils.o > endif > -- Regards, Bin
Hi Bin, >-----Original Message----- >From: Bin Meng <bmeng.cn at gmail.com> >Sent: 11 March 2020 19:22 >To: Pragnesh Patel <pragnesh.patel at sifive.com> >Cc: U-Boot Mailing List <u-boot at lists.denx.de>; Atish Patra ><atish.patra at wdc.com>; Palmer Dabbelt <palmerdabbelt at google.com>; Paul >Walmsley <paul.walmsley at sifive.com>; Jagan Teki ><jagan at amarulasolutions.com>; Troy Benjegerdes ><troy.benjegerdes at sifive.com>; Anup Patel <anup.patel at wdc.com>; Sagar >Kadam <sagar.kadam at sifive.com>; Rick Chen <rick at andestech.com>; Lukasz >Majewski <lukma at denx.de>; Simon Goldschmidt ><simon.k.r.goldschmidt at gmail.com>; Simon Glass <sjg at chromium.org>; >Markus Klotzbuecher <markus.klotzbuecher at kistler.com>; Baruch Siach ><baruch at tkos.co.il>; Anatolij Gustschin <agust at denx.de>; Thomas Hebb ><tommyhebb at gmail.com>; AKASHI Takahiro <takahiro.akashi at linaro.org>; >Marek Beh?n <marek.behun at nic.cz>; Philippe Reynes ><philippe.reynes at softathome.com>; Heinrich Schuchardt ><xypron.glpk at gmx.de>; Peng Fan <peng.fan at nxp.com> >Subject: Re: [PATCH v5 04/14] lib: Makefile: build crc7.c when >CONFIG_MMC_SPI > >On Wed, Mar 11, 2020 at 3:04 PM Pragnesh Patel ><pragnesh.patel at sifive.com> wrote: >> >> When build U-boot SPL, meet an issue of undefined reference to > >nits: U-Boot Will update. > >> 'crc7' for drivers/mmc/mmc_spi.c, so let's compile crc7.c when >> CONFIG_MMC_SPI selected. >> >> Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com> >> --- >> common/spl/Kconfig | 7 +++++++ >> lib/Makefile | 1 + >> 2 files changed, 8 insertions(+) >> >> diff --git a/common/spl/Kconfig b/common/spl/Kconfig index >> b03a476b9f..f93f552f5e 100644 >> --- a/common/spl/Kconfig >> +++ b/common/spl/Kconfig >> @@ -401,6 +401,13 @@ config SPL_CRC32_SUPPORT >> for detected accidental image corruption. For secure applications you >> should consider SHA1 or SHA256. >> >> +config SPL_CRC7_SUPPORT >> + bool "Support CRC7" >> + default y if MMC_SPI > >This dependency should be set in the MMPC_SPI driver with a "select". >The driver cannot work without it. Okay, will update in v6. Thanks for the review. > >> + help >> + Enable CRC7 hashing for drivers which are using in SPL. >> + This is a 32-bit checksum value that can be used to verify images. >> + >> config SPL_MD5_SUPPORT >> bool "Support MD5" >> depends on SPL_FIT >> diff --git a/lib/Makefile b/lib/Makefile index 15259d0473..7a50aa56ef >> 100644 >> --- a/lib/Makefile >> +++ b/lib/Makefile >> @@ -78,6 +78,7 @@ endif >> >> ifdef CONFIG_SPL_BUILD >> obj-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16.o >> +obj-$(CONFIG_SPL_CRC7_SUPPORT) += crc7.o >> obj-$(CONFIG_$(SPL_TPL_)HASH_SUPPORT) += crc16.o obj-y += >> net_utils.o endif >> -- > >Regards, >Bin
diff --git a/common/spl/Kconfig b/common/spl/Kconfig index b03a476b9f..f93f552f5e 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -401,6 +401,13 @@ config SPL_CRC32_SUPPORT for detected accidental image corruption. For secure applications you should consider SHA1 or SHA256. +config SPL_CRC7_SUPPORT + bool "Support CRC7" + default y if MMC_SPI + help + Enable CRC7 hashing for drivers which are using in SPL. + This is a 32-bit checksum value that can be used to verify images. + config SPL_MD5_SUPPORT bool "Support MD5" depends on SPL_FIT diff --git a/lib/Makefile b/lib/Makefile index 15259d0473..7a50aa56ef 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -78,6 +78,7 @@ endif ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16.o +obj-$(CONFIG_SPL_CRC7_SUPPORT) += crc7.o obj-$(CONFIG_$(SPL_TPL_)HASH_SUPPORT) += crc16.o obj-y += net_utils.o endif
When build U-boot SPL, meet an issue of undefined reference to 'crc7' for drivers/mmc/mmc_spi.c, so let's compile crc7.c when CONFIG_MMC_SPI selected. Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com> --- common/spl/Kconfig | 7 +++++++ lib/Makefile | 1 + 2 files changed, 8 insertions(+)