Adding files to /var/config in image

Home Forums MultiConnect OCG Adding files to /var/config in image

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5904

    Hello
    I’m creating my own image for my ocg-e unit.
    I would like to add my own ppp config and /network/interfaces files to the image
    Those files in /etc points to /var/config where the actual files are located.
    If I create a recipe and add the files to /var/config as required, the files are indeed copied to the image in the correct location. But as /var/config is actually mounted from /dev/mtdblock6 at boot my files are hidden behind the mount (If I unmount /var/config I do actually see the files in the real /var/config dir).

    Is the solution to add my files to /dev/mtdblock6, if so, how?
    Or is the solution to simply overwrite the symbolic links in /etc with my own real config files?
    or….?

    Regards
    Klaus

    #5905

    Investigated some more.
    Tried to simply add my own /etc/network/interfaces files.
    But, got the error:

    
    |  * check_data_file_clashes: Package lyngsoe-blt-config wants to install file /lyngsoe/DevTools/corecdp/corecdp-2.3.3/build/tmp/rootfs/corecdp-lyngsoe-image/etc/network/interfaces
    |       But that file is already provided by package  * netbase
    

    Which makes sense!
    So that is not the way to go!

    //Klaus

    #5909
    Bryan Tran
    Moderator

    Hi Klaus,

    1. One thing you can do is that – follow this link – http://www.multitech.net/developer/products/multiconnect-ocg/development/customizing-bitbake-recipes/

    2. Then when you flash your unit, you need to do the following command from u-boot:

    run erase_config

    run tftp_kernel

    run tftp_rootfs

    That way your new/modified config will be there.

    Or you can also issue the following command at the console of the CDP: rm -rf /var/config/*

    Then: reboot

    Notes: When you flash your unit, it will not touch the /var/config folder. This is why you need to do the commands:

    run erase_config or rm -rf /var/config/*

    Regards,

    BT

    #5926
    Jesse Gilles
    Blocked

    Klaus,

    You can modify the files provided by the multitech “config” recipe. It is located in multitech/recipes/multitech. The network interface file is at multitech/recipes/multitech/config/network/interfaces. The config recipe is what creates the links from /etc to /var/config for the various files that it provides. I would recommend looking at the recipe contents and the startup script to get an idea of how it works.

    You can either modify the interfaces file that is already there, or you can write a .bbappend file to the config recipe and provide your own copy of interfaces there.

    Changing the files provide by the config recipe only changes the defaults, as BT was pointing out. If you update the rootfs with your new settings, you will need to delete the file(s) in /var/config and reboot (they get unpacked from defaults on boot if they don’t exist).

    Hope that helps,
    Jesse

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