• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Announcing plugenv 1.0  (Read 2295 times)
cbxbiker61
Global Moderator
Sr. Member
*****

Karma: 38
Posts: 497


View Profile
« on: June 28, 2011, 08:04:15 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
« Last Edit: June 28, 2011, 08:25:40 PM by cbxbiker61 » Logged

spinifex
Full Member
***

Karma: 8
Posts: 167



View Profile WWW
« Reply #1 on: June 29, 2011, 12:28:26 AM »

Hello

I have compiled and tested. Using your 2.6.38.8 it works find for me.

While testing I found that when mtdparts is not defined as a kernel parameter it also works because the kernel creates the mtdparts for me  (I did not know this).

# cat /proc/cmdline
console=ttyS0,115200 ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs

dmesg gives
NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND 512MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 3 MTD partitions on "orion_nand":
0x000000000000-0x000000100000 : "u-boot"
0x000000100000-0x000000500000 : "uImage"
0x000000500000-0x000020000000 : "root"



So my usual NAND boot has a cmdline like:

# cat /proc/cmdline
console=ttyS0,115200 mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs


I changed this to:
console=ttyS0,115200 mtdparts=orion_nand:0x100000@0(u-boot)ro,0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs


The  problem is that when loading uImage from NAND and rootfs from USB (regardless of whether I define the 3 mtdparts or have no mtdparts),  I get a stream of kernel messages like:

Code:
Checking root file system...fsck from util-linux-ng 2.17.2
uncorrectable error :
uncorrectable error :
end_request: I/O error, dev mtdblock0, sector 0
Buffer I/O error on device mtdblock0, logical block 0
uncorrectable error :
uncorrectable error :
end_request: I/O error, dev mtdblock0, sector 0
Buffer I/O error on device mtdblock0, logical block 0
uncorrectable error :
(lots more the same)

I do not get the above messages, when the 0x100000@0(u-boot)ro mtdpart is not defined or when booting from mmc. It also only seems to happen when the rootfs is on USB.

Do you know what causes the messages (or how to stop them)?

Logged

cbxbiker61
Global Moderator
Sr. Member
*****

Karma: 38
Posts: 497


View Profile
« Reply #2 on: June 29, 2011, 12:52:25 AM »

Code:
Checking root file system...fsck from util-linux-ng 2.17.2
uncorrectable error :
uncorrectable error :
end_request: I/O error, dev mtdblock0, sector 0
Buffer I/O error on device mtdblock0, logical block 0
uncorrectable error :
uncorrectable error :
end_request: I/O error, dev mtdblock0, sector 0
Buffer I/O error on device mtdblock0, logical block 0
uncorrectable error :
(lots more the same)

I do not get the above messages, when the 0x100000@0(u-boot)ro mtdpart is not defined or when booting from mmc. It also only seems to happen when the rootfs is on USB.

Do you know what causes the messages (or how to stop them)?



It appears your boot sequence is running fsck against the u-boot partition.

"root=ubi0:rootfs" shouldn't that be ubi1:rootfs?
Logged

spinifex
Full Member
***

Karma: 8
Posts: 167



View Profile WWW
« Reply #3 on: June 29, 2011, 01:23:58 AM »

Quote
It appears your boot sequence is running fsck against the u-boot partition.
Yep.

[/quote]
"root=ubi0:rootfs" shouldn't that be ubi1:rootfs?
[/quote]
No,  root=ubi0:rootfs works fine.

Example of the boot cmdline causing the problem is:

# cat /proc/cmdline
console=ttyS0,115200 mtdparts=orion_nand:0x100000@0(u-boot)ro,0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) root=/dev/sda2 rootwait panic=10

The kernel has been loaded from NAND.

Succintly put, I only get the problem when 0x100000@0(u-boot)ro is in mtdparts.

Logged

spinifex
Full Member
***

Karma: 8
Posts: 167



View Profile WWW
« Reply #4 on: June 29, 2011, 03:59:50 AM »

On more investigation and rebooting

It seems that

# fdisk -l

Generates the same error messages

It seems that the solution is remove the env definition from mtdparts

Logged

bnborg
Newbie
*

Karma: 0
Posts: 31


View Profile
« Reply #5 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
Logged

Pages: [1]
Print
Jump to: