UDOOboard / uboot-imx

Das U-Boot for UDOO

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenWrt support

Noltari opened this issue · comments

Hello guys,

I'm trying to add OpenWrt support for UDOO Neo but I'm having some issues, and it would be great if I could get some help from anyone :).

First of all I need to be able to build a functional uboot from OpenWrt environment.
In order to do so, I used the patches available in the "2015.04+fsl_NEO" branch of this repo:
openwrt-es/openwrt@1aec79e
https://github.com/openwrt-es/openwrt/tree/imx6-udoo-neo/package/boot/uboot-imx6/patches
As you can see, patches 120-131 are the ones extracted from this repository, and patches 140/141 are hacks done to make it compile, since it would complain about undefined FSL_QSPI_FLASH_SIZE/FSL_QSPI_FLASH_NUM (patch 140) and about not having a defconfig for the basic version (141).

BTW, the kernel support part is also done, but I can't check if it needs any fixes until I get a working bootloader: openwrt-es/openwrt@ce5b518

P.S: Github repo & branch: https://github.com/openwrt-es/openwrt/commits/imx6-udoo-neo

It looks like I was using the wrong uboot (missing the SPL):
openwrt-es/openwrt@1dbc9d6

After that change it boots, but there are other errors:
https://gist.github.com/Noltari/068ee842b94801fe350e

Any ideas? :_

This is how I build the u-boot But from your description it looks like you build vanilla u-boot and not UDOO specific one. Maybe you missed a patch or two. Unless you have a debugger like the Segger or a Abatron you can instrument your code with printf to see where it fails. I am not familiar with SPL, from your log I have the doubt it your problem is related to wrong DRAM settings.

Well, as far as I know the DRAM settings are initialized in the SPL part of u-boot, and that doesn't seem to be failing, since it appears to load completely because the last output is this one:
https://github.com/UDOOboard/uboot-imx/blob/2015.04+fsl_NEO/board/udoo/neo/neo.c#L838

I'm pretty sure no patches are missing since I chose the 2015.04+fsl_NEO branch on purpose, due to the fact that it was created very recently by @fmntf, with nice and clean patches. The other branches are kind of a chaos because patches and backports are mixed.

And yes, I think I will have to add some printf in order to see where it's failing. I was waiting to see if any of the UDOO developers could help me with this, especially with the fixes I had to add where I just guessed things that could be wrong (like qspi).

Regards,
Álvaro.

You, are right, the DRAM setting was just an idea. I will dig into the 2015.XX Soon because I need the SPL feature to support all sorts of UDOO Boards in my Yocto port. So I have not to provide configs for each variant of NEO and the QUAD and Dual versions. I can update this issue with my experience. Yes the Patches are sort of chaos. Especially for the kernel.

commented

u-boot 2015.10 already has SPL support for Udoo Dual and Quad adapted by me.

Hello, I would like to clarify our u-boot branches:

  • current public builds (UDOObuntu beta x) are using master, both for NEO and Quad/Dual. There is no SPL support on master btw.
  • 2015.10+fslc is fsl community u-boot just for Quad/Dual (it lacks a good imx6sx support) and has SPL support (thank you again @vpeter4 !)
  • 2015.04+fsl_NEO is fsl imx u-boot for Neo and has SPL support. It will be used in next UDOObuntu builds.
  • 2015.10+fslc_NEO is fsl community, we tried to add Neo support (in order to use a single branch shared with Quad/Dual) but fsl community branch lacks a proper imx6sx support.

It is important to note that if you are not using Freescale's u-boot IMX branch, you will not be able to start the M4 core. Why don't you just use 2015.04+fsl_NEO to boot OpenWRT?

Ok, so that's the reason why it's not working, I'm using vanilla uboot source and not Freescale's source.
I will try to rebase Freescale's imx_v2015.04 patches into vanilla v2015.04 branch and build uboot from there.
Thanks @fmntf!

Before doing that, try 2015.10+fslc_NEO. It lacks the latest patches from 2015.04+fsl_NEO, but it should boot if I recall correctly.
BTW, before switching from 2015.10-fslc to 2015.04-fsl I tied to backport imx6sx stuff, but branches diverge too much to do a clean work.

Just one thing, I did not undertand if you cannot boot the board with our u-boot and OpenWRT, or if you didn't try that (but you just want to backport patches to OpenWRT's u-boot).

I want to build a working and usable uboot from OpenWrt environment, in order to be able to generate a working image exclusively using OpenWrt, and not depending on anything external.
I don't really care about the version used, but that it actually works.

@fmntf thanks for your insights. This saves me a lot of work and I know the meaning of the c

It's a good idea to add descriptions to every branch. I has been confused too.

The original idea was to use just a single branch, but we failed since there is no imx6sx compatibility on fslc-uboot. There is still activity on our u-boot repo, as soon as we complete it we will clean up branches and we will write some documentation too.

I'm closing this issue, but feel free to ask questions about u-boot and the porting on other OSs.