[U-Boot] [PATCH] Fixing `can't find crc32.c' error on non Linux platform

Arnaud Lacombe lacombar at gmail.com
Mon Nov 23 07:37:35 CET 2009


This is a quick and dirty patch to fix the build on a NetBSD platform,
using Linux binary compatibility to run ELDK 4.2 toolchain for ARM.

It is not intended for any kind of inclusion, but might give some hints
about
what's wrong or allow people not to give up on this error. A couple of other
nits need to be sorted out to have a fully clean build on NetBSD (sha1.h
inclusion error, missing getline(3), etc.).

Build "succeeded" with GNU Make 3.81.

Signed-off-by: Arnaud Lacombe <lacombar at gmail.com>
---
 tools/Makefile |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/tools/Makefile b/tools/Makefile
index b04e3f3..a4634d1 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -83,13 +83,6 @@ BIN_FILES-y += mkimage$(SFX)
 BIN_FILES-$(CONFIG_NETCONSOLE) += ncb$(SFX)
 BIN_FILES-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1$(SFX)

-# Source files which exist outside the tools directory
-EXT_OBJ_FILES-y += common/env_embedded.o
-EXT_OBJ_FILES-y += common/image.o
-EXT_OBJ_FILES-y += lib_generic/crc32.o
-EXT_OBJ_FILES-y += lib_generic/md5.o
-EXT_OBJ_FILES-y += lib_generic/sha1.o
-
 # Source files located in the tools directory
 OBJ_FILES-$(CONFIG_LCD_LOGO) += bmp_logo.o
 OBJ_FILES-$(CONFIG_VIDEO_LOGO) += bmp_logo.o
@@ -134,9 +127,7 @@ LOGO_BMP= logos/ronetix.bmp
 endif

 # now $(obj) is defined
-SRCS	+= $(addprefix $(SRCTREE)/,$(EXT_OBJ_FILES-y:.o=.c))
 SRCS	+= $(addprefix $(SRCTREE)/tools/,$(OBJ_FILES-y:.o=.c))
-SRCS	+= $(addprefix $(SRCTREE)/libfdt/,$(LIBFDT_OBJ_FILES-y:.o=.c))
 BINS	:= $(addprefix $(obj),$(sort $(BIN_FILES-y)))
 LIBFDT_OBJS	:= $(addprefix $(obj),$(LIBFDT_OBJ_FILES-y))

@@ -197,6 +188,7 @@ $(obj)mkimage$(SFX):	$(obj)crc32.o \
 			$(obj)sha1.o \
 			$(LIBFDT_OBJS)
 	$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
+
 	$(STRIP) $@

 $(obj)mpc86x_clk$(SFX):	$(obj)mpc86x_clk.o
@@ -236,8 +228,8 @@ $(obj)%.o: $(SRCTREE)/common/%.c
 $(obj)%.o: $(SRCTREE)/lib_generic/%.c
 	$(CC) -g $(CFLAGS) -c -o $@ $<

-$(LIBFDT_OBJS):
-	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
+$(obj)%.o: $(SRCTREE)/libfdt/%.c
+	$(CC) -g $(CFLAGS) -c -o $@ $<

 subdirs:
 ifeq ($(TOOLSUBDIRS),)
-- 
1.6.3.3.385.g60647.dirty



More information about the U-Boot mailing list