Trying to boot custom kernel on Wink Hub (i.MX28)

Rogan Dawes rogan at dawes.za.net
Sun Sep 24 22:16:15 CEST 2023


Hi folks,

I eventually decided that I did need to figure out the DRAM timings for the
Micron chip on my board, but I found an easier way than actually
"understanding what I'm doing"! :-)

I pulled the vendor U-Boot image off the flash, skipped the
appropriate number of bytes until I was actually dealing with a u-boot.sb
formatted image (looking for the STMP signature I found in the compiled
mainline u-boot), then used the Rockbox project's sbtoelf tool to convert
the SB back to two ELF files, the SPL.elf and the u-boot.elf. From there I
loaded the SPL.elf into ghidra, then went looking for byte sequences found
in arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c to see if I could locate them
in the vendor blob. I did, right at the end of the binary, then converted
bytes into uint32 sequences so that I could compare with the mxs_dram_vals
for CONFIG_MX28.

Did the compare and found a single bit that is different between the two
sequences of initialisation values. Literally a 1 to a 0, and that is all.
So I built mainline with that change, and an updated iomux_setup because
the Wink Hub v1 uses MX28_PAD_I2C0_SCL__DUART_RX and
MX28_PAD_I2C0_SDA__DUART_TX for its console pins. i was hoping to see it
boot via mxsldr, but unfortunately, I got nothing.

How can I get the SPL to emit something on the console to confirm it is
running? i.e. before the DRAM initialisation?

Regards,

Rogan


On Wed, 23 Aug 2023 at 17:56, Rogan Dawes <rogan at dawes.za.net> wrote:

> Hi Fabio,
>
> On Tue, 22 Aug 2023 at 13:44, Fabio Estevam <festevam at gmail.com> wrote:
> >
> > Hi Rogan,
> >
> > On Tue, Aug 22, 2023 at 6:42 AM Rogan Dawes <rogan at dawes.za.net> wrote:
> > >
> > > Hi Fabio,
> > >
> > > As far as I am aware, the U-boot source for the Wink hub has not been
> > > made available anywhere. That said, the RAM chip in use on the board
> >
> > Was there a formal request for the U-Boot source code to Wink?
> >
> > As per the GPL license, they have to share the U-Boot source code.
> >
>
> I have just asked them for it, so let's see what happens. I'm not
> optimistic, though, given their financial troubles. I am not aware of
> anyone else asking them. However, I do believe that there have been
> requests for the kernel sources for the Wink Hub 2, which were
> ignored, suggesting that they are not the best GPL citizen.
>
> > > is marked D9LPX, which apparently corresponds to the following item:
> > >
> https://media-www.micron.com/-/media/client/global/documents/products/data-sheet/dram/ddr2/512mbddr2.pdf?rev=2c70f8a2b207452584b2bf040de8d771
> >
> > There is a tool from NXP that helps with the i.MX28 DDR2 controller
> > initialization for a specific DDR model:
> >
> >
> https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/imx-processors/9552/1/MX28_DDR2_register_programming_aid_v0.2.xlsx
> >
> > The DDR initialization values obtained from this tool are then used in
> > U-Boot inside the 'mxs_dram_vals' array.
> >
> > There is a common DDR configuration at
> > arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c.
> >
> > Most likely, in your case, it will require a custom mxs_dram_vals
> > initialization, like it is done at board/liebherr/xea/spl_xea.c.
> >
> > > I did try to change the iomux_cfg_t as suggested above, built using
> > > make mx28evk_defconfig && make u-boot.sb, and used mxsldr to try load
> > > it, to no avail. There was no output on the serial port at all, or any
> > > other suggestion that anything was running.
> >
> > It has been a long time since I used the mxsldr tool.
> >
> > When time permits, I can try to load a recent U-Boot over USB using
> > this tool on a imx28-evk.
> >
> > Cheers
>
> I think fiddling with RAM timings is a little more in the weeds than I
> am ready to go at this point. I did see this post
> (http://web.archive.org/web/20151005053615/http://jalderman.org/?p=348),
> suggesting that it was not too difficult to get it working using
> mainline u-boot. That said, I also note that some teardowns mention
> that the RAM is a Nanya part, while I have Micron, so perhaps I should
> not place too much reliance on that.
>
> Rogan
>


More information about the U-Boot mailing list