Adding new Crypto Driver for HW Crypto Accelerator

Hi all,
I am trying to add and compile a driver for a custom crypto accelerator PCI card. I have tested same driver in Debian kernel. And added it to /Pkgs/Linux-image/drivers/crypto sub-directory. I edited Kconfig and Makefile. When I made the iso image, it did not appear in it.
Can somebody tell me the procedure to add additional drivers and make them load on bootup automatically?

Thanks in advance.

Hello sohailto.

Please tell me more detail about your build step.

In my experience, you would better to build deb package file on VyOS environment.
(It is mean that please install development environment on VyOS and make deb package for VyOS)

Because, current VyOS kernel version (hydrogeon) is kernel 3.3.8.
And it is not original Debian6 kernel.

After make deb package, put it into pkgs directory in build-iso repository.
and append package name into build-iso/livecd/config.vyatta/chroot_local-packageslists/foo.list

and make iso image

This URL might be help.

Hiroyuki Sato

Thanks for reply,
Could you please elaborate the procedure to make deb package for a driver? And how it would be loaded automatically?

Hello sohailto.

Currently, I don’t have experience about module development from scratch.

I’ll investigate about driver development. After that, I’ll update my post.

How to create development env on VyOS.

set system package repository squeeze components 'main contrib non-free'
set system package repository squeeze distribution 'squeeze'
set system package repository squeeze url ''

sudo apt-get install build-essential
sudo apt-get install module-assistant

These URLs might be useful.

Best regards.

This is really great for me :slight_smile:

Hi all,
Please help me about this kernel configuration problem. I have added sub-directory ‘Koni’ of the driver in /drivers/crypto. It has its own kconfig file. The variable CRYPTO_DEV_KONI is assigned value y by running make menuconfig and then running make oldconfig.
When I run make linux-image, the script conf spits this error,
" * restart config…

  • Hardware crypto devices

Hardware Crypto Devices (CRYPTO_HW) [y/n/?] y

Koni HW accelerator (CRYPTO_DEV_KONI) [N/m/y/?] (NEW) aborted!

console input/output is redirected. Run ‘make oldconfig’ to update configuration"

I have run ‘make oldconfig’ several times but no use.

I have done same procedure in Debian and it worked. My question is, Is the kernel configuration in VyOS is done by ‘make menuconfig’ or there is some special method?

Kind regards.

Hello sohailto

Have you ever tried the following step?

By the way, Is that source open?


git clone git://
cd build-iso.git

git submodule update --init pkgs/linux-image
cd pkgs/linux-image
git checkout $branch

Copy your driver to driver/crypto

Edit directory


Generate flavor file and ignore last error.

debian/bin/ $flavor

make[1]: *** [debian/control-real] Error 1
make[1]: Leaving directory `/home/arch/build-iso/pkgs/linux-image'
make: *** [debian/control] Error 2
cd $(build-iso)
make linux-image

Hiroyuki Sato.

Hello Hiroyuki Sato

Thank you very much for your quick reply, it really helped me. Yes I had followed all steps except the config file edit.
I have setup the ‘hydrogen’ branch and built ‘586-vyatta’ flavour.
The source of my driver is not open but it is very similar to Geode-AES.

And another question, could you please suggest configuration changes to make this driver load during system bootup?





If Kcofnig ex) drivers/infiniband/ulp/srp/Kconfig

        tristate "InfiniBand SCSI RDMA Protocol"
        depends on SCSI
        select SCSI_SRP_ATTRS

will generate .config like the following


so please take a look Kconfig file and add
your driver parameters.

Maybe, you can build additional module.

If that souce is open, I’ll try it. But it seems difficult.
If you know any simlar source, I can assist much.

And about another question

Have you ever tried to edit /etc/modules file?

I edited this file like the folowing

# /etc/modules: kernel modules to load at boot time.
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.


And after reboot, ‘‘loop’’ moudle loaded automatically.

And If that driver contain init script,
It is good idea to execute modprobe(insmod) in that script.

Happy hacking!!

Hiroyuki Sato.


Thanks again. I know the /etc/modules method but it is for running kernel. I actually asked for a configuration setting in the source code (linux-image) of VyOS to autoload modules at bootup. So that I can deploy the iso easily on many systems.
Any suggestion?




Your goal is

  • create custom iso image which is include custom driver and configuration


If so, Have you ever tried chroot_local-hooks?

Top of build-iso

cat livecd/config.vyatta/chroot_local-hooks/15-test 

echo "loop" >> /etc/modules

And execute make iso, you will find loop string in /etc/modules

It is a little quick hack. but It works.
I don’t know alternative solution yet.

Hiroyuki Sato.

Hi Hiroyuki Sato

Thanks for your quick solution. But I have found (verified) that the changes in configuration file alone (make the module builtin) are enough to autoload the module.
I checked the /proc/crypto and it contained the entry for Koni.
Thanks alot.


Thank you for this !