• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Dreamplug patches  (Read 2527 times)
spinifex
Full Member
***

Karma: 8
Posts: 167



View Profile WWW
« on: December 07, 2011, 08:13:19 PM »

There are some interesting kernel patches around for the Dreamplug.
Check these urls

http://www.newit.co.uk/forum/index.php/topic,2574.0.html and http://www.solinno.co.uk/public/dreamplug/

http://people.debian.org/~zumbi/dreamplug/
https://github.com/bauermann/freedom-maker/tree/bauermann-improvs/kernel


There is a CPU frequency scaling patch (which is also applicable to the Sheevaplug), my understanding is that the CPU drops to 400MHz when unloaded. This is interesting for even lower power usage by Sheeva and Dreamplugs.

There is also a patch for SPI/NOR support on the Dreamplug. This produces /dev/mtd for the Dreamplug and potentially means that the Dreamplug u-boot environment can be read/written without a JTAG. I have this patch installed, but I have not yet figured out the finer details.

Logged

spinifex
Full Member
***

Karma: 8
Posts: 167



View Profile WWW
« Reply #1 on: December 07, 2011, 10:11:36 PM »

Further to this I have tested the SPI patch and it works beautifully!

This means that in many cases there is no need for a JTAG on a Dreamplug. The patch allows fast, easy display and update of the u-Boot environment.

Using fw_printenv/fw_setenv from u-boot-tools

Code:
# apt-get install u-boot-tools

and with

Code:
# cat /etc/fw_env.config

# 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                   0x30000          0x1000         0x1000
I am not sure why the offset of 0x30000, but it works.
/dev/mtd1 seems to be all 0xFF

I am guessing that this will change depending on your version u-Boot.


Versions:
U-Boot 2011.06-02334-g8f495d9-dirty (Mar 28 2011 - 05:21:06)
Debian Wheezy
Linux 3.1.4
Logged

cbxbiker61
Global Moderator
Sr. Member
*****

Karma: 38
Posts: 497


View Profile
« Reply #2 on: December 08, 2011, 04:44:05 AM »

Further to this I have tested the SPI patch and it works beautifully!

This means that in many cases there is no need for a JTAG on a Dreamplug. The patch allows fast, easy display and update of the u-Boot environment.

Using fw_printenv/fw_setenv from u-boot-tools

Code:
# apt-get install u-boot-tools

and with

Code:
# cat /etc/fw_env.config

# 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                   0x30000          0x1000         0x1000
I am not sure why the offset of 0x30000, but it works.
/dev/mtd1 seems to be all 0xFF

I am guessing that this will change depending on your version u-Boot.


Versions:
U-Boot 2011.06-02334-g8f495d9-dirty (Mar 28 2011 - 05:21:06)
Debian Wheezy
Linux 3.1.4


spinifex.  Why don't you see if you can patch plugenv for the dreamplug with the mtd driver.  It should be pretty easy.  I haven't looked at that code (since I modified/wrote it), but it seems to me if you can differentiate the dreamplug from the sheevaplug in the /proc filesystem it would be no problem.  I'm guessing you could do it in 10 lines or less.  I can't remember where the memory offsets are in the source files, but it should be pretty plain.

plugenv is pretty slick for modifying the u-boot environment within linux.

git@github.com:cbxbiker61/plugenv.git
« Last Edit: December 08, 2011, 04:47:21 AM by cbxbiker61 » Logged

spinifex
Full Member
***

Karma: 8
Posts: 167



View Profile WWW
« Reply #3 on: December 08, 2011, 06:42:42 PM »

Quote
spinifex.  Why don't you see if you can patch plugenv for the dreamplug with the mtd driver.
?

I had a quick look. I do not think it is necessary. It is simpler maybe than you think with the kernel patch.

e.g.
Code:

# cat /dev/mtd0 |hexdump -C -s 0x30000 -n 4096

00030000  c5 65 07 f9 73 65 72 6e  6f 3d 44 53 32 2d 31 31  |.e..serno=DS2-11|
00030010  31 33 2d 30 30 30 35 36  34 00 62 6f 6f 74 64 65  |13-000564.bootde|
00030020  6c 61 79 3d 33 00 62 61  75 64 72 61 74 65 3d 31  |lay=3.baudrate=1|
00030030  31 35 32 30 30 00 65 74  68 61 64 64 72 3d 46 30  |15200.ethaddr=F0|
00030040  3a 41 44 3a 34 45 3a 30  30 3a 37 39 3a 42 31 00  |:AD:4E:00:
...
000306e0  62 5f 62 6f 6f 74 63 6d  64 32 00 00 73 65 72 69  |b_bootcmd2..seri|
000306f0  61 6c 00 65 74 68 61 63  74 3d 65 67 69 67 61 30  |al.ethact=egiga0|
00030700  00 00 00 00 4e 75 6d 62  65 72 20 32 36 35 39 00  |....Number 2659.|
00030710  00 66 73 3a 65 74 68 31  3a 6f 66 66 00 00 00 00  |.fs:eth1:off....|
00030720  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

# mtd_debug info /dev/mtd0
mtd.type = MTD_NORFLASH
mtd.flags = MTD_CAP_NORFLASH
mtd.size = 524288 (512K)
mtd.erasesize = 4096 (4K)
mtd.writesize = 1
mtd.oobsize = 0
regions = 0

# mtd_debug info /dev/mtd1
mtd.type = MTD_NORFLASH
mtd.flags = MTD_CAP_NORFLASH
mtd.size = 65536 (64K)
mtd.erasesize = 4096 (4K)
mtd.writesize = 1
mtd.oobsize = 0
regions = 0

i.e. no transalations required.

Logged

Pages: [1]
Print
Jump to: