[LEDE-DEV] custom files not working?

Koen Vandeputte koen.vandeputte at ncentric.com
Wed May 2 08:15:52 PDT 2018



On 2018-04-26 20:16, Hannu Nyman wrote:
> Custom files work quite normally for me.
> Just compiled and flashed r6763-746c590882, and I can see my custom 
> files quite normally in /etc.
>
> At the first glance I do not see any obvious mistake in your workflow.
>
Firstly:

Testing this in detail shows the actual issue:

Adding these files:
- etc/config/testfile    (contains a comment line)
- etc/config/network  (Altered config file, intended to overwrite the 
existing one)
- etc/config/wireless  (Altered config file, intended to overwrite the 
existing one)


The 1st file is properly added
The 2nd file is properly altered
The 3rd file seems to be ignored/overwritten again somewhere in the 
process.  It's not possible to provide a custom "wireless" file

summarized:  Adding new files seems to work,  altering used files ... 
not always


Secondly:

Is the content of the "files" dir written on top of the rootdir before 
generating the image? (so that the custom files are part of "rootfs" 
partition)
Or are they added using the FILES option in the image generator (making 
them part of "rootfs_data" partition ?)

Some filesystems (like ubifs) seem to act strangely when doing the 
initial boot after flashing while a rootfs_data overlay partition 
containing changes is also provided at this time.
immediately running "sync" after the initial boot finishes seems to aid 
in ensuring the custom changes are not lost on the 2nd boot.

The new mtd-utils patch series seems to have lowered the likeliness of 
the issue occurring..   but I've seen it again on some files.


Thanks again,

Koen

>
> Koen Vandeputte kirjoitti 26.4.2018 klo 16:58:
>> Hi All,
>>
>> I'm checking this functionality:
>>
>> https://openwrt.org/docs/guide-developer/build-system/use-buildsystem#custom_files 
>>
>>
>>
>> steps done:
>>
>> - clone openwrt master repo  (~/openwrt )
>> - make menuconfig & select target
>> - add custom files:
>> --> ~/openwrt/files/etc/test.txt  (containing some random bytes)
>> --> ~/openwrt/files/root/test2.txt  (containing some random bytes)
>> - make
>> - flash image cleanly to device (tested both JTAG & tftp load image 
>> via u-boot)
>>
>>
>> After booting,  I'm not seeing the 2 files I've added.
>>
>> Am I doing something wrong here?
>>
>>
>> Thanks,
>>
>> Koen
>>
>>
>




More information about the Lede-dev mailing list