Message ID | 20200513062617.19988-5-pragnesh.patel@sifive.com |
---|---|
State | Superseded |
Headers | show |
Series | RISC-V SiFive FU540 support SPL | expand |
On 13.05.20 08:26, Pragnesh Patel wrote: > 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> Reviewed-by: Heinrich Schuchardt <xypron.glpk at gmx.de> > --- > lib/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/Makefile b/lib/Makefile > index c6f862b0c2..a6812ea4a3 100644 > --- a/lib/Makefile > +++ b/lib/Makefile > @@ -30,7 +30,6 @@ obj-y += charset.o > endif > endif > obj-$(CONFIG_USB_TTY) += circbuf.o > -obj-y += crc7.o > obj-y += crc8.o > obj-y += crc16.o > obj-$(CONFIG_ERRNO_STR) += errno_str.o > @@ -90,6 +89,7 @@ obj-y += errno.o > obj-y += display_options.o > CFLAGS_display_options.o := $(if $(BUILD_TAG),-DBUILD_TAG='"$(BUILD_TAG)"') > obj-$(CONFIG_BCH) += bch.o > +obj-$(CONFIG_MMC_SPI) += crc7.o > obj-y += crc32.o > obj-$(CONFIG_CRC32C) += crc32c.o > obj-y += ctype.o >
On Wed, May 13, 2020 at 2:27 PM Pragnesh Patel <pragnesh.patel at sifive.com> wrote: > > 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> > --- > lib/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/Makefile b/lib/Makefile > index c6f862b0c2..a6812ea4a3 100644 > --- a/lib/Makefile > +++ b/lib/Makefile > @@ -30,7 +30,6 @@ obj-y += charset.o > endif > endif > obj-$(CONFIG_USB_TTY) += circbuf.o > -obj-y += crc7.o Why not change this line? > obj-y += crc8.o > obj-y += crc16.o > obj-$(CONFIG_ERRNO_STR) += errno_str.o > @@ -90,6 +89,7 @@ obj-y += errno.o > obj-y += display_options.o > CFLAGS_display_options.o := $(if $(BUILD_TAG),-DBUILD_TAG='"$(BUILD_TAG)"') > obj-$(CONFIG_BCH) += bch.o > +obj-$(CONFIG_MMC_SPI) += crc7.o but inserting the changes here? > obj-y += crc32.o > obj-$(CONFIG_CRC32C) += crc32c.o > obj-y += ctype.o > -- Regards, Bin
Am May 17, 2020 12:02:30 PM UTC schrieb Bin Meng <bmeng.cn at gmail.com>: >On Wed, May 13, 2020 at 2:27 PM Pragnesh Patel ><pragnesh.patel at sifive.com> wrote: >> >> 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> >> --- >> lib/Makefile | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/lib/Makefile b/lib/Makefile >> index c6f862b0c2..a6812ea4a3 100644 >> --- a/lib/Makefile >> +++ b/lib/Makefile >> @@ -30,7 +30,6 @@ obj-y += charset.o >> endif >> endif >> obj-$(CONFIG_USB_TTY) += circbuf.o >> -obj-y += crc7.o > >Why not change this line? This line is inside an if statement and ignored when building SPL. The patch fixes two issues: * building crc7 when not needed in main U-Boot * not building crc7 when required in SPL > >> obj-y += crc8.o >> obj-y += crc16.o >> obj-$(CONFIG_ERRNO_STR) += errno_str.o >> @@ -90,6 +89,7 @@ obj-y += errno.o >> obj-y += display_options.o >> CFLAGS_display_options.o := $(if >$(BUILD_TAG),-DBUILD_TAG='"$(BUILD_TAG)"') >> obj-$(CONFIG_BCH) += bch.o >> +obj-$(CONFIG_MMC_SPI) += crc7.o > >but inserting the changes here? This line is after the endif. Best regards Heinrich > >> obj-y += crc32.o >> obj-$(CONFIG_CRC32C) += crc32c.o >> obj-y += ctype.o >> -- > >Regards, >Bin
On Sun, May 17, 2020 at 10:28 PM Heinrich Schuchardt <xypron.glpk at gmx.de> wrote: > > Am May 17, 2020 12:02:30 PM UTC schrieb Bin Meng <bmeng.cn at gmail.com>: > >On Wed, May 13, 2020 at 2:27 PM Pragnesh Patel > ><pragnesh.patel at sifive.com> wrote: > >> > >> 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> > >> --- > >> lib/Makefile | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/lib/Makefile b/lib/Makefile > >> index c6f862b0c2..a6812ea4a3 100644 > >> --- a/lib/Makefile > >> +++ b/lib/Makefile > >> @@ -30,7 +30,6 @@ obj-y += charset.o > >> endif > >> endif > >> obj-$(CONFIG_USB_TTY) += circbuf.o > >> -obj-y += crc7.o > > > >Why not change this line? > > This line is inside an if statement and ignored when building SPL. > > The patch fixes two issues: > > * building crc7 when not needed in main U-Boot > * not building crc7 when required in SPL Thanks for the clarifications! Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
diff --git a/lib/Makefile b/lib/Makefile index c6f862b0c2..a6812ea4a3 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -30,7 +30,6 @@ obj-y += charset.o endif endif obj-$(CONFIG_USB_TTY) += circbuf.o -obj-y += crc7.o obj-y += crc8.o obj-y += crc16.o obj-$(CONFIG_ERRNO_STR) += errno_str.o @@ -90,6 +89,7 @@ obj-y += errno.o obj-y += display_options.o CFLAGS_display_options.o := $(if $(BUILD_TAG),-DBUILD_TAG='"$(BUILD_TAG)"') obj-$(CONFIG_BCH) += bch.o +obj-$(CONFIG_MMC_SPI) += crc7.o obj-y += crc32.o obj-$(CONFIG_CRC32C) += crc32c.o obj-y += ctype.o
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> --- lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)