This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/PROCESSOR-SDK-AM335X: How to create ipk package

Part Number: PROCESSOR-SDK-AM335X

Tool/software: Linux

Hi,

I want to create ipk packages for tnftpd. 

As I understand I can add a layer and recipes to arago project to build ipks for this.

Do we have any other easy ways to do this ? For example in sdk, or create in the target EVM board.

Thanks in advance.

Best regards.

  

  • Hello Robert,

    It is very easy to create ipk files with the OE build system. You just need to copy tnftpd_20130325.bb recipe to <tisdk>/sources/meta-openembedded/meta-networking/recipes-support/tnftp/ and tnftpd-autotools.patch within <tisdk>/sources/meta-openembedded/meta-networking/recipes-support/tnftp/tnftpd/ directory then run MACHINE=am335x-evm bitbake tnftpd -c do_package_write_ipk command.

    Alternatively you can build ipk out of the three, manually by creating CONTROL and data directories with the populated content below.

    <CONTROL>/control
    Package: tnftpd
    Version: 20130325-r0
    Description: Enhanced NetBSD ftp server
     tnftpd (formerly known as lukemftpd) is a port of the NetBSD FTP server
     to other systems. It offers many enhancements over the traditional BSD
     FTP server, including command-line editing, command-line fetches of FTP
     and HTTP URLs (including via proxies), command-line uploads of FTP URLs,
     context-sensitive word completion, dynamic progress bar, IPv6 support,
     modification time preservation, paging of local and remote files, passive
     mode support (with fallback to active mode), SOCKS support, TIS FWTK
     gate-ftp server support, and transfer rate throttling.
    Section: net
    Priority: optional
    Maintainer: OE-Core Developers <openembedded-core@lists.openembedded.org>
    License: BSD-4-Clause
    Architecture: armv7ahf-neon
    OE: tnftpd
    Depends: libc6 (>= 2.25), update-alternatives-opkg
    Source: tnftpd_20130325.bb

    <CONTROL>/postinst
    #!/bin/sh
        update-alternatives --install /usr/bin/ftpd ftpd /usr/libexec/tnftpd 100

    <CONTROL>/prerm
    #!/bin/sh
        update-alternatives --install /usr/bin/ftpd ftpd /usr/libexec/tnftpd 100

    Create a data directory with the tnftpd binary.
    <data>/usr/libexec/tnftpd

    Use opkg-build command to create an ipk.

    Usage: ./opkg-build [-c] [-C] [-Z compressor] [-O] [-o owner] [-g group] <pkg_directory> [<destination_directory>]

    If you do not have opkg-build in your computer, you can find one in <tisdk>/build/arago-tmp-external-linaro-toolchain/work/x86_64-linux/opkg-utils-native/<version>/image/<path-to-tisdk>/build/arago-tmp-external-linaro-toolchain/work/x86_64-linux/opkg-utils-native/<version>/recipe-sysroot-native/usr/bin/ directory.

    To create an ipk in the target EVM board, you need to install the opkg-utils package from <tisdk>/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/opkg-utils/<version>/deploy-ipks/armv7ahf-neon/ to your EVM, native-compile the tnftpd and create the same CONTROL and data directories with the same populated content from above and use the same opkg-build command to create the ipk.

    Best regards,
    Kemal

  • Thank you very much, Kemal.