Use openpctv to learn how to install and generate an opkg package

Source: Internet
Author: User

Http://linuxtoy.org/archives/openpctv-adding-full-tv-functionality-to-htpc.html

OpenPCTV-more comprehensive TV functions for your HTPC


I learned from linuxtoy that openPCTV is packaged with opkg.

Obtain source code:git clone git://git.code.sf.net/p/openpctv/code openpctv-code


After the download, we found that it was not based on buildroot. Instead, we used the script and makefile methods to achieve automated compilation. we can select the cubieboard board to compile and create rootfs and iso, and roughly check the script, suitable for learning.

Currently, you can refer to opkg for openembedded and buildroot, that is, openPCTV.


Script/installdev script

Use -- offline-root to specify the target root directory of rootfs.

First create the var/lib/opkg/info directory, similar to the archlinux pacman installation requires the establishment of var/lib/pacman


$ ROOT/$ TOOLCHAIN/bin/opkg -- offline-root $ ROOT/$ TOOLCHAIN \ install $ PACKAGE> & $ VERBOSE_OUT need to create a directory first
mkdir -p $ROOT/$TOOLCHAIN/var/lib/opkg/info/STAMP=$ROOT/$TOOLCHAIN/var/lib/opkg/info/$1.control


The index file is used to generate the opkg repository index file, which is the same as the script in OE.

You can use the opkg-make-index parameter description to generate

#!/bin/sh. config/options$SCRIPTS/installdev opkg-utils[ "$VERBOSE" = yes ] && V="-v"opkg-make-index $V -l $PKGROOT/Packages.filelist -p $PKGROOT/Packages $PKGROOT


The packagedev file is mainly used to generate the opkg package.

First, call to parse some meta information in the package directory, generate the control file through add_control, and finally use opkg-build-O-o root-g root $ INSTALL $ DEVPKGROOT> & $ VERBOSE_OUT

Create the target package file. "-O" indicates that the opk suffix is used. "-o" indicates that "-O" indicates that "-g" uses user permissions and is passed to tar compression for parameter usage,


There is a funtions file in the configs/directory, which is a common function library. For example, functions such as get_meta can view the code in it.


Build/build. host/toolchain/bin/directory master native tools

After the opkg-build notification is used to create files such as contol and postinstall, compress the files to generate packages such as opk and ipk.

The specific process mainly refers to the debian packaging system, but it is simpler than debian.


Https://code.google.com/p/opkg/source/browse/tags/opkg-0.2.0-rc2/utils/opkg-key opkg-key signature


Some tools for the http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/ yocto project are very helpful for opkg Packaging

This article is from the BLOG "gun and Rose", please be sure to keep this source http://axlrose.blog.51cto.com/434566/1293640

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.