Last active
December 9, 2021 09:34
-
-
Save 17twenty/2712354 to your computer and use it in GitHub Desktop.
Getting Yocto working on the Beaglebone
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setup for Fedora 17 | |
sudo yum install python m4 make wget curl ftp hg tar bzip2 gzip unzip python-psyco perl texinfo texi2html diffstat openjade docbook-style-dsssl sed docbook-style-xsl docbook-dtds docbook-utils sed bc glibc-devel ccache pcre pcre-devel quilt groff linuxdoc-tools patch linuxdoc-tools cmake help2man perl-ExtUtils-MakeMaker tcl-devel gettext chrpath ncurses apr SDL-devel mesa-libGL-devel mesa-libGLU-devel gnome-doc-utils autoconf automake | |
sudo yum install tftp-server | |
sudo yum install nfs-utils | |
sudo yum install minicom | |
sudo systemctl enable nfs-server.service | |
sudo systemctl disable firewalld.service # This may/maynot be on your system but causes grief if it is! | |
# ------------------------------------------------------------------------------- | |
# Yocto checkout | |
git clone git://git.yoctoproject.org/poky poky-git | |
cd poky-git | |
git clone https://github.com/openembedded/meta-oe.git layers | |
git clone git://git.yoctoproject.org/meta-ti meta-ti | |
# Set it up for the beaglebone | |
source oe-init-build-env beaglebone | |
# Add MACHINE ?= "beaglebone" to your conf/local.conf | |
# Add the meta-oe and meta-ti layers to your conf/bblayers.conf, mine ended up | |
as follows: | |
# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf | |
# changes incompatibly | |
LCONF_VERSION = "4" | |
BBFILES ?= "" | |
BBLAYERS ?= " \ | |
/media/scratch/poky-git/meta \ | |
/media/scratch/poky-git/meta-yocto \ | |
/media/scratch/poky-git/layers/meta-oe \ | |
/media/scratch/poky-git/meta-ti \ | |
" | |
# Add the following line to your local.conf | |
BBMASK ?= ".*/meta-ti/recipes-(misc|bsp/formfactor)/" | |
# I had to manually mess with the qemu configuration to get the toolchain/sdk to build | |
# This patch explains what I had to better than I can | |
http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=robert/qemu&id=23138099c77cd3dc6af309c81ef52da03a9ad004 | |
# !!! If you get libcurl errors, it's likely this - clean and restart your build with | |
bitbake -c cleansstate qemu-nativesdk | |
# !!! If you get udev errors as well *urrgh* then you can set a specific version | |
usage by adding PREFERRED_VERSION_udev = "164" to your local.conf. | |
# Build stuff | |
bitbake -k core-image-minimal meta-toolchain | |
# Grab what you need from the tmp/deploy/images | |
* core-image-minimal-beaglebone.tar.bz2 | |
* uImage-beaglebone.bin | |
* modules-beaglebone.tgz # Only if you need these, I didn't. | |
# And the SDK from tmp/deploy/sdk | |
* poky-eglibc-i686-arm-toolchain-1.2+snapshot-2012XXXX.tar.bz2 | |
# Tar up the kernel from the work directory | |
tar cfz kernel_3.2.14.tar.gz tmp/work/beaglebone-poky-linux-gnueabi/linux-ti33x-psp-3.2-r0/git | |
# Move the stuff over to your other machine | |
I'll let you figure that out ;) | |
# ------------------------------------------------------------------------------- | |
# Setup up the toolchain on local machine | |
cd / | |
sudo tar xfvj ~/Documents/BeagleBone/git-poky/poky-eglibc-i686-arm-toolchain-1.2+snapshot-20120516.tar.bz2 | |
# Source the environment script to make life easy (set up PATH etc) | |
source /opt/poky/1.2+snapshot/environment-setup-armv7a-vfp-neon-poky-linux-gnueabi | |
# Setup your NFS exports | |
sudo vim /etc/exports | |
/home/nick/Documents/BeagleBone/git-rootfs *(rw,sync,no_subtree_check,no_root_squash) | |
# Extract the filesystem | |
cd /home/nick/Documents/BeagleBone/git-rootfs | |
sudo tar xvfj ../git-poky/core-image-minimal-beaglebone.tar.bz2 | |
# Extract the kernel | |
cd /work_directory_for_kernel/ | |
tar xfz ../kernel_3.2.14.tar.gz | |
# Edit the source to remove the hardcoded path from firmware/am335x-pm-firmware.bin.gen.S | |
# Configuration and build kernel | |
# Copy the beagleboard defconfig to your .config | |
cp meta-ti/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/defconfig .config | |
# Make menuconfig and tweak what you want. | |
make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- menuconfig | |
# Make the uImage | |
make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- uImage | |
# Copy it to the TFTP | |
sudo cp arch/arm/boot/uImage /var/lib/tftpboot/uImage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment