All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/4] spl, common, serial: build SPL without serial support
Date: Tue, 16 Jun 2015 07:21:06 +0200	[thread overview]
Message-ID: <557FB242.8080804@denx.de> (raw)
In-Reply-To: <20150615153213.GX1728@bill-the-cat>

Hello Tom,

Am 15.06.2015 17:32, schrieb Tom Rini:
> On Mon, Jun 15, 2015 at 02:20:59PM +0200, Heiko Schocher wrote:
>
>> This patch enables building SPL without
>> CONFIG_SPL_SERIAL_SUPPORT support.
>>
>> Signed-off-by: Heiko Schocher <hs@denx.de>
>
> I like that we're starting down this path.  But can you explain why we
> need each of these changes:

I try it ...

The determining change is in "include/common.h", which twist the
putc, puts, printf and vprintf functions to /dev/null ... so the
compiler/linker can drop all them ... all other changes are only
fixing compiler warnings, as for example vars no longer used ...

>>   arch/arm/lib/interrupts.c          | 4 ++--
>>   arch/arm/mach-at91/arm926ejs/cpu.c | 2 +-
>>   common/cli_readline.c              | 2 +-
>>   common/cli_simple.c                | 2 +-
>>   lib/display_options.c              | 4 ++--
>
> Having gone down the path of disabling output in SPL before due to size
> constraints I didn't need to modify those files (but it was on an older
> version)

Do you have a patch?

>>   common/image.c                     | 8 ++++++--
>
> In this case I just said we only need those functions (and their
> strings!) when we have SPL_SERIAL available.  It may be worth
> re-checking what parts of this file we really need available in SPL
> even.

Hmm... my change is only to get rid of compiler warning "var defined
but not used" with marking this vars with "__maybe_unused" ... so it
is the less intrusive way ...

If we have a header before the kernel image, we need functions from
here in SPL, and maybe FIT is sometime supported/used in SPL ...
maybe someone wants to print header info in SPL before booting it ...
so I do not know if this would be an easy job ...

>>   common/spl/spl.c                   | 9 +++++++++
>
> We should be able to be fine without a preloader_console_init() func I
> think.

I just defined a version for the non serial case, at this place
there is already this function ...

I only set:

         gd->bd = &bdata;
         gd->have_console = 0;

which seems not to bad to me ... ok, "gd->have_console" should be 0.
And why is in preloader_console_init() "gd->bd = &bdata;" ... this
seems not the right place to me, as it has nothing to do with
"console init" ... so maybe we really can drop it, but it gets called
from:

$ grep -lr preloader_console_init .
./arch/microblaze/cpu/spl.c
./arch/powerpc/cpu/ppc4xx/spl_boot.c
./arch/powerpc/cpu/mpc5xxx/spl_boot.c
./arch/arm/mach-davinci/spl.c
./arch/arm/mach-uniphier/spl.c
./arch/arm/mach-mvebu/spl.c
./arch/arm/mach-at91/spl_at91.c
./arch/arm/mach-at91/spl_atmel.c
./arch/arm/mach-tegra/spl.c
./arch/arm/mach-zynq/spl.c
./arch/arm/cpu/armv7/omap-common/boot-common.c
./arch/arm/cpu/armv7/omap-common/boot-common.c.orig
./arch/arm/cpu/armv7/sunxi/board.c
./arch/arm/cpu/armv7/omap3/board.c
./arch/arm/mach-socfpga/spl.c
./20150615/0004-spl-common-serial-build-SPL-without-serial-support.patch
./board/compulab/cm_fx6/spl.c
./board/gateworks/gw_ventana/gw_ventana_spl.c
./board/solidrun/mx6cuboxi/mx6cuboxi.c
./board/barco/platinum/spl_titanium.c
./board/barco/platinum/spl_picon.c
./board/kosagi/novena/novena_spl.c
./board/ti/ks2_evm/board.c
./board/LaCie/edminiv2/edminiv2.c
./board/wandboard/spl.c
./board/freescale/mx6sxsabresd/mx6sxsabresd.c
./board/freescale/ls1021aqds/ls1021aqds.c
./board/freescale/ls1021atwr/ls1021atwr.c
./board/freescale/mx6sabresd/mx6sabresd.c
./board/bachmann/ot1200/ot1200_spl.c
./board/work-microwave/work_92105/work_92105_spl.c
./board/woodburn/woodburn.c

so ... we need a dummy function ... or?

Thanks for your comments!

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

  reply	other threads:[~2015-06-16  5:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-15 12:20 [U-Boot] [PATCH 0/4] add support for the at91 based smartweb board Heiko Schocher
2015-06-15 12:20 ` [U-Boot] [PATCH 1/4] spl, common, serial: build SPL without serial support Heiko Schocher
2015-06-15 15:32   ` Tom Rini
2015-06-16  5:21     ` Heiko Schocher [this message]
2015-06-15 12:21 ` [U-Boot] [PATCH 2/4] nand, atmel: remove udelay in spl_nand_erase_one() Heiko Schocher
2015-06-15 23:41   ` Scott Wood
2015-06-15 12:21 ` [U-Boot] [PATCH 3/4] lib/display_options: fix compiler warnings Heiko Schocher
2015-06-15 14:43   ` Tom Rini
2015-06-16  4:44     ` Heiko Schocher
2015-06-15 12:21 ` [U-Boot] [PATCH 4/4] arm, at91: support for sam9260 based smwartweb board Heiko Schocher

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=557FB242.8080804@denx.de \
    --to=hs@denx.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.