Experimental kernels available for testing for Rev-A1 and rev-C1 boards

60 views
Skip to first unread message

Joao Cardoso

unread,
Oct 13, 2010, 12:31:39 PM10/13/10
to Alt-F
In http://dl.dropbox.com/u/1555717/DNS-323/Alt-F/experimental/index.html
you will find several kernel images and a README.txt file that
explains the procedure to use then.

Alexey Boyko

unread,
Oct 18, 2010, 6:49:43 AM10/18/10
to Alt-F
> In  http://dl.dropbox.com/u/1555717/DNS-323/Alt-F/experimental/index.html
> you will find several kernel images and a README.txt file that
> explains the procedure to use then.

zImage-C1-testing-1 mostly works for me, but i need custom kernel for
Rev.C1.
How to build such kernel? which patches I need ?

Joao Cardoso

unread,
Oct 18, 2010, 9:48:31 AM10/18/10
to Alt-F
By the end of the week 0.1B5 will be released, with two patches for
supporting rev-C1 boards.

In http://code.google.com/p/alt-f/, in the wiki section, you find
instructions on how to build Alt-F
using the code and patches found in SVN.

Meanwhile, could you please tell us what "mostly works for me" means?
What does and does not work?

Alexey Boyko

unread,
Oct 18, 2010, 10:07:49 AM10/18/10
to Alt-F
> By the end of the week 0.1B5 will be released, with two patches for
> supporting rev-C1 boards.
>
> In http://code.google.com/p/alt-f/, in the wiki section, you find
> instructions on how to build Alt-F

btw, in Alt-F-utils, in configure script, there is a bashism - "echo -
e", which is not
working in debian "dash". Replace "#!/bin/sh" to "#!/bin/bash"

> using the code and patches found in SVN.

I see a lot of patches in alt-f-readonly/patches, which needed for
2.6.35.* ?

> Meanwhile, could you please tell us what "mostly works for me" means?
> What does and does not work?

I have no much time to investigate fully. kernel started, telnet/ftp/
web started.
After reading forum, I have checked fan/leds. I have not found fan
support, but led driver is works,

Joao Cardoso

unread,
Oct 18, 2010, 11:23:10 AM10/18/10
to Alt-F


On Oct 18, 3:07 pm, Alexey Boyko <ale...@boyko.km.ua> wrote:
> > By the end of the week 0.1B5 will be released, with two patches for
> > supporting rev-C1 boards.
>
> > Inhttp://code.google.com/p/alt-f/, in the wiki section, you find
> > instructions on how to build Alt-F
>
> btw, in Alt-F-utils, in configure script, there is a bashism - "echo -
> e", which is not
> working in debian "dash". Replace "#!/bin/sh" to "#!/bin/bash"

fixed, thanks

> > using the code and patches found in SVN.
>
> I see a lot of patches in alt-f-readonly/patches, which needed for
> 2.6.35.* ?

That directory is "historical", I have to delete it from SVN.
kernel patches can be found in toolchain/kernel-headers (!) and are
applied automatically.
But I have not yet svn commit the rev-C1 patches.

> > Meanwhile, could you please tell us what "mostly works for me" means?
> > What does and does not work?
>
> I have no much time to investigate fully. kernel started, telnet/ftp/
> web started.
> After reading forum, I have checked fan/leds. I have not found fan
> support, but led driver is works,

Good to know. Does buttons also work?

Could you please post the contents of /tmp/board?
For 0.1B5 the led/fan/button daemon exits if the board is not B1.
I will only enable it after having positive feedback from rev-C1/A1
users.
You have to wait a few more days to manually evaluate if the fan is
working, if you are willing to help.

Thanks

Joao Cardoso

unread,
Oct 18, 2010, 12:47:24 PM10/18/10
to Alt-F


On Oct 18, 4:23 pm, Joao Cardoso <whoami.jc...@gmail.com> wrote:
> On Oct 18, 3:07 pm, Alexey Boyko <ale...@boyko.km.ua> wrote:
>
> > > By the end of the week 0.1B5 will be released, with two patches for
> > > supporting rev-C1 boards.

OK, I put zImage-C1-testing-2, the candidate 0.1B5 kernel, in
http://dl.dropbox.com/u/1555717/DNS-323/Alt-F/experimental/index.html

Please read the zImage-C1-testing-1/2 in the README.txt and report
back.

Alexey Boyko

unread,
Oct 18, 2010, 1:31:27 PM10/18/10
to al...@googlegroups.com
> Good to know. Does buttons also work?

front button:
# od -x /dev/event0
0000000 b5c7 4cbd 543c 000a 0001 0074 0001 0000
0000020 b5c7 4cbd 5449 000a 0000 0000 0000 0000
0000040 b5c8 4cbd a31f 000c 0001 0074 0000 0000
0000060 b5c8 4cbd a328 000c 0000 0000 0000 0000

back button not work

> Could you please post the contents of /tmp/board?

# cat /tmp/board
B1

but on bottom side of device is label "Rev.C1"
standard kernel from Alt-F-0.1B4 not works.
Its powered off after loading.


# dmesg |grep DNS
Machine: D-Link DNS-323
DNS-323: Identified HW revision C1
DNS-323: Found ethernet MAC address: 1c:bd:b9:89:5f:21.


--
ale...@boyko.km.ua

Joao Cardoso

unread,
Oct 18, 2010, 2:17:46 PM10/18/10
to Alt-F


On Oct 18, 6:31 pm, "Alexey Boyko" <ale...@boyko.km.ua> wrote:
> > Good to know. Does buttons also work?
>
> front button:
> # od -x /dev/event0
> 0000000 b5c7 4cbd 543c 000a 0001 0074 0001 0000
> 0000020 b5c7 4cbd 5449 000a 0000 0000 0000 0000
> 0000040 b5c8 4cbd a31f 000c 0001 0074 0000 0000
> 0000060 b5c8 4cbd a328 000c 0000 0000 0000 0000

fine

> back button not work

hmm, looking at the code, the patch author seems to not have
determined which gpio is the reset switch. Or he just not care.
We have to live with it for now, unless you are able to edit some C
source code and compile the kernel?

> > Could you please post the contents of /tmp/board?
>
> # cat /tmp/board
> B1
> but on bottom side of device is label "Rev.C1"
> standard kernel from Alt-F-0.1B4 not works.
> Its powered off after loading.
>
> # dmesg |grep DNS
> Machine: D-Link DNS-323
> DNS-323: Identified HW revision C1

Thanks. My detection was in error, but with the new patche I can just
parse the dmesg output

Have you tested the fan with the zImage-C1-testing-2 kernel?

Thanks

Alexey Boyko

unread,
Oct 18, 2010, 3:12:08 PM10/18/10
to al...@googlegroups.com
>> back button not work
>
> hmm, looking at the code, the patch author seems to not have
> determined which gpio is the reset switch. Or he just not care.

I get this device recently. may be button is broken. I have not tested
it with standard firmware

> We have to live with it for now, unless you are able to edit some C
> source code and compile the kernel?

I can edit C source and compile kernel. But I cant connect serial to device
because that device is not mine own.

> Have you tested the fan with the zImage-C1-testing-2 kernel?

Just tested:

leds are working.

# cat /sys/devices/platform/mv64xxx_i2c.0/i2c-0/0-0048/temp1_input
36000


# cd /sys/class/hwmon/hwmon1/
# ls -l
lrwxrwxrwx 1 root root 0 Oct 19 16:44 device ->
../../../devices/platform/dns323c-fan.0
lrwxrwxrwx 1 root root 0 Oct 19 16:44 subsystem ->
../../hwmon
-rw-r--r-- 1 root root 4096 Oct 19 16:44 uevent
# cd device/
# ls -l
lrwxrwxrwx 1 root root 0 Oct 19 17:03 bus ->
../../../bus/platform
lrwxrwxrwx 1 root root 0 Oct 19 17:03 driver ->
../../../bus/platform/drivers/dns323c-fan
-r--r--r-- 1 root root 4096 Oct 19 17:03 fan1_input
lrwxrwxrwx 1 root root 0 Oct 19 17:03 hwmon:hwmon1 ->
../../../class/hwmon/hwmon1
-r--r--r-- 1 root root 4096 Oct 19 17:03 modalias
-r--r--r-- 1 root root 4096 Oct 19 17:03 name
-rw-r--r-- 1 root root 4096 Oct 19 17:04 pwm1
-rw-r--r-- 1 root root 4096 Oct 19 17:03 pwm1_enable
lrwxrwxrwx 1 root root 0 Oct 19 17:03 subsystem ->
../../../bus/platform
-rw-r--r-- 1 root root 4096 Oct 19 17:03 uevent
# echo 100 >pwm1
# readlink -f /sys/class/hwmon/hwmon1/device/pwm1
/sys/devices/platform/dns323c-fan.0/pwm1

fan is working.

--
ale...@boyko.km.ua

Joao Cardoso

unread,
Oct 18, 2010, 4:43:27 PM10/18/10
to Alt-F
Excellent!

0.1B5 will support rev-C1 hardware!

As for the back-button issue: support is missing in the kernel, it's
not your unity fault.

From the patched arch/arm/mach-orion5x/dns323-setup.c:

/* Rev C1 */
#define DNS323C_GPIO_KEY_POWER 1
#define DNS323C_GPIO_POWER_OFF 2
#define DNS323C_GPIO_LED_RIGHT_AMBER 8
#define DNS323C_GPIO_LED_LEFT_AMBER 9
#define DNS323C_GPIO_LED_POWER 17
#define DNS323C_GPIO_FAN_BIT1 18
#define DNS323C_GPIO_FAN_BIT0 19

static struct orion5x_mpp_mode dns323c_mpp_modes[] __initdata = {
{ 0, MPP_GPIO }, /* ? input */
{ 1, MPP_GPIO }, /* input power switch (0 =
pressed) */
{ 2, MPP_GPIO }, /* output power off */
{ 3, MPP_UNUSED }, /* ? output */
{ 4, MPP_UNUSED }, /* ? output */
{ 5, MPP_UNUSED }, /* ? output */
{ 6, MPP_UNUSED }, /* ? output */
{ 7, MPP_UNUSED }, /* ? output */
{ 8, MPP_GPIO }, /* i/o right amber LED */
{ 9, MPP_GPIO }, /* i/o left amber LED */
{ 10, MPP_GPIO }, /* input */
{ 11, MPP_UNUSED },
{ 12, MPP_SATA_LED },
{ 13, MPP_SATA_LED },
{ 14, MPP_SATA_LED },
{ 15, MPP_SATA_LED },
{ 16, MPP_UNUSED },
{ 17, MPP_GPIO }, /* power button LED */
{ 18, MPP_GPIO }, /* fan speed bit 0 */
{ 19, MPP_GPIO }, /* fan speed bit 1 */
{ -1 },
};

As you can see, there is no DNS323_GPIO_KEY_RESET defined, and some
gpio lines are unassigned.

The easy way to test those, is (eg, testing gpio 10, which is the
default reset switch for A1 and B1)

cd /sys/class/gpio/
echo 10 > export # this will print "1" if the gpio is in use, and will
not export the gpio
ls gpio10/
active_low direction edge subsystem uevent value

And now it would be necessary to configure and test it, read kernel
Documentation/gpio.txt, section "Paths in Sysfs" about line 544.
But it might be dangerous (I don't know) if you set an output line as
input, or vice-versa.

Thanks for your help, its been invaluable.

PS-I'm assuming that you can use and mount filesystems on disk and
that the network is working at 100Mbps and 1Gbps.

> --
> ale...@boyko.km.ua

Alexey Boyko

unread,
Oct 18, 2010, 4:58:11 PM10/18/10
to al...@googlegroups.com
> cd /sys/class/gpio/
> echo 10 > export # this will print "1" if the gpio is in use, and will
> not export the gpio
> ls gpio10/
> active_low direction edge subsystem uevent value
>
> And now it would be necessary to configure and test it, read kernel
> Documentation/gpio.txt, section "Paths in Sysfs" about line 544.
> But it might be dangerous (I don't know) if you set an output line as
> input, or vice-versa.


# cd /sys/class/gpio/
# echo 10 >export
# cd gpio10/
# cat active_low
0
# cat direction
in
# cat edge
none
# cat value
1
# cat value
0
# cat value
1

yes. its gpio10. I have pressed reset button and do `cat value`, its
changed

> PS-I'm assuming that you can use and mount filesystems on disk and
> that the network is working at 100Mbps and 1Gbps.

filesystems on disk mounts automatically. network works at 1G, jumbo
frames are possible.
I see 'hdparm -t /dev/sda1' at 55MBs, when with dlink firmware no more
then 25MBs.
I dont know why, but 'hdparm -t /dev/sda' show only 22MBs. (With dlink
firmware was 16MBs).

--
ale...@boyko.km.ua

Joao Cardoso

unread,
Oct 18, 2010, 5:14:45 PM10/18/10
to Alt-F
I already said excellent, don't know what else to say :-)

I put a zImage-C1-testing-3 in the usual place, can you please test
the back button using /dev/event0?

> > PS-I'm assuming that you can use and mount filesystems on disk  and
> > that the network is working at 100Mbps and 1Gbps.
>
> filesystems on disk mounts automatically. network works at 1G, jumbo  
> frames are possible.
> I see 'hdparm -t /dev/sda1' at 55MBs, when with dlink firmware no more  
> then 25MBs.
> I dont know why, but 'hdparm -t /dev/sda' show only 22MBs. (With dlink  
> firmware was 16MBs).

I have no idea. On my box:

# hdparm -Tt /dev/sda1

/dev/sda1:
Timing buffer-cache reads: 126 MB in 0.51 seconds = 250620 kB/s
Timing buffered disk reads: 133 MB in 3.01 seconds = 45129 kB/s

# hdparm -Tt /dev/sda

/dev/sda:
Timing buffer-cache reads: 128 MB in 0.51 seconds = 256617 kB/s
Timing buffered disk reads: 134 MB in 3.01 seconds = 45551 kB/s


> --
> ale...@boyko.km.ua

Alexey Boyko

unread,
Oct 18, 2010, 5:37:47 PM10/18/10
to al...@googlegroups.com
> I put a zImage-C1-testing-3 in the usual place, can you please test
> the back button using /dev/event0?

reset button works:

# uname -a
Linux dlink-895F21 2.6.35.7 #9 Mon Oct 18 22:06:40 WEST 2010 armv5tel
GNU/Linux
# od -x /dev/event0
0000000 f27a 4cbd a1f1 000c 0001 0198 0001 0000
0000020 f27a 4cbd a1fe 000c 0000 0000 0000 0000
0000040 f27b 4cbd 5047 0001 0001 0198 0000 0000
0000060 f27b 4cbd 5050 0001 0000 0000 0000 0000


--
ale...@boyko.km.ua

Joao Cardoso

unread,
Oct 19, 2010, 11:16:27 AM10/19/10
to Alt-F
One more test, please, related with the order of hardware enumeration.
Could you execute:

for i in $(seq 0 3); do cat /sys/class/hwmon/hwmon${i}/device/
name; done

on B1 it gives:

g760a
lm75
cat: can't open '/sys/class/hwmon/hwmon2/device/name': No such file or
directory
cat: can't open '/sys/class/hwmon/hwmon3/device/name': No such file or
directory

Thanks

Alexey Boyko

unread,
Oct 19, 2010, 2:14:23 PM10/19/10
to al...@googlegroups.com

> One more test, please, related with the order of hardware enumeration.
> Could you execute:
> for i in $(seq 0 3); do cat /sys/class/hwmon/hwmon${i}/device/
> name; done


dlink-895F21 login: root
COLUMNS=136;LINES=35;export COLUMNS LINES;
# for i in $(seq 0 3); do cat /sys/class/hwmon/hwmon${i}/device/name; done
lm75
dns323c-fan


cat: can't open '/sys/class/hwmon/hwmon2/device/name': No such file or
directory
cat: can't open '/sys/class/hwmon/hwmon3/device/name': No such file or
directory


--
ale...@boyko.km.ua

Reply all
Reply to author
Forward
0 new messages