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

Hello,

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?

Thanks!
– 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 Index of /debian --pbuilder-debian-mirror Index of /debian --debian-security-mirror http://security.debian.org/ --build-type development --architecture amd64 --build-by john.smith@the-agency.gov
flavor=amd64-vyos
branch=current

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
lshwlm-sensors
util-linux
cpufrequtils
firmware-atheros
EOF

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…

Regards!
– Al

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

Hi,

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.

Best!
Alain

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 
    popd
done

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.

http://www.five-ten-sg.com/mapper/blog/vyos

Perhaps that will work for you.