Adding files to your file system image
Home › Forums › MultiConnect OCG › Adding files to your file system image
Tagged: filesystem linux, jffs2
- This topic has 6 replies, 4 voices, and was last updated 10 years, 5 months ago by lewis wight.
-
AuthorPosts
-
June 3, 2014 at 4:06 pm #5823lewis wightParticipant
I not sure how I can add my custom firmware files to the file system image in the .jffs2, The goal of course is make it as easy as possible to flash my custom image with all of the files it needs to run.
June 10, 2014 at 8:29 pm #5826lewis wightParticipantAnyone have any info on this?
June 11, 2014 at 7:35 am #5828Mike FioreBlockedHi Lewis,
The documentation on this site should help to point you in the right direction. Here are a few links…http://www.multitech.net/developer/products/multiconnect-ocg/development/creating-a-custom-image/
http://www.multitech.net/developer/products/multiconnect-ocg/development/writing-bitbake-recipes/
Basically, you would write a recipe to build, configure, and install your application or files. Then, when you build your custom image that includes that recipe, your application or files will be on the device after flashing the new image.
Don’t hesitate to post back if you have more questions or if something was unclear!
Cheers,
MikeJune 16, 2014 at 10:02 am #5888lewis wightParticipantI took some time and tried some recipes and here is what I found.
I’ve found that this works:
do_install() { cd ${WORKDIR} rm -f test tar czf test.tar.gz ${CONFIGFILES} install -m 0777 -d ${D}/etc install -m 0644 ${WORKDIR}/test.tar.gz ${D}/etc/test.tar.gz }
which is exactly the same as:
do_install() { cd ${WORKDIR} rm -f test tar czf test.tar.gz ${CONFIGFILES} install -m 0777 -d ${D}${sysconfdir} install -m 0644 ${WORKDIR}/test.tar.gz ${D}${sysconfdir}/test.tar.gz }
since ${sysconfdir} = “/etc”
the problem is I want to install my files on a new folder on the root file system, not in /etc. When I try to do this:
do_install() { cd ${WORKDIR} rm -f test tar czf test.tar.gz ${CONFIGFILES} install -m 0777 -d ${D}/newFolder install -m 0644 ${WORKDIR}/test.tar.gz ${D}/newFolder/test.tar.gz }
I get this error:
dp-full-image/etc/device_table is different from the conffile in the new package. The new conffile will be placed at /home/user/Desktop/corecdp-2.3.3/build/tmp/rootfs/corecdp-full-image/etc/device_table-opkg.
can you please explain how to install my files in directories that are not /etc
thansk!
- This reply was modified 10 years, 5 months ago by lewis wight.
- This reply was modified 10 years, 5 months ago by lewis wight.
- This reply was modified 10 years, 5 months ago by lewis wight.
June 16, 2014 at 12:16 pm #5892Elijah PrattParticipantHi Lewis,
Could you clarify your error somewhat?
You said you are getting an error with the device, but what you posted below sounds like bitbake is finding two separate conf-files and is trying to figure out what to do with them.June 16, 2014 at 12:44 pm #5893Jesse GillesBlockedLewis,
The error regarding /etc/device_table is really a warning and I don’t think it is related to your issue in any way.
The reason your file isn’t showing up in the image is because it isn’t in a standard path. Bitbake defines the FILES variable to include files located in standard linux locations by default (/etc, /usr/bin, /usr/lib).
You can override the FILES variable and set your custom location by putting the following in your recipe:
FILES_${PN} = "/newFolder"
Or you could add to it:
FILES_${PN} += "/newFolder"
Jesse
June 18, 2014 at 12:08 pm #5899lewis wightParticipantThanks Jesse, I’m almost there now, the last part I can’t seem to fix is the defaults.tar.gz What I’m guessing is that where the ppp defaults are kept, then when I flash the file system they are installed. The problem is, despite my best efforts I can not change what goes into that folder. I’ve looked over all files in your package and changed every single one of them that could possibly make up that folder and it still does not effect the contents of the defaults.tar.gz folder. The reason for this is of course to have my custom ppp options into my build. Any guidance would be much appreciated.
-
AuthorPosts
- You must be logged in to reply to this topic.