• Home
  • Help
  • Search
  • Login
  • Register
  Show Posts
Pages: [1]
1  Hardware and U-Boot firmware / U-Boot stuff / Re: U-Boot not responding to keyboard input on: August 21, 2009, 12:12:02 PM
I can think of three things that might be wrong:

1) Something wrong with the serial connection on the PC end. This seems unlikely, as you've tried different software, and presumably the output you've pasted was seen from both.

2) Something wrong with the serial connection on the Sheeva (firmware setting like parity, etc.?). You should be able to reset all this stuff using the alpha6 installer (search these forums -- you can't miss it), which resets all uboot settings. Of course, there could be a real hardware problem with your plug.

3) Something wrong with the serial cable, or a loose connection.

To distinguish among these various possibilities, I would first answer the following: have you ever had the device working correctly, serial connection and all? (I notice that it's not booting fully in your pasted output.) If you had it working before, and changed nothing regarding the hardware or PC settings, you can probably rule out #1 and #3, above.

Then learn how to use the alpha6 installer. This will serve you well in all future experimentation anyway, and if the problem is with some device setting, it will be fixed right away. If that doesn't fix it, and the problem persists across multiple host PCs and mini-USB cables, then I'd guess something broken with the plug hardware. It's weird to get all that serial output faithfully, though, with no control -- especially the '0' character right after "Hit any key to stop autoboot", which I presume YOU typed, and was echoed back by the plug. That indicates correct, full-duplex serial connectivity.

-Ann



2  Hardware and U-Boot firmware / U-Boot stuff / Re: Where does u-boot store the env variables such as bootargs? on: August 21, 2009, 09:25:50 AM
Hey, Rooster.

You will need to
...
edit the /etc/fw_env.config according to flash sector size and address.
...
I will try to get the correct settings tomorrow

Any luck with this?

Eagerly awaiting the ability to have the Sheeva rewrite its own firmware.

- Ann

3  Hardware and U-Boot firmware / U-Boot stuff / Re: Where does u-boot store the env variables such as bootargs? on: August 19, 2009, 01:51:28 PM
That's odd, Cq.

"apt-get install uboot-envtools" worked for me, from the Alpha6 installer. What output do you get from this command?

Can you install other packages? "apt-get install build-essential"?

Finally, what happens when you do this? :
Code:
root@ubuntu:~# cat /etc/apt/sources.list
deb http://ports.ubuntu.com/ jaunty main restricted universe multiverse
deb http://ports.ubuntu.com/ jaunty-updates main restricted universe multiverse
deb http://ports.ubuntu.com/ jaunty-security main restricted universe multiverse

-Ann
4  Hardware and U-Boot firmware / U-Boot stuff / Re: Where does u-boot store the env variables such as bootargs? on: August 18, 2009, 12:38:32 PM
The error produced when I try to update the u-boot settings:
    Cannot malloc -327680 bytes: Cannot allocate memory
indicates a computational bug in either the fw_setenv tool or its interaction with a dependent library (you can't allocate negative memory!).

Unfortunately, that seems consistent with the description offered in the thread mentioned above:
I think it won't work...
U-Boot is burned using 4bit ECC including its env variable,
While your Linux probably support only 1 bit ECC.

For the NAND found on the SheevaPlug, 1 bit ECC should be enough since it have an SLC Nand.
However the KW BootROM support only 4bit ECC or none, so it better use the 4 bit ECC...

I think there are few options, all are not simple:
1) Changing the U-Boot to treat the env variable with 1 bit ECC.
2) Rewrite the user tool so it will write to the MTD without ECC and write the 4bit ECC to the OOB manually.
3) Add 4 bit ECC to the Linux, this will be part of future LSP releases, it should be safer for MLC NAND, however it will slow down the NAND access.

I was hoping that between April (when that analysis was done) and now someone might have taken on one of the three steps mentioned there.

Or perhaps that analysis is incorrect? I am not qualified to say.

- Ann
5  Hardware and U-Boot firmware / U-Boot stuff / Re: Where does u-boot store the env variables such as bootargs? on: August 18, 2009, 12:27:13 PM
Update:

I have installed the following /etc/fw_env.config
Code:
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundand
# environment sector is assumed present.
# MTD device name       Device offset   Env. size       Flash sector size
/dev/mtd0               0xa0000         0x70000         0x20000

I found this config from the following thread:
http://plugcomputer.org/plugforum/index.php?topic=117.0

As reported in that thread, this config produces a working fw_printenv, but a non-working fw_setenv.
 Sad
Code:
root@ubuntu:~# fw_printenv | grep bootdelay
Read error on /dev/mtd0: Success
bootdelay=3

root@ubuntu:~#  fw_setenv bootdelay 4
Read error on /dev/mtd0: Success
Unlocking flash...
Done
Cannot malloc -327680 bytes: Cannot allocate memory
Error: can't write fw_env to flash

root@ubuntu:~# fw_printenv | grep bootdelay
Read error on /dev/mtd0: Success
bootdelay=3

Hopefully, a slightly tweaked config file can yield better results.



... I was thinking of upgrading to Alpha-6 kernel and uboot anyway.  Which I did.
I also updated my system to the alpha6 stuff right away, CqCn. Been running alpha6 from NFS, NAND, and USB stick, all successfully.

- Ann
6  Hardware and U-Boot firmware / U-Boot stuff / Re: Where does u-boot store the env variables such as bootargs? on: August 18, 2009, 12:02:37 PM
fw_setenv fw_getenv in Ubuntu is in uboot-envtools package, simply aptitude install it.
Thanks, Rooster! Worked fine, though did not install /etc/fw_env.config. Guess we will create...


You will need to manage to get a mapping to the uboot environment settings (probably add to uboot environments to mtdparts) and then edit the /etc/fw_env.config according to flash sector size and address.

My NAND layout (post alpha6-installer) is:
Code:
root@ubuntu:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00400000 00020000 "uImage"
mtd2: 1fb00000 00020000 "root"

My u-boot settings for successfully booting from NAND are:
Code:
setenv bootcmd 'nand read.e 0x800000 0x100000 0x400000; bootm 0x800000'
setenv bootargs 'console=ttyS0,115200 mtdparts=orion_nand:0x100000@0x000000(u-boot)ro,0x400000@0x100000(uImage)ro,0x1fb00000@0x500000(rootfs)rw root=/dev/mtdblock2 rootfstype=jffs2'
though I'm currently booting from NFS, as noted above in previous post.


The for fw_env.config format is as follows:
...
Cool. Which of the above info is relevant to producing the correct config?

I will try to get the correct settings tomorrow
Thank you!

Smiley
7  Hardware and U-Boot firmware / U-Boot stuff / Re: Where does u-boot store the env variables such as bootargs? on: August 18, 2009, 11:20:18 AM
Ann, Curious about the boot over nfs part.  Why not install all the development tools with apt-get? 
Yes -- I have indeed used apt-get to install build-essential and the other tools on the Plug itself.

Why NFS?
1) Because I can modify all the Plug's files from both the x86 development server (which has sophisticated editors, scripting languages, etc.), and from the stripped-down Sheeva. Sometimes it's helpful to modify the filesystem when the Sheeva is powered off.
2) When connected with cat6 cable straight to the desktop x86 NFS server (and maybe its RAID?), it's probably the Sheeva's highest-performing storage solution.
3) The Plug can use all the storage space available to the more powerful development system.

ShPlug is definitely fast enough for development. 
I agree -- the Sheeva is fast enough to do its own builds (especially for the things OTHER than the kernel!   Wink ), so that's my intention too.

I would be interested in a full tools howto -- where to get the complete environment, ...
Me too, and have put up a thread requesting same. But in place of that, all we can do is share setups. I've only had my Plug a week, so my set up is rapidly evolving. But currently, it's like this:

I have a linux x86, full desktop / development system, which holds various kernels and root filesystems for the Sheeva. These are ultimately organized under one (grand-)parent directory, and exported over both NFS and TFTP. So switching between kernels or filesystems means changing only one u-boot parameter.

For the record, this development system is actually a VirtualBox virtual machine, hosted on my MacBook Pro, and it has two (virtual) network cards: one is connected (via NAT) to the MacBook's AirPort, for internet connectivity; the other is bridged to the laptop's gigabit ethernet card, which is cabled directly to the Sheeva.

The gigabit interface on the Mac, the gigabit interface on the VirtualBox, and the gigabit interface on the Plug are all configured  on the the 172.16.*.* subnet, and the linux system forwards packets from one interface to the other, so that the Plug can use the VBox's 172.16 address as a gateway.

End result: I can carry all gear with me in my bag, then carry out the following steps when I'm ready to play:
1) Wake laptop from sleep and restore VirtualBox from its latest snapshot (30-45 seconds)
2) Cable Sheeva to laptop and boot. (another 30 seconds or so to SSH prompt)
Any internet access the laptop has is shared among all systems, and there's no need to use the serial cable.*

*except to switch boot settings, which is one more reason why we need this thread resolved!

But I keep thinking it should be possible to write this env utility in a script language, either bash or something like php...  That is my current interest.
  Exactly!

-Ann
8  Hardware and U-Boot firmware / U-Boot stuff / Re: Where does u-boot store the env variables such as bootargs? on: August 17, 2009, 10:38:47 AM
While I have not exhausted every file there, I could not anything starting with fw_ at all.  My lack of familiarity with this whole environment.  Have you seen the actual source code file there?

Not yet. Since I cannot (yet) figure out how to get a proper development environment working for this device on an x86 host, I intend to set up a development environment by booting the device over NFS. Then i will try installing gcc, libc, and git from the operating system utilities. Finally, I will try to find the source for the uBoot utilities and compile them using the device itself.

Will report back on results.

-Ann
9  Linux Stuff / General Linux questions / Cross-compiling / embedded tutorial? on: August 17, 2009, 08:05:27 AM
Hello, Sheevans.

I am looking for some information on how to set up a fully-featured development environment for the Sheeva on an x86-based Debian and/or RedHat i386 host. I would like to be able to perform the following tasks from the development system:

1) Compile the kernel from the cross-compiler / development environment (covered already in http://www.plugcomputer.org/plugwiki/index.php/Compiling_Linux_Kernel_for_the_Plug_Computer
2) Create an appropriate minimal root filesystem for Ubuntu and/or Fedora (from their installers?)
3) Use the OS-native package manger to install software on top of the minimal root FS (using chroot?)
4) Use the cross-compiler to build arbitrary source code for the Sheeva
5) Strip unnecessary files from the resulting root file system

Has anyone accomplished the majority of these? Care to share?  Smiley

- Ann
10  Hardware and U-Boot firmware / U-Boot stuff / Re: Where does u-boot store the env variables such as bootargs? on: August 17, 2009, 07:52:10 AM
Ann,
Could you please provide a link to the source code?

Here's the source code...
git://git.denx.de/u-boot.git

form http://git.denx.de/?p=u-boot.git;a=summary
-Ann
11  Hardware and U-Boot firmware / U-Boot stuff / Re: Where does u-boot store the env variables such as bootargs? on: August 16, 2009, 08:46:12 PM
A way to configure Sheeva's uboot from its own bash shell to be exact. 

Unfortunately, the fw_printenv and fw_setenv utilities in the installer appear to be compiled for the x86 side of things.

This page:
http://elinux.org/U-boot_environment_variables_in_linux
suggests that cross-compiling the fw_printenv and fw_setenv utilities in a properly-set up cross-compilation environment will work.
But no binaries to prove it are provided.    Huh

Perhaps someone out there who has a "real" cross-compilation environment wants to try this and post results?

- Ann

12  Hardware and U-Boot firmware / U-Boot stuff / Re: uboot-envtools on: August 16, 2009, 08:31:54 PM
So the conclusion of this thread was...
There's currently no way for the plug to update its own uBoot settings, from a script?

Is this still true?

- Ann

 Undecided
Pages: [1]