Questions about writing custom boot loader, Zynq, Zybo

Thomas Skibo thomasskibo at yahoo.com
Mon Jul 25 16:45:20 UTC 2016


> On Jul 24, 2016, at 3:25 PM, Lee D <embaudarm at gmail.com> wrote:
> 
> Thanks for the tips.  The RS232 issue was simple.  Xilinx (or possibly Digilent) changed the default clock for the serial port from 50MHz to 100MHz. I made the correction in the DTS file and now the baud rate is correct.

I hadn’t noticed they changed it.  My u-boot still uses the 50Mhz so it matches the DTS file.

What really ought to happen is the slcr driver should determine the frequency of all the clocks derived from ps_clk so the only thing the DTS file needs to provide is the ps_clk frequency.  I’ll have to do that anyway if we move over to using GNU DTS files.

> 
> Do you know if passing a  boot params structure in R0 is necessary for the kernel to boot?  
> 
> I still can't seem to get past that timer message.  This is what I've done:
> 
> 1. Made sure I am working with a bare default Zybo config generated in Vivado 2016.2
> 
> 2. compared my ps_init.[ch] to the one you pointed me to.  There were no significant differences except for the RS232 clock rate.  I had some MIO pins configured, and my DRAM timings were different.  my DRAM works fine with standalone apps so I assume that was a tweak made by Digilent and not an issue.
> 
> 3. added printf's to inittimecounter() in  src/sys/kern/kern_tc.c.  It is clear that it completes normally.  Also the timer appears to be running.  
> 
> However that function is part of the kernel init sequence (SYSINIT macro), so I don't know what is getting called next. 
> 
> 4. I removed the ehci device from the DTS, and commented out all USB related entries in the zybo kernel config file.  Still it freezes after that timer message.  So probably not USB related.
> 
> 5. Checked to make sure that the USB3320 chip is not being held in reset by the GPIO line.
> 
> My next steps are:
> 
> 1. keep digging through the kernel and placing printfs to pinpoint where it is failing.
> 
> 2. try the ps_init.[ch] files you showed me in my project, even though they shouldn't make any difference.
> 
> 3. try passing a boot params structure in r0. 
> 
> Thanks again for pointing me to the original ps_init files, that was very helpful to be able to see those.
> 
> Lee
> 

——
Thomas Skibo
thomasskibo at yahoo.com





More information about the freebsd-arm mailing list