October 20, 2019, 12:41:50 pm

News:

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


Linaro 13.04 developer for A20

Started by patwood, October 02, 2013, 02:02:07 pm

Previous topic - Next topic

patwood

You've got include/linux/device.h checked out, and that's where the error is coming from; mine doesn't reference syscore anywhere.

karnicero

Quote from: patwood on October 03, 2013, 10:55:36 am
You've got include/linux/device.h checked out, and that's where the error is coming from; mine doesn't reference syscore anywhere.


You were right! My repository was not updated correctly. I compiled the kernel successfully:


Image Name:   Linux-3.4.61+
Created:      Thu Oct 3 23:19:45 2013
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    4521328 Bytes = 4415.36 kB = 4.31 MB
Load Address: 40008000
Entry Point:  40008000
  Image arch/arm/boot/uImage is ready

magno

Patrick, please help me keep my site up to date. I want to put all best distros I found in one place:

http://cubieboard.cmabreu.com.br/

My e-mail address is in bottom of the page. If you release a new file, please tell me.


cubee-noob

Quote from: karnicero on October 03, 2013, 10:20:27 am

In file included from include/linux/dma-mapping.h:5:0,
                 from arch/arm/kernel/asm-offsets.c:15:
include/linux/device.h: In function 'dev_pm_syscore_device':
include/linux/device.h:817:12: error: 'struct dev_pm_info' has no member named 'syscore'
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2


Welcome.
I had similar problems when compiling the patwood branch of 3.4.43 for A20.
some of the compile errors i could fix (wrong header files and so on), but i also had unmet dependencies and i was not able to compile a kernel. what is sad because many modules to things i need are missing.

I guess the sunxi git repositories are kinda broken, at least if one clones branches.

it would be helpful if someone could provide the (patched) kernel sources that do not have these compile errors  as tar.gz/tar.bz2 or would fix the git repos and would provide how to clone them properly.

patwood

October 06, 2013, 01:01:17 pm #19 Last Edit: October 06, 2013, 01:35:55 pm by patwood
Quote from: cubee-noob on October 06, 2013, 07:19:13 am
Quote from: karnicero on October 03, 2013, 10:20:27 am

In file included from include/linux/dma-mapping.h:5:0,
                 from arch/arm/kernel/asm-offsets.c:15:
include/linux/device.h: In function 'dev_pm_syscore_device':
include/linux/device.h:817:12: error: 'struct dev_pm_info' has no member named 'syscore'
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2


Welcome.
I had similar problems when compiling the patwood branch of 3.4.43 for A20.
some of the compile errors i could fix (wrong header files and so on), but i also had unmet dependencies and i was not able to compile a kernel. what is sad because many modules to things i need are missing.

I guess the sunxi git repositories are kinda broken, at least if one clones branches.

it would be helpful if someone could provide the (patched) kernel sources that do not have these compile errors  as tar.gz/tar.bz2 or would fix the git repos and would provide how to clone them properly.


Actually, the branches I post are simply patched versions of the main sunxi repo.  Part of the problem is that you may be enabling drivers that don't yet work on the A20, or that nobody has yet built and tested.  The 3.4.xx A20 kernel only went live a few months ago, and 3.4.43 is over a month behind 3.4.63 already,  so you can't expect everything to build on it.  Also, not all drivers will necessarily build for any allwinner device, so you also need to make sure something builds on A10 as well.

Anyway, if you want a more recent kernel, try my cedar branch.  I merged in the stage/sunxi-3.4 code this week and is currently (as of right now) up to date with it.

Edit: I know it looks like my github repo is based on the cubieboard2 fork, but that's just because github won't let me fork different branches from different repos on their webui.  The stage/sunxi-3.4, cedar, and pat-/cedar-3.4.43 branches were all cloned from the linux-sunxi repo and pushed up to github from my development system.  A quick compare on github can confirm this:

https://github.com/patrickhwood/linux-sunxi/compare/linux-sunxi:stage%2Fsunxi-3.4...stage%2Fsunxi-3.4
https://github.com/patrickhwood/linux-sunxi/compare/linux-sunxi:stage%2Fsunxi-3.4...cedar

I no longer do any work on the branches from the cubieboard2 fork or the 3.3.0 kernel.

cubee-noob

October 06, 2013, 03:08:50 pm #20 Last Edit: October 06, 2013, 03:32:07 pm by cubee-noob
hi patwood,
thx for your reply.are there any downloadable tarballs of the kernel sources?
i am not familiar with git.
if there are no tarballs, how can i optain compileable sources from git?

patwood

October 06, 2013, 06:06:22 pm #21 Last Edit: October 06, 2013, 06:15:55 pm by patwood
Quote from: cubee-noob on October 06, 2013, 03:08:50 pm
hi patwood,
thx for your reply.are there any downloadable tarballs of the kernel sources?
i am not familiar with git.
if there are no tarballs, how can i optain compileable sources from git?

Not from reliable sources, and the .zip downloads from github are a joke -- they don't support symlinks, so the zipped sources are only good for reference, not for building.

You can install git and run:

git clone "http://github/some-git-user/some-git-repository"

Followed by

git checkout "the-branch-you-want"

For example, to get at my most recent branch (as of writing this -- it'll change in the future):

git clone http://github.com/patrickhwood/linux-sunxi
cd linux-sunxi
git checkout cedar

cubee-noob

Thx again patwood.

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

  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.

/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


Ascomar

I had the same problem, which is due to how gcc threats inline functions. I solved it by installing gcc version 4.6 (apt-get install gcc4.6).

Hope this can help.

cubee-noob

Quote from: Ascomar on October 07, 2013, 03:13:57 am
I had the same problem, which is due to how gcc threats inline functions. I solved it by installing gcc version 4.6 (apt-get install gcc4.6).



Hi,
in case you read my posting above, you would have seen i am using gcc4.6.
it is the default gcc in debian wheezy iirc.

derekdhaas

Patwood, can you upload the new u-boot and SPL?

Don't know what you've changed, but it seems to boot much quicker.

cubee-noob

i struggled on with my fight to compile a kernel with the modules i need.

the compile error mentioned above comes the power management in sunxi.
decativated it, next compile error :(

so i changed the gcc from 4.6 zu 4.7 to see if it is not a error in the source code but in the compiler.
i tried, and it failed again.
gcc4.7 threw same error as gcc4.6:
AR      lib/lib.a
  LD      vmlinux.o
  MODPOST vmlinux.o
  GEN     .version
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
net/built-in.o: In function `wiphy_rfkill_start_polling':
/usr/src/kernel/linux-sunxi/net/wireless/core.c:640: undefined reference to `rfkill_resume_polling'
make: *** [.tmp_vmlinux1] Error 1
root@cubieboard2:/usr/src/kernel/linux-sunxi# gcc --version
gcc (Debian 4.7.2-5) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.



i give it up :(

either a cubieboard is inapproriate to be self hosted, or the kernel code is highly broken, or i am just too stupid.

what i do not understand is why the kernels of all cubieboard a20 distros i have seen so far do NOT have kernel modules for reiserfs, xfs, jfs and other usefull modules but do have some hardly needed modules .....

patwood

Quote from: derekdhaas on October 07, 2013, 08:17:10 am
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).

patwood

Quote from: cubee-noob on October 07, 2013, 02:44:25 am
Thx again patwood.

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


...
/usr/src/kernel/linux-sunxi/arch/arm/mach-sun7i/pm/standby/mem_printk.c:168: undefined reference to `memcpy'
...


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.

/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


I don't build kernels on the CB1 or CB2; I've been cross-compiling ARM kernels for a couple of years on x86 now, and it's much, much faster on a multi-core desktop.  Others have built kernels on the Cubieboards, so there's obviously something different about your setup.

The message you're seeing does look a lot like the one people experience with newer versions of gcc; however, 4.6.3 isn't one that produces it (I use the 4.6.3 armhf cross tools on x86 ubuntu).

You're actually seeing two different errors: one is a missing C library function (memcpy, an ANSI C standard function); the other is a missing driver function (rfkill_resume_polling).  It's the same error, but for two completely different reasons.

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).

derekdhaas

Quote from: patwood on October 07, 2013, 10:48:15 am
Quote from: derekdhaas on October 07, 2013, 08:17:10 am
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