I've made a driver to work with my cubieboard leds (/dev/class/leds). I'm too lazy to commit it to git so I put it here.
To compile it you need linux-sunxi kernel source with configured and compiled kernel. Here is instruction:
1. Create directory and put sun4i_leds.c there
2. Create Makefile with single line "obj-m := sun4i-leds.o"
3. Run
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -C /path/to/linux-sunxi/ SUBDIRS=$PWD modules
and you'll get sun4i-leds.ko module
4. Recompile kernel with CONFIG_NEW_LEDS=y (also there is a number of triggers available to enable)
5. Get your script.bin from /dev/mmcblk0p1 (mount it) and decompile it into script.fex
6. Add to script.fex following lines:
leds_pin_1 = port:PH20<1><default><default><0>
leds_name_1 = "ph20:green:led1"
leds_pin_2 = port:PH21<1><default><default><0>
leds_name_2 = "ph21:blue:led2"
7. Compile script.fex into script.bin
8. Put new kernel and script.bin to /dev/mmcblk0p1 partition
9. Reboot & insmod sun4i-leds.ko
echo 255 > /sys/class/leds/ph20:green:led1/brightness
to light led or you can play with triggers to blink it on usb/mmc activity.
Sata/ide trigger currently doesn't work (i'll try to fix this)