• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomepcDuinoA10 based pcDuino1/pcDuino2/pcDuino lite/pcDuino lite wifiCross build pcDuino kernel on X86-64 machine
Previous Next

Cross build pcDuino kernel on X86-64 machine

Posted by: admin , December 29, 2013

This tutorial discusses how to cross build linux kernel for pcDuino on a X86-64 machine. For information on how to set up a X86-PC machine development environment,  please refer to How to setup a X86-64 Virtual Box Cross Compilation Build Enviroment for pcDuino.

Across our learn center, we will use ‘#’ to indicate that this command is running on a X86-PC, and ‘$’ to indicate that this command is running on pcDuino.

1. Download kernel source files from Github.

# git clone https://github.com/pcduino/kernel.git

Note:

This step only downloads the build environment.
There are some submodules from https://github.com/linux-sunxi/.
Source files of submodules will be downloaded when running “make” under kernel/ directory for the first time
(or if the submodules have not been downloaded before when running “make”)

2. Install required software and toolchain on PC for cross-compilation

# sudo apt-get install build-essential git u-boot-tools texinfo texlive ccache zlib1g-dev gawk
# sudo apt-get install bison flex gettext uuid-dev ia32-libs
# sudo apt-get install libusb-1.0-0-dev

# sudo apt-get install g++-arm-linux-gnueabihf

3. Build Kernel Image

Run “make” under kernel/ directory ( Do not compile the source file under kernel/linux-sunxi directory ).

    # cd kernel/
    # make

If no error occurs, a livesuitable image and a HW_pack will be in the output folder:

  • pcduino_a10_hwpack_YYYYMMDD.tar.xz ( includes uboot for mmc-boot, kernel, and driver modules ).
  • pcduino_a10_kernel_livesuit_YYYYMMDD.img ( kernel image update by livesuit )

crossbuild_2

Note:

  • For the first time, it will download the required source code from https://github.com/linux-sunxi/.
  • For each time run “make”, it will apply the patch for pcduino.
  • The patch for pcduino is located at kernel/patch/ directory.
  • All the object files generated by compile tools saved in kernel/build directory.
  • Compile kernel under kernel/linux-sunxi directory will make the build environment “dirty”.
  • If your have done it before. clean up by running “make mrproper” under kernel/linux-sunxi.

For information on how to replace kernel with the newly generated kernel, please refer to: How to Replace Kernel of pcDuino?

Tags: A10 based pcDuino1/pcDuino2/pcDuino lite/pcDuino lite wifi

Share!
Tweet

admin

About the author

One Response to “Cross build pcDuino kernel on X86-64 machine”

  1. Log in to Reply
    Eric Lee
    October 6, 2014 at 9:41 am

    Hi,
    # sudo apt-get install bison flex gettext uuid-dev ia32-libs

    ia32-libs seems not existing @ 14.04.1 version anymore, how to do alternatively?
    Many thanks in advance!

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors