State of the U-Boot, how to solve the mess?

Moderators: mdrjr, odroid

State of the U-Boot, how to solve the mess?

Unread postby longsleep » Sun Jun 07, 2015 2:39 am

Hi folks,

the U-Boot provided seems to be based on v2011.03 which is very old. It is lacking a bunch of features and is generally in a bad shape. I am looking for ways to improve this situation. I have identified the following issues:

- No shared Git history with upstream U-Boot (seems to be created from aml tarball.
- Lot's of patches have been applied, some from upstream U-Boot which essentially makes it hard/impossible to merge anything from upstream.
- U-Boot tree contains features which does not seem to be very useful which makes the tree bloated and even harder to merge.

To make the C1 a nice platform, these things need to improve. Are there any plans to upstream at least parts of the changes and to improve repository quality in general for the U-Boot tree?

I am asking, because i had a hard time to build a working U-Boot for Ubuntu Snappy and i had to backport only a single thing (fat write support). I now have a fork of the Hardkernel U-Boot tree at https://github.com/longsleep/u-boot-odroidc which adds another set of messy patches on top.

Ideally i would like to see the cpu/aml_meson up-streamed first, c1 specific patches second.

Anyone has thoughts on this?

Cheers
Simon
longsleep
 
Posts: 39
Joined: Mon Mar 04, 2013 6:15 am
languages_spoken: english, german
ODROIDs: U2, U3, C1

Re: State of the U-Boot, how to solve the mess?

Unread postby tobetter » Sun Jun 07, 2015 11:19 am

longsleep wrote:Hi folks,

the U-Boot provided seems to be based on v2011.03 which is very old. It is lacking a bunch of features and is generally in a bad shape. I am looking for ways to improve this situation. I have identified the following issues:

- No shared Git history with upstream U-Boot (seems to be created from aml tarball.
- Lot's of patches have been applied, some from upstream U-Boot which essentially makes it hard/impossible to merge anything from upstream.
- U-Boot tree contains features which does not seem to be very useful which makes the tree bloated and even harder to merge.

To make the C1 a nice platform, these things need to improve. Are there any plans to upstream at least parts of the changes and to improve repository quality in general for the U-Boot tree?

I am asking, because i had a hard time to build a working U-Boot for Ubuntu Snappy and i had to backport only a single thing (fat write support). I now have a fork of the Hardkernel U-Boot tree at https://github.com/longsleep/u-boot-odroidc which adds another set of messy patches on top.

Ideally i would like to see the cpu/aml_meson up-streamed first, c1 specific patches second.

Anyone has thoughts on this?

Cheers
Simon

I guess up-streamed U-boot wouldn't be happened or would take very long, since it's not easy to manage.

The issues you pointed out:
- No shared Git history with upstream U-Boot (seems to be created from aml tarball.

Correct, there is no history where AMLogic started to work from U-boot git.
- Lot's of patches have been applied, some from upstream U-Boot which essentially makes it hard/impossible to merge anything from upstream.

Correct, since some features are required to support from other U-boot, many patches are merged from upstream. It's hard to merge, git cherry-pick/merge won't work at all.
- U-Boot tree contains features which does not seem to be very useful which makes the tree bloated and even harder to merge.

What features are you meaning? :)

What feature are you trying to have on U-boot for C1? Only FAT write?
tobetter
 
Posts: 2085
Joined: Mon Feb 25, 2013 10:55 am
Location: Kitchener, ON, Canada
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1

Re: State of the U-Boot, how to solve the mess?

Unread postby longsleep » Sun Jun 07, 2015 5:18 pm

Thanks for your reply. ODROID C1 is a great platform, but to really become the ARM platform of choice for everything the U-Boot needs to be cleaned up.

tobetter wrote:I guess up-streamed U-boot wouldn't be happened or would take very long, since it's not easy to manage.


I am not sure. It should be possible for someone who knows U-Boot. At least starting a cleanup by forward porting the relevant bits to make the C1 to a upstream based U-Boot tree.

tobetter wrote:
- U-Boot tree contains features which does not seem to be very useful which makes the tree bloated and even harder to merge.

What features are you meaning? :)

What feature are you trying to have on U-boot for C1? Only FAT write?


There are several features, required in the U-Boot to support Ubuntu Snappy which are not / are different in the U-Boot tree for ODROID C1:

- cmd_test: implement -e test for file existence (e5e897c01b1cd496187ca56a38ff5559d27f951c)
- fs: add filesystem switch libary, implement ls and fsload commands (045fa1e1142552799ad3203e9e0bc22a11e866ea)
- fs: rename fsload command to load (f9b55e22856a97523074f3dc40ea5d196298756a)
- fs: Add support for saving data to filesystems (a8f6ab5229fb4cd8299df84c8698e128b5125a8e)
- fat: implement exists() for FAT fs (b7b5f3195fa5a31ab1505e0c87054dc6dc71627b)
- FAT: Add FAT write feature (c30a15e590c7e5bfd27e4704c81648071f11d51f)

To view these changes, add the hash to the upstream URL: http://git.denx.de/?p=u-boot.git;a=commit;h= - i cannot add direct links above to due forum URL limit.

These are only the base commits. There are plenty of fixups after those commits and a lot of other commits required to apply those. The U-Boot has changed quite a lot since the fork for ODROID C1. See the commands yourself in the source code containg the U-Boot script for Snappy (http://bazaar.launchpad.net/~phablet-te ... oot.go#L47). The snappy-system.txt should be usable by U-Boot without having to overwrite a lot of stuff with legacy commands like i am currently solving this (https://github.com/longsleep/snappy-odr ... s/boot.ini).
longsleep
 
Posts: 39
Joined: Mon Mar 04, 2013 6:15 am
languages_spoken: english, german
ODROIDs: U2, U3, C1

Re: State of the U-Boot, how to solve the mess?

Unread postby tobetter » Mon Jun 08, 2015 11:29 am

longsleep wrote:Thanks for your reply. ODROID C1 is a great platform, but to really become the ARM platform of choice for everything the U-Boot needs to be cleaned up.

tobetter wrote:I guess up-streamed U-boot wouldn't be happened or would take very long, since it's not easy to manage.


I am not sure. It should be possible for someone who knows U-Boot. At least starting a cleanup by forward porting the relevant bits to make the C1 to a upstream based U-Boot tree.

tobetter wrote:
- U-Boot tree contains features which does not seem to be very useful which makes the tree bloated and even harder to merge.

What features are you meaning? :)

What feature are you trying to have on U-boot for C1? Only FAT write?


There are several features, required in the U-Boot to support Ubuntu Snappy which are not / are different in the U-Boot tree for ODROID C1:

- cmd_test: implement -e test for file existence (e5e897c01b1cd496187ca56a38ff5559d27f951c)
- fs: add filesystem switch libary, implement ls and fsload commands (045fa1e1142552799ad3203e9e0bc22a11e866ea)
- fs: rename fsload command to load (f9b55e22856a97523074f3dc40ea5d196298756a)
- fs: Add support for saving data to filesystems (a8f6ab5229fb4cd8299df84c8698e128b5125a8e)
- fat: implement exists() for FAT fs (b7b5f3195fa5a31ab1505e0c87054dc6dc71627b)
- FAT: Add FAT write feature (c30a15e590c7e5bfd27e4704c81648071f11d51f)

To view these changes, add the hash to the upstream URL: http://git.denx.de/?p=u-boot.git;a=commit;h= - i cannot add direct links above to due forum URL limit.

These are only the base commits. There are plenty of fixups after those commits and a lot of other commits required to apply those. The U-Boot has changed quite a lot since the fork for ODROID C1. See the commands yourself in the source code containg the U-Boot script for Snappy (http://bazaar.launchpad.net/~phablet-te ... oot.go#L47). The snappy-system.txt should be usable by U-Boot without having to overwrite a lot of stuff with legacy commands like i am currently solving this (https://github.com/longsleep/snappy-odr ... s/boot.ini).

Thank you for the detail. I believe U-boot for C1 won't be ported to mainline of U-boot by Hardkernel since there is no such request except you and no one ask for changing it at all...at least so far. :D I hated to work on top of AMLogic's tarball and instead I tried to port it to mainline early phase of C1 development. It was not easy and there are bunch of things more important than such work for C1 to resolve, so suspended. I would consider to merge to support such features if possible, but guess it would take some time.
tobetter
 
Posts: 2085
Joined: Mon Feb 25, 2013 10:55 am
Location: Kitchener, ON, Canada
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1


Return to General Chat

Who is online

Users browsing this forum: No registered users and 1 guest