VyOS 1.2.x (Beryllium) Build System / HOWTO build custom Kernel into ISO



since the big changes in the VyOS build system from Lithium to Beryllium, I seem to be no longer able to compile custom Kernel configurations (i.e. add ath10k modules) and then have them built into the VyOS ISO image. Also, the wiki entry https://wiki.vyos.net/wiki/Rebuild_VyOS_kernel_Step does not lead to an ISO image containing a copy of the new-built Kernel.

Did anyone get around this and may suggest a solution on how to get a custom Kernel into VyOS 1.2.x builds?

– Alain


Seems I figured it out – a lucky hit on aunt Google.

It is assumed that you already cloned and cd’ed into vyos-build.

[code]# Configure the build environment
./configure --debian-mirror http://httpredir.debian.org/debian/ --pbuilder-debian-mirror http://httpredir.debian.org/debian/ --debian-security-mirror http://security.debian.org/ --build-type development --architecture amd64 --build-by john.smith@the-agency.gov

Update build environment

git checkout $branch
git pull

For each custom submodule (example: vyos-kernel)

git submodule (–init) update packages/vyos-kernel/
cd packages/vyos-kernel
git checkout $branch
git pull
./debian/bin/build-flavour.sh $flavor
cp debian/arch/amd64/config.$flavor .config
make-kpkg --config menuconfig
cp .config debian/arch/amd64/config.$flavor
LOCALVERSION= make-kpkg --rootcmd fakeroot --initrd --append_to_version -$flavor kernel_image
cd …/…/

Put extra packages

cat < data/live-build-config/package-lists/vyos-utils.list.chroot

Make iso file

sudo make iso[/code]

What I still missed to find out is how to make the build system install the “firmware-atheros” package from jessie-backports…

– Al


Any ideas on how to do the same in 1.1.7 ?
Aunt Google seems to hate my questions.



this is for 1.1.7. However, doing a “make iso” does not seem to work for some strange reason. The build process crashes when building the initrd for the custom Kernel. :confused:


Are you sure?
./debian/bin/build-flavour.sh doesn’t exist is 1.1.7.
also packages/vyos-kernel/ doesn’t exist. It’s pkgs/linux-image in 1.1.7.


You are right. Please excuse my fault. I was referring to the yet-to-be-released 1.2.0 version and its build architecture.



I am trying to build all the vyos 1.2 packages from source, including the kernel. For each package,

(cd packages/vyos-kernel; git checkout current; debian/bin/build-flavour.sh $flavor)
for i in packages/*; do
    pushd $i
    git checkout current
    dpkg-buildpackage -us -uc -b 

That works for all the other packages, but the kernel build says

dpkg-checkbuilddeps: Unmet build dependencies: gcc-4.4

It looks like the debian packaging for the kernel wants gcc-4.4, but jessie uses gcc-4.9. I will try the recipe from https://wiki.vyos.net/wiki/Rebuild_VyOS_kernel_Step#VyOS_1.2.x and see if I can make that work.


I finally have a script to rebuild (almost all) the vyos packages from source, and build an iso from those rebuilt packages.


Perhaps that will work for you.