Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read basic config from config-file on FAT-Partition #3

Closed
TiniTech opened this issue Mar 25, 2016 · 16 comments
Closed

Read basic config from config-file on FAT-Partition #3

TiniTech opened this issue Mar 25, 2016 · 16 comments

Comments

@TiniTech
Copy link
Contributor

Make basic features configurable via config-file placed on FAT partition so the config can easily be edited and saved to survive firmware updates.

I'd particularly like to use this to set up WiFi so I can enter the WPA/WEP-Key on the desktop computer.

@TiniTech TiniTech changed the title Read basic config from FAT-Partition Read basic config from config-file on FAT-Partition Mar 25, 2016
@harbaum
Copy link
Member

harbaum commented Apr 17, 2016

User installed apps are now stored on the sd card as a first step. This makes sure they aren't affected by updates of the root file system.

@rkunze
Copy link
Member

rkunze commented Apr 24, 2016

As of commit 6ab5545, WLAN config for wlan0 is now stored on the SD card, in "config/net/wpa.wlan0.conf". Format for this file is the same as for wpa_supplicant.conf. A basic configuration can simply set SSID and PSK for one network:

network={
    ssid="MY_SSID"
    psk="my secret wpa password"
}

If this file does not exist, an empty file is created automatically on startup. Config changes using the "WiFI" app are saved to "config/net/wpa.wlan0.conf" as well.

@harbaum
Copy link
Member

harbaum commented Apr 24, 2016

That's commit cecfd42

Sounds good, I'll give it a try asap.

@rkunze
Copy link
Member

rkunze commented Apr 24, 2016

That's commit cecfd42

Yes, of cource - i accidentally pasted the parent commit 😊

@rkunze
Copy link
Member

rkunze commented Apr 30, 2016

@TiniTech is the solution from cecfd42 OK for you? If so, can you close the issue?

@TiniTech
Copy link
Contributor Author

TiniTech commented May 1, 2016

Sure, I think this approach separates data/config and system in a way that makes updating easy and saves (me and others) configuring the wifi over and over again.
I wasn't aware it was up to me to close the issue. Now I did.

@TiniTech TiniTech closed this as completed May 1, 2016
@rkunze
Copy link
Member

rkunze commented May 1, 2016

I could have closed it myself, but because you opened the issue I thought it better if you give the final OK 😄

@TiniTech
Copy link
Contributor Author

TiniTech commented May 1, 2016

Thanks!
However, to be honest I feel I was too quick on that... Now that I understood the (new) principle with the users and the passwords for root, I have to deal with the fact that every system update overwrites the user/password configuration.
Would it be possible to also store config/etc/passwd and config/etc/shadow in the userspace on the FAT?

@TiniTech TiniTech reopened this May 1, 2016
@rkunze
Copy link
Member

rkunze commented May 2, 2016

If you use the "simple layout", all changes to files in /etc/ will be stored on the FAT partition (in config/etc/).

@TiniTech
Copy link
Contributor Author

TiniTech commented May 2, 2016

Would it be possible to implement that for the advanced layout as well? I like the idea of having (more of/"all" of) the config being separated from the system to preserve it during updates.

@rkunze
Copy link
Member

rkunze commented May 3, 2016

Yes, but doing so would negate some of the advantages of the advanced layout - namely, write speed and (more) robustness against unclean shutdown.

What I'm thinking about is a third layout variant, with uImage, am335x-kno_txt.dtb and rootfs.img and maybe some configuration defaults (like an initial WLAN config) on the FAT partition, and changes (downloaded apps, config changes, ...) on an EXT4 partition.

@harbaum
Copy link
Member

harbaum commented May 3, 2016

Is that really worth the effort? I am even not sure if we should release the files for the advanced layout. Having different files being part of different setups will probably confuse some users.

@rkunze
Copy link
Member

rkunze commented May 3, 2016

I think it is, especially since it would combine the advantages of the advanced layout (more robust, faster) with the advantages of the simple layout (config changes persist across upgrades). The disadvantage of this setup is that changes cannot easily be accessed "offline" from Windows, because these changes would be on an EXT4 file system.

rkunze added a commit that referenced this issue Apr 28, 2017
@ski7777
Copy link
Member

ski7777 commented Jul 8, 2017

Does anybody need this? Maybe we should just create a tool, which can transfer settings like WLAN via USB.

@LarsK1
Copy link
Contributor

LarsK1 commented Aug 16, 2017

Is that idea still necessary? (We intriduced a new layout, so do we need it anymore?)

PeterDHabermehl pushed a commit that referenced this issue Jan 3, 2018
@PeterDHabermehl
Copy link
Contributor

Obsolete due to new unified sd card layout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants