References:
http://elinux.org/Building_BBB_Kernel
http://wiki.beyondlogic.org/index.php/BeagleBoneBlack_Building_Kernel
https://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-Bootloader:U-Boot <--- Mostly this one, it is up to date.
On BBB:
debian@beaglebone:~$ uname -r
3.8.13-bone79
On Build machine:
For what I am doing it is not necessary to build u-boot, or to grab the compiler.
mkdir BBB
cd BBB
wget -c https://releases.linaro.org/components/toolchain/binaries/5.4-2017.01/arm-linux-gnueabihf/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf.tar.xz
tar xf gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf.tar.xz
export CC=`pwd`/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
${CC}gcc --version
Output:arm-linux-gnueabihf-gcc (Linaro GCC 5.4-2017.01) 5.4.1 20161213
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
git clone https://github.com/u-boot/u-boot cd u-boot/ git checkout v2017.03-rc2 -b tmp
wget -c https://rcn-ee.com/repos/git/u-boot-patches/v2017.03-rc2/0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch
wget -c https://rcn-ee.com/repos/git/u-boot-patches/v2017.03-rc2/0002-U-Boot-BeagleBone-Cape-Manager.patch
patch -p1 < 0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch
patch -p1 < 0002-U-Boot-BeagleBone-Cape-Manager.patch
make ARCH=arm CROSS_COMPILE=${CC} distclean
make ARCH=arm CROSS_COMPILE=${CC} am335x_evm_defconfig
make ARCH=arm CROSS_COMPILE=${CC}
cd ..
# If you just want to build the kernel start here.
git clone https://github.com/RobertCNelson/bb-kernel
cd bb-kernel/
# there are a number of options here, 4.4-rt would be a good project for another day
# https://wiki.linuxfoundation.org/realtime/start
# I think git branch -l will show all of the available branches
git checkout origin/am33x-v4.4 -b tmp
sudo apt-get update
sudo apt-get install device-tree-compiler lzma zlib1g:i386
I am going to build this as a deb package for ease of installation right now. I just want to test the process.
./build_deb.sh
Setup the kernel the way you want and wait for it to build ...
https://www.kernel.org/doc/html/latest/
deb packages are in the <location you chose>/BBB/bb-kernel/deploy.
I use nautilus to copy them over. `Connect to Server` sftp://debian@192.168.7.2
created a new directory in ~/ called kernel
copied and pasted the debs over to ~/kernel
then in the terminal
ssh debian@192.168.7.2
cd kernel
sudo dpkg -i linux-firmware-image-4.4.52-bone16_1cross_armhf.deb
sudo dpkg -i linux-headers-4.4.52-bone16_1cross_armhf.deb
sudo dpkg -i linux-image-4.4.52-bone16_1cross_armhf.deb
sudo dpkg -i linux-libc-dev_1cross_armhf.deb
sudo reboot
and once it comes back up, ssh back in:
debian@beaglebone:~$ uname -r
4.4.52-bone16
If you wanted to create a full image on an sd card, follow the directions on the web site (the one with an arrow pointing to it.)
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.