public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Arnaud Lacombe <lacombar@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Fixing `can't find crc32.c' error on non Linux platform
Date: Mon, 23 Nov 2009 01:37:35 -0500	[thread overview]
Message-ID: <4B0A2DAF.3080908@gmail.com> (raw)

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@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

                 reply	other threads:[~2009-11-23  6:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B0A2DAF.3080908@gmail.com \
    --to=lacombar@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox