Skip to contentSkip to conversation

U-Boot and Linux on Walnut based board

U-Boot-Users Brian S. Park 3 participants 6 messages Jun 12, 2008 – Jun 14, 2008

lore
Share & tools
lore
#0 lore raw

Hi,
I'm trying to get the latest U-Boot 1.3.3 and Linux (any version) working on our custom board based on Walnut demo board. I have used U-Boot 1.0.0 and Linux 2.4.20 on our other similar board and that worked out well. However, a lot seems to have changed since then.

Since I'm using ELDK 4.1 now (used ELDK 2.1 for the old project), the old code does not compile properly. So, I'm trying to get the latest code to work with our new board and are having some issues.

1. U-Boot 1.3.3 works. But it does not boot the old Linux image or Linux 2.4.25 (latest 2.4?) compiled using ELDK 4.1
2. U-Boot 1.0.0 boots Linux 2.4.25 (latest 2.4?) compiled using ELDK 4.1.

Then I found out that the kernel parameter passing has changed and I should use powerpc architecture instead of ppc. But Linux 2.4.25 does not have powerpc architecture. So, I'm now trying 2.6 kernel. Using linux-2.6-latest.tar.bz2 from ftp://ftp.denx.de/pub/linux/. However, the powerpc architecture does not have walnut.c for configuring the board. I need to customize it since our custom board does not have FPGA.

What's the best way to build linux kernel that works on U-Boot 1.3.3?

Thanks.

Brian

===============================================================
Brian S. Park brian.park at corelis.com (562) 926-6727 x132
---------------------------------------------------------------
Everything we do helps our customers get to market FASTER with HIGHER quality and LOWER cost
===============================================================

#1 lore raw

Dear Brian,

Quoted 5 lines · in message <[email protected]> you wrote:

I'm trying to get the latest U-Boot 1.3.3 and Linux (any version) working on our custom board based on Walnut demo board. I have used U-Boot 1.0.0 and Linux 2.4.20 on our other similar board and that worked out well. However, a lot seems to have changed since then.

Indeed, these versions are really old. Must have been already used by the Troglodytes or so.

Quoted 2 lines

1. U-Boot 1.3.3 works. But it does not boot the old Linux image or Linux 2.4.25 (latest 2.4?) compiled using ELDK 4.1

It should boot them just fine. What exacl;y are the commands you are using, what your environment settings / boot areguments, and what the error messages?

Quoted 3 lines

2. U-Boot 1.0.0 boots Linux 2.4.25 (latest 2.4?) compiled using ELDK 4.1.

Then I found out that the kernel parameter passing has changed and I

No, not really. Only when you call for it.

Quoted 3 lines

should use powerpc architecture instead of ppc. But Linux 2.4.25 does not have powerpc architecture. So, I'm now trying 2.6 kernel. Using linux-2.6-latest.tar.bz2 from ftp://ftp.denx.de/pub/linux/. However,

Forget about FTP. Please use git instead. If you really want, you can use the snapshot feature of the web interface to download a tarball (but using real git is stongly preferred).

Quoted 2 lines

the powerpc architecture does not have walnut.c for configuring the board. I need to customize it since our custom board does not have FPGA.

Recent versions do have support for the walnut board. Please ignore the FTP server and download the current code from the git repository.

Quoted 1 line

What's the best way to build linux kernel that works on U-Boot 1.3.3?

Again: U-Boot 1.3.3 will boot your old 2.4 kernel just fine.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"No matter where you go, there you are..."          - Buckaroo Banzai
#2 lore raw

Wolfgang,
Thank you for your response.
Boot parameter I'm using is the following. bootargs=root=/dev/ram rw ramdisk_size=8192 console=ttyS0,115200 console=tty0 ip=192.168.1.157:192.168.1.86:192.168.1.2:255.255.255.0:DevUSB::off

It is the same bootarg that I used when using U-Boot 1.0.0. I left the other environment variable as default. They are different than my old system but I do not see why they would make a difference. The linux kernel and the ramdisk image are programmed on the flash at ffc00000 and ffd00000 respectively. When I run the kernel as I usually do, it just locks up after uncompressing the images. I tried defining and undefining CONFIG_OF_LIBFDT and they both behave the same way.

Below is the serial port capture of U-Boot 1.3.3 running on our old target. Only U-Boot has been updated.
Any help will be appreciated.

Thanks

Brian

=> printenv
bootcmd=run net_nfs
bootdelay=5
baudrate=115200
loads_echo=1
ethaddr=00:04:ac:e3:14:87
ipaddr=192.168.1.157
serverip=192.168.1.86
autoload=no
preboot=echo;echo Type \"run flash_nfs\" to mount root filesystem over NFS;echo gatewayip=192.168.1.2
netmask=255.255.255.0
netdev=eth0
hostname=DevUSB
nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} ramargs=setenv bootargs root=/dev/ram rw
addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off panic=1
addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate} flash_nfs=run nfsargs addip addtty;bootm ${kernel_addr} flash_self=run ramargs addip addtty;bootm ${kernel_addr} ${ramdisk_addr} net_nfs=tftp 200000 ${bootfile};run nfsargs addip addtty;bootm rootpath=/opt/eldk/ppc_4xx
bootfile=uImage
kernel_addr=ffc00000
ethact=ppc_4xx_eth0
bootargs=root=/dev/ram rw ramdisk_size=8192 console=ttyS0,115200 console=tty0 ip=192.168.1.157:192.168.1.86:192.168.1.2:255.255.255.0:DevUSB::off stdin=serial
stdout=serial
stderr=serial
ver=U-Boot 1.3.3 (Jun 12 2008 - 13:01:38)

Environment size: 1091/8187 bytes
=> imi ffc00000

## Checking Image at ffc00000 ...

    Legacy image found
    Image Name:   Linux-2.4.20
    Image Type:   PowerPC Linux Kernel Image (gzip compressed)
    Data Size:    559824 Bytes = 546.7 kB
    Load Address: 00000000
    Entry Point:  00000000
    Verifying Checksum ... OK

=> imi ffd00000

## Checking Image at ffd00000 ...
Legacy image found
Image Name:
Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
Data Size: 1967920 Bytes = 1.9 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
=> bootm ffc00000 ffd00000
## Booting kernel from Legacy Image at ffc00000 ...

    Image Name:   Linux-2.4.20
    Image Type:   PowerPC Linux Kernel Image (gzip compressed)
    Data Size:    559824 Bytes = 546.7 kB

Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
## Loading init Ramdisk from Legacy Image at ffd00000 ...

    Image Name:
    Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
    Data Size:    1967920 Bytes =  1.9 MB
    Load Address: 00000000
    Entry Point:  00000000
    Verifying Checksum ... OK
    Loading Ramdisk to 07dab000, end 07f8b730 ... OK
Quoted 45 lines · Wolfgang Denk

Dear Brian,

Quoted 5 lines · in message <[email protected]> you wrote:

I'm trying to get the latest U-Boot 1.3.3 and Linux (any version) working on our custom board based on Walnut demo board. I have used U-Boot 1.0.0 and Linux 2.4.20 on our other similar board and that worked out well. However, a lot seems to have changed since then.

Indeed, these versions are really old. Must have been already used by the Troglodytes or so.

Quoted 2 lines

1. U-Boot 1.3.3 works. But it does not boot the old Linux image or Linux 2.4.25 (latest 2.4?) compiled using ELDK 4.1

It should boot them just fine. What exacl;y are the commands you are using, what your environment settings / boot areguments, and what the error messages?

Quoted 3 lines

2. U-Boot 1.0.0 boots Linux 2.4.25 (latest 2.4?) compiled using ELDK 4.1.

Then I found out that the kernel parameter passing has changed and I

No, not really. Only when you call for it.

Quoted 3 lines

should use powerpc architecture instead of ppc. But Linux 2.4.25 does not have powerpc architecture. So, I'm now trying 2.6 kernel. Using linux-2.6-latest.tar.bz2 from ftp://ftp.denx.de/pub/linux/. However,

Forget about FTP. Please use git instead. If you really want, you can use the snapshot feature of the web interface to download a tarball (but using real git is stongly preferred).

Quoted 2 lines

the powerpc architecture does not have walnut.c for configuring the board. I need to customize it since our custom board does not have FPGA.

Recent versions do have support for the walnut board. Please ignore the FTP server and download the current code from the git repository.

Quoted 1 line

What's the best way to build linux kernel that works on U-Boot 1.3.3?

Again: U-Boot 1.3.3 will boot your old 2.4 kernel just fine.

Best regards,

Quoted 7 lines

Wolfgang Denk

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"No matter where you go, there you are..." - Buckaroo Banzai

===============================================================
Brian S. Park brian.park at corelis.com (562) 926-6727 x132
---------------------------------------------------------------
Everything we do helps our customers get to market FASTER with HIGHER quality and LOWER cost
===============================================================

#3 lore raw

Wolfgang,
I tried the following versions on our old board and found that booting linux stops working from 1.3.2-rc1. So, some change between 1.3.1 and 1.3.2-rc1 is causing my problem. Can you give me any pointers as to where to look?

1.0.0: works
1.2.0: works
1.3.0: works
1.3.1: works
1.3.2-rc1: does not work
1.3.2: does not work
1.3.3: does not work

Brian

Quoted 161 lines · Brian S. Park

Wolfgang,
Thank you for your response.
Boot parameter I'm using is the following. bootargs=root=/dev/ram rw ramdisk_size=8192 console=ttyS0,115200 console=tty0 ip=192.168.1.157:192.168.1.86:192.168.1.2:255.255.255.0:DevUSB::off

It is the same bootarg that I used when using U-Boot 1.0.0. I left the other environment variable as default. They are different than my old system but I do not see why they would make a difference. The linux kernel and the ramdisk image are programmed on the flash at ffc00000 and ffd00000 respectively. When I run the kernel as I usually do, it just locks up after uncompressing the images. I tried defining and undefining CONFIG_OF_LIBFDT and they both behave the same way.

Below is the serial port capture of U-Boot 1.3.3 running on our old target. Only U-Boot has been updated.
Any help will be appreciated.

Thanks

Brian

=> printenv
bootcmd=run net_nfs
bootdelay=5
baudrate=115200
loads_echo=1
ethaddr=00:04:ac:e3:14:87
ipaddr=192.168.1.157
serverip=192.168.1.86
autoload=no
preboot=echo;echo Type \"run flash_nfs\" to mount root filesystem over NFS;echo
gatewayip=192.168.1.2
netmask=255.255.255.0
netdev=eth0
hostname=DevUSB
nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} ramargs=setenv bootargs root=/dev/ram rw
addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off panic=1
addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate} flash_nfs=run nfsargs addip addtty;bootm ${kernel_addr} flash_self=run ramargs addip addtty;bootm ${kernel_addr} ${ramdisk_addr} net_nfs=tftp 200000 ${bootfile};run nfsargs addip addtty;bootm rootpath=/opt/eldk/ppc_4xx
bootfile=uImage
kernel_addr=ffc00000
ethact=ppc_4xx_eth0
bootargs=root=/dev/ram rw ramdisk_size=8192 console=ttyS0,115200 console=tty0 ip=192.168.1.157:192.168.1.86:192.168.1.2:255.255.255.0:DevUSB::off stdin=serial
stdout=serial
stderr=serial
ver=U-Boot 1.3.3 (Jun 12 2008 - 13:01:38)

Environment size: 1091/8187 bytes
=> imi ffc00000

## Checking Image at ffc00000 ...

    Legacy image found
    Image Name:   Linux-2.4.20
    Image Type:   PowerPC Linux Kernel Image (gzip compressed)
    Data Size:    559824 Bytes = 546.7 kB
    Load Address: 00000000
    Entry Point:  00000000
    Verifying Checksum ... OK

=> imi ffd00000

## Checking Image at ffd00000 ...
Legacy image found
Image Name:
Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
Data Size: 1967920 Bytes = 1.9 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
=> bootm ffc00000 ffd00000
## Booting kernel from Legacy Image at ffc00000 ...

    Image Name:   Linux-2.4.20
    Image Type:   PowerPC Linux Kernel Image (gzip compressed)
    Data Size:    559824 Bytes = 546.7 kB

Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
## Loading init Ramdisk from Legacy Image at ffd00000 ...

    Image Name:
    Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
    Data Size:    1967920 Bytes =  1.9 MB
    Load Address: 00000000
    Entry Point:  00000000
    Verifying Checksum ... OK
    Loading Ramdisk to 07dab000, end 07f8b730 ... OK
Quoted 45 lines · Wolfgang Denk

Dear Brian,

Quoted 5 lines · in message <[email protected]> you wrote:

I'm trying to get the latest U-Boot 1.3.3 and Linux (any version) working on our custom board based on Walnut demo board. I have used U-Boot 1.0.0 and Linux 2.4.20 on our other similar board and that worked out well. However, a lot seems to have changed since then.

Indeed, these versions are really old. Must have been already used by the Troglodytes or so.

Quoted 2 lines

1. U-Boot 1.3.3 works. But it does not boot the old Linux image or Linux 2.4.25 (latest 2.4?) compiled using ELDK 4.1

It should boot them just fine. What exacl;y are the commands you are using, what your environment settings / boot areguments, and what the error messages?

Quoted 3 lines

2. U-Boot 1.0.0 boots Linux 2.4.25 (latest 2.4?) compiled using ELDK 4.1.

Then I found out that the kernel parameter passing has changed and I

No, not really. Only when you call for it.

Quoted 3 lines

should use powerpc architecture instead of ppc. But Linux 2.4.25 does not have powerpc architecture. So, I'm now trying 2.6 kernel. Using linux-2.6-latest.tar.bz2 from ftp://ftp.denx.de/pub/linux/. However,

Forget about FTP. Please use git instead. If you really want, you can use the snapshot feature of the web interface to download a tarball (but using real git is stongly preferred).

Quoted 2 lines

the powerpc architecture does not have walnut.c for configuring the board. I need to customize it since our custom board does not have FPGA.

Recent versions do have support for the walnut board. Please ignore the FTP server and download the current code from the git repository.

Quoted 1 line

What's the best way to build linux kernel that works on U-Boot 1.3.3?

Again: U-Boot 1.3.3 will boot your old 2.4 kernel just fine.

Best regards,

Quoted 7 lines

Wolfgang Denk

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"No matter where you go, there you are..." - Buckaroo Banzai

===============================================================
Brian S. Park brian.park at corelis.com (562) 926-6727 x132
---------------------------------------------------------------
Everything we do helps our customers get to market FASTER with HIGHER quality and LOWER cost
===============================================================

Quoted 9 lines

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

===============================================================
Brian S. Park brian.park at corelis.com (562) 926-6727 x132
---------------------------------------------------------------
Everything we do helps our customers get to market FASTER with HIGHER quality and LOWER cost
===============================================================

#4 lore raw
Quoted 14 lines · Brian S. Park

Wolfgang,
I tried the following versions on our old board and found that booting linux stops working from 1.3.2-rc1. So, some change between 1.3.1 and 1.3.2-rc1 is causing my problem. Can you give me any pointers as to where to look?

1.0.0: works
1.2.0: works
1.3.0: works
1.3.1: works
1.3.2-rc1: does not work
1.3.2: does not work
1.3.3: does not work

Quoted 2 lines

Brian

Brian,

You are in an excellent position to use "git bisect" now! Do this, roughly:

    $ git checkout master
    $ git bisect start
    $ git bisect bad
    $ git bisect good v1.3.1

Compile and test the versions as indicated.
Then use either

    $ git bisect good
or
    $ git bisect bad

as appropriate.

Repeat until you have narrowed the search
down to just one suspect commit!

jdl

#5 lore raw
In reply to Brian S. Park

Dear Brian,

Quoted 5 lines · in message <[email protected]> you wrote:

I tried the following versions on our old board and found that booting linux stops working from 1.3.2-rc1. So, some change between 1.3.1 and 1.3.2-rc1 is causing my problem. Can you give me any pointers as to where to look?

I tried it with our 2.4.25 kernel, and I have to confirm that ther eis indeed a bug.

Quoted 7 lines

1.0.0: works
1.2.0: works
1.3.0: works
1.3.1: works
1.3.2-rc1: does not work
1.3.2: does not work
1.3.3: does not work

This is as close as I can get quickly:

	There are only 'skip'ped commit left to test.
	The first bad commit could be any of:
	d25dfe08fbd1220cb994e7e6b105049aa9aa8e79
	483e09a223c666269ef81d3573a6591b1046b0ef
	9b94ac61d2176185c30adf0793e079ec30e68687
	ff768cb168d8157c24a25016dbfbeb465e47f420

Stefan, could you [or anybody else?] please have a closer look what's going on there?

Thanks in advance.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Whom the gods would destroy, they first teach BASIC.