element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Single-Board Computers
  • Products
  • Dev Tools
  • Single-Board Computers
  • More
  • Cancel
Single-Board Computers
Forum BBB - Building the Linux Kernel
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Single-Board Computers to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 29 replies
  • Subscribers 59 subscribers
  • Views 4210 views
  • Users 0 members are here
  • beaglebone_black
  • bbb
  • bb_black
  • beagle_bone_black
Related

BBB - Building the Linux Kernel

shabaz
shabaz over 12 years ago

Hi, I've added a step-by-step guide to building the Linux kernel for the BBB at the elinux wiki, so we can all edit it to improve the process. Particular thanks to Vlad Ungureanu for helping with debugging.

 

It took a while to get the steps ironed out. I still need to figure out how how to build the rest of the file system (there is a file system supplied

with TI's SDK) and getting it NFS-mounted.

 

These are the current steps documented (hopefully these links work):

 

  • 1 Beaglebone Black – Building Images
    • 1.1 Introduction
      • 1.1.1 Is it difficult?
      • 1.1.2 What is required?
      • 1.1.3 What steps are involved?
    • 1.2 Getting started - Folders
    • 1.3 Installing the build tools (toolchain)
      • 1.3.1 3. 1 Compile tools
      • 1.3.2 3.2 Some miscellaneous items
      • 1.3.3 3.3 U-boot
    • 1.4 Downloading and building the Linux Kernel
    • 1.5 Transferring the image to the BBB via TFTP
    • 1.6 Appendix: Installing and configuring the TFTP server
    • 1.7 Appendix: Installing and using Minicom
  • Sign in to reply
  • Cancel

Top Replies

  • bwelsby
    bwelsby over 12 years ago in reply to shabaz +1
    If you want a RHL/Centos style distro then you could try installing this root file system to go with your kernel from http://www.redsleeve.org/ no idea if it will work (in theory it should) but I will…
  • bwelsby
    bwelsby over 12 years ago in reply to shabaz +1
    Me too, when I was in gainfull employment I used nothing but Centos and RHEL. I only got into Debian and Ubuntu because of the R-Pi. It looks like a package repository is being built mainly for R-Pi but…
  • Former Member
    Former Member over 12 years ago in reply to shabaz +1
    shabaz wrote: ~/kernel/kernel$ make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- INSTALL_MOD_PATH=$HOME/kernel/kernel/rootfs modules_install I'm not sure what it does, I'll try it. Does it create…
  • bwelsby
    bwelsby over 12 years ago in reply to shabaz

    shabaz wrote:

     

    That's great!! I'm looking forward to trying it.

    I would be extremely happy with this on the BBB!!

     

    Well I have got it working, image image image  there's a few tweeks required and it's rather late now so will document it all tomorrow.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 12 years ago in reply to bwelsby

    Oh, wow, you've made my evening. Goodnight!!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • bwelsby
    bwelsby over 12 years ago in reply to shabaz

    Ok this is how I got the redsleeve distro working.

    First create a bootable SD card, I followed the instructions here and installed Ubuntu 12.04.2 LTS then checked it booted up and worked

     

    When I plugged this into my desktop it appears as /dev/sdb1 and /dev/sdb2 devices. /dev/sdb2 is the one we are interested in.

    Download the redsleeve root file system http://ftp.redsleeve.org/pub/yum/os/rsel6-rootfs.tar.bz2

    extract with tar -xvf rsel6-rootfs.tar.bz2 and this creates a directory rsel6-rootfs containing the file system.

    Mount /dev/sdb2 somewhere - on my system it auto mounted as /media/rootfs_

     

    Now copy the kernel boot, modules and firmware into the rsel6-rootfs file system

     

    cp -R /media/rootfs_/boot rsel6-rootfs

    cp -R /media/rootfs_/lib/modules rsel6-rootfs/lib

    cp -R /media/rootfs_/lib/firmware rsel6-rootfs/lib

     

    Now make some changes to the configs.

    Edit rsel6-rootfs/etc/fstab:  remove or comment out  the line for /dev/sda1 and the last two lines beginning with raiden: and change the / mount entry.

    what I ended up with is this:

     

    #---------------------

    /dev/mmcblk0p2          /               ext4    noatime         1 1

    devpts                  /dev/pts        devpts  gid=5,mode=620  0 0

    tmpfs                   /dev/shm        tmpfs   defaults        0 0

    proc                    /proc           proc    defaults        0 0

    sysfs                   /sys            sysfs   defaults        0 0

    #----------------------

     

    I then enabled the serial console port:

     

    Add /dev/ttyO0 to the end of rsel6-rootfs/etc/securetty

    create rsel6-rootfs/etc/init/ttyO0.conf with the following content

     

    #-------------------

    start on runlevel [2345]

    stop on runlevel [!2345]

     

    respawn

    exec /sbin/agetty 115200 ttyO0 vt102

    #------------------

     

    Now I replaced the ubuntu file system.

    rm -fR /media/rootfs_/*

     

    cp -R rsel6-rootfs/* /media/rootfs_

    sync

     

    remove the SD and boot in the BBB

    There were still a few errors but it still came up.

    login as root password password

    I then manually configured eth0 with a static IP for my network

    ifconfig eth0 192.168.1.4

    route add default gw 192.168.1.254

     

    I also used vim to create /etc/resolv.conf with

    #---------------

    nameserver 192.168.1.254

    nameserver 127.0.0.1

    #---------------

    To make the network configuration permanent you will need to create some missing files:

    /etc/sysconfig/network

    /etc/sysconfig/network-scripts/ifcfg-eth0

     

    That's it, it works, yum works but be careful installing packages so as not to overwrite /boot /lib/modules /lib/firmware

    Also note all the software has been compiled for ARM5.

     

    Enjoy!

    Brian

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 12 years ago in reply to bwelsby

    Thanks for the detailed information!

    I'm looking forward to trying this. I'm on a work trip+short vacation from tomorrow, so I may have to wait ten days or so to try it sadly.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago

    Hi Shabaz,

    Thank you for your set-by-set post. I like it much, but I faild on step

    Transferring the image to the BBB via TFTP

     

    When I enter

    tftp 0x80200000 uImage-BBB

    I have follwoing info

     

    U-Boot# tftp 0x80200000 uImage-BBB

    link up on port 0, speed 100, full duplex

    Using cpsw device

    TFTP from server 192.168.111.189; our IP address is 192.168.111.131

    Filename 'uImage-BBB'.

    Load address: 0x80200000

    Loading: T T T T T T T T T T T T T T T T T T T T

    Retry count exceeded; starting again

    using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in

    MAC c8:a0:30:b8:ac:84

    HOST MAC de:ad:be:af:00:00

    RNDIS ready

    ERROR: The remote end did not respond in time.

    at ether.c:2395/usb_eth_init()

    link up on port 0, speed 100, full duplex

     

    than repeat and repeat again utill I kill it.

    I have check tftp server and seems work. My host is ubunut 12.04 on a virtualBox.

    Do you have any idea how I should fix this issue? Thank you

     

    Joe

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 12 years ago in reply to Former Member

    Hi Joe,

     

    I did once see that output, I think that might mean that either a firewall is blocking TFTP, or maybe the TFTP server folder (from where it will serve the file) is different to the folder where the image is placed. I'm not familiar with Ubuntu (it may come with a different TFTP server) so it may be worth double-checking what the default TFTP folder is.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago

    Hi,

     

    Really sorry, I am quite new and I spent several days traying a lot of things. First of all, my goal is update new kernel in my beaglebone black.

     

    I followed this procedure, Building BBB Kernel - eLinux.org , without any problem until "Start up minicom, and power up the BBB; quickly press space repeatedly to stop it at the u-boot prompt."

    I don't know how to get u-boot prompt. I bougth a uSD card and followed plenty of procedures (i.e. BeagleBone Black - Linux on ARM - eewiki) but i can not get it.

     

    I followed the procedures to run an angstron image from sd, but always got angstom prompt instead of u-boot propt.

    I tryyes as well to copy MLO, u-boot.img into boot partition of uSD, but when I connect the usb 3 leds (USR0:2) turn on and keep this status always. I wonder if maybe i need a serial cable (http://es.farnell.com/ftdi/ttl-232r-3v3/cable-usb-to-ttl-level-serial-conv/dp/1329311) to do this or i can get u-boot prompt directly from usb

     

    I am using a ubuntu virtual machine to do everything.

     

    Could u help me a little bit with this

     

    really sorry ffor thinconeniences

     

    regards

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 11 years ago in reply to Former Member

    Hi Ignacio,

     

    I'm sorry I didn't mention it in the text, but yes that bit used a serial cable. I don't believe it is possible in any other way, because the USB won't be running at that stage. The cable you refer to will work.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to shabaz

    best to ignore the usb otg port altogether IMHO.  anything presented through that will only be visible after angstrom is fully booted up and has chance to load and configure the driver from an init-script. Proper serial cable connected to J1 is the only way to get to u-boot prompt.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
<
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube