[U-Boot] Implementing spl_start_uboot() for directly booting linux

Heshsham Abdul Basit hf.basit at gmail.com
Wed Jul 30 11:37:10 CEST 2014


On 30 July 2014 13:56, Stefano Babic <sbabic at denx.de> wrote:
> 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.

OK.

>
>> 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;
> }
>



Thanks.  I missed this.


> 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.
>

Will give it a try.

> Best regards,
> Stefano Babic
>
>
>
Thanks.
> --
> =====================================================================
> 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
> =====================================================================


More information about the U-Boot mailing list