Project

General

Profile

U-boot not bringing Linux kernel up correctly

Added by Chris Weinman almost 10 years ago

Hi,
I've built the preloader, U-Boot, Linux kernel and filesystem as per the instructions at https://support.criticallink.com/redmine/projects/mityarm-5cs/wiki/Building_u-Boot_and_Preloader and https://support.criticallink.com/redmine/projects/mityarm-5cs/wiki/Yocto_for_MitySOM-5CSX
This boots if bridge_enable_handoff isn't run in u-boot, but fails to bring up the second CPU core
If bridge_enable_handoff is run, the kernel fails to run, but does not panic.
Enabling the earlyprintk feature in the kernel gives more information, attached.

Note that this output was generated with the preloader and U-boot being loaded from QSPI, then booting as normal from an SD card (i.e. reading the kernel and DTB from MMC, using a filesystem on the SD). The issue also occurs using a preloader and u-boot built for and loaded from the SD card.
  • Booting using the QSPI method described above using the critical link supplied SD yields the same results.
  • Booting from the critical link supplied SD then swapping SDs once U-boot is loaded works (i.e. stop u-boot, swap cards, run 'boot')
  • Replacing the root filesystem, kernel and DTB on a copy of the critical link SD image works (i.e. using critical link built preloader and u-boot). I've attached similar output from this setup for comparison

So I'm fairly certain the kernel and DTB are fine, and I'm pretty sure the root filesystem is not yet mounted, so I think the problem lies in U-Boot itself. I don't know where to look next. Any ideas?
Thanks,
Chris

Attachments:
Boot output with earlyprintk enabled: built_preloader_uboot.txt
Boot output using critical link built preloader and uboot with my kernel, DTB and filesystem, with earlyprintk enabled: cl_preloader_uboot.txt


Replies (5)

RE: U-boot not bringing Linux kernel up correctly - Added by Michael Williamson almost 10 years ago

Hi Chris,

We will look into it. Can you post the module type and serial number just so we know your exact configuration?

-Mike

RE: U-boot not bringing Linux kernel up correctly - Added by Chris Weinman almost 10 years ago

Hi Michael,
p/n: 80-000642RI-1
s/n: 14008623
It's in a dev kit at the moment. Our base board borrowed heavily from the dev kit, so there shouldn't be any significant differences there.
I have tried other modules to no avail.
I did try grabbing a different head from your git repository (soc_camera as the date is similar to the build date for U-boot on the critical link SD card) and it seems to work when booting from the SD. I'm about to build for QSPI and give that a shot.
Thanks,
Chris

RE: U-boot not bringing Linux kernel up correctly - Added by Chris Weinman almost 10 years ago

OK, problem commit seems to be 938156 (http://support.criticallink.com/gitweb/?p=u-boot-socfpga.git;a=commit;h=93815696dce132ff8abc4ab2f4c195339ff821a0). I haven't had a chance to look at it to see if there are any obvious problems here.
Using the rebased a494dc allows me to boot with the preloader and u-boot in QSPI, and the kernel, DTB and linux root filesystem on the SD (which is what we need).
Here's the process I used so far:
I've stepped through the commits between soc_camera and socfpga_v2013.01.01, having used git rebase to merge commit by commit, and using the fix from 7ea403 to allow it to build.
In resolving conflicts, I removed the bsp generated files from the git tree. Those files were still referenced elsewhere, so I modified the makefile to copy those files from my BSP to board/altera/socfpga, which allowed everything to build. Makefile is attached.
I then used git bisect to do it's thing to find the offending commit.

I'm using the Critical Link build VM to build this, but our FPGA project was built under Windows using Quartus 14.0.0 Build 200 06/17/2014 SJ Full Version

Thanks,
Chris

Makefile (8.53 KB) Makefile

RE: U-boot not bringing Linux kernel up correctly - Added by Daniel Vincelette almost 10 years ago

Hi Chris,

We've also just recently found that that commit is causing troubles for our 5CSX dev kit as well. It appears to be adjusting the SDRAM row size to 4GB instead of 1GB in order to workaround an SDRAM errata. We are currently looking into it and I'll update this thread when we find what the issue is.

For now I suggest running without that commit.

Dan

RE: U-boot not bringing Linux kernel up correctly - Added by Michael Williamson almost 10 years ago

So this commit in u-Boot must also be accompanied by a patch in the kernel that is present in the 3.10LTS, 3.16 and higher kernels from rocket boards. This is the patch to the commit in the kernel needed for the u-Boot commit to work properly:

http://rocketboards.org/gitweb/?p=linux-socfpga.git;a=commit;h=14cef3b4c21ed3bd2445f1d592b0e54a3af4b3e8

Our most recent DevKit releases have advanced to the 3.16 kernel and can now use the uBoot patch mentioned in this post.

There is a thread on the Altera [RFI] mailing list (from rocketboards) about there here:

http://lists.rocketboards.org/pipermail/rfi/2015-March/002891.html

We have some products right now that are pinned to 3.12 of the kernel, without the mentioned u-Boot commit we have not had any issues.

-Mike

    (1-5/5)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)