Author Topic: Linaro 13.04 developer for A20  (Read 50973 times)

Offline patwood

  • Linux geek
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1660
  • Karma: +129/-0
    • View Profile
Re: Linaro 13.04 developer for A20
« Reply #30 on: October 07, 2013, 01:43:11 pm »
Patwood, can you upload the new u-boot and SPL?

Don't know what you've changed, but it seems to boot much quicker.
Done.  It's at http://dl.cubieforums.com/patwood/u-boot-mmc-ext4.tar.gz.  It boots faster for two reasons: I changed the "Hit any key to stop autoboot" timeout to 1 second, and it has a change made on 11 Aug by Hans de Goede that enabled the caches in u-boot (there was a ~10 second delay here while u-boot loaded and decompressed the kernel).

Thanks patwood, by the way, where did you get these changes? Can't find them in the u-boot commit log, are you using a different branch/repository: https://github.com/hno/u-boot/commits/wip/a20

I'm using the main linux-sunxi repo and main sunxi branch:

https://github.com/linux-sunxi/u-boot-sunxi

I'm working with a fairly old (as if Aug 27th is old these days!) commit: b19e90165ded325eb8d94c5582fba133452ec22d and I changed CONFIG_BOOTDELAY from 3 to 1 in include/configs/sunxi-common.h.

karnicero

  • Guest
Re: Linaro 13.04 developer for A20
« Reply #31 on: October 07, 2013, 07:47:03 pm »
Thx again patwood.

It did not help :(
make uImage still does not work and throws same error as 3.4.43 from sunxi:

Code: [Select]
  CC      arch/arm/mach-sun7i/pm/standby/mem_serial.o
  CC      arch/arm/mach-sun7i/pm/standby/mem_printk.o
  CC      arch/arm/mach-sun7i/pm/standby/mem_divlibc.o
  CC      arch/arm/mach-sun7i/pm/standby/mem_int.o
  CC      arch/arm/mach-sun7i/pm/standby/mem_timing.o
  AS      arch/arm/mach-sun7i/pm/standby/mem_divlib.o
  LD      arch/arm/mach-sun7i/pm/standby/standby.elf
arch/arm/mach-sun7i/pm/standby/mem_printk.o: In function `itoa':
/usr/src/kernel/linux-sunxi/arch/arm/mach-sun7i/pm/standby/mem_printk.c:168: undefined reference to `memcpy'
arch/arm/mach-sun7i/pm/standby/mem_printk.o: In function `utoa':
/usr/src/kernel/linux-sunxi/arch/arm/mach-sun7i/pm/standby/mem_printk.c:214: undefined reference to `memcpy'
arch/arm/mach-sun7i/pm/standby/mem_printk.o: In function `print_align':
/usr/src/kernel/linux-sunxi/arch/arm/mach-sun7i/pm/standby/mem_printk.c:369: undefined reference to `memcpy'
make[3]: *** [arch/arm/mach-sun7i/pm/standby/standby.elf] Error 1
make[2]: *** [arch/arm/mach-sun7i/pm/standby/standby.bin] Error 2
make[1]: *** [arch/arm/mach-sun7i/pm] Error 2
make: *** [arch/arm/mach-sun7i] Error 2
root@cubieez:/usr/src/kernel/linux-sunxi#

gcc is gcc (Debian 4.6.3-14) 4.6.3
CLAGS are "", so there none.
.config is /proc/config.gz plus modules for xfs and reiserfs file system.

Code: [Select]
/usr/src/kernel/linux-sunxi# uname -a
Linux cubieez 3.4.43-sun7i #1 SMP PREEMPT Thu Sep 19 21:43:14 CEST 2013 armv7l GNU/Linux

i am no C programmer bt i guess if there are undefined references, something must be broken.

could you build a kernel with these sources on a cubieboard2?

in case you want my .config, i'll post it here

Hi,

I compiled the kernel successfully but I changed in the file mem_printk.c:

line 168:
char digit_string[] = "0123456789ABCDEF";
to: char * digit_string = "0123456789ABCDEF";

line 213:
char digit_string[] = "0123456789ABCDEF";
to: char* digit_string = "0123456789ABCDEF";

line 369:
char fill_ch[] = "                ";
to: char* fill_ch = "                ";

and now all compiled ok.

Good luck!

cubee-noob

  • Guest
Re: Linaro 13.04 developer for A20
« Reply #32 on: October 08, 2013, 03:55:25 am »

You might want to try one thing:  uninstall your gcc *and* libraries and reinstall 4.6.x.  The memcpy error may be due to the function not being in your libc library and not due to the wrong compiler version (i.e., a mismatch between the library and compiler).

this probem ocurred on a different distro too.
nevertheless i uninstalled gcc, reinstalled libc and libc-dev and so on, installed gcc4.7 again.
the problem still occurs.

maybe i will test cross compile on my Kubuntu pc the next days but i am not very confident it will change anything.

Offline patwood

  • Linux geek
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1660
  • Karma: +129/-0
    • View Profile
Re: Linaro 13.04 developer for A20
« Reply #33 on: October 08, 2013, 09:48:08 am »

You might want to try one thing:  uninstall your gcc *and* libraries and reinstall 4.6.x.  The memcpy error may be due to the function not being in your libc library and not due to the wrong compiler version (i.e., a mismatch between the library and compiler).

this probem ocurred on a different distro too.
nevertheless i uninstalled gcc, reinstalled libc and libc-dev and so on, installed gcc4.7 again.
the problem still occurs.

maybe i will test cross compile on my Kubuntu pc the next days but i am not very confident it will change anything.

I never used GCC 4.7 to build the kernel, but I recall there were issues with this version, which is why 4.5 or 4.6 is recommended-

Offline stulle

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Linaro 13.04 developer for A20
« Reply #34 on: October 08, 2013, 09:54:27 am »
HI!

Thanks for your work patwood :) glad to see progress, the image works very well for me. I installed lubuntu-desktop and so far everything "feels fine" with xv :)

i have a question: i compiled gnash from git  with "hardware acceleration: directfb" but chromium wont load the plugin and complains:

 "libGL error: failed to load driver: sunxi-mali"

is this expected or is this a bug? shouldn't it load the driver "fbturbo"?

edit: i installed sunxi-mali by the howto on linux-sunxi-website: http://linux-sunxi.org/Binary_drivers, so that is not the problem
« Last Edit: October 08, 2013, 10:21:37 am by stulle »

Offline cubieplayer

  • Full Member
  • ***
  • Posts: 177
  • Karma: +22/-1
    • View Profile
Re: Linaro 13.04 developer for A20
« Reply #35 on: October 08, 2013, 04:21:42 pm »
Patwood, can you upload the new u-boot and SPL?

Don't know what you've changed, but it seems to boot much quicker.
Done.  It's at http://dl.cubieforums.com/patwood/u-boot-mmc-ext4.tar.gz.  It boots faster for two reasons: I changed the "Hit any key to stop autoboot" timeout to 1 second, and it has a change made on 11 Aug by Hans de Goede that enabled the caches in u-boot (there was a ~10 second delay here while u-boot loaded and decompressed the kernel).

Thanks patwood, by the way, where did you get these changes? Can't find them in the u-boot commit log, are you using a different branch/repository: https://github.com/hno/u-boot/commits/wip/a20
can' t find aslo
Cubian:http://cubian.org/ Cubian  Helpdesk:https://github.com/cubieplayer/Cubian/issues

Offline patwood

  • Linux geek
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1660
  • Karma: +129/-0
    • View Profile
Re: Linaro 13.04 developer for A20
« Reply #36 on: October 08, 2013, 06:40:41 pm »
Patwood, can you upload the new u-boot and SPL?

Don't know what you've changed, but it seems to boot much quicker.
Done.  It's at http://dl.cubieforums.com/patwood/u-boot-mmc-ext4.tar.gz.  It boots faster for two reasons: I changed the "Hit any key to stop autoboot" timeout to 1 second, and it has a change made on 11 Aug by Hans de Goede that enabled the caches in u-boot (there was a ~10 second delay here while u-boot loaded and decompressed the kernel).

Thanks patwood, by the way, where did you get these changes? Can't find them in the u-boot commit log, are you using a different branch/repository: https://github.com/hno/u-boot/commits/wip/a20
can' t find aslo
http://www.cubieforums.com/index.php/topic,838.msg5056.html#msg5056

Offline patwood

  • Linux geek
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1660
  • Karma: +129/-0
    • View Profile
Re: Linaro 13.04 developer for A20
« Reply #37 on: October 08, 2013, 06:56:36 pm »
HI!

Thanks for your work patwood :) glad to see progress, the image works very well for me. I installed lubuntu-desktop and so far everything "feels fine" with xv :)

i have a question: i compiled gnash from git  with "hardware acceleration: directfb" but chromium wont load the plugin and complains:

 "libGL error: failed to load driver: sunxi-mali"

is this expected or is this a bug? shouldn't it load the driver "fbturbo"?

edit: i installed sunxi-mali by the howto on linux-sunxi-website: http://linux-sunxi.org/Binary_drivers, so that is not the problem

If everything got installed right, you should see something like this in Xorg.0.log:

Code: [Select]
[   355.184] Loading extension GLX
[   355.184] (II) LoadModule: "sunxifb"
[   355.201] (II) Loading /usr/lib/xorg/modules/drivers/sunxifb_drv.so
[   355.324] (II) Module sunxifb: vendor="X.Org Foundation"
[   355.324]    compiled for 1.13.3, module version = 0.3.1
[   355.324]    Module class: X.Org Video Driver
[   355.325]    ABI class: X.Org Video Driver, version 13.1
[   355.325] (II) SUNXIFB: driver for framebuffer: sunxifb

There are so many possible reasons why it's not working on a fresh install: not renaming mesa-egl, not setting the permissions for /dev/mali, disp, and ump, maybe needing to run ldconf.  Just not really sure.

First, though, make sure either sunxifb or fbturbo is being loaded properly when Xorg starts up (I'm using an older mali build that's named sunxifb).

magno

  • Guest
Re: Linaro 13.04 developer for A20
« Reply #38 on: October 08, 2013, 07:14:05 pm »
So just add consoleblank=0 to the extraargs line in /boot/uEnv.txt to disable screen blanking:
Code: [Select]
extraargs=disp.screen0_output_mode=1280x720p60 consoleblank=0

It worked !

magno

  • Guest
Re: Linaro 13.04 developer for A20
« Reply #39 on: October 08, 2013, 08:52:25 pm »
Distro is 1GB with about 250MB free; use gparted or fdisk/resizefs to make it bigger.

When I execute

Code: [Select]
resize2fs /dev/mmcblk0p1
I get

Code: [Select]
resize2fs 1.42.5 (29-Jul-2012)
The filesystem is already 230400 blocks long.  Nothing to do!

Can you tell me how to resize the partition?
My SDCard is 2GB.

Offline patwood

  • Linux geek
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1660
  • Karma: +129/-0
    • View Profile
Re: Linaro 13.04 developer for A20
« Reply #40 on: October 08, 2013, 10:48:31 pm »
Distro is 1GB with about 250MB free; use gparted or fdisk/resizefs to make it bigger.

When I execute

Code: [Select]
resize2fs /dev/mmcblk0p1
I get

Code: [Select]
resize2fs 1.42.5 (29-Jul-2012)
The filesystem is already 230400 blocks long.  Nothing to do!

Can you tell me how to resize the partition?
My SDCard is 2GB.

You have to increase the partition size first. See fdisk.

Offline esiravegna

  • Newbie
  • *
  • Posts: 37
  • Karma: +1/-0
    • View Profile
Re: Linaro 13.04 developer for A20
« Reply #41 on: October 11, 2013, 11:21:51 am »
Pat, thanks a lot for your work. I'm trying to build xbmc from scratch using http://linux-sunxi.org/XBMC, the libhybris binaries et all...however, when i try modprobe mali seems that the trivers aren't installed. I'm following http://linux-sunxi.org/Binary_drivers#Mali_kernel_driver, but make install states, which is true, that dev/mali isn't found.

Any ideas on how can install the mali drivers? Thanks!

Offline patwood

  • Linux geek
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1660
  • Karma: +129/-0
    • View Profile
Re: Linaro 13.04 developer for A20
« Reply #42 on: October 11, 2013, 02:03:20 pm »
Pat, thanks a lot for your work. I'm trying to build xbmc from scratch using http://linux-sunxi.org/XBMC, the libhybris binaries et all...however, when i try modprobe mali seems that the trivers aren't installed. I'm following http://linux-sunxi.org/Binary_drivers#Mali_kernel_driver, but make install states, which is true, that dev/mali isn't found.

Any ideas on how can install the mali drivers? Thanks!

Starting from a fresh install of http://dl.cubieforums.com/patwood/linaro-quantal-developer-20130422-342-A20-3.4.61.img.xz, I did a "modprobe mali":

Code: [Select]
/root: modprobe mali
UMP<2>: Inserting UMP device driver. Compiled: Oct  2 2013, time: 01:12:25
UMP<2>: Using OS memory backend, allocation limit: 134217728
UMP: UMP device driver  loaded
Mali: permit MALI_IOC_MEM_MAP_EXT ioctl for framebuffer (paddr=0x5A000000, size=33554432)
<6>mali: use config clk_div 3
<6>mali: clk_div 3
Mali: mali clock set completed, clock is  320000000 Hz
<6>mali: use config clk_div 3
<6>mali: clk_div 3
Mali: mali clock set completed, clock is  320000000 Hz
Mali: Mali device driver loaded
/root: lsmod
Module                  Size  Used by
mali                  110943  0
ump                    51995  1 mali
cpufreq_powersave       1229  0
cpufreq_conservative     5970  0
cpufreq_userspace       3366  0
cpufreq_stats           3675  0
8192cu                450521  0
/root: ls -l /dev/mali
crw------- 1 root root 242, 0 Jan  1 00:00 /dev/mali

Offline esiravegna

  • Newbie
  • *
  • Posts: 37
  • Karma: +1/-0
    • View Profile
Re: Linaro 13.04 developer for A20
« Reply #43 on: October 11, 2013, 02:36:53 pm »
Thanks a lot!

cubee-noob

  • Guest
Re: Linaro 13.04 developer for A20
« Reply #44 on: October 12, 2013, 02:27:30 am »

Hi,

I compiled the kernel successfully but I changed in the file mem_printk.c:

line 168:
char digit_string[] = "0123456789ABCDEF";
to: char * digit_string = "0123456789ABCDEF";

line 213:
char digit_string[] = "0123456789ABCDEF";
to: char* digit_string = "0123456789ABCDEF";

line 369:
char fill_ch[] = "                ";
to: char* fill_ch = "                ";


thx a lot and sorry for the belated reply.

i changed mem_printk.c that way.
line 168:
char digit_string[] = "0123456789ABCDEF";
to: char * digit_string = "0123456789ABCDEF";
line 213:
char digit_string[] = "0123456789ABCDEF";
to: char * digit_string = "0123456789ABCDEF";
line 369:
char fill_ch[] = "                ";
to: char * fill_ch = "                ";


yes, i fixed it that way and now it did make uImage.
without errors. gcc version is gcc (Debian) 4.7.2-5

i mainly used /proc/config.gz and added the modules i needed.

i hope the broken code will be fixed soon in git.

by the way: make module pwm-sunxi also threw an error because pwm-sunxi.h was in the wrong directory, but i could fix by copying it to includes/

thx again.
« Last Edit: October 12, 2013, 03:23:47 am by cubee-noob »