Go Down

Topic: Creating .ipk file for Yun (Read 2174 times) previous topic - next topic


Has anyone here ever bundled their project into an ipk file? I have an Arduino project that contains some custom C code and some PHP/Python scripts. I want to install the project on several Yuns, so I would like to bundle the whole thing into a .ipk file then install it via opkg (my Yun is running v0.1.8).

I followed the guide here: http://inportb.com/2010/10/19/making-an-opkg-package/ to create the ipk file. I created a project folder in Debian then compressed it and renamed the .tar.gz extension to .ipk.

Here are the contents of the folder:

  • debian-binary - a text file containing the string 2.0

  • control.tar.gz - an archive of a folder named "control" containing the Debian control file

  • data.tar.gz - an archive containing usr/bin/myexecutable and my PHP/Python files in var/

When I try to install the package, however, I get this error:
Code: [Select]
>> opkg install myproject.ipk -V 4
opkg_conf_parse_file: Loading conf file /etc/opkg.conf.
Collected errors:
* pkg_init_from_file: Malformed package file myproject.ipk.

Even with verbosity level 4, there's not much information to go by. Is there any way to get more information on what specifically is wrong with my archive?



Jan 20, 2014, 03:56 pm Last Edit: Jan 20, 2014, 04:00 pm by thomas-c Reason: 1
Hi Zach, double-check your opkg verbose syntax (your example shows a space between -V and 4):

Code: [Select]
opkg install myproject.ipk -V4
opkg install myproject.ipk --verbosity=4

Also, make sure your control.tar.gz does not contain any paths to its file(s)...

Wrong - control.tar.gz will contain paths:
Code: [Select]
myproject$  tar czvf control.tar.gz ./control/*
myproject$  ar -r myproject.ipk debian-binary control.tar.gz data.tar.gz

Correct - control.tar.gz will not contain paths:
Code: [Select]
myproject$  cd control && tar czvf ../control.tar.gz * && cd ..
myproject$  ar -r myproject.ipk debian-binary control.tar.gz data.tar.gz


Thanks! This solved my problem.

Go Up