This is a page about TI’s Cortex-A8 based; BeagleBone Black.
Basic Requirements
Running a recent supported release of Debian, Fedora or Ubuntu on a x86 64bit based PC; without OS Virtualization Software. Many of the listed commands assume /bin/bash as the default shell.
This is a pre-built (64bit) version of GCC that runs on generic linux, sorry (32bit) x86 users, it’s time to upgrade… Download/Extract:
1 2 3 4
#user@localhost:~$ wget -c https://releases.linaro.org/components/toolchain/binaries/6.5-2018.12/arm-linux-gnueabihf/gcc-linaro-6.5.0-2018.12-x86_64_arm-linux-gnueabihf.tar.xz tar xf gcc-linaro-6.5.0-2018.12-x86_64_arm-linux-gnueabihf.tar.xz export CC=`pwd`/gcc-linaro-6.5.0-2018.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
Test Cross Compiler:
1 2
#user@localhost:~$ ${CC}gcc --version
1 2 3 4 5 6
#Test Output: arm-linux-gnueabihf-gcc (Linaro GCC 6.5-2018.12) 6.5.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the sourcefor copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Bootloader:U-Boot
Das U-Boot – the Universal Boot Loader: http://www.denx.de/wiki/U-Boot 30 Depending on your Linux Distrubution, you will also need a host gcc and other tools, so with Debian/Ubuntu start with installing the build-essential meta package. Download:
1 2 3
#user@localhost:~$ git clone -b v2019.04 https://github.com/u-boot/u-boot --depth=1 cd u-boot/
#user@localhost:~/u-boot$ make ARCH=arm CROSS_COMPILE=${CC} distclean make ARCH=arm CROSS_COMPILE=${CC} am335x_evm_defconfig make ARCH=arm CROSS_COMPILE=${CC}
Linux Kernel
This script will build the kernel, modules, device tree binaries and copy them to the deploy directory.
Mainline
Download:
1 2 3
#~/ git clone https://github.com/RobertCNelson/bb-kernel cd bb-kernel/
#user@localhost:~$ tar xf ubuntu-20.04.2-minimal-armhf-2021-06-20.tar.xz
Setup microSD card
We need to access the External Drive to be utilized by the target device. Run lsblk to help figure out what linux device has been reserved for your External Drive.
With util-linux v2.26, sfdisk was rewritten and is now based on libfdisk.
1 2 3 4 5 6 7 8
#Check the version of sfdisk installed on your pc is atleast 2.26.x or newer. sudo sfdisk --version #Example Output sfdisk from util-linux 2.27.1 #sfdisk >= 2.26.x sudo sfdisk ${DISK} <<-__EOF__ 4M,,L,* __EOF__
Format Partition:
With mkfs.ext4 1.43, we need to make sure metadata_csum and 64bit ext4 features are disabled. As the version of U-Boot needed for this target CAN NOT correctly handle reading files with these newer ext4 options.
To help new users, since the kernel version can change on a daily basis. The kernel building scripts listed on this page will now give you a hint of what kernel version was built.
Copy and paste that “export kernel_version=5.X.Y-Z” exactly as shown in your own build/desktop environment and hit enter to create an environment variable to be used later.
export kernel_version=5.X.Y-Z Copy Root File System
This sections assumes you have already installed your favorite xorg based window manager, such as lxde, xfce, kde, gnome, etc… These are packages that need to be installed on top of your selected windows manager and an xorg.conf needed to correctly setup the video interface. Note: If the cursor doesn’t show up right away, first hit: ctlr-alt-f1 then: ctrl-alt-f7 after which it ‘should’ show up… Make sure to install, fbdev driver and xrandr utilities: