Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
chrulri
Old
(Last edited by chrulri; 15th April 2011 at 10:46 PM.) Reason: archos moved source code to git repository
#1  
chrulri's Avatar
Senior Member - OP
Thanks Meter 266
Posts: 895
Join Date: Dec 2010

 
DONATE TO ME
Lightbulb [HOWTO] Build custom kernel, libraries and applications on your own

For building own custom stuff for my Gen8 Device I set up an Ubuntu 10.10 32bit Virtual Machine, so everything in here refers to it, may be different on other linux system.

[disclaimer]This is only a HowTo, if you brick your android device with some custom kernels or other stuff, don't blame me! I'm not responsible for anything you do![/disclaimer]

Notice: ** = you only have to do this step once
  • Prerequisites for Ubuntu 10.10 32 Bit: **
    Code:
    # sudo apt-get install git-core flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl automake autoconf libtool gettext texinfo libmpfr1ldbl
  • Prepare environment: **
    Code:
    # mkdir -pv $HOME/{archos,bin}
    # echo export ARCHOS=\$HOME/archos >> ~/.bashrc
    # echo export PATH=\$HOME/bin:\$PATH >> ~/.bashrc
    # cd $HOME/archos
    # wget -Oavos_env.tgz http://archos-gen8-dvb.googlecode.com/files/avos_env_20110415.tgz
    # tar xzf avos_env.tgz
    # install -m755 cross $HOME/bin/
    # rm -f cross avos_env.tgz
    RESTART CONSOLE OR REBOOT COMPUTER!
  • Toolchain: **
    Code:
    # cd $ARCHOS
    # make all
  • Configure kernel:
    Code:
    # cd $ARCHOS
    # make kernel-config
  • Restore kernel config:
    Code:
    # cd $ARCHOS
    # make kernel-reset
  • Build kernel:
    Code:
    # cd $ARCHOS
    # make kernel-build
  • CrossCompile: (this is just an example for if you want to build some linux libraries or tools)
    Code:
    # echo $ARCHOS
    # cd ..xyz../..zyx../
    # cross make
The Following 11 Users Say Thank You to chrulri For This Useful Post: [ Click to Expand ]
 
jbradshw
Old
#2  
Member
Thanks Meter 2
Posts: 41
Join Date: Dec 2010
Location: Atlanta

 
DONATE TO ME
I followed your instructions, and I got all the way to the end, but when I did 'make kernel-build' it ended with this:

drivers/built-in.o: In function `archos_dpm_suspend':
/home/zyntax/archos/gen8-gpl-froyo/linux/drivers/usb/storage/archos_hdd.c:261: undefined reference to `usbsata_power'
make[3]: *** [.tmp_vmlinux1] Error 1
make[2]: *** [sub-make] Error 2
make[2]: Leaving directory `/home/zyntax/archos/gen8-gpl-froyo/linux'
make[1]: *** [/home/zyntax/archos/gen8-gpl-froyo/buildroot//linux/arch/arm/boot/zImage] Error 2
make[1]: Leaving directory `/home/zyntax/archos/gen8-gpl-froyo/buildroot'
make: *** [kernel-build] Error 2
zyntax@john-ubuntu:~/archos$

This is on a fresh install of Ubuntu 10.10 32-bit in Virtualbox. I installed it, updated the OS, then started your steps. Not sure if this is normal and I'm holding off on the last step. I did do one extra step: in 'make kernal-config' I deselected all the Archos boards under System Type except for the A101IT since that's what I have.
 
chrulri
Old
#3  
chrulri's Avatar
Senior Member - OP
Thanks Meter 266
Posts: 895
Join Date: Dec 2010

 
DONATE TO ME
Quote:
Originally Posted by jbradshw View Post
This is on a fresh install of Ubuntu 10.10 32-bit in Virtualbox. I installed it, updated the OS, then started your steps. Not sure if this is normal and I'm holding off on the last step. I did do one extra step: in 'make kernal-config' I deselected all the Archos boards under System Type except for the A101IT since that's what I have.
can you please try again without modifying kernel config?
 
jbradshw
Old
#4  
Member
Thanks Meter 2
Posts: 41
Join Date: Dec 2010
Location: Atlanta

 
DONATE TO ME
Did that, now I get this:

CC [M] drivers/usb/musb/omap2430.o
/home/zyntax/archos/gen8-gpl-froyo/linux/drivers/usb/musb/omap2430.c:221: warning: 'omap_phy_read' defined but not used
LD [M] drivers/usb/musb/musb_hdrc.o
LD drivers/built-in.o
make[2]: *** [sub-make] Error 2
make[2]: Leaving directory `/home/zyntax/archos/gen8-gpl-froyo/linux'
make[1]: *** [/home/zyntax/archos/gen8-gpl-froyo/buildroot//linux/arch/arm/boot/zImage] Error 2
make[1]: Leaving directory `/home/zyntax/archos/gen8-gpl-froyo/buildroot'
make: *** [kernel-build] Error 2


I don't believe I changed anything besides what I mentioned earlier. Is there anyway to get back a default kernel-config?
 
chrulri
Old
#5  
chrulri's Avatar
Senior Member - OP
Thanks Meter 266
Posts: 895
Join Date: Dec 2010

 
DONATE TO ME
hehe, I thought you should try with default kernel-config

I added a section for restoring kernel config in the start posting :
Quote:
Originally Posted by chulri View Post
[*]Restore kernel config:
Code:
# cd $ARCHOS
# tar xzf gen8-gpl-froyo.tgz gen8-gpl-froyo/linux/linux.config
 
jbradshw
Old
#6  
Member
Thanks Meter 2
Posts: 41
Join Date: Dec 2010
Location: Atlanta

 
DONATE TO ME
Well I did poke around in the config, but as far as I remember I only removed those extra archos systems. I'll restore the default and run it again later tonight.

Thanks.
 
$aur0n
Old
(Last edited by $aur0n; 29th December 2010 at 02:06 PM.)
#7  
$aur0n's Avatar
Senior Member
Thanks Meter 495
Posts: 1,453
Join Date: Nov 2010

 
DONATE TO ME
Quote:
Originally Posted by jbradshw View Post
Well I did poke around in the config, but as far as I remember I only removed those extra archos systems. I'll restore the default and run it again later tonight.
You can't remove other devices (like A32, A101 etc) from Linux kernel config because Archos made bad dependencies for different parts of the kernel and even 70S requires some USB kernel code, it's only compiled when you choose A101 - so either you clean it up manually, or you are required to leave checked other archos devices :/
The Following User Says Thank You to $aur0n For This Useful Post: [ Click to Expand ]
 
EleCtrOx666
Old
#8  
Senior Member
Thanks Meter 149
Posts: 533
Join Date: Aug 2009
Thanks for this howto, this is gonna be useful for me, should be a sticky.
 
jbradshw
Old
#9  
Member
Thanks Meter 2
Posts: 41
Join Date: Dec 2010
Location: Atlanta

 
DONATE TO ME
OK the make kernel-build worked without errors. Now I'm just questioning the command 'cd ..xyz../..zyx../' I don't have any files or directories called that, and running that reports the same. Can I just skip that and do the make cross?
 
chrulri
Old
(Last edited by chrulri; 29th December 2010 at 11:11 PM.)
#10  
chrulri's Avatar
Senior Member - OP
Thanks Meter 266
Posts: 895
Join Date: Dec 2010

 
DONATE TO ME
@jbradshw that's just a sample if someone wants to crosscompile something (e.g. some linux library or application like linuxtv-dvb-apps or w_scan)
you don't have to do everything mentioned in the howto. it's a HowTo not a HaveTo

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Windows-Based Multi-Tool for the Sony Xperia U

If you are a flashaholic and an owner of the Sony Xperia U, you may be interested in the … more

XDA University: Crafting Recovery-Flashable Packages

Those of us who use Linux on a day to day basis don’t think twice about sinking … more

Side-Swiping Multitasking with Kakudo

Recovering iPad users may still remember the multitasking function where you can swipe left or right to … more