• Home
  • Help
  • Search
  • Login
  • Register
  Show Posts
Pages: 1 [2] 3
16  Hardware and U-Boot firmware / U-Boot stuff / Re: DENX Open Das U-Boot on SheevaPlug on: August 04, 2011, 06:21:11 PM
I see your point.  Make a separate /boot partition and don't change it very often.

You could try re-defining the mtd partitions.  This is done in uboot when the mtdparts environment variable is set.  On my SheevaPlug it is "mtdparts=mtdparts=orion_nand:512k(uboot),4m@1m(kernel),507m@5m(rootfs)".

Maybe "mtdparts=mtdparts=orion_nand:512k(uboot),100m@1m(boot),407m@105m(extra)" or "mtdparts=mtdparts=orion_nand:512k(uboot),4m@1m(kernel),100m@5m(boot),403m@105m(extra)" if you want to keep a uboot image in the default location.  Note, my math might be wrong, it needs to be verified.

I don't remember if I had to set mtdids first or if uboot took care of it:  "mtdids=nand0=orion_nand".  Then in my boot sequence, I run "ubi part nand0,2; ubifsmount rootfs; ubifsload 0x1100000 /boot/uInitrd; ubifsload 0x800000 /boot/uImage".  After a ubifs is mounted, you can run ubifsls to list files on the file system.
17  Linux Stuff / General Linux questions / Re: "UBI device does not have free logical eraseblocks"? on: August 04, 2011, 05:36:50 PM
It is normal for there to be no erase blocks when a ubifs takes up the whole mtd partition.  The numbers are in your ubinfo for /dev/ubi0.  You need:

mkfs.ubifs -m 2048 -e 129024 -c 1984 -r ./romfs ./images/rootfs.ubifs.

For my SheevaPlug, with 512 MB NAND, I used:

Code:
cp -ax . /opt/ubi
mkfs.ubifs -m 2048 -e 129024 -c 4053 -r /opt/ubi ubifs.img
ubiupdatevol /dev/ubi0_1 ubifs.img

My ubinfo:

Code:
root@debian:/# ubinfo -a
UBI version:                    1
Count of UBI devices:           1
UBI control device major/minor: 10:62
Present UBI devices:            ubi0

ubi0
Volumes count:                           1
Logical eraseblock size:                 129024 bytes, 126.0 KiB
Total amount of logical eraseblocks:     4053 (522934272 bytes, 498.7 MiB)
Amount of available logical eraseblocks: 0 (0 bytes)
Maximum count of volumes                 128
Count of bad physical eraseblocks:       3
Count of reserved physical eraseblocks:  40
Current maximum erase counter value:     25
Minimum input/output unit size:          2048 bytes
Character device major/minor:            252:0
Present volumes:                         1

Volume ID:   1 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        4009 LEBs (517257216 bytes, 493.3 MiB)
State:       OK
Name:        rootfs
Character device major/minor: 252:2
root@debian:/#
18  Linux Stuff / Kernel / Re: uboot and kernel HowTo newer Version? on: August 04, 2011, 03:54:27 PM
You can get a new (DENX OpenBoot) version of uboot for DockStar from the link on the page http://www.cyrius.com/debian/kirkwood/sheevaplug/uboot-upgrade.html.

You can install Debian using Martin's instructions on http://www.cyrius.com/debian/kirkwood/sheevaplug/install.html.  You need to have serial console access to the DockStar, but there are also links on that page leading to serial access instructions.
19  Hardware and U-Boot firmware / U-Boot stuff / Re: DENX Open Das U-Boot on SheevaPlug on: August 03, 2011, 10:51:42 PM
You don't need a separate filesystem for /boot.  I have the whole Debian base running on one ubifs partition.  The SheevaPlug came with three partitions defined on the MTD NAND:

# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00400000 00020000 "uImage"
mtd2: 1fb00000 00020000 "root"

u-boot is 1 MB, uImage is 4 MB and root is the remaining 507 MB.  It came with a basic linux using jffs2 on root.  It was only using about 10% of root.  My base Debian install took about half of it, reformatted as ubifs.  It is now about 75% full after I installed x11vnc and xrfb.  I am thinking I will set it up to mount /usr/local from a USB or SD drive.  Then I can put most applications there.  I am also thinking that with DENX U-Boot working so well there really is no need for the 4 MB NAND partition for uImage.  It seems to load quicker from ubifs.
20  Hardware and U-Boot firmware / Hardware / Re: SheevaPlug Power Supply Failure on: August 03, 2011, 02:11:01 PM
I think the design of the SheevaPlug with respect to cooling is pisspoor at best.  There should be wider ventilation slots and more of them.  The power supply compartment gets no ventilation at all.  It's no wonder that it fails.

The soc and memory have a poorly fitting aluminium heat spreader, and that is backed up against the plastic case.

Soon, I plan to enhance the cooling, at least by drilling some ventilation holes.
21  Hardware and U-Boot firmware / U-Boot stuff / Re: uboot binaries on: August 03, 2011, 01:51:11 PM
Somewhere in the Plug Wiki, http://plugcomputer.org/plugwiki/index.php?title=Main_Page, I read that the plug can be fussy about USB drives.  FAIK it's fussy about SD also.
22  Hardware and U-Boot firmware / U-Boot stuff / Re: DENX Open Das U-Boot on SheevaPlug on: August 03, 2011, 01:48:25 PM
I should add that it didn't work until I changed the root= argument to ubi!rootfs.  The exclamation point. '!' is mentioned in the UBI FAQ, http://www.linux-mtd.infradead.org/faq/ubifs.html#L_mount_ubifs, for situations where the kernel boot loader gets "confused".

I went through several iterations of this before I got it to work.  I had a working system on an 8 GB SD flash that I copied to make the ubifs image.  I modified etc/fstab on the copy, but that by itself is not enough.  Root has to be mounted before fstab can be read.
23  Hardware and U-Boot firmware / U-Boot stuff / Re: DENX Open Das U-Boot on SheevaPlug on: August 03, 2011, 01:19:32 PM
I used Martin Michlmayr's instructions on http://www.cyrius.com/debian/kirkwood/sheevaplug/install.html to upgrade U-Boot and install the testing version of Debian Linux.

I got there from the Debian page in the Plug Wiki, http://plugcomputer.org/plugwiki/index.php?title=Main_Page.

Ubifs is recommended on another Plug Wiki page,  http://plugcomputer.org/plugwiki/index.php/Installing_Debian_To_Flash.  That page refers to http://www.linux-mtd.infradead.org/doc/ubifs.html#L_overview for more information.

With a recent Debian kernel, ubifs is built in.  Still, it is tricky to get Linux to mount it as root.  You have to pass the right arguments to the kernel by setting bootargs in U-Boot.  In my case, "console=ttyS0,115200n8 root=ubi!rootfs rw rootfstype=ubifs rootflags=noatime,rw mtdparts=orion_nand:512k(uboot),4m@1m(kernel),507m@5m(rootfs)" are the ones I used.

To read the kernel and Initrd from ubifs, you have to mount it first:  "ubi part nand0,2; ubifsmount rootfs; ubifsload 0x1100000 /boot/uInitrd; ubifsload 0x800000 /boot/uImage".  Note, uInitrd and Uimage are in the boot directory on the root ubi filesystem.

In order to create, format and mount ubifs volumes, you need to install the mtd-utils.  As a bonus, you get some flash tools including fw_printenv and fw_setenv.
24  Linux Stuff / Linux distributions / Re: NEW guruplug / openrd / sheeva installer images WHEEZY on: August 01, 2011, 10:03:04 PM
I succeeded in getting wheezy working on my SheevaPlug, both on sd/mmc and on nand.

I couldn't get USB working.  I think the USB flash drive I tried was flakey.  Nand is working on ubifs.
25  Hardware and U-Boot firmware / U-Boot stuff / DENX Open Das U-Boot on SheevaPlug on: August 01, 2011, 09:28:59 PM
I installed the latest DENX U-Boot, U-Boot 2011.06 (Jul 03 2011 - 02:54:01), compiled for SheevaPlug.  I have had no problems with it, other than my ignorance.  I can now boot from a ubifs partition on MTD NAND.

The commands in this version more closely match those in the DULG manual, http://www.denx.de/wiki/DULG/Manual, than those in Marvell U-Boot.  There are still some gaps, notably for the ubi commands:
Code:
ubi     - ubi commands
ubifsload- load file from an UBIFS filesystem
ubifsls - list files in a directory
ubifsmount- mount UBIFS volume
ubifsumount- unmount UBIFS volume

Marvell>> ? ubi
ubi - ubi commands

Usage:
ubi part [part] [offset]
 - Show or set current partition (with optional VID header offset)
ubi info [l[ayout]] - Display volume and ubi layout information
ubi create[vol] volume [size] [type] - create volume name with size
ubi write[vol] address volume size - Write volume from address with size
ubi read[vol] address volume [size] - Read volume to address with size
ubi remove[vol] volume - Remove volume
[Legends]
 volume: character name
 size: specified in bytes
 type: s[tatic] or d[ynamic] (default=dynamic)

Marvell>> ? ubifsmount
ubifsmount - mount UBIFS volume

Usage:
ubifsmount <volume-name>
    - mount 'volume-name' volume

I tried to find clues in the source code, but I founf the following by trial and error:
Code:
Marvell>> ubi part nand0,2
Creating 1 MTD partitions on "nand0":
0x000000500000-0x000020000000 : "mtd=2"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=2"
UBI: MTD device size:            507 MiB
UBI: number of good PEBs:        4053
UBI: number of bad PEBs:         3
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 4053
UBI: number of PEBs reserved for bad PEB handling: 40
UBI: max/mean erase counter: 25/10
Marvell>> ubifsmount rootfs
UBIFS: mounted UBI device 0, volume 1, name "rootfs"
UBIFS: mounted read-only
UBIFS: file system size:   515837952 bytes (503748 KiB, 491 MiB, 3998 LEBs)
UBIFS: journal size:       9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: LZO
UBIFS: reserved for root:  0 bytes (0 KiB)
Marvell>> ubifsload 0x800000 /boot/uImage
Loading file '/boot/uImage' to addr 0x00800000 with size 1579576 (0x00181a38)...
Done
Marvell>> iminfo 0x800000

## Checking Image at 00800000 ...
   Legacy image found
   Image Name:   Debian kernel
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1579512 Bytes = 1.5 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
26  Hardware and U-Boot firmware / U-Boot stuff / Re: Announcing plugenv 1.0 on: July 29, 2011, 01:06:04 PM
Hello,

I'm announcing the availabilty of plugenv 1.0.  It's a new utility base on sheeva-uboot-tools by Federico Heinz.  I had some issues running sheeva-uboot-tools but since it was fundamentally correct I spun it into plugenv.

Once it is installed on the plug it is as simple as "plugenv -e" (as root) to modify your uboot environment.  "plugenv -l" will list your existing environment.

description:
http://github.com/cbxbiker61/plugenv

git checkout:
git://github.com/cbxbiker61/plugenv.git

The "standard" way to do this in Das U-Boot is to enable the environment tools in the U-Boot source tree and include your kernel.  See:  http://www.denx.de/wiki/view/DULG/HowCanIAccessUBootEnvironmentVariablesInLinux.
 
This gives you fw_printenv and fw_setenv in /usr/bin.  The recent Debian dernels have this.  You have to have an  /etc/fw_env.config file for it to work.  For SheevaPlug:

Code:
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
#
# XXX this configuration might miss a fifth parameter for the "Number of
# sectors"

# MTD device name   Device offset   Env. size   Flash sector size
/dev/mtd0           0x60000         0x20000     0x20000
27  Hardware and U-Boot firmware / U-Boot stuff / Re: uboot binaries on: July 29, 2011, 12:08:28 PM
I recently tried the latest DENX U-Boot, compiled for Debian on SheevaPlug, http://people.debian.org/~tbm/u-boot/2011.03-6/sheevaplug/u-boot.kwb.  It comes up as:

Code:
U-Boot 2011.03 (Apr 26 2011 - 21:50:07)

Gone are the Marvell text "splash" and the Marvell stamp in the version string.  It has support for booting from ubifs and scripting.
28  Hardware and U-Boot firmware / U-Boot stuff / Re: dreamplug uboot bootdelay=0 on: July 21, 2011, 12:05:07 AM
On my SheevaPlug, the bootdelay always gets set back to 3 after the second reset.  I have tried various settings from 5 to 10.  I don't know if this has anything to do with your dreamplug, but there seems to be something in U-Boot that changes the bootdelay.
29  Hardware and U-Boot firmware / Hardware / Re: Power Plug rev 1.3 j6 uart and j7 on: July 14, 2011, 04:58:57 PM
Here are my images:





Oh well.  I guess I don't have link posting priviledges yet.
30  Hardware and U-Boot firmware / Hardware / Power Plug rev V7R1 on: July 14, 2011, 02:52:43 PM
My new Sheeva Plug 003-SP1001 has a Power Plug V7R1 board.  It came with J2, J4, J7. and J16 populated (with jacks).  It also seems to have all the necessary caps and choke for the 7-pin eSata jack, J10.  There are also a number of additional unpopulated jack sites.  Here is the list:

  • J1  - External Ethernet
  • J2  - 2-pin jack labeled 2.5v
  • J3  - 4-pin from power supply
  • J4  - 8-pin jack
  • J5  - Ext. USB
  • J6  - 6-pin jack position
  • J7  - 3-pin jack labeled Uart
  • J8  - Ext. SD slot
  • J9  - Ext. Mini USB
  • J10 - 7-pin eSata jack position
  • J11 - 4-pin jack position
  • J12 - 1-pin position
  • J13 - 4-pin jack position
  • J14 - 4-pin jack position, CPU side, opposite of J14
  • J16 - 10pin jack

Whatever they are, not all would be usefull.  There's a couple of unpopulated chip positions, U12 and U17, not to mention associated caps resisters, etc.  I'll try to capture some images and post them.
Pages: 1 [2] 3