Welcome! Log In Create A New Profile

Advanced

Pointers for porting U-Boot 1.1.4 source to more current U-Boot

Posted by rayknight 
Pointers for porting U-Boot 1.1.4 source to more current U-Boot
January 03, 2019 08:05PM
bodhi, I am wondering if you have any pointers on porting 1.1.4 version U-Boot for a Kirkwood device to a more current U-Boot? The structure of U-Boot appears to be quite different, so I'm looking for some pointers on how best to approach the update.

Thanks,
Ray
Re: Pointers for porting U-Boot 1.1.4 source to more current U-Boot
January 03, 2019 10:41PM
Ray,

My own policy is I will not conduct tutorials about building kernel and u-boot. There is no time for me to do those time consuming tasks while helping troubleshooting problems :) So below is a general guideline. And once you got it going, you can PM and ask questions if you are stuck somewhere.

======


The software structure is too different beween the old Marvell u-boot 1.1.4 and modern u-boot version. So it's almost like writing new u-boot, except that you can create a skeleton to complete a big part of the code by cloning an existing u-boot from my GitHub.

1. You should look for GPL source. Without it, it is not feasible to port the old u-boot 1.14 to a modern version completely.
2. Choose a u-boot that is closest to the one you are porting in this order of importance
Kirkwood SoC.
Clock rate
RAM
Flash type (NAND/SPI)
Peripherals (USB, HDD, SD card)

If any Clock rate, RAM, and Flash type does not match between clone candidate and new u-boot then it is a little more complicate, that I can't go into in this post.

3. Clone the directory structure in ./board
4. Clone the header file in ./include/configs
5. Clone the defconfig in ./configs
6. Start changing names
7. Build

8. And then find GPIOs in the GPL to adjust them to the new u-boot in ./board. This is a detective works, with grepping, reading, deciphering the GPL GPIO setup code (which is different from one 1.1.4 u-boot to another, depending on the manufacterer patch).
9. Build
10. kwboot to see if you can start new u-boot.

Steps 8,9,10 are iterative.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pointers for porting U-Boot 1.1.4 source to more current U-Boot
January 04, 2019 12:22AM
Thanks bodhi,

This was the type of pointers I was looking for. Fortunately the boards I'm looking to update can all be booted via kwboot so your steps are a good start. And I do have GPL source for the first target I'll be attempting (Netgear ReadyNAS Duo RND2000). Can you tell me if there is already support for an Armada 300 (88F6282) based device in your GitHub tree? All the devices listed by wikidevi as having this processor aren't currently supported by your u-boot. Is the ZyXEL NSA325 based on the Armada300?

Ray
Re: Pointers for porting U-Boot 1.1.4 source to more current U-Boot
January 04, 2019 02:04AM
Hi Ray,

Yes. NSA325 is the right one. It is Kirwood 88F6282, aka Armada 300 (just a branding scheme by Marvell to start the Armada series).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: