What exactly should be stored in the locations that the feed points to, and how do I generate it ?
As a background:
I have created my own "helloworld" package, and when I "make menuconfig" with my package selected then “make”, I could see my application included in the firmware.
However, after doing a: "opkg remove helloworld" on the target device (i.e. Virtual Box VDI on x86), my helloworld package got removed from the disk. I tried later to "opkg install helloworld" but it doesn't come back.
After some research on opkg, I noticed that it stores the feeds for optional package in /etc/opkg/distfeeds.conf and /etc/opkg/customfeeds.conf. And in this file, it has the feed to my package as: https://download.openwrt.org/snapshots/packages/x86_64/helloworld which does not have my package.
Note that to be able to make my helloworld package, I've manually edited feeds.conf.default in the openWrt development environment to add a line to my package as follows (for ./scripts/feeds update -a and ./scripts/feeds install -a to work):
Why do you need opkg to re-install your helloworld program?
Helloworld exists in your firmware. Just copy the package components from /rom to /. No need to use opkg.
Or if you really want to use opkg, scp your helloworld.ipk from your <buildroot>/bin/packages/<target> folder to your router tmp folder and opkg install it from there.
I asked the question from a theoretical perspective: What to do if I want to be able to install my program as an Optional package. In "make menuconfig", if you select the "M" option, I think it will not include my HelloWorld in the firmware. So in such a case, how can I install it later.
For most packages and features, you have three options: y, m, n which are represented as follows:
pressing y sets the <*> built-in label
This package will be compiled and included in the firmware image file.
pressing m sets the <M> package label
This package will be compiled, but not included in the firmware image file, e.g. to be installed with opkg after flashing the firmware image file to the device.
pressing n sets the < > excluded label
The source code will not be processed.