Adding files to your file system image

Home Forums MultiConnect OCG Adding files to your file system image

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #5823
    lewis wight
    Participant

    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.

    #5826
    lewis wight
    Participant

    Anyone have any info on this?

    #5828
    Mike Fiore
    Blocked

    Hi 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/

    http://www.multitech.net/developer/products/multiconnect-ocg/development/customizing-bitbake-recipes/

    http://www.multitech.net/developer/products/multiconnect-ocg/development/working-with-a-single-recipe/

    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,
    Mike

    #5888
    lewis wight
    Participant

    I 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 9 years, 10 months ago by lewis wight.
    • This reply was modified 9 years, 10 months ago by lewis wight.
    • This reply was modified 9 years, 10 months ago by lewis wight.
    #5892
    Elijah Pratt
    Participant

    Hi 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.

    #5893
    Jesse Gilles
    Blocked

    Lewis,

    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

    #5899
    lewis wight
    Participant

    Thanks 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.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.