Errors while builidng custom ISO for amd64 1.5 (current)

Hi all,

I am trying to build custom image of VyOS for development (in kernel space and user space). I am following instruction from: Build VyOS β€” VyOS 1.5.x (circinus) documentation - and I built a custom kernel with following changes in x86_64_vyos_defconfig file:

  • CONFIG_HEADERS_INSTALL=y
  • CONFIG_MODULE_SIG_FORMAT=n
  • CONFIG_MODULE_SIG=n
  • CONFIG_MODULE_SIG_FORCE=n
  • CONFIG_MODULE_SIG_ALL=n

I ran following scripts/commands as root (changed https to hxxps because of VyOS forum locks):

  • apt install build-essential flex bison libssl-dev libelf-dev bc git
  • git clone -b current --single-branch hxxps://github.com/vyos/vyos-build
  • cd vyos-build/scripts/package-build/linux-kernel
  • git clone hxxps://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
  • cd linux
  • git checkout v6.6.62
  • cd …
  • bash build-kernel.sh
  • cp *.deb vyos-build/packages/
  • cd vyos-build
  • make clean
  • ./build-vyos-image generic --architecture amd64

After executing last command I always got following error:

OSError: Command 'lb build 2>&1' failed

I tried to execute next scripts from vyos link and coping *.deb to vyos-build/packages/ (for example product of build-linux-firmware.sh) but without any valid results. At the end I always got the same error.

P.S. In case of building ISO without any modification it works like a charm.

What is the host machine: OS/Arch you’re building the image? And do you use the docker container to build it or on your host machine?

I do build a VyOS custom iso with the rndis_host kernel module enabled using the docker image on an x86_64 i5-12500 server.

I did git clone the vyos-build repo and add the kernel config (CONFIG_USB_NET_RNDIS_HOST=m in my case) I want to the following file:

scripts/package-build/linux-kernel/arch/x86/configs/vyos_defconfig

And run docker with the vyos/vyos-build image (as per VyOS doc)

$ cd ./scripts/package-build/linux-kernel/
$ ./build.py --config package.toml --packages linux-kernel 

Optional: Add some modules you like to be build to ./build.py like accel-ppp qat ovpn-dco jool if you need them (check the build.py file for options).

Then copy or move the *.deb file to /vyos/packages and create the ISO

$ mv *.dep /vyos/packages
$ cd /vyos/
$ sudo ./build-vyos-image generic --architecture amd64
2 Likes

Thank you for your reply! It was the key to create my custom kernel. So command:

./build.py --config package.toml --packages linux-kernel 

Did the job, and builded *.deb files by this script worked properly during building ISO. For others - if you want to install linux headers (they are generated during previous command), you should import linux-headers*.deb on your new ISO based host and ran the following command:

dpkg -i linux-headers*.deb