public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Implementing spl_start_uboot() for directly booting linux
@ 2014-07-30  8:21 Heshsham Abdul Basit
  2014-07-30  8:26 ` Stefano Babic
  0 siblings, 1 reply; 3+ messages in thread
From: Heshsham Abdul Basit @ 2014-07-30  8:21 UTC (permalink / raw)
  To: u-boot

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


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, So if you can provide any example
board implementation , it would give me a clear picture of how to do
this for my zynq board.

Thanks in advance,


Abdul Basit

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] Implementing spl_start_uboot() for directly booting linux
  2014-07-30  8:21 [U-Boot] Implementing spl_start_uboot() for directly booting linux Heshsham Abdul Basit
@ 2014-07-30  8:26 ` Stefano Babic
  2014-07-30  9:37   ` Heshsham Abdul Basit
  0 siblings, 1 reply; 3+ messages in thread
From: Stefano Babic @ 2014-07-30  8:26 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] Implementing spl_start_uboot() for directly booting linux
  2014-07-30  8:26 ` Stefano Babic
@ 2014-07-30  9:37   ` Heshsham Abdul Basit
  0 siblings, 0 replies; 3+ messages in thread
From: Heshsham Abdul Basit @ 2014-07-30  9:37 UTC (permalink / raw)
  To: u-boot

On 30 July 2014 13:56, Stefano Babic <sbabic@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
> =====================================================================

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-30  9:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-30  8:21 [U-Boot] Implementing spl_start_uboot() for directly booting linux Heshsham Abdul Basit
2014-07-30  8:26 ` Stefano Babic
2014-07-30  9:37   ` Heshsham Abdul Basit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox