From: Mike Frysinger Date: Mon, 26 Sep 2011 00:47:29 -0400 Subject: [U-Boot] [RFC PATCH 06/20] sandbox: Allow board_init_f() and board_init_r() to return In-Reply-To: References: <1316278139-28635-2-git-send-email-sjg@chromium.org> <201109172005.03226.vapier@gentoo.org> Message-ID: <201109260047.30911.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Friday, September 23, 2011 11:55:11 Simon Glass wrote: > On Sat, Sep 17, 2011 at 5:05 PM, Mike Frysinger wrote: > > On Saturday, September 17, 2011 12:48:45 Simon Glass wrote: > >> Since the sandbox architecture doesn't do relocation, we prefer to call > >> board_init_r() explicitly when board_init_f() returns. Similarly we > >> prefer to call main_loop() when board_init_r returns. > > > > NAK; i dont see how sandbox is special. just do what i do in Blackfin's > > board.c: > > board_init_f calls board_init_r > > board_init_r does while (1) main_loop() > > I have done as you say for now, but this isn't great. It means that > the only way back to the top level (say to run another test) is to use > setjmp/longjmp. But I will deal with this issue when it actually comes > up. i dont understand what you mean. the main loop allows you to process commands forever and thus test as many commands as you want. if you're testing something before the main_loop, then i think it is correct that you'd "boot" from scratch, get to the main_loop (and thus pass your test), and then call "reset" to exit. if you want to test something else before main_loop, start all over from scratch. -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20110926/b7996b97/attachment.pgp