02-17-2016 03:23 PM
I'm porting a highly modular application from vxWorks to Linux right now. The application requires regular updates, as do the plug-ins that the system uses to interface with other systems. On vxWorks, we essentially created a system image of the core code, deployed it to a safe folder on the RT target, cleared the existing file structure, and replaced it with the new image. We had a separate system for downloading plug-ins and loading them in the core code. The current system will not work with Linux (at least for the core system), and I'd like to implement all of our code updates (core and plug-in) using opkg. However, as a life-long Windows user, I'm at a complete loss for how to package the code into .ipk files. Is there a reliable Windows-based utility for taking a file structure and compressing it into a .ipk file (I looked into IPK Creator 4.1, but I ran into some errors I can't seem to get around), or a clear and recent tutorial for what I'll need and how to create an IPK from Cygwin?
Thanks,
Adam
Solved! Go to Solution.
02-17-2016 03:50 PM
Opkg has a set of tools to help with package creation, repo indexing, package inspection, etc. They are hosted at git://git.yoctoproject.org/opkg-utils. Haven't tried it myself, but the tools should run fine under cygwin.
The tool you want to use is opkg-build. The tool consumes a directory that inside needs to have a CONTROL subdir (with the control file inside), as wel as all the top level dirs and subdirs with the files you want to install. For example, a pkg that contains /etc/file1 and /var/file2 will look like this:
mydir
/etc
file1
/var
file2
/CONTROL
control
To build the package, you need to run "opkg-build mydir". The control file at the very minimum needs to have the fields Package, Version, Status, Section, Architecture, Maintainer, Source and Description. If a field is missing, the tool will let you know.
hope this helps!
02-17-2016 04:22 PM
In addition to what Alejandro said I've found it useful, for debug purposes, to know that .ipk files are actually archive files i.e. you can extract them using the 'ar' utility in cygwin. When you extract the .ipk you'll notice there are a couple of .tar.gz files: one contains the control files (control.tar.gz) the other your data files (data.tar.gz).