GithubHelp home page GithubHelp logo

linux-sunxi / linux-sunxi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from torvalds/linux

721.0 153.0 466.0 3.73 GB

Linux source for Allwinner/Boxchip F20 (sun3i), A10 (sun4i), A12/A13/A10S (sun5i) and A20 (sun7i) SoCs

Home Page: http://linux-sunxi.org/Linux

License: Other

Assembly 1.70% C 96.71% Shell 0.05% Awk 0.01% Perl 0.07% Python 0.01% Objective-C 0.19% C++ 0.87% UnrealScript 0.01% Scilab 0.01% ASP 0.01% Makefile 0.30% SourcePawn 0.01% Groff 0.01% Yacc 0.01% Lex 0.01% Batchfile 0.01% Pascal 0.01% HTML 0.05%

linux-sunxi's Introduction

	Linux kernel release 3.x <http://kernel.org/>

These are the release notes for Linux version 3.  Read them carefully,
as they tell you what this is all about, explain how to install the
kernel, and what to do if something goes wrong. 

WHAT IS LINUX?

  Linux is a clone of the operating system Unix, written from scratch by
  Linus Torvalds with assistance from a loosely-knit team of hackers across
  the Net. It aims towards POSIX and Single UNIX Specification compliance.

  It has all the features you would expect in a modern fully-fledged Unix,
  including true multitasking, virtual memory, shared libraries, demand
  loading, shared copy-on-write executables, proper memory management,
  and multistack networking including IPv4 and IPv6.

  It is distributed under the GNU General Public License - see the
  accompanying COPYING file for more details. 

ON WHAT HARDWARE DOES IT RUN?

  Although originally developed first for 32-bit x86-based PCs (386 or higher),
  today Linux also runs on (at least) the Compaq Alpha AXP, Sun SPARC and
  UltraSPARC, Motorola 68000, PowerPC, PowerPC64, ARM, Hitachi SuperH, Cell,
  IBM S/390, MIPS, HP PA-RISC, Intel IA-64, DEC VAX, AMD x86-64, AXIS CRIS,
  Xtensa, Tilera TILE, AVR32 and Renesas M32R architectures.

  Linux is easily portable to most general-purpose 32- or 64-bit architectures
  as long as they have a paged memory management unit (PMMU) and a port of the
  GNU C compiler (gcc) (part of The GNU Compiler Collection, GCC). Linux has
  also been ported to a number of architectures without a PMMU, although
  functionality is then obviously somewhat limited.
  Linux has also been ported to itself. You can now run the kernel as a
  userspace application - this is called UserMode Linux (UML).

DOCUMENTATION:

 - There is a lot of documentation available both in electronic form on
   the Internet and in books, both Linux-specific and pertaining to
   general UNIX questions.  I'd recommend looking into the documentation
   subdirectories on any Linux FTP site for the LDP (Linux Documentation
   Project) books.  This README is not meant to be documentation on the
   system: there are much better sources available.

 - There are various README files in the Documentation/ subdirectory:
   these typically contain kernel-specific installation notes for some 
   drivers for example. See Documentation/00-INDEX for a list of what
   is contained in each file.  Please read the Changes file, as it
   contains information about the problems, which may result by upgrading
   your kernel.

 - The Documentation/DocBook/ subdirectory contains several guides for
   kernel developers and users.  These guides can be rendered in a
   number of formats:  PostScript (.ps), PDF, HTML, & man-pages, among others.
   After installation, "make psdocs", "make pdfdocs", "make htmldocs",
   or "make mandocs" will render the documentation in the requested format.

INSTALLING the kernel source:

 - If you install the full sources, put the kernel tarball in a
   directory where you have permissions (eg. your home directory) and
   unpack it:

		gzip -cd linux-3.X.tar.gz | tar xvf -

   or
		bzip2 -dc linux-3.X.tar.bz2 | tar xvf -


   Replace "XX" with the version number of the latest kernel.

   Do NOT use the /usr/src/linux area! This area has a (usually
   incomplete) set of kernel headers that are used by the library header
   files.  They should match the library, and not get messed up by
   whatever the kernel-du-jour happens to be.

 - You can also upgrade between 3.x releases by patching.  Patches are
   distributed in the traditional gzip and the newer bzip2 format.  To
   install by patching, get all the newer patch files, enter the
   top level directory of the kernel source (linux-3.x) and execute:

		gzip -cd ../patch-3.x.gz | patch -p1

   or
		bzip2 -dc ../patch-3.x.bz2 | patch -p1

   (repeat xx for all versions bigger than the version of your current
   source tree, _in_order_) and you should be ok.  You may want to remove
   the backup files (xxx~ or xxx.orig), and make sure that there are no
   failed patches (xxx# or xxx.rej). If there are, either you or me has
   made a mistake.

   Unlike patches for the 3.x kernels, patches for the 3.x.y kernels
   (also known as the -stable kernels) are not incremental but instead apply
   directly to the base 3.x kernel.  Please read
   Documentation/applying-patches.txt for more information.

   Alternatively, the script patch-kernel can be used to automate this
   process.  It determines the current kernel version and applies any
   patches found.

		linux/scripts/patch-kernel linux

   The first argument in the command above is the location of the
   kernel source.  Patches are applied from the current directory, but
   an alternative directory can be specified as the second argument.

 - If you are upgrading between releases using the stable series patches
   (for example, patch-3.x.y), note that these "dot-releases" are
   not incremental and must be applied to the 3.x base tree. For
   example, if your base kernel is 3.0 and you want to apply the
   3.0.3 patch, you do not and indeed must not first apply the
   3.0.1 and 3.0.2 patches. Similarly, if you are running kernel
   version 3.0.2 and want to jump to 3.0.3, you must first
   reverse the 3.0.2 patch (that is, patch -R) _before_ applying
   the 3.0.3 patch.
   You can read more on this in Documentation/applying-patches.txt

 - Make sure you have no stale .o files and dependencies lying around:

		cd linux
		make mrproper

   You should now have the sources correctly installed.

SOFTWARE REQUIREMENTS

   Compiling and running the 3.x kernels requires up-to-date
   versions of various software packages.  Consult
   Documentation/Changes for the minimum version numbers required
   and how to get updates for these packages.  Beware that using
   excessively old versions of these packages can cause indirect
   errors that are very difficult to track down, so don't assume that
   you can just update packages when obvious problems arise during
   build or operation.

BUILD directory for the kernel:

   When compiling the kernel all output files will per default be
   stored together with the kernel source code.
   Using the option "make O=output/dir" allow you to specify an alternate
   place for the output files (including .config).
   Example:
     kernel source code:	/usr/src/linux-3.N
     build directory:		/home/name/build/kernel

   To configure and build the kernel use:
   cd /usr/src/linux-3.N
   make O=/home/name/build/kernel menuconfig
   make O=/home/name/build/kernel
   sudo make O=/home/name/build/kernel modules_install install

   Please note: If the 'O=output/dir' option is used then it must be
   used for all invocations of make.

CONFIGURING the kernel:

   Do not skip this step even if you are only upgrading one minor
   version.  New configuration options are added in each release, and
   odd problems will turn up if the configuration files are not set up
   as expected.  If you want to carry your existing configuration to a
   new version with minimal work, use "make oldconfig", which will
   only ask you for the answers to new questions.

 - Alternate configuration commands are:
	"make config"      Plain text interface.
	"make menuconfig"  Text based color menus, radiolists & dialogs.
	"make nconfig"     Enhanced text based color menus.
	"make xconfig"     X windows (Qt) based configuration tool.
	"make gconfig"     X windows (Gtk) based configuration tool.
	"make oldconfig"   Default all questions based on the contents of
			   your existing ./.config file and asking about
			   new config symbols.
	"make silentoldconfig"
			   Like above, but avoids cluttering the screen
			   with questions already answered.
			   Additionally updates the dependencies.
	"make defconfig"   Create a ./.config file by using the default
			   symbol values from either arch/$ARCH/defconfig
			   or arch/$ARCH/configs/${PLATFORM}_defconfig,
			   depending on the architecture.
	"make ${PLATFORM}_defconfig"
			  Create a ./.config file by using the default
			  symbol values from
			  arch/$ARCH/configs/${PLATFORM}_defconfig.
			  Use "make help" to get a list of all available
			  platforms of your architecture.
	"make allyesconfig"
			   Create a ./.config file by setting symbol
			   values to 'y' as much as possible.
	"make allmodconfig"
			   Create a ./.config file by setting symbol
			   values to 'm' as much as possible.
	"make allnoconfig" Create a ./.config file by setting symbol
			   values to 'n' as much as possible.
	"make randconfig"  Create a ./.config file by setting symbol
			   values to random values.

   You can find more information on using the Linux kernel config tools
   in Documentation/kbuild/kconfig.txt.

	NOTES on "make config":
	- having unnecessary drivers will make the kernel bigger, and can
	  under some circumstances lead to problems: probing for a
	  nonexistent controller card may confuse your other controllers
	- compiling the kernel with "Processor type" set higher than 386
	  will result in a kernel that does NOT work on a 386.  The
	  kernel will detect this on bootup, and give up.
	- A kernel with math-emulation compiled in will still use the
	  coprocessor if one is present: the math emulation will just
	  never get used in that case.  The kernel will be slightly larger,
	  but will work on different machines regardless of whether they
	  have a math coprocessor or not. 
	- the "kernel hacking" configuration details usually result in a
	  bigger or slower kernel (or both), and can even make the kernel
	  less stable by configuring some routines to actively try to
	  break bad code to find kernel problems (kmalloc()).  Thus you
	  should probably answer 'n' to the questions for
          "development", "experimental", or "debugging" features.

COMPILING the kernel:

 - Make sure you have at least gcc 3.2 available.
   For more information, refer to Documentation/Changes.

   Please note that you can still run a.out user programs with this kernel.

 - Do a "make" to create a compressed kernel image. It is also
   possible to do "make install" if you have lilo installed to suit the
   kernel makefiles, but you may want to check your particular lilo setup first.

   To do the actual install you have to be root, but none of the normal
   build should require that. Don't take the name of root in vain.

 - If you configured any of the parts of the kernel as `modules', you
   will also have to do "make modules_install".

 - Verbose kernel compile/build output:

   Normally the kernel build system runs in a fairly quiet mode (but not
   totally silent).  However, sometimes you or other kernel developers need
   to see compile, link, or other commands exactly as they are executed.
   For this, use "verbose" build mode.  This is done by inserting
   "V=1" in the "make" command.  E.g.:

	make V=1 all

   To have the build system also tell the reason for the rebuild of each
   target, use "V=2".  The default is "V=0".

 - Keep a backup kernel handy in case something goes wrong.  This is 
   especially true for the development releases, since each new release
   contains new code which has not been debugged.  Make sure you keep a
   backup of the modules corresponding to that kernel, as well.  If you
   are installing a new kernel with the same version number as your
   working kernel, make a backup of your modules directory before you
   do a "make modules_install".
   Alternatively, before compiling, use the kernel config option
   "LOCALVERSION" to append a unique suffix to the regular kernel version.
   LOCALVERSION can be set in the "General Setup" menu.

 - In order to boot your new kernel, you'll need to copy the kernel
   image (e.g. .../linux/arch/i386/boot/bzImage after compilation)
   to the place where your regular bootable kernel is found. 

 - Booting a kernel directly from a floppy without the assistance of a
   bootloader such as LILO, is no longer supported.

   If you boot Linux from the hard drive, chances are you use LILO which
   uses the kernel image as specified in the file /etc/lilo.conf.  The
   kernel image file is usually /vmlinuz, /boot/vmlinuz, /bzImage or
   /boot/bzImage.  To use the new kernel, save a copy of the old image
   and copy the new image over the old one.  Then, you MUST RERUN LILO
   to update the loading map!! If you don't, you won't be able to boot
   the new kernel image.

   Reinstalling LILO is usually a matter of running /sbin/lilo. 
   You may wish to edit /etc/lilo.conf to specify an entry for your
   old kernel image (say, /vmlinux.old) in case the new one does not
   work.  See the LILO docs for more information. 

   After reinstalling LILO, you should be all set.  Shutdown the system,
   reboot, and enjoy!

   If you ever need to change the default root device, video mode,
   ramdisk size, etc.  in the kernel image, use the 'rdev' program (or
   alternatively the LILO boot options when appropriate).  No need to
   recompile the kernel to change these parameters. 

 - Reboot with the new kernel and enjoy. 

IF SOMETHING GOES WRONG:

 - If you have problems that seem to be due to kernel bugs, please check
   the file MAINTAINERS to see if there is a particular person associated
   with the part of the kernel that you are having trouble with. If there
   isn't anyone listed there, then the second best thing is to mail
   them to me ([email protected]), and possibly to any other
   relevant mailing-list or to the newsgroup.

 - In all bug-reports, *please* tell what kernel you are talking about,
   how to duplicate the problem, and what your setup is (use your common
   sense).  If the problem is new, tell me so, and if the problem is
   old, please try to tell me when you first noticed it.

 - If the bug results in a message like

	unable to handle kernel paging request at address C0000010
	Oops: 0002
	EIP:   0010:XXXXXXXX
	eax: xxxxxxxx   ebx: xxxxxxxx   ecx: xxxxxxxx   edx: xxxxxxxx
	esi: xxxxxxxx   edi: xxxxxxxx   ebp: xxxxxxxx
	ds: xxxx  es: xxxx  fs: xxxx  gs: xxxx
	Pid: xx, process nr: xx
	xx xx xx xx xx xx xx xx xx xx

   or similar kernel debugging information on your screen or in your
   system log, please duplicate it *exactly*.  The dump may look
   incomprehensible to you, but it does contain information that may
   help debugging the problem.  The text above the dump is also
   important: it tells something about why the kernel dumped code (in
   the above example it's due to a bad kernel pointer). More information
   on making sense of the dump is in Documentation/oops-tracing.txt

 - If you compiled the kernel with CONFIG_KALLSYMS you can send the dump
   as is, otherwise you will have to use the "ksymoops" program to make
   sense of the dump (but compiling with CONFIG_KALLSYMS is usually preferred).
   This utility can be downloaded from
   ftp://ftp.<country>.kernel.org/pub/linux/utils/kernel/ksymoops/ .
   Alternately you can do the dump lookup by hand:

 - In debugging dumps like the above, it helps enormously if you can
   look up what the EIP value means.  The hex value as such doesn't help
   me or anybody else very much: it will depend on your particular
   kernel setup.  What you should do is take the hex value from the EIP
   line (ignore the "0010:"), and look it up in the kernel namelist to
   see which kernel function contains the offending address.

   To find out the kernel function name, you'll need to find the system
   binary associated with the kernel that exhibited the symptom.  This is
   the file 'linux/vmlinux'.  To extract the namelist and match it against
   the EIP from the kernel crash, do:

		nm vmlinux | sort | less

   This will give you a list of kernel addresses sorted in ascending
   order, from which it is simple to find the function that contains the
   offending address.  Note that the address given by the kernel
   debugging messages will not necessarily match exactly with the
   function addresses (in fact, that is very unlikely), so you can't
   just 'grep' the list: the list will, however, give you the starting
   point of each kernel function, so by looking for the function that
   has a starting address lower than the one you are searching for but
   is followed by a function with a higher address you will find the one
   you want.  In fact, it may be a good idea to include a bit of
   "context" in your problem report, giving a few lines around the
   interesting one. 

   If you for some reason cannot do the above (you have a pre-compiled
   kernel image or similar), telling me as much about your setup as
   possible will help.  Please read the REPORTING-BUGS document for details.

 - Alternately, you can use gdb on a running kernel. (read-only; i.e. you
   cannot change values or set break points.) To do this, first compile the
   kernel with -g; edit arch/i386/Makefile appropriately, then do a "make
   clean". You'll also need to enable CONFIG_PROC_FS (via "make config").

   After you've rebooted with the new kernel, do "gdb vmlinux /proc/kcore".
   You can now use all the usual gdb commands. The command to look up the
   point where your system crashed is "l *0xXXXXXXXX". (Replace the XXXes
   with the EIP value.)

   gdb'ing a non-running kernel currently fails because gdb (wrongly)
   disregards the starting offset for which the kernel is compiled.

linux-sunxi's People

Contributors

acmel avatar adrianbunk avatar alanstern avatar arndb avatar avikivity avatar axellin avatar broonie avatar bzolnier avatar chrismason-xx avatar davem330 avatar dhowells avatar gregkh avatar heicarst avatar herbertx avatar htejun avatar hverkuil avatar jmberg avatar jmberg-intel avatar joeperches avatar kaber avatar lenb avatar neilbrown avatar ozbenh avatar pmundt avatar ralfbaechle avatar rddunlap avatar rjwysocki avatar sfrothwell avatar tiwai avatar torvalds avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

linux-sunxi's Issues

sun4i_usb: sw_hcd max packet size

I have a Tablet with an Allwinner A10 SoC (Odys Xelio) running Android 4.0.3 and Linux Kernel 3.0.8.

Trying to attach a UVC Webcam via USB results in the following error:

<7>[ 4958.130000] WRN:L2837(drivers/usb/sun4i_usb/hcd/core/sw_hcd_host.c):ERR: sw_hcd_urb_enqueue, ep packet is too big, maxpacket = 5120
<3>[ 4958.150000] uvcvideo: Failed to submit URB 0 (-90).
<7>[ 4958.410000] [sw_hcd]: sw_hcd_h_disable, epnum = 81
<7>[ 4958.420000] [sw_hcd]: sw_hcd_urb_dequeue, sw_hcd(d98ce0ec, 0x0, 0x3f),urb(d934c680, 16, 0), dev = 7, ep = 3, dir = in

Code causing the error: drivers/usb/sun4i_usb/hcd/core/sw_hcd_host.c#L2838

Could it be that the driver does not support USB Packets > 512 bytes? (my USB Stick uses 512 byte packetsize and works, the UVC camera uses 1024 bytes and does not work)

Is there a way around this issue or is there any driver update?

disabling ANDROID_PARANOID_NETWORK breaks it

disabling ANDROID_PARANOID_NETWORK leads to:

security/commoncap.c: In function 'cap_capable':
security/commoncap.c:90:40: error: 'AID_NET_RAW' undeclared (first use in this function)
security/commoncap.c:90:40: note: each undeclared identifier is reported only once for each function it appears in
security/commoncap.c:92:42: error: 'AID_NET_ADMIN' undeclared (first use in this function)
make[1]: *** [security/commoncap.o] Error 1

wemac ethernet: problems with IPv6, likely broken multicast

Hello,

I observe problems when using IPv6 on the Mele A2000's built-in Ethernet.

IPv6 uses Neighbour Discovery instead of ARP to resolve v6 addresses to MACs, and it relies on multicast.

The most noticeable issue that I have on the Mele (and have also observed on some other systems with broken multicast support) is that the Mele can't be successfully ping6'ed (or contacted in any other way) from another network host, until the Mele itself first initiates a ping6 to that host. After that the connectivity works fine in both directions, but only for a brief period of time.

The Mele also doesn't seem to be able to receive Route Advertisements from the network (which also use multicast).

Get Mali working on X11 and Android

Mali DRM required module has been integrated and is now on the wip/allwinner-v3.0-android-v2/mali branch.

However, using the xserver-xorg-mali package from Linaro PPA:


X.Org X Server 1.11.3
Release Date: 2011-12-16
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.38-1209-omap4 armv7l Linaro
Current Operating System: Linux linaro-ubuntu-desktop 3.0.31+ #6 PREEMPT Sat May 19 01:36:40 CEST 2012 armv7l
Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p2 init=/init loglevel=8 rootfstype=ext4 rootwait
Build Date: 25 April 2012  06:26:32PM
xorg-server 2:1.11.4-0ubuntu10.1linaro1 (For technical support please see http://www.ubuntu.com/support) 
Current version of pixman: 0.24.4
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Fri May 18 23:44:04 2012
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
mali trace: MaliSetup
mali trace: MaliIdentify
mali trace: MaliProbe
mali trace: MaliHWProbe
mali trace: MaliPreInit
mali trace: MaliGetRec
mali trace: MaliHWInit
mali trace: MaliHWGetDepth
mali trace: HWGetVidmem
mali trace: MaliHWGetName
mali trace: MaliHWGetFD
mali trace: FBDev_crtc_config
mali: FBDev_crtc_config done
mali trace: MaliScreenInit
(EE) MALI(0): mali_drm_open_master DRM OPEN (fd: 0x9)
mali trace: MaliHWMapVidmem
mali trace: MaliHWLinearOffset
mali trace: MaliHWSave
mali trace: MaliHWModeInit
mali trace: MaliHWSetMode
mali trace: MaliHWSaveScreen
mali trace: MaliHWAdjustFrame
libblt_hwCould not open device /dev/b2r2_blt
libblt_hwCould not open device /dev/b2r2_blt
(EE) MALI(0): XVScreenInit failed

Fatal server error:
AddScreen/ScreenInit failed for driver 0


Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
Please also check the log file at "/var/log/Xorg.0.log" for additional information.

mali trace: MaliHWLeaveVT
mali trace: MaliHWRestore
 ddxSigGiveUp: Closing log
Server terminated with error (1). Closing log file.
root@linaro-ubuntu-desktop:/usr/share/X11/xorg.conf.d# Write failed: Broken pipe

TODO: Check with the Mali Xorg sources from ARM to see if they also require this driver (i'm not sure if it's a HW component part of the Mali), and if so, it can be implemented from the GPL sources on Linaro tree: http://www.igloocommunity.org/gitweb/?p=kernel/igloo-kernel.git;a=tree;f=drivers/video/b2r2;h=424976ba6cce1abfa0f96048475a208b329f24d6;hb=66abcc2e034602ba5a0743475c41996c903caedd

Sir Im Not able to compile this kernel for sun4i ( all winner 10 )

Sir Can u help Im developer and im trying to compile with this kernel source for sun4i ( all winner 10 ) tablets but im getting compilation error i did def config for my device and set the tool chain path but i m getting error on compilation can u help me
here is log :

rom@rom-laptop:$ cd kernel
rom@rom-laptop:
/kernel$ cd funbook_kernel
rom@rom-laptop:/kernel/funbook_kernel$ cd kernel
rom@rom-laptop:
/kernel/funbook_kernel/kernel$ make sun4i_defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf

configuration written to .config

rom@rom-laptop:/kernel/funbook_kernel/kernel$ make -j3
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
HOSTCC scripts/genksyms/genksyms.o
SHIPPED scripts/genksyms/lex.c
SHIPPED scripts/genksyms/parse.h
CC scripts/mod/empty.o
cc1: error: unrecognized command line option "-m64"
cc1: error: unrecognized command line option "-mno-red-zone"
cc1: error: unrecognized command line option "-mcmodel=kernel"
cc1: error: unrecognized command line option "-maccumulate-outgoing-args"
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
SHIPPED scripts/genksyms/keywords.c
SHIPPED scripts/genksyms/parse.c
CC kernel/bounds.s
cc1: error: unrecognized command line option "-m64"
cc1: error: unrecognized command line option "-mno-red-zone"
cc1: error: unrecognized command line option "-mcmodel=kernel"
cc1: error: unrecognized command line option "-maccumulate-outgoing-args"
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
make: *** Waiting for unfinished jobs....
HOSTCC scripts/genksyms/lex.o
HOSTCC scripts/genksyms/parse.o
HOSTLD scripts/genksyms/genksyms
make: *** [scripts] Error 2
rom@rom-laptop:
/kernel/funbook_kernel/kernel$

plz help me :) hope i get help

MK802 boots lichee 3.0.8+, but not latest android-v2 branch

Hi,
I'm hacking around with a so-called MK802 device -- it's a small AllWinner A10 device.

I have it booting off the lichee 3.0.8+ kernel, but using a similar kernel config (or the default kernel config) on the android-v2 branch fails to boot at all. We're still struggling to identify a way to enable a serial console.. in the absence of that, I wondered if anyone is able to help with recommendations about how to get 3.0.36 booting on the device, and if there's any way I can help?

-Toby

Display won't wake up after suspend

On first boot the display is works. After suspend display won't wake up (only backlight), touchscreen works on black screen. HDMI works after sleep, wake up without problem.
This problem only for Ainol Novo 7 Aurora (not see this problem on any other a10-based device)
No errors in dmesg,
Resolve the problem: Quarx2k@31974a2
But it cause very big battery drain in idle mode.

New info: Aurora use SPI interface module. In current kernel tree missing drivers for spi.
If i disable the "cd_spi_para", display can't wakeup on ainol kernel too.
https://gist.github.com/2979796

VGA does not work with 3.0.31

Previously I used kernel 3.0.8 and modules released with the Ubuntu 10.04 image and could enable VGA output with the following program

int main(int argc, char const *argv[])
{

unsigned long   args[4];
int             ret = -1;

int disp = open("/dev/disp", O_RDWR, 0);
args[0]         = 0;
args[1]         = 0;
args[2]         = 0;
args[3]         = 0;
ret = ioctl(disp,0x201,(unsigned long)args); //turn VGA off

args[1] = 0x4; //set mode to 1024x768
ret = ioctl(disp,0x202,(unsigned long)args); //set the mode
ret = ioctl(disp,0x200,(unsigned long)args); //turn VGA on again

return 0;

}

I've build 3.0.31 (allwinner-v3.0-android-v2) today, replaced uImage and the modules. And the program above does not seem to work anymore.

I've also got a lot of "init: Failed to create pty - disabling logging for job" messages that did not appear before. So maybe we need to enable something in the kernel that is not enabled by default.

Broken usb host in sun4i_crane_defconfig

I'm compiling my kernel based on a sun4i_crane_defconfig, using the allwinner-v3.0-android-v2 branch.
sun4i usb host drivers segment kernel.

If I disable the DeviceDrivers -> Usb opts, kernel boots propertly.

Trace:

[usb_manager]: CONFIG_USB_SW_SUN4I_USB0_OTG
[sw_hcd0]: usb host driver initialize........
[sw_hcd0]: open_usb_clock
[sw_hcd0]: host_init_state = 0
[sw_hcd0]: platform is usb host
<1>Unable to handle kernel paging request at virtual address 6e6f4468
<1>pgd = c0004000
<1>[6e6f4468] *pgd=00000000
<0>Internal error: Oops: 805 [#1] PREEMPT
<d>Modules linked in:
CPU: 0    Not tainted  (3.0.31+ #3)
PC is at sw_hcd_init_controller.constprop.8+0x274/0x44c
LR is at fifo_setup+0x134/0x1d0
pc : [<c0513b18>]    lr : [<c0513348>]    psr: 60000013
sp : d983bed0  ip : f1c13098  fp : 00000000
r10: f1c13000  r9 : 00000000  r8 : c078dc78
r7 : 00000000  r6 : c078de74  r5 : d98c006e  r4 : 6e6f4374
r3 : 00000200  r2 : 00000000  r1 : 00000001  r0 : 00000000
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5387d  Table: 40004019  DAC: 00000015

(.....)

[<c0513b18>] (sw_hcd_init_controller.constprop.8+0x274/0x44c) from [<c001e734>])
[<c001e734>] (sw_hcd_probe+0xd0/0x164) from [<c02aa6bc>] (platform_drv_probe+0x)
[<c02aa6bc>] (platform_drv_probe+0x14/0x18) from [<c02a9424>] (driver_probe_dev)
[<c02a9424>] (driver_probe_device+0x134/0x274) from [<c02a95cc>] (__driver_atta)
[<c02a95cc>] (__driver_attach+0x68/0x8c) from [<c02a8218>] (bus_for_each_dev+0x)
[<c02a8218>] (bus_for_each_dev+0x48/0x8c) from [<c02a8c20>] (bus_add_driver+0xf)
[<c02a8c20>] (bus_add_driver+0xfc/0x268) from [<c02a9ad8>] (driver_register+0xa)
[<c02a9ad8>] (driver_register+0xa8/0x130) from [<c02aaa38>] (platform_driver_pr)
[<c02aaa38>] (platform_driver_probe+0x18/0x9c) from [<c002e3b4>] (do_one_initca)
[<c002e3b4>] (do_one_initcall+0x90/0x160) from [<c00089fc>] (kernel_init+0x74/0)
[<c00089fc>] (kernel_init+0x74/0x110) from [<c0035218>] (kernel_thread_exit+0x0)


(.....)

<4>swapper used greatest stack depth: 5856 bytes left
<0>Kernel panic - not syncing: Attempted to kill init!

(.....)

<0>Rebooting in 10 seconds..

drivers/media/video/sun4i_csi/csi0/sun4i_drv_csi.c inlining problem

With gcc-4.7 (from arch linux) there is a problem with compiling drivers/media/video/sun4i_csi/csi0/sun4i_drv_csi.c

Error is that functions are declared inline yet no function bodies are found.

The calls: bsp_csi_set_buffer_address and bsp_csi_int_clear_status are the culprits.

drivers/media/video/sun4i_csi/include/sun4i_csi_core.h contains the inline function prototypes.

drivers/media/video/sun4i_csi/csi1/sun4i_drv_csi.c seems to have the inline function bodies.

allwinner-v3.0-android-v2 compile error

Hi, I have trouble compile allwinner-v3.0-android-v2 branch for sun4i_crane platform.

Default config used.

Android USB gadget driver give me that error under Mac OS X:

CC drivers/usb/gadget/android.o
drivers/usb/gadget/android.c: In function 'android_disable':
drivers/usb/gadget/android.c:221:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
drivers/usb/gadget/android.c:226:12: error: invalid storage class for function 'adb_function_init'
drivers/usb/gadget/android.c:235:13: error: invalid storage class for function 'adb_function_cleanup'
drivers/usb/gadget/android.c:241:12: error: invalid storage class for function 'adb_function_bind_config'
drivers/usb/gadget/android.c:246:13: error: invalid storage class for function 'adb_android_function_enable'
drivers/usb/gadget/android.c:258:13: error: invalid storage class for function 'adb_android_function_disable'
...
etc

The same errors under linux build environment.

Also, found revert for Android USB gadget and info about new AOSP code give errors in CM9:

https://github.com/faux123/msm8660-htc-ics/pull/3/files

fbcon and mali seem to cause crash if both loaded

I'm currently at commit 23e5456 in the allwinner-v3.0-android-v2 branch.

If I attempt to load the various Mali display modules, as well as fbcon for the console, then the modprobe on fbcon hangs for a long time, then my device crashes.

Apologies for the brevity of this error report -- I do not have a current way to capture any kernel panics as my device is headless and had not written it to syslog.

Note that everything was being loaded as modules, not compiled into kernel.

Android gadget bits lost while porting to 3.3/3.4

there are a serie of changes in 3.0 (v2) that can't be forward ported it to linux 3.3 as it doesn't have drivers/usb/gadget/android.c but that we don't want to lose.

https://gist.github.com/2793851 includes the following patches:

Author: Javen <[email protected]>
Date:   Fri Nov 25 14:02:28 2011 +0800

    usb: add sys_config support
Author: javen <[email protected]>
Date:   Mon Nov 28 20:41:11 2011 +0800

    fixed bug for android
  • commit: e098dbd (only drivers/usb/gadget/ parts)
Author: xiongtie <xiongtie@Exdroid3.(none)>
Date:   Mon Dec 26 23:06:07 2011 +0800

    merge from tag exdroid4.0.1r1-v0.4

(more to come)

sata driver doesn't load on 3.0-v2

after blindly copying drivers/ata/sw_ahci_platform.h and drivers/ata/sw_ahci_platform.c from the 3.0-v1 branch (where it works fine) it panics on load:

[ 1443.700000] Unable to handle kernel paging request at virtual address 5287c864
[ 1443.700000] pgd = d91b4000
[ 1443.700000] Registering platform device 'sw_ahci.0'. Parent
[ 1443.700000] d
[ 1443.720000] [5287c864] *pgd=00000000 at platform
[ 1443.720000] Internal error: Oops: 5 [#1] PREEMPT
[ 1443.720000] Modules linked in: sw_ahci_platform(+) nand
[ 1443.720000] CPU: 0    Not tainted  (3.0.31+ #17)
[ 1443.720000] PC is at gpio_request.part.4+0x104/0x4c8
[ 1443.720000] LR is at gpio_request.part.4+0x4c4/0x4c8
[ 1443.720000] pc : [<c0052a40>]    lr : [<c0052e00>]    psr: 200f0013
[ 1443.720000] sp : d9089c60  ip : 22866df4  fp : d9089cd4
[ 1443.720000] r10: 5287c864  r9 : d9088000  r8 : c0036c04
[ 1443.720000] r7 : d9089ce8  r6 : 00000001  r5 : 00000058  r4 : c0759f3c
[ 1443.720000] r3 : 00000000  r2 : f2851370  r1 : 22866dfc  r0 : 5287c888
[ 1443.720000] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[ 1443.720000] Control: 10c5387d  Table: 591b4019  DAC: 00000015
...
[ 1443.720000] Backtrace: 
[ 1443.720000] [<c005293c>] (gpio_request.part.4+0x0/0x4c8) from [<c0052e20>] (gpio_request+0x1c/0x28)
[ 1443.720000] [<c0052e04>] (gpio_request+0x0/0x28) from [<c0053480>] (gpio_request_ex+0x3c/0xe0)
[ 1443.720000] [<c0053444>] (gpio_request_ex+0x0/0xe0) from [<bf0231d0>] (sw_ahci_start+0xa8/0x140 [sw_ahci_platform])
[ 1443.720000]  r7:c07583d8 r6:c0757938 r5:dc9c4000 r4:bf0237a0
[ 1443.720000] [<bf023128>] (sw_ahci_start+0x0/0x140 [sw_ahci_platform]) from [<bf025178>] (sw_ahci_probe+0x178/0x37c [sw_ahci_platform])
[ 1443.720000]  r7:00000000 r6:d9089d94 r5:00000000 r4:d9128d90
[ 1443.720000] [<bf025000>] (sw_ahci_probe+0x0/0x37c [sw_ahci_platform]) from [<c02e7ce8>] (platform_drv_probe+0x20/0x24)
[ 1443.720000] [<c02e7cc8>] (platform_drv_probe+0x0/0x24) from [<c0509ae4>] (really_probe+0xcc/0x1b4)
[ 1443.720000] [<c0509a18>] (really_probe+0x0/0x1b4) from [<c02e6984>] (driver_probe_device+0x88/0xa4)
[ 1443.720000]  r6:bf0237d4 r5:bf023904 r4:bf0237a0
[ 1443.720000] [<c02e68fc>] (driver_probe_device+0x0/0xa4) from [<c02e6a34>] (__driver_attach+0x94/0x98)
[ 1443.720000]  r5:bf023904 r4:bf0237a0
[ 1443.720000] [<c02e69a0>] (__driver_attach+0x0/0x98) from [<c02e5a8c>] (bus_for_each_dev+0x64/0x90)
[ 1443.720000]  r6:c02e69a0 r5:00000000 r4:bf023904 r3:c02e69a0
[ 1443.720000] [<c02e5a28>] (bus_for_each_dev+0x0/0x90) from [<c02e6620>] (driver_attach+0x24/0x28)
[ 1443.720000]  r6:d9018180 r5:c07335f8 r4:bf023904
[ 1443.720000] [<c02e65fc>] (driver_attach+0x0/0x28) from [<c02e61e4>] (bus_add_driver+0xc8/0x260)
[ 1443.720000] [<c02e611c>] (bus_add_driver+0x0/0x260) from [<c02e6f60>] (driver_register+0x80/0x144)
[ 1443.720000] [<c02e6ee0>] (driver_register+0x0/0x144) from [<c02e8100>] (platform_driver_register+0x4c/0x60)
[ 1443.720000]  r8:c0036c04 r7:0002306a r6:00000000 r5:00000001 r4:bf0238f0
[ 1443.720000] r3:00000000
[ 1443.720000] [<c02e80b4>] (platform_driver_register+0x0/0x60) from [<c02e8134>] (platform_driver_probe+0x20/0xa4)
[ 1443.720000] [<c02e8114>] (platform_driver_probe+0x0/0xa4) from [<bf0253a0>] (sw_ahci_init+0x24/0x30 [sw_ahci_platform])
[ 1443.720000]  r6:00000000 r5:d9088000 r4:bf0236f0 r3:00000000
[ 1443.720000] [<bf02537c>] (sw_ahci_init+0x0/0x30 [sw_ahci_platform]) from [<c00302f4>] (do_one_initcall+0x40/0x184)
[ 1443.720000]  r4:c0756e80 r3:00000000
[ 1443.720000] [<c00302b4>] (do_one_initcall+0x0/0x184) from [<c0094ff0>] (sys_init_module+0x7c/0x1a4)
[ 1443.720000] [<c0094f74>] (sys_init_module+0x0/0x1a4) from [<c0036a80>] (ret_fast_syscall+0x0/0x30)
[ 1443.720000]  r7:00000080 r6:00000000 r5:00000000 r4:be818988
[ 1443.720000] Code: e0821101 e0820100 e240a024 e241c008 (e5100024) 
evice: 'sw_ahci.0': device_add
May 16 10:42:35 localhost kernel: [ 1443.700000] bus: 'platform': add device sw_ahci.0
May 16 10:42:35 localhost kernel: [ 1443[ 1444.920000] ---[ end trace dcdbcaa8ecd2fbe3 ]---

Kernel doesn't boot / or output anything to uSD UART

Booting on my Novo7 Advanced, from u-boot:

Q2011.09-rc1 (Feb 28 2012 - 15:54:51) Allwinner Technology

CPU:   SUNXI Family
Board: A10-EVB
DRAM:  512 MiB
NAND:  3504 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
--------fastboot partitions--------
-total partitions:8-
-name-        -start-       -size-
BOOTFS      : 100000        1000000
LROOTFS     : 1100000       2000000
LSYSTEMFS   : 3100000       10000000
LDATAFS     : 13100000      40000000
MISC        : 53100000      100000
LRECOVERYFS : 53200000      2000000
LCACHEFS    : 55200000      10000000
UDISK       : 65200000      75e00000
-----------------------------------
Hit any key to stop autoboot:  0
sun4i#help
?       - alias for 'help'
base    - print or set address offset
boot    - boot default, i.e., run 'bootcmd'
boota   - boota   - boot android bootimg from memory

bootd   - boot default, i.e., run 'bootcmd'
bootm   - boot application image from memory
cmp     - memory compare
cp      - memory copy
crc32   - checksum calculation
env     - environment handling commands
exit    - exit script
false   - do nothing, unsuccessfully
fastboot- fastboot- use USB Fastboot protocol

fatdown - download data to a dos filesystem
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls   - list files in a directory (default /)
go      - start application at address 'addr'
help    - print command description/usage
key_test- Test the key value and dump key registers
loop    - infinite loop on address range
md      - memory display
mm      - memory modify (auto-incrementing address)
mtest   - simple RAM read/write test
mw      - memory write (fill)
nand    - NAND sub-system
nboot   - boot from NAND device
nm      - memory modify (constant address)
printenv- print environment variables
reset   - Perform RESET of the CPU
run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv  - set environment variables
showvar - print local hushshell variables
test    - minimal test like /bin/sh
true    - do nothing, successfully
version - print monitor, compiler and linker version
sun4i#fatls nand 7
            lost.dir/
            .android_secure/
  3632540   uimage
    40692   sys_config1.bin
            android/

2 file(s), 3 dir(s)

sun4i#fatload nand 7 50000000 uimage
reading uimage

3632540 bytes read
sun4i#bootm 50000000
## Booting kernel from Legacy Image at 50000000 ...
   Image Name:   Linux-3.0.8-android+
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3632476 Bytes = 3.5 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

And from there, silence.

The kernel is either not booting, or booting and not outputting anything, or booting and outputting anywhere else (I'm debugging using the uSD breakout).

lcd and hdmi as modules may lead to a blank screen

I've discovered that the X11 Mali driver will not load (due to UMP errors) if you have compiled the Mali module into the kernel.
ie. It only works if they are all modules, loaded after boot.

However I've also discovered that if you use them as modules, then you get no display output at all if you are using the basic framebuffer X11 driver.

This appears to be because the disp and hdmi components both try to call into each other to set function pointers up -- however since one will always be loaded before the other, these function pointers are not configured. This circular initialisation should be avoided.

In the hdmi module, in Hdmi_init(void) there is a call to disp_set_hdmi_func() in the disp module. I guess that's why.

fbcon crashes it to death

in 3.0 fbcon crashes the mele because disp doesn't implement fbops->fb_imageblit. to solve that 7fa2715 extended the disp driver to use the generic not-accelerated fillrect, copyarea and imageblit callbacks.

But now the wip/allwinner-v3.0-android/disp branch crashes because pseudo_palette doesn't refer to a u32[16];

$ gdb drivers/video/cfbimgblt.ko
(gdb) list *(cfb_imageblit+0x98)
0x98 is in cfb_imageblit (drivers/video/cfbimgblt.c:290).
285                     p->fbops->fb_sync(p);
286
287             if (image->depth == 1) {
288                     if (p->fix.visual == FB_VISUAL_TRUECOLOR ||
289                         p->fix.visual == FB_VISUAL_DIRECTCOLOR) {
290                             fgcolor = ((u32*)(p->pseudo_palette))[image->fg_color];
291                             bgcolor = ((u32*)(p->pseudo_palette))[image->bg_color];
292                     } else {
293                             fgcolor = image->fg_color;
294                             bgcolor = image->bg_color;

next step would be to find the proper way to link whatever BSP_disp_get_palette_table() uses to fbi->pseudo_palette...

also, considering we only care about Linux we should probably get rid of all the wrapper code in drivers/video/sun4i/disp/de_bsp/

pendings porting to 3.4

drivers that got broken:

  • drivers/net/wireless/rtl8192cu/ → allwinnerized version of drivers/net/wireless/rtlwifi/rtl8192cu

pending merges:

pending merges not even in 3.0-v2 tree:

cp: cannot stat `drivers/net/wireless/bcm4330/firmware/mw269v3_fw.bin': No such file or directory

Maybe you have forget put these into the fold ...
cp: cannot stat `drivers/net/wireless/bcm4330/firmware/mw269v3_fw.bin': No such file or directory

And This is the output error :

Image Name: Linux-3.0.31+
Created: Sat May 19 20:57:10 2012
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4042472 Bytes = 3947.73 kB = 3.86 MB
Load Address: 40008000
Entry Point: 40008000
Image arch/arm/boot/uImage is ready
arch/arm/boot/uImage' ->output/uImage'
arch/arm/boot/zImage' ->output/zImage'
cp: cannot stat `drivers/net/wireless/bcm4330/firmware/mw269v3_fw.bin': No such file or directory

i used the old(3.08+ /based my table ) instead of it

eth0 link always down

When using sun4i_defconfig on branch allwinner-v3.0-android-v2, on a Mele A1000, the ethernet driver will sometimes refuse to see that the cable is plugged in. When the interface is brought up, I get:

<7>wemac wemac.0: enabling eth0
<4>wemac wemac.0: WARNING: no IRQ resource flags set.
<7>wemac wemac.0: resetting device
<6>wemac wemac.0: eth0: link down

This varies from build to build of the kernel, but once I have a kernel where the interface doesn't come up, it never comes up from that kernel. This happens on a completely stock sun4i_defconfig kernel with no modules loaded.

The interface's MAC address is being configured via a uboot variable. My /etc/network/interfaces is minimal:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

Watching the link light on the interface, I see:

  • light on during uboot.
  • light goes out sometime during boot.
  • if working: light goes on when interface is brought up, otherwise the light stays off.

It's been doing this for a while but I've only just had time to look into it. This disturbs me a little because if this is as common as I've been observing, surely someone else would have observed it too.

I'm using the standard emdebian gcc toolchain, 4.4.5-8; is it worth trying a different compiler?

mount rootfs fails unless rootdelay=1 added

Building 4GB SD card following my own instructions at http://rhombus-tech.net/allwinner_a10/hacking_the_mele_a1000/Building_Debian_From_Source_Code_for_Mele/. Unable to mount the root filesystem. Here is boot log: http://pastebin.com/jWQYHaJP

Note that card present pin can be read immediately.

Tried with two different makes of 4GB SDHC cards.

This was working last week, BTW.

If I stop boot and add rootdelay, boots OK.

setenv root /dev/mmcblk0p2 rootdelay=1
saveenv
boot

"ksoftirqd/0" always use 3-8% CPU.

It happening because HDMI is waiting connect for cable. Checking it every 200ms (in sleep too).
Simply solution to increase hdmi_delay_ms for 2sec - "drivers/video/sun4i/hdmi/drv_hdmi.c"
After ksoftirqd/0 always 0%.

hardcoded changes in head.S

in arch/arm/kernel/head.S we are hardcoding (9aae53f) two chunks of ASM, the first sets the machine id (which is in fact job of the bootloader) and about the second Tom said today on IRC.

09:59:15 < hipboi> ok, i checked with my workmate
09:59:42 < hipboi> it's maps the memory of the sys_config
10:00:37 < hipboi> at the 48MiB offset of 0x40000000

but we can't just cut it out and my knowledge about ARM's linux booting process is still too limited to know. hints?

Don't fail horribly if the bootloader used is not the one we prefer

We should still attempt the AW mem check hack if there's no proper ATAG

We should do this because:

  1. It's the best way to test the kernels on a new device: knowing the rest of the bootchain works fine, one can test the kernel and be sure it's not some other component failing.
  2. There's no uboot that can boot Android boot.img partitions from NAND as far as I'm aware.
  3. Lazy people exist :P

Kernel panic with preempted kernel

If I try to run any kernel with kernel preemption available, I get assorted peculiar crashes, most looking like this:

<1>Unable to handle kernel NULL pointer dereference at virtual address 00000019
<1>pgd = c0004000
<1>[00000019] *pgd=00000000[    3.050000] [00000019] *pgd=00000000
<0>Internal error: Oops: 5 [#1] PREEMPT
<d>Modules linked in:[    3.060000] Modules linked in:
CPU: 0    Not tainted  (3.0.31+ #1)
PC is at regulator_get_voltage+0x10/0x3c
LR is at sun4i_cpufreq_initcall+0xb4/0x12c
pc : [<c02ae9f0>]    lr : [<c000ecf4>]    psr: a0000013
sp : db83bf58  ip : db83bf70  fp : db83bf6c
r10: 00000000  r9 : 00000000  r8 : 00000000
r7 : 00000013  r6 : 00000000  r5 : db83a000  r4 : ffffffed
r3 : 00000000  r2 : 00000000  r1 : 00000001  r0 : ffffffed
Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel

(followed by lots of stuff that I can paste if it's useful)

If I turn kernel preemption off --- I usually go for server mode, with no forced preemption --- it works fine (although with diverse other issues). When it crashes, it usually happens some time during startup, although the exact place can vary. In other words, exactly like what it looks like: some code that's failing to handle kernel preemption properly, so a preemption request in the wrong place is causing a panic.

It's not just my kernels. I've just tried the prebuild SD card image at http://www.cnx-software.com/2012/06/22/ubuntu-12-04-server-armhf-image-for-mele-a1000a2000 and it behaves in precisely the same way.

I'm really confused. This is obviously working out-of-the-box for other people, yet for me it's crashing almost instantly on startup... and I'm not the only one, as I found this pastebin log:

http://pastebin.com/j6RXb0Ae

...which is word-for-word what I'm getting, even to the addresses! But I have no idea who posted it.

SATA problem on MeleA1000

I succeeded to compile and start my own kernel, using the branch allwinner-v3.0-
android-v2 ...
But when I install the sata module (sw_ahci_platform) I have this error:

<6>ata1: EH complete
<3>ata1: exception Emask 0x10 SAct 0x0 SErr 0x4000000 action 0xe frozen
ata1: exception Emask 0x10 SAct 0x0 SErr 0x4000000 action 0xe frozen
<3>ata1: irq_stat 0x00000040, connection status changed
<3>ata1: SError: { DevExch }
<4>ata1: limiting SATA link speed to 1.5 Gbps
<6>ata1: hard resetting link
<6>ata1: SATA link down (SStatus 1 SControl 310)
<6>ata1: EH complete
<3>ata1: exception Emask 0x10 SAct 0x0 SErr 0x4000000 action 0xe frozen
<3>ata1: irq_stat 0x00000040, connection status changed
<3>ata1: SError: { DevExch }

I checked the internet, some guys report a cable error, but when I boot on
Android I get this:

sw_ahci sw_ahci.0: controller can't do PMP, turning off CAP_PMP
sw_ahci sw_ahci.0: forcing PORTS_IMPL to 0x1
sw_ahci sw_ahci.0: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl platform mode
sw_ahci sw_ahci.0: flags: ncq sntf pm led clo only pio slum part ccc
scsi0 : sw_ahci_platform
ata1: SATA max UDMA/133 irq_stat 0x00400040, connection status changed irq 56
ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata1.00: native sectors (2) is smaller than sectors (1953525168)
ata1.00: ATA-8: ST1000LM024 HN-M101MBB, 2AR10002, max UDMA/133
ata1.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata1.00: configured for UDMA/133

Any suggestions ?

thanks and regards,

Nik0

SATA oddities

The SATA driver doesn't appear to be entire stable, for whatever reason. There have been a couple of anecdotal reports of file system corruption and the occasional error dumped on the console (error dumps appended here).

I have no idea what could be causing this (or even if it's totally normal)...

The errors I got were:

[ 116.050000] ata1.00: exception Emask 0x0 SAct 0x7fffffff SErr 0x0 action 0x6 frozen
[ 116.060000] ata1.00: failed command: WRITE FPDMA QUEUED
[ 116.070000] ata1.00: cmd 61/08:00:b0:1e:e4/00:00:06:00:00/40 tag 0 ncq 4096 out
[ 116.070000] res 40/00:01:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 116.080000] ata1.00: status: { DRDY }

...followed by:

[ 116.890000] ata1.00: status: { DRDY }
[ 116.900000] ata1: hard resetting link
[ 117.370000] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 117.700000] ata1.00: configured for UDMA/100
[ 117.710000] ata1.00: device reported invalid CHS sector 0
[ 117.720000] ata1.00: device reported invalid CHS sector 0
...repeated for several seconds...
[ 118.020000] ata1: EH complete

And then it was fine. And a bit later I got:

[ 368.570000] ata1.00: exception Emask 0x12 SAct 0x2 SErr 0x1280500 action 0x6 frozen
[ 368.580000] ata1.00: irq_stat 0x08000000, interface fatal error
[ 368.590000] ata1: SError: { UnrecovData Proto 10B8B BadCRC TrStaTrns }
[ 368.600000] ata1.00: failed command: READ FPDMA QUEUED
[ 368.610000] ata1.00: cmd 60/a8:08:08:6d:65/00:00:06:00:00/40 tag 1 ncq 86016 in
[ 368.610000] res 40/00:0c:08:6d:65/00:00:06:00:00/40 Emask 0x12 (ATA bus error)
[ 368.620000] ata1.00: status: { DRDY }
[ 368.630000] ata1: hard resetting link
[ 369.170000] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 369.530000] ata1.00: configured for UDMA/100
[ 369.540000] ata1: EH complete

Another list member got:

<3>ata1.00: exception Emask 0x0 SAct 0x1 SErr 0x0 action 0x6 frozen
[51815.040000] ata1.00: exception Emask 0x0 SAct 0x1 SErr 0x0 action 0x6 frozen
<3>ata1.00: failed command: WRITE FPDMA QUEUED
[51815.050000] ata1.00: failed command: WRITE FPDMA QUEUED
<3>ata1.00: cmd 61/08:00:88:97:08/00:00:1e:00:00/40 tag 0 ncq 4096 out
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[51815.060000] ata1.00: cmd 61/08:00:88:97:08/00:00:1e:00:00/40 tag 0
ncq 4096 out
[51815.060000] res 40/00:00:00:00:00/00:00:00:00:00/00 Emask
0x4 (timeout)
<3>ata1.00: status: { DRDY }
[51815.070000] ata1.00: status: { DRDY }
<6>ata1: hard resetting link
<6>ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
<6>ata1.00: configured for UDMA/133
<4>ata1.00: device reported invalid CHS sector 0
[51815.440000] ata1.00: device reported invalid CHS sector 0
<6>ata1: EH complete
<6>kmemleak: 15 new suspected memory leaks (see /sys/kernel/debug/kmemleak)
<6>kmemleak: 12 new suspected memory leaks (see /sys/kernel/debug/kmemleak)
<3>ata1.00: exception Emask 0x10 SAct 0xfc SErr 0x280100 action 0x6 frozen
[101718.400000] ata1.00: exception Emask 0x10 SAct 0xfc SErr 0x280100
action 0x6 frozen
<3>ata1.00: irq_stat 0x08000000, interface fatal error
[101718.410000] ata1.00: irq_stat 0x08000000, interface fatal error
<3>ata1: SError: { UnrecovData 10B8B BadCRC }
[101718.420000] ata1: SError: { UnrecovData 10B8B BadCRC }
<3>ata1.00: failed command: READ FPDMA QUEUED
[101718.430000] ata1.00: failed command: READ FPDMA QUEUED
<3>ata1.00: cmd 60/08:10:10:9c:19/00:00:02:00:00/40 tag 2 ncq 4096 in
res 40/00:3c:38:9c:19/00:00:02:00:00/40 Emask 0x10 (ATA bus error)
[101718.430000] ata1.00: cmd 60/08:10:10:9c:19/00:00:02:00:00/40 tag 2
ncq 4096 in
[101718.430000] res 40/00:3c:38:9c:19/00:00:02:00:00/40 Emask
0x10 (ATA bus error)
<3>ata1.00: status: { DRDY }
[101718.440000] ata1.00: status: { DRDY }
<3>ata1.00: failed command: READ FPDMA QUEUED
[101718.450000] ata1.00: failed command: READ FPDMA QUEUED
<3>ata1.00: cmd 60/08:18:18:9c:19/00:00:02:00:00/40 tag 3 ncq 4096 in
res 40/00:3c:38:9c:19/00:00:02:00:00/40 Emask 0x10 (ATA bus error)
[101718.460000] ata1.00: cmd 60/08:18:18:9c:19/00:00:02:00:00/40 tag 3
ncq 4096 in
[101718.460000] res 40/00:3c:38:9c:19/00:00:02:00:00/40 Emask
0x10 (ATA bus error)
<3>ata1.00: status: { DRDY }
[101718.470000] ata1.00: status: { DRDY }
<3>ata1.00: failed command: READ FPDMA QUEUED
[101718.480000] ata1.00: failed command: READ FPDMA QUEUED
<3>ata1.00: cmd 60/08:20:20:9c:19/00:00:02:00:00/40 tag 4 ncq 4096 in
res 40/00:3c:38:9c:19/00:00:02:00:00/40 Emask 0x10 (ATA bus error)
[101718.490000] ata1.00: cmd 60/08:20:20:9c:19/00:00:02:00:00/40 tag 4
ncq 4096 in
[101718.490000] res 40/00:3c:38:9c:19/00:00:02:00:00/40 Emask
0x10 (ATA bus error)
<3>ata1.00: status: { DRDY }
[101718.500000] ata1.00: status: { DRDY }
<3>ata1.00: failed command: READ FPDMA QUEUED
[101718.510000] ata1.00: failed command: READ FPDMA QUEUED
<3>ata1.00: cmd 60/08:28:28:9c:19/00:00:02:00:00/40 tag 5 ncq 4096 in
res 40/00:3c:38:9c:19/00:00:02:00:00/40 Emask 0x10 (ATA bus error)
[101718.520000] ata1.00: cmd 60/08:28:28:9c:19/00:00:02:00:00/40 tag 5
ncq 4096 in
[101718.520000] res 40/00:3c:38:9c:19/00:00:02:00:00/40 Emask
0x10 (ATA bus error)
<3>ata1.00: status: { DRDY }
[101718.530000] ata1.00: status: { DRDY }
<3>ata1.00: failed command: READ FPDMA QUEUED
[101718.530000] ata1.00: failed command: READ FPDMA QUEUED
<3>ata1.00: cmd 60/08:30:30:9c:19/00:00:02:00:00/40 tag 6 ncq 4096 in
res 40/00:3c:38:9c:19/00:00:02:00:00/40 Emask 0x10 (ATA bus error)
[101718.540000] ata1.00: cmd 60/08:30:30:9c:19/00:00:02:00:00/40 tag 6
ncq 4096 in
[101718.540000] res 40/00:3c:38:9c:19/00:00:02:00:00/40 Emask
0x10 (ATA bus error)
<3>ata1.00: status: { DRDY }
[101718.550000] ata1.00: status: { DRDY }
<3>ata1.00: failed command: READ FPDMA QUEUED
[101718.560000] ata1.00: failed command: READ FPDMA QUEUED
<3>ata1.00: cmd 60/08:38:38:9c:19/00:00:02:00:00/40 tag 7 ncq 4096 in
res 40/00:3c:38:9c:19/00:00:02:00:00/40 Emask 0x10 (ATA bus error)
[101718.570000] ata1.00: cmd 60/08:38:38:9c:19/00:00:02:00:00/40 tag 7
ncq 4096 in
[101718.570000] res 40/00:3c:38:9c:19/00:00:02:00:00/40 Emask
0x10 (ATA bus error)
<3>ata1.00: status: { DRDY }
[101718.580000] ata1.00: status: { DRDY }
<6>ata1: hard resetting link
<6>ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
<6>ata1.00: configured for UDMA/133
<6>ata1: EH complete

Sun3i clock.c syntaxe error

Hello all,
I found something seem to be a syntaxe error into a kernel file, i'm not very sure...
(i hope this is the good place to push this issue)
File : /arch/arm/mach-sun3i/clock/clock.c (Line : 1688) - Struct : clk_ahb_de_image0
Field .clk_id is CSP_CCM_MOD_CLK_AHB_DE_IMAGE1 but this must be CSP_CCM_MOD_CLK_AHB_DE_IMAGE0 no ?
Best regards,
Bin

sun4i_defconfig (et al) suggestions

# CONFIG_IPV6 is not set
Please change to =m

# CONFIG_TUN is not set
same here

# CONFIG_NETFILTER is not set
same here, but this also opens up a huge subsection to configure, I'd suggest copying this section verbatim from Debian.

# USB Network Adapters
#
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_USBNET is not set
# CONFIG_USB_HSO is not set
# CONFIG_USB_IPHETH is not set
# CONFIG_WAN is not set

I suggest enabling all these as =m, needed on the MK802 for wired Ethernet via USB.

CONFIG_NO_HZ=y
but on http://rhombus-tech.net/allwinner_a10/hacking_the_mele_a1000/server/ someone wrote "tickless kernel doesn't work. (If you turn it on, the system will hang randomly.)" -- is this no longer true?

Kernel modules build may fail when using several cores

Not really sure if it's a kernel bug but if I use:
make ARCH=arm CROSS_COMPILE=${cross_compiler} -j ${num_jobs} INSTALL_MOD_PATH=output modules where num_job is total number of CPU threads x 1.5, the build will sometimes fail as follows:

CC [M] drivers/gpu/mali/mali/linux/mali_osk_low_level_mem.o
CC [M] drivers/gpu/mali/ump/../mali/linux/mali_osk_locks.o
CC [M] drivers/gpu/mali/ump/../mali/linux/mali_osk_memory.o
fixdep: error opening depfile: drivers/gpu/mali/mali/linux/.mali_osk_atomics.o.d: No such file or directory
make[4]: *** [drivers/gpu/mali/mali/linux/mali_osk_atomics.o] Error 2
make[4]: *** Waiting for unfinished jobs....

Changing this line to use 2 jobs:
make ARCH=arm CROSS_COMPILE=${cross_compiler} -j 2 INSTALL_MOD_PATH=output modules

It can build.

dcc_tty.c in 3.0 v2

Needed to change line in drivers/char/dcc_tty.c to match v1.

Offending line is

< static spinlock_t g_dcc_tty_lock = SPIN_LOCK_UNLOCKED; in v2

static DEFINE_SPINLOCK(g_dcc_tty_lock); in v1 (will try to track down root cause),

dcc_tty.c in 3.0 v2

Needed to change line in drivers/char/dcc_tty.c to match v1.

Offending line is

static spinlock_t g_dcc_tty_lock = SPIN_LOCK_UNLOCKED; in v2

static DEFINE_SPINLOCK(g_dcc_tty_lock); in v1

(will try to track down root cause),

reserving memory only to enabled features

On Fri, 18 May 2012 23:49:26 +0100 David Given sent the following patch to the mailing list:

Attached is a patch which prevents memory being reserved for
framebuffer, G2D and video engine if the relevant bits aren't enabled in
the kernel configuration. This whole area looks very much under
construction, and I've no idea whether this is the right approach or
not, but on my server system this gains me an extra 115MB or so of
usable RAM.

(Incidentally, the G2D area is apparently never reserved. Is that correct?)

http://lists.phcomp.co.uk/pipermail/arm-netbook/attachments/20120518/d327754f/attachment.bin

error :modules/wifi/usi-bcm4329/v4.218.248.15/open-src/src/dhd/linux/dhd-cdc-sdmmc-gpl-3.0.31+/wl_iw.c

CC [M]  /ics/allwinner/linux-allwinner/modules/wifi/usi-bcm4329/v4.218.248.15/open-src/src/dhd/linux/dhd-cdc-sdmmc-gpl-3.0.31+/wl_iw.o
/ics/allwinner/linux-allwinner/modules/wifi/usi-bcm4329/v4.218.248.15/open-src/src/dhd/linux/dhd-cdc-sdmmc-gpl-3.0.31+/wl_iw.c: In function ‘wl_iw_set_pmksa’:
/ics/allwinner/linux-allwinner/modules/wifi/usi-bcm4329/v4.218.248.15/open-src/src/dhd/linux/dhd-cdc-sdmmc-gpl-3.0.31+/wl_iw.c:5203:5: error: array subscript is above array bounds [-Werror=array-bounds]
/ics/allwinner/linux-allwinner/modules/wifi/usi-bcm4329/v4.218.248.15/open-src/src/dhd/linux/dhd-cdc-sdmmc-gpl-3.0.31+/wl_iw.c:5206:5: error: array subscript is above array bounds [-Werror=array-bounds]
cc1: all warnings being treated as errors

make[4]: *** [/ics/allwinner/linux-allwinner/modules/wifi/usi-bcm4329/v4.218.248.15/open-src/src/dhd/linux/dhd-cdc-sdmmc-gpl-3.0.31+/wl_iw.o] Error 1
make[3]: *** [_module_/ics/allwinner/linux-allwinner/modules/wifi/usi-bcm4329/v4.218.248.15/open-src/src/dhd/linux/dhd-cdc-sdmmc-gpl-3.0.31+] Error 2
make[3]: Leaving directory `/ics/allwinner/linux-allwinner'
make[2]: *** [modules] Error 2
make[2]: Leaving directory `/ics/allwinner/linux-allwinner/modules/wifi/usi-bcm4329/v4.218.248.15/open-src/src/dhd/linux/dhd-cdc-sdmmc-gpl-3.0.31+'
make[1]: *** [objdir] Error 2
make[1]: Leaving directory `/ics/allwinner/linux-allwinner/modules/wifi/usi-bcm4329/v4.218.248.15/open-src/src/dhd/linux'
make: *** [dhd-cdc-sdmmc-gpl] Error 2

Goodix GT801NI_3R15_1AV ("2 in 1"?) touchscreen doesn't work

Log on stock firmware, where it works fine:

<3>[    7.934312] init: untracked pid 85 exited
<7>[    7.950463] goodix_touch_3F goodix_ts_init @20120306 m_inet_ctpState return false,continue deteck 
<7>[    7.970474] ctp_fetch_sysconfig_para. 
<7>[    7.970474] ctp_fetch_sysconfig_para: after: ctp_twi_addr is 0x55, dirty_addr_buf: 0x55. dirty_addr_buf[1]: 0xfffe 
<7>[    8.000466] ctp_fetch_sysconfig_para: ctp_twi_id is 2. 
<6>[    8.000466] ctp_fetch_sysconfig_para: screen_max_x = 1024. 
<6>[    8.020473] ctp_fetch_sysconfig_para: screen_max_y = 768. 
<6>[    8.020473] ctp_fetch_sysconfig_para: revert_x_flag = 0. 
<6>[    8.040477] ctp_fetch_sysconfig_para: revert_y_flag = 0. 
<6>[    8.040477] ctp_fetch_sysconfig_para: exchange_x_y_flag = 1. 
<6>[    8.070460] goodix_ts_init release by jicky 2012.02.06 
<7>[    8.070460] [jicky]===========================goodix_ts_init=====================
<7>[    8.090467] goodix_ts_init: after fetch_sysconfig_para:  normal_i2c: 0x55. normal_i2c[1]: 0xfffe 
<6>[    8.090467] ctp_detect: Detected chip Goodix-TS at adapter 2, address 0x55
<7>[    8.120483] ============= GT801 2+1 probe start ==============
<6>[    8.430491] Begin goodix i2c test
<6>[    8.430491] ===== goodix_touch_3F i2c test ok=======
<6>[    8.460492] Goodix-TS 2-0055: gt801 2pulus1 init panel!
<6>[    8.480494] Goodix-TS 2-0055: Touchscreen works in IIC wake up green mode!
<6>[    8.530503] input: Goodix-TS-board-3 as /devices/virtual/input/input2
<7>[    8.530503] Goodix TouchScreen Version:GT801NI_3R15_1AV
<6>[    8.544167] Goodix-TS 2-0055: Create proc entry success!
<6>[    8.544167] Goodix-TS 2-0055: Goodix debug sysfs create success!
<6>[    8.555667] Goodix-TS 2-0055: Start Goodix-TS-board-3 in interrupt mode
<6>[    8.562387] Goodix-TS 2-0055: Driver Modify Date:2011-06-27
<7>[    8.562387] ============= GT8012+1 probe finished ==============
<6>[    8.574098] init: command 'insmod' r=0
<7>[    8.590510] ssd253x-ts_86F rocky@20120308m_inet_ctpState return true,just return 
<6>[    8.590510] init: command 'insmod' r=-1
<7>[    8.610505] sun4i-ts.c: sun4i_ts_init: start ...
<7>[    8.610505] rtp_used == 0. 
<6>[    8.621778] init: command 'insmod' r=-1
<6>[    8.621778] init: command 'insmod' r=-1

Some info about the module on stock rom:

$ strings goodix_touch_3F.ko |grep =
license=GPL
description=Goodix Touchscreen Driver
depends=ft5x_ts
[...]

Log of "goodix_touch.ko" from source kernel

<4>[    3.220000] ===========================goodix_ts_init=====================
<4>[    3.220000] ctp_fetch_sysconfig_para. 
<4>[    3.230000] ctp_fetch_sysconfig_para: after: ctp_twi_addr is 0x55, dirty_addr_buf: 0x55. dirty_addr_buf[1]: 0xfffe 
<4>[    3.240000] ctp_fetch_sysconfig_para: ctp_twi_id is 2. 
<6>[    3.240000] ctp_fetch_sysconfig_para: screen_max_x = 1024. 
<6>[    3.250000] ctp_fetch_sysconfig_para: screen_max_y = 768. 
<6>[    3.250000] ctp_fetch_sysconfig_para: revert_x_flag = 0. 
<6>[    3.260000] ctp_fetch_sysconfig_para: revert_y_flag = 0. 
<6>[    3.260000] ctp_fetch_sysconfig_para: exchange_x_y_flag = 1. 
<4>[    3.270000] goodix_ts_init: after fetch_sysconfig_para:  normal_i2c: 0x55. normal_i2c[1]: 0xfffe 
<4>[    3.280000] script parser fetch err. 
<4>[    3.280000] ctp_init_platform_resource: tp_reset request gpio fail!
<4>[    3.290000] ctp_reset. 
<4>[    3.290000] ctp_wakeup. 
<6>[    3.490000] ctp_detect: Detected chip Goodix-TS at adapter 2, address 0x55
<6>[    3.500000] ===============================GT801 Probe===========================
<6>[    3.510000] Begin goodix i2c test
<4>[    3.510000] incomplete xfer (0x20)
<4>[    3.530000] incomplete xfer (0x20)
<4>[    3.550000] incomplete xfer (0x20)
<4>[    3.570000] incomplete xfer (0x20)
<4>[    3.590000] incomplete xfer (0x20)
<6>[    3.610000] Warnning: I2C connection might be something wrong!

Device boots itself considerably long after halt

Devices boot long after being halted, with no external interaction

Steps to reproduce:
1 - Shut device down and don't touch it
2- The device turns off
3- The device remains off for several minutes
4- The device boots again on itself

Confirmed devices where this can be seen:
1x VC882 (not an A10 apparently)
2x ZaTab

This bug is especially bad for people who boot linux distros on their tablets, as distros don't suspend and will drain the battery if it goes unnoticed.

Maybe there's some kind of wake alarm that isn't disarmed on power off?

Hardware performance counters do not work (perf, oprofile)

Running oprofile or perf fails to collect any events from ARM hardware performance counters. The system log shows:
[46554.550000] oprofile: using arm/armv7
[46679.440000] hw perfevents: unable to reserve pmu

Brief googling shows that there was similar problem with OMAP CPUs and there is a patch available for them. It might be possible to adapt it.

make deb-pkg target fails (because make headers_check fails)

I am assuming this is because the androidisation of the kernel messes up the header file structure, but make deb-pkg fails, because behind the scenes make headers_check fails, on allwinner-v3.0-android, and allwinner-v3.0-android-v2. This is more for information than anything, as the same did not apply to the 3.3 tree.

If you disable the "make headers_check" in scripts/package/builddeb, then it succeeds in building the packages, though how useful the headers package is unknown. Although there are problems with arm headers packages anyway as I believe the "mach-xxx" headers are not included (certainly true when buidling kirkwood targets).

SATA problem on MeleA1000

I succeeded to compile and start my own kernel, using the branch allwinner-v3.0-
android-v2 ...
But when I install the sata module (sw_ahci_platform) I have this error:

<6>ata1: EH complete
<3>ata1: exception Emask 0x10 SAct 0x0 SErr 0x4000000 action 0xe frozen
ata1: exception Emask 0x10 SAct 0x0 SErr 0x4000000 action 0xe frozen
<3>ata1: irq_stat 0x00000040, connection status changed
<3>ata1: SError: { DevExch }
<4>ata1: limiting SATA link speed to 1.5 Gbps
<6>ata1: hard resetting link
<6>ata1: SATA link down (SStatus 1 SControl 310)
<6>ata1: EH complete
<3>ata1: exception Emask 0x10 SAct 0x0 SErr 0x4000000 action 0xe frozen
<3>ata1: irq_stat 0x00000040, connection status changed
<3>ata1: SError: { DevExch }

I checked the internet, some guys report a cable error, but when I boot on
Android I get this:

sw_ahci sw_ahci.0: controller can't do PMP, turning off CAP_PMP
sw_ahci sw_ahci.0: forcing PORTS_IMPL to 0x1
sw_ahci sw_ahci.0: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl platform mode
sw_ahci sw_ahci.0: flags: ncq sntf pm led clo only pio slum part ccc 
scsi0 : sw_ahci_platform
ata1: SATA max UDMA/133 irq_stat 0x00400040, connection status changed irq 56
ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata1.00: native sectors (2) is smaller than sectors (1953525168)
ata1.00: ATA-8: ST1000LM024 HN-M101MBB, 2AR10002, max UDMA/133
ata1.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata1.00: configured for UDMA/133

Any suggestions ?

Thanks and regards,

Nik0

8250_sunxi.ko needs custom irq handler

7427082 made quite a few changes in the core 8250.ko, mostly debugging but there is an special irq handling (see UART_USR). Most of the patch can be forward ported without much troubles, but the following was done on a section removed by upstream in 4834d02 so we need to make our own irq handler like s3c64xx did in 88bb4ea.

--- a/drivers/tty/serial/8250.c
+++ b/drivers/tty/serial/8250.c
@@ -1667,14 +1727,28 @@ static irqreturn_t serial8250_interrupt(int irq, void *dev_id)
                         * UART was busy. The interrupt must be cleared by reading
                         * the UART status register (USR) and the LCR re-written. */
                        unsigned int status;
-                       status = *(volatile u32 *)up->port.private_data;
+                       DEBUG_SERIAL(&up->port, "bus busy...\n");
+                       printk(">>> bus busy...\n");
+                       //status = *(volatile u32 *)up->port.private_data;
+                       status = serial_in(up, UART_USR);
                        serial_out(up, UART_LCR, up->lcr);

                        handled = 1;

                        end = NULL;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.