Welcome! Log In Create A New Profile

Advanced

Tips for adding support to latest uBoot when I have 1.1.1 level source

Posted by rayknight 
Tips for adding support to latest uBoot when I have 1.1.1 level source
September 20, 2016 12:01AM
I have source code to an ancient uBoot version 1.1.1 I'd like to port this to the latest uboot, but I have no idea where to start and documentation on the uBoot site appears to be seriously out of date. I am an experienced C developer (over 20 years experience) and was a contributor to Linux back when m68k Macs were still a viable platform. I'd just like some pointers as I have not been able to decipher the structure of uboot (i.e. where to begin adding support).

Ray
Re: Tips for adding support to latest uBoot when I have 1.1.1 level source
September 20, 2016 03:18AM
Hi Ray,

I think you're approaching this at the wrong angle. Older u-boots patches are quite different from each others. So there is no point in starting from old u-boot. The patches usually were badly done (trust me, you'd want to curse when you read them :)) so it would introduce more uncertainty in understanding new u-boot. Ignore them until you need to read an old u-boot GPL to find certain info. Older and current u-boot architectures are quite different.

If you want to learn how to develop new u-boot, the best way is to study new u-boot code, and start modifying it. Once you get familiar with how u-boot is structured, and if you can modify it to remove/add features, then you can start developing new one using old u-boot patches.

So here is the one method: wait until somebody releases a new u-boot and find out what was added. The prime example is: I'm developing a new Cisco ON100-K9 u-boot for this community and the Linux community at large. When I push the code to my GitHub, you would go and fetch them, do a source diff between the branches or commits. Or if you're impatient, you would go to my GitHub and start diffing the branches to see what I did in developing the new HP T5325 u-boot, NSA310S u-boot, or NSA325 u-boot,....

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



Edited 1 time(s). Last edit at 09/20/2016 03:54AM by bodhi.
Re: Tips for adding support to latest uBoot when I have 1.1.1 level source
September 20, 2016 05:04PM
I'm trying to create a uboot for my Kurobox-Pro. I accidentally overwrote mtd0, so if the device goes down I'm hosed as the binary image can't be found online! I have the original source code, but I have been unsuccessful in building it because it doesn't mention what tools were used or required and it fails to build with current tools. So I thought I would just add support to current uboot. There is apparently one Orion device supported by the current uboot source.

So I guess I'll start with looking at your commits for the HP T5325 and NSA units.

Thanks for the advice.

Ray
Re: Tips for adding support to latest uBoot when I have 1.1.1 level source
September 20, 2016 05:59PM
rayknight Wrote:
-------------------------------------------------------
> I'm trying to create a uboot for my Kurobox-Pro.
> I accidentally overwrote mtd0, so if the device
> goes down I'm hosed as the binary image can't be
> found online! I have the original source code,
> but I have been unsuccessful in building it
> because it doesn't mention what tools were used or
> required and it fails to build with current tools.

If you upload this source tarball to Dropbox I can take a look to see if I can build it.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Tips for adding support to latest uBoot when I have 1.1.1 level source
September 20, 2016 06:39PM
And you should have backed up your NAND mtds before doing anything with it.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Tips for adding support to latest uBoot when I have 1.1.1 level source
September 20, 2016 09:55PM
I don't have a dropbox account. However the source is available at http://downloads.buffalo.nas-central.org/KBPro_ARM9/GPL/source/u-boot.src.tar.gz Correct config is rd88f5182_NAS2_TINY_buffalo_hs_config.

I thought I was writing the mtd on another device and didn't realize my mistake until too late. Wrote a Dockstar uboot to my Kurobox-Pro instead of the intended Dockstar!

Ray
Re: Tips for adding support to latest uBoot when I have 1.1.1 level source
September 20, 2016 10:01PM
rayknight Wrote:
-------------------------------------------------------
> I don't have a dropbox account. However the
> source is available at
> http://downloads.buffalo.nas-central.org/KBPro_ARM
> 9/GPL/source/u-boot.src.tar.gz Correct config is
> rd88f5182_NAS2_TINY_buffalo_hs_config.
>
> I thought I was writing the mtd on another device
> and didn't realize my mistake until too late.
> Wrote a Dockstar uboot to my Kurobox-Pro instead
> of the intended Dockstar!
>
> Ray

I'll download and take a look.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Tips for adding support to latest uBoot when I have 1.1.1 level source
September 22, 2016 03:09PM
@Ray,

There is a Release Notes in the tarball.


Quote

28-Feb-2006

Release notes for 88F5181 U-Boot, release: 1.10.8
============================================================================

Table of Contents
-----------------
1. Contents of Release
2. Supported boards
3. How to build U-Boot
4. Changes from Previous Releases
5. Known Issues
6. Disclaimer

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Tips for adding support to latest uBoot when I have 1.1.1 level source
September 22, 2016 10:08PM
Those are the directions I followed. Result from make is as follows:

In file included from /media/Development/Arm/Devices/KuroBox_Pro/u-boot/board/mv88fxx81/osServices/uboot/mvOsUboot.h:79:0,
                 from /media/Development/Arm/Devices/KuroBox_Pro/u-boot/board/mv88fxx81/osServices/mvOs.h:106,
                 from /media/Development/Arm/Devices/KuroBox_Pro/u-boot/board/mv88fxx81/Board/Nflash/mvNflashHwIf.c:64:
/media/Development/Arm/Devices/KuroBox_Pro/u-boot/board/mv88fxx81/Board/Nflash/mvNflashHwIf.c: In function ‘mvNflash16bitDataSet’:
/media/Development/Arm/Devices/KuroBox_Pro/u-boot/board/mv88fxx81/Board/Nflash/mvNflashHwIf.c:228:52: error: lvalue required as increment operand
         MV_MEMIO16_WRITE(DATA_CMD, *((MV_U16*)pSrc)++);
                                                    ^
/media/Development/Arm/Devices/KuroBox_Pro/u-boot/board/mv88fxx81/osServices/uboot/ArchARM/mvUbootArm.h:52:64: note: in definition of macro ‘MV_MEMIO16_WRITE’
     ((*((volatile unsigned short*)(addr))) = ((unsigned short)(data)))
                                                                ^
/media/Development/Arm/Devices/KuroBox_Pro/u-boot/board/mv88fxx81/Board/Nflash/mvNflashHwIf.c: In function ‘mvNflash16bitDataGet’:
/media/Development/Arm/Devices/KuroBox_Pro/u-boot/board/mv88fxx81/Board/Nflash/mvNflashHwIf.c:294:25: error: lvalue required as increment operand
         *((MV_U16*)pDst)++ = MV_MEMIO16_READ(DATA_CMD);
                         ^
/media/Development/Arm/Devices/KuroBox_Pro/u-boot/config.mk:175: recipe for target '/media/Development/Arm/Devices/KuroBox_Pro/u-boot/board/mv88fxx81/Board/Nflash/mvNflashHwIf.o' failed
make[1]: *** [/media/Development/Arm/Devices/KuroBox_Pro/u-boot/board/mv88fxx81/Board/Nflash/mvNflashHwIf.o] Error 1
make[1]: Leaving directory '/media/Development/Arm/Devices/KuroBox_Pro/u-boot/board/mv88fxx81/db88f5181'
Makefile:171: recipe for target 'board/mv88fxx81/db88f5181/libdb88f5181.a' failed
make: *** [board/mv88fxx81/db88f5181/libdb88f5181.a] Error 2



Ray

-------------------------------
Mod edit: use code tags



Edited 1 time(s). Last edit at 09/24/2016 02:51PM by bodhi.
Re: Tips for adding support to latest uBoot when I have 1.1.1 level source
September 29, 2016 06:28AM
rayknight Wrote:
-------------------------------------------------------
> I'm trying to create a uboot for my Kurobox-Pro.
> I accidentally overwrote mtd0, so if the device
> goes down I'm hosed as the binary image can't be
> found online!

you tried asking this guy if he can clone his device's uboot for you? http://www.cyrius.com/debian/orion/buffalo/kuroboxpro/
I have the same issue with old U-Boot. I do not brick my device but, i can't make right u-boot for my device.
I have a WD Sharespace which is compatible to 88f5181 board as on topicstarter.
GPL consist u-boot 1.1.1 sources but during make it fails because of pretty old gcc descriptors used.

make[1]: Entering directory '/srv/gpl_src/package/u-boot/u-boot-1.1.1/examples'
arm-linux-gnueabi-gcc: error: unrecognized command line option ‘-mshort-load-bytes’
arm-linux-gnueabi-gcc: error: unrecognized command line option ‘-mapcs-32’
arm-linux-gnueabi-gcc: error: unrecognized command line option ‘-mshort-load-bytes’
arm-linux-gnueabi-gcc: error: unrecognized command line option ‘-mapcs-32’

and at the end it fails with

arm-linux-gnueabi-gcc -g  -Os   -fno-strict-aliasing  -fno-common -ffixed-r8 -mshort-load-bytes -msoft-float -D__KERNEL__ -DTEXT_BASE=0x00f10000 -I/srv/gpl_src/package/u-boot/u-boot-1.1.1/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabi/4.9/include -pipe  -DCONFIG_ARM -D__ARM__ -mapcs-32 -march=armv5 -g  -Os   -fno-strict-aliasing  -fno-common -ffixed-r8 -mshort-load-bytes -msoft-float -D__KERNEL__ -DTEXT_BASE=0x00f10000 -I/srv/gpl_src/package/u-boot/u-boot-1.1.1/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabi/4.9/include -pipe  -DCONFIG_ARM -D__ARM__ -mapcs-32 -march=armv5 -Wall -Wstrict-prototypes -c -o stubs.o stubs.c
arm-linux-gnueabi-gcc: error: unrecognized command line option ‘-mshort-load-bytes’
arm-linux-gnueabi-gcc: error: unrecognized command line option ‘-mapcs-32’
arm-linux-gnueabi-gcc: error: unrecognized command line option ‘-mshort-load-bytes’
arm-linux-gnueabi-gcc: error: unrecognized command line option ‘-mapcs-32’
/srv/gpl_src/package/u-boot/u-boot-1.1.1/config.mk:175: recipe for target 'stubs.o' failed
make[1]: *** [stubs.o] Error 1
make[1]: Leaving directory '/srv/gpl_src/package/u-boot/u-boot-1.1.1/examples'
Makefile:162: recipe for target 'examples' failed
make: *** [examples] Error 2

My wish to make new u-boot supporting ext4 and larger than 2Tb HDDs.
But i stuck at the begining.
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: