Add a Prebuilt Yocto ipk Package to the Project Print


This application note describes how to add a prebuilt Yocto .ipk package to the installed Emcraft Yocto distribution, without rebuilding it.

If you have a prebuilt Yocto .ipk package (eg iptables_1.4.21-r0_cortexa5hf-vfp-neon.ipk), here is how to add it to your project filesystem image for subsequent deployment to the board:

  • Copy the package to theĀ packages/ directory of your Emcraft Yocto installation tree:
  • bash$ cp iptables_1.4.21-r0_cortexa5hf-vfp-neon.ipk /opt/yocto-1.8.1/packages/cortexa5hf-vfp-neon/
    bash$

  • Clone the opkg-utils package from the Yocto GitHub repository to an arbitrary directory on your development host:
  • bash$ git clone git://git.yoctoproject.org/opkg-utils
    ...
    bash$

  • Rebuild the index database in the Yocto packages directory:
  • bash$ ./opkg-utils/opkg-make-index -r /opt/yocto-1.8.1/packages/cortexa5hf-vfp-neon/Packages -p /opt/yocto-1.8.1/packages/cortexa5hf-vfp-neon/Packages -m /opt/yocto-1.8.1/packages/cortexa5hf-vfp-neon
    ...
    bash$

  • Now, you could add the new package to your project, build and copy the resulted rootfs.ubi image to the TFTP server directory for deployment on the board:
  • bash$ cd projects/rootfs
    bash$ rm -rf rootfs-build-tmpdir
    bash$ vi rootfs.initramfs
    ...
    opkg iptables
    bash$ make
    ...
    bash$ cp rootfs.ubi /tftpboot/images/