Welcome! Log In Create A New Profile

Advanced

kernel build environment setup on mele

Posted by hyena 
kernel build environment setup on mele
July 13, 2012 03:54PM
Hi,

bit of a newbie in respect of the A10 and Debian Armhf .. got a build running stably on a mele A1000 with a mixture of bastardised crosscompiled androlinux kernel etc ... keen to play around and try and compile a lean HEADLESS kernel/ROOTFS (with close to 512MB RAM and ethernet/SATA) .. bit like i'm runnng on an iconnect at the moment.

Setup with a lot of trial and error a kernel compile environment for an iconnect before and was wondering if someone could provide some reasonably basic instructions to optimum build setup for native Debian Wheezy kernel compilation on the mele A1000 (same as 2000 except case)

thx in advance
Re: kernel build environment setup on mele
July 13, 2012 05:23PM
If you are looking to compile natively then you could just use the Debian SDcard image we have here. It has a nice build environment and is what I'm using for native builds. You would probably want to use the Mele script.bin, and put it on a 8GB card, and also delete the media files. Then you can delete the pkgs you don't want. I'm planning to get a lean buildroot posted but I haven't got to it yet.

If the SD image doesn't suit then you can make your own rootfs using debbootstrap. That is how I made the SD image and it does not take too much time or effort. You could also try the Rhombus rootfs. If you are only building the kernel then cross-compiling using CodeSourcery or Linaro or whatever is also fine. No performance will be gained by compiling the kernel natively, and the difference between the various toolchains when building a kernel is negligible. Most userspace packages should be built natively, or with an armhf optimized toolchain. But for the kernel it does not matter since there is no code in the kernel that needs it. See here

Please note that you can't just use the source for a Debian or vanilla kernel. You have to use the linux-allwinner git sources. If you are running headless then the sun4i_defconfig will work fine. They just removed all the Android crap from the defaults a few days ago. So you will not need to worry about that. either. But the defconfig is still missing a lot of things the Debian kernel provides. So you will need to enable things like netfilter and ipv6 if you need them.

I would not recommend running any Debian version except Sid. Wheezy and Lenny are too old. Sid is very stable and has been running fine on my Dockstar and GoFlex's for way over a year with no issues. Armhf will get you best performance on the A10. It is only available in Sid.
Re: kernel build environment setup on mele
July 14, 2012 09:27AM
thx for this .. will have a bash @ it

p.s. .. just looking through defconfig and switching on a few things .. SATA didnt work the first time i did the compilation a while ago (using bits and pieces from the arm netbooks forum) ... what do i need to put in to or configure to ensure SATA working now im doing it from scratch ?

thx



Edited 1 time(s). Last edit at 07/14/2012 01:35PM by hyena.
Re: kernel build environment setup on mele
July 17, 2012 05:31PM
got the necessary config changes but i think there are driver issues which i believe have been fixed but still remain to be committed to the current GIT code ... the defconfig will need changes as well

i think the resultant changes to the config to enable SATA result in a defconfig (SCSI section) something like the following :

#
# SCSI device support
#
CONFIG_SCSI_MOD=y
# CONFIG_RAID_ATTRS is not set
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
# CONFIG_SCSI_NETLINK is not set
CONFIG_SCSI_PROC_FS=y

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not set
CONFIG_BLK_DEV_SR=y
CONFIG_BLK_DEV_SR_VENDOR=y
# CONFIG_CHR_DEV_SG is not set
# CONFIG_CHR_DEV_SCH is not set
CONFIG_SCSI_MULTI_LUN=y
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set
# CONFIG_SCSI_SCAN_ASYNC is not set
CONFIG_SCSI_WAIT_SCAN=m
#
# SCSI Transports
#
# CONFIG_SCSI_SPI_ATTRS is not set
# CONFIG_SCSI_FC_ATTRS is not set
# CONFIG_SCSI_ISCSI_ATTRS is not set
# CONFIG_SCSI_SAS_ATTRS is not set
# CONFIG_SCSI_SAS_LIBSAS is not set
# CONFIG_SCSI_SRP_ATTRS is not set
CONFIG_SCSI_LOWLEVEL=y
# CONFIG_ISCSI_TCP is not set
# CONFIG_ISCSI_BOOT_SYSFS is not set
# CONFIG_LIBFC is not set
# CONFIG_LIBFCOE is not set
# CONFIG_SCSI_DEBUG is not set
# CONFIG_SCSI_DH is not set
# CONFIG_SCSI_OSD_INITIATOR is not set
CONFIG_ATA=y
# CONFIG_ATA_NONSTANDARD is not set
CONFIG_ATA_VERBOSE_ERROR=y
CONFIG_SATA_PMP=y
#
# Controllers with non-SFF native interface
#
CONFIG_SATA_AHCI_PLATFORM=y
CONFIG_SW_SATA_AHCI_PLATFORM=m
CONFIG_ATA_SFF=y
#
# SFF controllers with custom DMA interface
#
CONFIG_ATA_BMDMA=y

#
# SATA SFF controllers with BMDMA
#
# CONFIG_SATA_MV is not set



#
# PATA SFF controllers with BMDMA
#
# CONFIG_PATA_ARASAN_CF is not set
#
Re: kernel build environment setup on mele
July 18, 2012 07:56AM
Quote

the defconfig will need changes as well

The defconfig is crap.
It may kind of work for Android. But for our purposes, using it for mainstream Linux, it is a joke.
Don't use it.
Good luck in getting it fixed. . . Personally, I am not going to waste my time on pointless exercises. I'll just use my own config and let others submit the defconfig patches. I wish you the best of luck in getting them accepted.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: