Hi Daniel, On Sun, Apr 01, 2012 at 11:44:11AM +0300, Daniel Golle wrote: > > * removes init script because we should be using uci-defaults instead > nack. > The actual board-detection and uboot-env config should not be in the > uboot-envtools package as it is very platform dependent. adding lantiq_env to > uci-defaults obviously makes on lantiq platform only, but we are using > uboot-envtools on a couple of different platforms. > the approach of creating uci-configuration values from the a uci-default > script of the platform and then have a run-once init script to generate the > actual /etc/fw_env.config had a couple of reasons to be exactly as it was: > in this way, the platform *defaults* always live in /etc/config/ubootenv and > can be created by a uci-default script for every platform.
Agreed. Makes sense for me to leave this then. I will change it in v3. > fw_env.config gets generated only if it doesn't exist yet and values in uci > exist. > in this way, uboot-env remains target agnostic. But we should do this with uci-defaults and not init script. init script is a waste of resources uci-defaults will do a job just fine. > the configuration, a far as OpenWrt is concerned, lives in uci. > the configuration-file used by the fw_printenv/fw_setenv tool is generated > from uci, just like it happens for most config-files in OpenWrt which are > run-time generated out of uci. in this specific case I see that it makes sense > to store it in /etc instead of /var/etc, as we don't want to overwrite > user-made changes to this file and have the user brick his system... Yes. > > Changes since v1: > > > > We should put target uboot environment uci-defaults in this package and use > > Makefile to install correct one. I should have think of that the first > > time. Idea is from owsip package. > See above. target uboot environment uci-defaults should live at the targets > imho , see > target/linux/ar71xx/base-files/etc/uci-defaults/ubootenv > for the way I intended it. I dont think that is a good place to put the script there because every ar71xx target will have that uci file even if user does not have uboot-envtools. Look at this section from my patch: +ifneq ($(CONFIG_TARGET_lantiq),) + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) ./files/lantiq_env $(1)/etc/uci-defaults/uboot-envtools +endif I'll resend v3 with ar71xx included this way too. Regards, Luka _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel