From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sun, 19 Oct 2008 20:44:05 +0200 Subject: [U-Boot] [PATCH v2] bootm: Move to using a function pointer table for the boot os function In-Reply-To: <1224439644-10648-1-git-send-email-galak@kernel.crashing.org> References: <1224439644-10648-1-git-send-email-galak@kernel.crashing.org> Message-ID: <20081019184405.GA9455@game.jcrosoft.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 13:07 Sun 19 Oct , Kumar Gala wrote: > This removes a bit of code and makes it easier for the upcoming sub bootm > command support to call into the proper OS specific handler. > > Signed-off-by: Kumar Gala > --- > > Fix a bug that showed up in sub command testing in that we didn't sent the relocated > flag. > > common/cmd_bootm.c | 68 +++++++++++++++++++++++---------------------------- > 1 files changed, 31 insertions(+), 37 deletions(-) > > diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c > index b02da3e..956e1a0 100644 > --- a/common/cmd_bootm.c > +++ b/common/cmd_bootm.c > @@ -119,6 +119,22 @@ int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); > static boot_os_fn do_bootm_integrity; > #endif > > +boot_os_fn * boot_os[] = { > + [IH_OS_LINUX] = do_bootm_linux, > + [IH_OS_NETBSD] = do_bootm_netbsd, why not add config to ative or not netbsd, linux and rterms to reduce U-Boot size? Best Regards, J.