November 18, 2019, 08:19:08 am

News:

Have you visited the Allwinner Chipset wiki? - http://linux-sunxi.org/


CB2, kernel 3.4.75

Started by Valeron70, January 04, 2014, 03:47:39 am

Previous topic - Next topic

Valeron70

Hi, I build new kernel from https://github.com/patrickhwood/linux-sunxi as this tutorial http://www.cubieforums.com/index.php/topic,472.0.html
I copied uImage, /lib/modules and /lib/firmware on SD-card and reboot CB2.
But after loading cubieboard2, eth0 interface are missing !
Where is my mistake?

Saegematz

Maybe
To load ethernet: modprobe sunxi_gmac  To load wifi: modprobe bcmdhd

Valeron70

Solved!
in /etc/modules: sunxi_emac

patwood

Yes, about two months ago the emac and gmac drivers were made loadable modules, probably because different hardware started showing up with one or the other (I think the CT was the first with a gmac), and because most tablets and android sticks have neither.

You can always make it built in with menuconfig.

Valeron70

Pat, in which file(s) I can specify kernel signature? After build kernel, command "uname -r" said: "3.4.75-xxxxx-dirty"
I found only 3.4.75 - in Makefile

patwood

Quote from: Valeron70 on January 04, 2014, 08:51:41 pm
Pat, in which file(s) I can specify kernel signature? After build kernel, command "uname -r" said: "3.4.75-xxxxx-dirty"
I found only 3.4.75 - in Makefile


You need to have CONFIG_LOCALVERSION_AUTO=y set in your .config (you probably do if you're getting the -xxxx-dirty name), then put your signature in the file .scmversion in the top-level linux-sunxi directory.

Valeron70


Valeron70

/sys/class/leds/ is empty ! How to create and use leds?

Saegematz

Look in script.bin (script.fex), there are a few lines with led on lubuntu Images.
look after "modprobe gpio-sunxi"
ask patwood ;-)

rose28357

Somewhere i found this ...
Added in /etc/rc.local:
echo 64 > /sys/class/leds/blue:ph21:led1/brightness
echo 64 > /sys/class/leds/orange:ph20:led2/brightness
echo 64 > /sys/class/leds/white:ph11:led3/brightness
echo 64 > /sys/class/leds/green:ph07:led4/brightness

Or fairly the same
$sudo su
#for i in /sys/class/leds/* ; do echo 64 > "$i"/brightness ; done

Saegematz


rose28357

I asume that we have 8 bit digital to analog converter is used.
So 64 means scale the input to 1/4 down. Or dimm to 25 %.

It works.

Saegematz

I try echo 64 later.
His problem was, he has a new compiled kernel and no path to led.
Maybe gpio or other things are missing on menuconfig , because path  led failed.

patwood

Quote from: Saegematz on January 06, 2014, 02:19:44 pm
I try echo 64 later.
His problem was, he has a new compiled kernel and no path to led.
Maybe gpio or other things are missing on menuconfig , because path  led failed.


The LEDs are binary.  0 turns them off, anything else turns them on.

Perhaps the gpio module is loadable and not built in.  Try modprobe gpio-sunxi.

Valeron70

Yes,  modprobe gpio_sunxi: FATAL: Module gpio_sunxi not found.
I will search how to builg single module