An image to make Odroid kernel build much easier.
2.9K
This image is written for easy compile on development of Odroid Linux kernel.
This has all the toolchain the Odroid boards requires in advance. So you can compile your custom Linux kernel by just downloading Odroid kernel source tree and running this image.
Unfortunately, it should be too slow.
This image runs on Ubuntu Linux based, which means that it runs on Linux Kernel. In macOS or Windows, their Docker uses the specific virtual engine provided by each OS to emulate the Linux environment.
So that the performance is tooooo slower than the native Linux machine does. In my case, on macOS 10.14 with E3-1230v3 processor, it takes more than 2 hours for compiling XU4 kernel. This might be acceptable for someone but it may not in most cases.
Thus, it should work on any Docker supported system but the performance will be very slow.
For further information, please refer to References section of this documents.
However, if you use Windows 20h1 or higher, you can build as fast as on the Linux system thanks to the WSL 2 that is introduced in modern Windows 10.
In my experience, that difference is only a few minutes between native Linux and WSL 2. Probably it can be just a few seconds for the powerful system.
You can refer to this link to know about Docker WSL2 backend.
It is not suitable for third party images like Android kernel, @tobetter's Debian/Ubuntu, and Armbian, DietPi. All these images have different kernel source tree and also has differed boot directory structure.
The full usage is,
docker run -it --rm \
-v { Kernel source path }:/kernel \
-v { Path to receive output kernel binaries from the image }:/output \
-v { Path to boot media's boot partition }:/media/boot \
-v { Path to boot media's rootfs partition }:/media/rootfs \
-e USER_UID={ UID to correct ownership, set 1000 by default } \
-e USER_GID={ GID to correct ownership, set 1000 by default } \
-e SBC={ The name of your SBC without the prefix word Odroid } \
-e MAKE_ARGS={ make arguments you about to use } \
-e AUTO_INSTALL={ Install automatically to the boot media after complete building kernel } \
awesometic/odroid-kernel-builder
Looks quite complicate. The examples in the below.
docker run -it --rm \
-v $(pwd):/kernel \
-e USER_UID=$UID \
-e USER_GID=$GID \
-e SBC=n2 \
-e MAKE_ARGS=cleanbuild \
awesometic/odroid-kernel-builder
docker run -it --rm \
-v $(pwd):/kernel \
-v ~/kernel-outputs:/output \
-e USER_UID=$UID \
-e USER_GID=$GID \
-e SBC=n2 \
-e MAKE_ARGS=cleanbuild \
awesometic/odroid-kernel-builder
AUTO_INSTALL is set to false, the /media/boot, /media/rootfs volumes will be not affect anything.docker run -it --rm \
-v $(pwd):/kernel \
-v /media/boot:/media/boot \
-v /media/rootfs:/media/rootfs \
-e USER_UID=$UID \
-e USER_GID=$GID \
-e SBC=n2 \
-e MAKE_ARGS=cleanbuild \
-e AUTO_INSTALL=true \
awesometic/odroid-kernel-builder
You have to put your Odroid device name as a value of SBC environment variable. Currently supported boards are here.
You can put your parameters for the make command as a value of MAKE_ARGS environment variable. Here are the prepared make options.
make odroid???_defconfig for the given SBC environment valuemake menuconfigmake cleanmake distcleanmake distclean; make odroid???_defconfig; makemakeThe building process will use all the available CPU cores by using "$(nproc) * 6 / 5" fomula.
Do not run this image as a daemon. Promptly to be terminated because it doesn't have any jobs to keep doing.
Deokgyu Yang ([email protected])
Content type
Image
Digest
Size
1.3 GB
Last updated
over 5 years ago
docker pull awesometic/odroid-kernel-builder