Intro
Kernel, compiler, bsps, libraries, examples, userspace daemons… Because no one wants to deal with this alone, hardware manufactures (or community) often release pre-configured/customized OS distribution.
Adapteva is no exception and provides with parabuntu a fork of Ubuntu.
Let’s see how parabuntu diverges from mainline…
OS
Fortunately, parabutnu doesn’t include any major modifications. The changeset includes:
- patched thermald for overheating protection (heat sink is not enough, trust me)
- kernel + bootloader (u-boot) setup
- partitioning scripts
- toolchain packages (eSDK, OpenCL etc.)
- FPGA bitstream packages
Yup, that’s pretty much it.
Arch Linux (alternative)
If you have seen my previous posts, likely you noticed, I am a huge fan of Arch Linux. If you’d like to switch the OS, here is a list of packages you can install to get the equivalent of parabuntu:
To build the whole system image, you can check out my previous blog post and use packer:
git clone https://github.com/mkaczanowski/packer-builder-arm
cd packer-builder-arm
go mod download
go build
sudo packer build boards/parallella/archlinuxarm.json
Packages
While writing package definitions (ie. RPM) is quite easy, the problem is with patching and versions… For example, it took me a good while to collect Epiphany kernel module files. Those are present upstream, but without dts
files that would enable elink
… If that wasn’t painful enough, the module didn’t work with the newer kernel version, too!
Here I want to highlight how many files you need to think about when you want to provide a proper kernel package for your platform:
source=(
"http://www.kernel.org/pub/linux/kernel/v5.x/${_srcname}.tar.xz"
"http://www.kernel.org/pub/linux/kernel/v5.x/patch-${pkgver}.xz"
'0001-kernel-add-epiphany-kconfig.patch'
'0002-kernel-add-epiphany-makefile.patch'
'epiphany.c'
'epiphany.h'
'epiphany_uapi.h'
'linux.preset'
'60-linux.hook'
'90-linux.hook'
'linux-parallella.install'
'config'
)
Summary
Again, coming up with a custom distro is pretty straightforward, but it does take a lot of effort. We need to take care of many system components and make sure those work continuously over time…
See other posts!
- # Parallella (part 1): Case study
- # Parallella (part 10): Power efficiency
- # Parallella (part 11): malloc
- # Parallella (part 12): Tensorflow?
- # Parallella (part 13): Closing notes
- # Parallella (part 2): Hardware
- # Parallella (part 3): Kernel
- # Parallella (part 4): ISA
- # Parallella (part 5): elibs
- # Parallella (part 6): FreeRTOS