This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

  • Resolved

how to build a kernel for beaglebone from scratch?

Hi, there:

I go through the forum, did not find answer about this.

I am using arm-linux-gnueabi to try to build a kernel for beaglebone. I get the source from git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-oamp.git. The system boot and stopped after loading the kernel. 

Can anyone tell me what kernel source I need to use?

Thank you!

Jin

  • Jin,


    I would recommend you try the kernel from the Sitara Linux SDK at http://software-dl.ti.com/dsps/dsps_public_sw/am_bu/sdk/AM335xSDK/latest/index_FDS.html.

    There is also a GCC toolchain in that SDK

    Chase

  • In reply to Chase Maupin:

    Hi, Chase:

    I did download and install the TI SDK system.

    Then I setup the environment and make the kernel with the GCC cross tool come with it. I have a compaining of shared library libz.so.1. How can I build this or get from somewhere?

    Thank you!

    Jin

     

    > [linux-devkit]:/local/jyu3-build/arm/ti-sdk-am335x-evm-05.04.01.00/board-support/linux-3.2-psp04.06.00.07.sdk> make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- uImage

    >   CHK     include/linux/version.h

    >   CHK     include/generated/utsrelease.h

    > make[1]: `include/generated/mach-types.h' is up to date.

    >   CC      kernel/bounds.s

    > /local/jyu3-build/arm/ti-sdk-am335x-evm-05.04.01.00/linux-devkit/bin/.

    > ./libexec/gcc/arm-arago-linux-gnueabi/4.5.3/cc1: error while loading

    > shared libraries: libz.so.1: cannot open shared object file: No such

    > file or directory

    > make[1]: *** [kernel/bounds.s] Error 1

    > make: *** [prepare0] Error 2

    > [linux-devkit]:/local/jyu3-build/arm/ti-sdk-am335x-evm-05.04.01.00/boa

    > rd-support/linux-3.2-psp04.06.00.07.sdk>

     

  • In reply to Jin Yu1:

    Never mind, I found it.

    Jin

  • In reply to Jin Yu1:

    Jin,

    It also looks like you sourced the environment-setup script.  You do NOT want to do that when building the kernel because it will cause some of the host tools the kernel uses to be cross-compiled for the ARM instead.

    Chase

  • In reply to Chase Maupin:

    Hi, Chase:

    I still have the same complain from the compiler.

    I tried to guess to set the library path EXTRALDFLAGS := /linux-devkit/arm-arago-linux-gnueabi/usr/lib in file /script/Makefile.build

    It still failed to find the libz.so.1 in   /linux-devkit/arm-arago-linux-gnueabi/usr/lib . can you tell me what I am missing?

    Thank you!

    Jin 

  • In reply to Jin Yu1:

    Hi, Chase:

    It turns out I have 64bit machine, I am missing 32bit library lib32lz.1

    Now it compiles.

    Thank you!

    Jin

  • In reply to Jin Yu1:

    Hi, Chase:

    Now the system is up with the kernel and u-boot I built based on your source. Thank you!

    Do you have a git site I can directly get the kernel and u-boot source without all the install things?

    Also can I disable the power management unit. What is the purpose of am335x-pm-firmware.bin?

    Jin

  • In reply to Jin Yu1:

    Hi,

    run into the same problem. Where I cn get this lib32lz.1 library?

    Thanks in advance

    Martin

  • In reply to Martin Moessner:

    Hi Martin:

    Sorry for the typo. You should install the lib32z1 library in your machine. For Debian I use apt-get to install it.

    Jin

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.