From patchwork Mon Sep 26 05:16:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 116356 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id E6877B6F80 for ; Mon, 26 Sep 2011 15:16:23 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5BDDD28265; Mon, 26 Sep 2011 07:16:22 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lJpMXawWP-9c; Mon, 26 Sep 2011 07:16:22 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E438528266; Mon, 26 Sep 2011 07:16:19 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4F16928266 for ; Mon, 26 Sep 2011 07:16:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7fb7vclsJ-gg for ; Mon, 26 Sep 2011 07:16:16 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by theia.denx.de (Postfix) with ESMTPS id 6AAF528265 for ; Mon, 26 Sep 2011 07:16:14 +0200 (CEST) Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 1D4041B4133; Mon, 26 Sep 2011 05:16:10 +0000 (UTC) From: Mike Frysinger Organization: wh0rd.org To: Simon Glass Date: Mon, 26 Sep 2011 01:16:08 -0400 User-Agent: KMail/1.13.7 (Linux/3.1.0-rc4; KDE/4.6.5; x86_64; ; ) References: <1316794942-24709-1-git-send-email-sjg@chromium.org> <1316794942-24709-14-git-send-email-sjg@chromium.org> In-Reply-To: <1316794942-24709-14-git-send-email-sjg@chromium.org> MIME-Version: 1.0 Message-Id: <201109260116.10005.vapier@gentoo.org> Cc: Andreas@theia.denx.de, U-Boot Mailing List Subject: Re: [U-Boot] [RFC PATCH v2 13/20] sandbox: Add OS dependent layer X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de On Friday, September 23, 2011 12:22:15 Simon Glass wrote: > arch/sandbox/cpu/sandbox/Makefile | 7 ++++- > arch/sandbox/cpu/sandbox/os.c | 49 you don't need to follow the "SoC" convention. arch/sandbox/cpu/*.c should work fine ... > --- a/arch/sandbox/cpu/sandbox/Makefile > +++ b/arch/sandbox/cpu/sandbox/Makefile > > +# I want to do this, but it doesn't seem to work > +CFLAGS_arch/sandbox/cpu/sandbox/os.o += -I/usr/include seems to work for me ... CFLAGS_arch/blackfin/lib/board.o = -ffoo if you edit config.mk like so, does that help you figure out what is wrong ? > --- /dev/null > +++ b/arch/sandbox/cpu/sandbox/os.c > > +int os_open(const char *pathname, int flags) > +{ > + return open(pathname, flags); > +} i guess since u-boot can't really create files, we don't need to support the 3rd arg (mode) ... what about creating file-backed flash devices on the fly ? -mike --- a/config.mk +++ b/config.mk @@ -280,6 +280,8 @@ $(obj)%.s: %.S $(CPP) $(ALL_AFLAGS) -o $@ $< $(obj)%.o: %.S + echo $(BCURDIR)/$(@F) + echo $(ALL_CFLAGS) $(CC) $(ALL_AFLAGS) -o $@ $< -c $(obj)%.o: %.c $(CC) $(ALL_CFLAGS) -o $@ $< -c