From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Wed, 30 Jul 2014 10:26:59 +0200 Subject: [U-Boot] Implementing spl_start_uboot() for directly booting linux In-Reply-To: References: Message-ID: <53D8AC53.3020209@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Abdul, On 30/07/2014 10:21, Heshsham Abdul Basit wrote: > Hello, > > I am trying to directly boot the kernel i.e without u-boot, on my > Xilinx Zynq based microzed board. > > > I understand that for that I must implement the function > spl_start_uboot() in spl.c > > > > Right now the definition is: > > > > #ifdef CONFIG_SPL_OS_BOOT > int spl_start_uboot(void) > { > /* boot linux */ > return 0; > } > #endif > > > Given here: > https://github.com/Xilinx/u-boot-xlnx/blob/2a0536fa48db1fc5332e3cd33b846d0da0c8bc1e/arch/arm/cpu/armv7/zynq/spl.c Anyway, you are not using mainline. Please stick with the sources on u-boot mainline to get help here. > Can someone explain how to implement this function for directly > booting the kernel? Actually till now all the boards I have searched > have not implemented this function, This means you have not deeply searched. Check for example board/technexion/twister/twister.c: int spl_start_uboot(void) { int val = 0; if (!gpio_request(SPL_OS_BOOT_KEY, "U-Boot key")) { gpio_direction_input(SPL_OS_BOOT_KEY); val = gpio_get_value(SPL_OS_BOOT_KEY); gpio_free(SPL_OS_BOOT_KEY); } return val; } On this board, the decision which image to boot is taken by looking at a GPIO (switch on the board). Of course, you can implement the way you need based on your hardware. Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================