From: Kenneth Johansson <kenneth@southpole.se>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [Junk released by Allow List] Command history no longer working
Date: Thu, 29 May 2008 21:58:29 +0200 [thread overview]
Message-ID: <1212091109.2236.3.camel@localhost.localdomain> (raw)
In-Reply-To: <42848A5C5A0D1E47B026E644DD49B08E02725DB2@mail>
On Thu, 2008-05-29 at 15:41 -0400, Hugo Villeneuve wrote:
> u-boot-users-bounces at lists.sourceforge.net wrote:
> > Hi,
> > I have observed that after this commit, the command history is no
> > longer working:
> >
> > ---
> > commit 597f6c26a18b389903a64692bacbf9a1ca69355b
> > Author: James Yang <James.Yang@freescale.com>
> > Date: Mon May 5 10:22:53 2008 -0500
> >
> > Fix readline_into_buffer() with CONFIG_CMDLINE_EDITING before
> > relocating
> >
> > When CONFIG_CMDLINE_EDITING is enabled, readline_into_buffer()
> > doesn't
> > work before relocating to RAM because command history is written
> > into
> > a global array that is not writable before relocation. This patch
> > defers to the no-editing and no-history code in
> > readline_into_buffer()
> > if it is called before relocation.
> > ---
> >
> > Based on the comments, I dont understand why it ceases to work
> > because, in my case, U-Boot runs entirely from RAM (it is copied from
> > flash to RAM by a first stage bootloader).
> >
> > I have CONFIG_CMDLINE_EDITING defined.
>
> Well after reading through the code in common/main.c, I figured that
> by setting GD_FLG_RELOC in my board init function:
>
> gd->flags |= GD_FLG_RELOC;
>
> command history would be working again, and it did.
>
> But is it the right thing to do?
Yes.
> I noticed that not a lot of platforms/boards set GD_FLG_RELOC so
> command history will probably cease to work for these boards also?
Most boards do the relocation and then it gets set by the common
board_init_r() function.
next prev parent reply other threads:[~2008-05-29 19:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-29 18:29 [U-Boot-Users] Command history no longer working Hugo Villeneuve
2008-05-29 19:41 ` [U-Boot-Users] [Junk released by Allow List] " Hugo Villeneuve
2008-05-29 19:58 ` Kenneth Johansson [this message]
2008-05-29 20:13 ` [U-Boot-Users] [Junk released by Allow List] Command historyno " Hugo Villeneuve
2008-06-10 12:34 ` [U-Boot-Users] [Junk released by Allow List] Command history no " Magnus Lilja
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=1212091109.2236.3.camel@localhost.localdomain \
--to=kenneth@southpole.se \
--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