OpenWrt Forum Archive

Topic: How to add new files to images.

The content of this topic has been archived on 16 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I'm trying to add new files to OpenWrt,  after i do make and flash images to device the  new files are not reflected on the device.

But when i manually copy pack_name.ipk to device and install it, i can see them.

But i want the new files to be reflected when i flash image rather through pack_name.ipk.

Does any one faced this scenario b4?

Create a new folder "files/" in your buildroot. Then put the appropriate files there.
If you want to e.g. add a file /etc/app/example.conf then create a folder files/etc/app/ in your buildroot and put example.conf there. Then rebuild your image with make.

~ JoW

(Last edited by jow on 14 Oct 2008, 12:33)

Hi JoW,

Thanks for your reply.

But i have done the same, ie.
-> I have created following folders "etc/openvpn" under package/openvpn/files/
     the final structure looks like this  package/openvpn/files/etc/openvpn/

->manually copied requied files(client.conf) under it.

->changed the openvpn/Makefile as  follows
    $(INSTALL_DIR)  $(1)/etc/openvpn
    $(INSTALL_DATA) ./files/etc/openvpn/client.conf $(1)/etc/openvpn

->from top level, i have done "make V=99"
   but after flashing .squashfs to device, the new files were not reflected.

Did i missed any step??

Hi.

The directory trunk/package/openvpn/files/ might work too but the preferred solution is to put those files in trunk/files/ instead. No Makefile modifications needed for that.

~ JoW

Hi Jow.

Thanks again.

But even after creating "files" folder under trunk and copied required files(etc/openvpn/client.conf) inside it
still the /etc/openvpn/client.conf structure dosen't reflect in the images.

The folder structure is ./trunk/openwrt/files/etc/openvpn/client.conf

Any idea, what has went wrong???

The folder structure shouldn't be ./trunk/openwrt/files/etc/openvpn/client.conf it should be  ./trunk/files/etc/openvpn/client.conf

Hi Oconnor,

The higher level folder structure is

/tunk/release/openwrt/

inside it we have following folders/files(after doing $make)

./bin            . /files                           ./include   ./knox.config           ./LICENSE         ./Makefile      ./package     
./README    ./rules.mk                     ./scripts   ./staging_dir_mips    ./target             ./tmp             ./tool_build
./toolchain   ./toolchain_build_mips    ./tools      ./BSDmakefile         ./build_mips       ./Config.in     ./dl
./docs


Can you look into it and let me know whether i have created  . /files  folder in correct location????

(Last edited by sharadt on 15 Oct 2008, 09:18)

I googled for the document that descries about  "how to add files/folders offline in local machine and build images", but unable to find one.

Is there any document that describes same??

Hi,

The solution you people mentioned is correct.

Thanks for that.

My tftp was not working correctly, hence i had problem, but now its resolved.

Regards,
Sharad.

(Last edited by sharadt on 21 Oct 2008, 10:28)

The discussion might have continued from here.