summaryrefslogtreecommitdiff
path: root/package/base-files
Commit message (Collapse)AuthorAgeFilesLines
* functions.sh: fix default_postinst functionMarko Ratkaj2017-11-081-1/+1
| | | | | | | | | | | | | | | | | | When we run "opkg install" on a package that installs an uci-defaults script, functions.sh will fail to evaluate that script in its default_postinst function. This happens because there is no "./" present and it searches for the file in paths specified by the PATH variable. This would work on bash, but it will not work on ash and some other shells like sh, zsh. This applys to the ". filename" directive used in this case. This patch will make the path relative to the /etc/uci-defaults directory. Fixes: FS#1021 Signed-off-by: Marko Ratkaj <marko.ratkaj@sartura.hr>
* LEDE v17.01.4: revert to branch defaultsStijn Tintel2017-10-181-2/+2
| | | | Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* LEDE v17.01.4: adjust config defaultsv17.01.4Stijn Tintel2017-10-181-2/+2
| | | | Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* LEDE v17.01.3: revert to branch defaultsStijn Tintel2017-10-031-2/+2
| | | | Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* LEDE v17.01.3: adjust config defaultsv17.01.3Stijn Tintel2017-10-031-2/+2
| | | | Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* base-files: create /etc/config/ directoryHauke Mehrtens2017-10-011-0/+1
| | | | | | | | | | | | | | | The /bin/config_generate script and some other scripts are assuming the /etc/config directory exists in the image. This is true in case for example the package firewall, dropbear or dnsmasq are included, which are adding the files under /etc/config/. Without any of these package the system will not boot up fully because the /etc/config/ directory is missing and some init scripts just fail. Make sure all images with the base-files contain a /etc/config/ directory. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: John Crispin <john@phrozen.org>
* base-files: fix wan6 interface config generation for pppoeHans Dedecker2017-09-182-6/+3
| | | | | | | | | | | | | | | | Setting ipv6 to auto in case of a pppoe interface will trigger the creation of a dynamic wan_6 interface meaning two IPv6 interfaces (wan6 and wan_6) will be active on top of the pppoe interface. This leads to unpredictable behavior in the network; therefore set ipv6 to 1 which will prevent the dynamic creation of the wan_6 interface. Further alias the wan6 interface on top of the wan interface for pppoe as the wan6 interface can only be started when the link local address is ready. In case of pppoe the link local address is negotiated during the Internet Protocol Control Protocol when the PPP link is setup meaning all the IP address info is only available when the wan interface is up. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* base-files: don't setup network in preinit if failsafe is disabledRafał Miłecki2017-08-091-1/+4
| | | | | | | | | | | | With failsafe disabled there is no point in early network setup. We don't send announcement over UDP and there is no way to ssh to the device. A side effect of this is avoiding a possibly incorrect network config (only with failsafe disabled). This problem is related to possible changes made by user in /etc/config/network. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* base-files: fix PKG_CONFIG_DEPENDS to include version.mk entriesRafał Miłecki2017-06-261-1/+2
| | | | | | | | Including version.mk sets PKG_CONFIG_DEPENDS to config entries used for VERSION_SED command. We should keep these configs to make sure package gets refreshed when needed. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* LEDE v17.01.2: revert to branch defaultsAlexander Couzens2017-06-101-2/+2
| | | | Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
* LEDE v17.01.2: adjust config defaultsv17.01.2Alexander Couzens2017-06-101-2/+2
| | | | Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
* base-files: network.sh: fix a number of IPv6 logic flawsJo-Philipp Wich2017-06-081-17/+48
| | | | | | | | | | | | | | | | | | | | | | * Change network_get_subnet6() to sensibly guess a suitable prefix Attempt to return the first non-linklocal, non-ula range, then attempt to return the first non-linklocal range and finally fall back to the previous behaviour of simply returning the first found item. * Fix network_get_ipaddrs_all() Instead of replicating the flawed logic appending a fixed ":1" suffix to IPv6 addresses, rely on network_get_ipaddrs() and network_get_ipaddrs6() to build a single list of all interface addresses. * Fix network_get_subnets6() Instead of replicating the flawed logic appending a fixed ":1" suffix to IPv6 addresses, rely on the ipv6-prefix-assignment.local-address field to figure out the proper network address. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: network.sh: properly report local IPv6 addressesJo-Philipp Wich2017-06-082-18/+14
| | | | | | | | | | Rework the network_get_ipaddr6() and network_get_ipaddrs6() functions to fetch the effective local IPv6 address of delegated prefix from the "local-address" field instead of naively hardcoding ":1" as static suffix. Fixes FS#829. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: always set proto passed to _ucidef_set_interface()Mathias Kresin2017-06-031-1/+1
| | | | | | | | | | | | | | | Overwrite an already set proto if a new one is passed to _ucidef_set_interface() similar to what is done for the interface. It is required when using ""ucidef_set_interface_wan 'ptm0' 'pppoe'" after some initial wan interface configuration is already done by ucidef_add_switch. The "json_is_a protocol string" guard is meant to not reset an earlier set interface proto in case something like "ucidef_set_interface_lan 'eth0'" is used afterwards. Signed-off-by: Mathias Kresin <dev@kresin.me>
* base-files: implement ucidef_set_hostname(), ucidef_set_ntpserver()Jo-Philipp Wich2017-05-031-0/+20
| | | | | | | | | | | | | | Commit 2036ae4 (base-files: support hostname and ntp servers through board.d) was supposed to implement these procedures but lacked the required changes to uci-defaults.sh. Add the missing procedures now to fix config generation on targets relying on hostname or NTP server presetting. Fixes FS#754. Reported-by: Cristian Morales Vega <cristian@samknows.com> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: Added a deprecation notice on wifi detectDavid Pinilla Caparrós2017-03-011-1/+7
| | | | | | | | When running wifi detect, the user will be told on error output that wifi detect is deprecated, that wifi config must be used instead. Also the commit that changes it is referenced for further info. Signed-off-by: David Pinilla Caparrós <dpinitux@gmail.com>
* base-files: Add wifi config to wifi command usageDavid Pinilla Caparrós2017-03-011-2/+2
| | | | | | | | | | Since commit 5f8f8a366136a07df661e31decce2458357c167a wifi detect does not longer work and wifi config it's used to configure not yet configured wireless devices. This commit changes command usage to reflect that change. Signed-off-by: David Pinilla Caparrós <dpinitux@gmail.com>
* build: add buildbot specific config option for setting defaultsFelix Fietkau2017-02-151-1/+1
| | | | | | | | | | This can be used to tweak the buildbot behavior without having to change buildbot's configuration. It will also allow us to add more aggressive clean steps (e.g. on toolchain changes), which would break developers' workflows if enable by default. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* base-files: add /etc/iproute2/rt_protosHans Dedecker2017-02-012-1/+20
| | | | Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* base-files: uppercase default hostname: LEDEYousong Zhou2017-02-011-1/+1
| | | | | | | The name will appear in shell prompt and LuCI page title. Uppercase letters seem to be more vigorous Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
* base-files: don't overwrite model name set by targetMathias Kresin2017-02-011-1/+1
| | | | | | | | | | | The condition is always true due to the literal string followed the -n test parameter. A model name set by target scripts always gets overwritten this way. Change the condition to check for an already existing destination file as it was before 5e85ae9 ("base-files: fix error message during boot"). Signed-off-by: Mathias Kresin <dev@kresin.me>
* base-files: fix user creation on sysupgrade with few opkg control filesMatthias Schiffer2017-01-271-1/+1
| | | | | | | | | | | If only a single opkg control file exists (which can happen with CONFIG_CLEAN_IPKG), grep would not print the file name by default. Instead of forcing it using -H, we just switch to -l (print only file names) and get rid of the cut. Add -s to suppress an error message when no control files exist. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* LEDE v17.01: set branch defaultsJo-Philipp Wich2017-01-161-1/+1
| | | | Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: add ARCH_PACKAGES to openwrt_release and os-releaseMatthias Schiffer2017-01-162-0/+2
| | | | | | | | | Knowing the package architecture at runtime can be useful, e.g. to configure opkg repository URLs. The value of ARCH_PACKAGES ("%A" in VERSION_SED) as added to openwrt_release (as DISTRIB_ARCH) and os-release (as LEDE_ARCH). Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* opkg: drop S/MIME supportFelix Fietkau2017-01-101-39/+0
| | | | | | | | | | It has never been used by default (due to being too bloated), and it is properly replaced by usign (which has been the default for a long time now). Remove this feature to simplify the build system Signed-off-by: Felix Fietkau <nbd@nbd.name>
* base-files: save /bin/mknod for sysupgradeFelix Fietkau2017-01-061-1/+2
| | | | | | It is used on NAND devices in case hotplug is too slow Signed-off-by: Felix Fietkau <nbd@nbd.name>
* base-files: export x86 platform upgrade functions to common.shYousong Zhou2017-01-051-0/+90
| | | | Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
* build: use mkhash to replace various quirky md5sum/openssl callsFelix Fietkau2017-01-051-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* base-files: fix message of initscript wrapperAlberto Bursi2017-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | currently (after blogic's edit to my commit) it prints like this: root@lede:/# service aa aa does not exist. the following services are available :adblock dnsmasq gpio_switch rpcd system boot done led sqm uhttpd crelay dropbear log sysctl umount cron firewall network sysfixtime urandom_seed ddns fstab odhcpd sysntpd which looks pretty bad, and is even worse if someone writes only "service" without arguments, as it will print " does not exist. " which is confusing. with this commit it looks like this: root@lede:/# service service "" not found, the following services are available: adblock dnsmasq gpio_switch rpcd system boot done led sqm uhttpd crelay dropbear log sysctl umount cron firewall network sysfixtime urandom_seed ddns fstab odhcpd sysntpd Yes there is some play with " and ', it is to display "name" or just "" if no service name is entered (like in the example). Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
* base-files: add support for overlaying rootfs contentRafał Miłecki2016-12-201-0/+5
| | | | | | | | | This adds support for install-overlay define. When used in package it allows installing files to a special directory that gets copied to the root when installing it. It allows overwriting files provided by other packages. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* base-files: fix CONFIG_VERSION_DIST defaultJo-Philipp Wich2016-12-141-1/+1
| | | | | | Fix the default value of CONFIG_VERSION_DIST to use uppercase "LEDE". Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: use SNAPSHOT instead of CURRENT to designate untagged branch buildsJo-Philipp Wich2016-12-141-4/+4
| | | | | | | Calling a build ##.##-CURRENT might mislead users into thinking that this build is the most current release of a branch. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: Changed UCI variable name for GPIO value from 'default' to 'value'Julian Labus2016-12-121-1/+1
| | | | | | | | | | | This changes the UCI variable for the GPIO value from system.$cfg.default back to system.$cfg.value as it was before the change from uci-defaults [1] to board.d. /etc/init.d/gpio_switch [2] still expects the value to be in system.$cfg.value. [1] https://github.com/lede-project/source/blob/d65916047b44d6d157d88d15e8e3d92555c5e6f8/package/base-files/files/lib/functions/uci-defaults.sh#L197 [2] https://github.com/lede-project/source/blob/master/package/base-files/files/etc/init.d/gpio_switch#L17 Signed-off-by: Julian Labus <julian@labus-online.de>
* build: support adding version code to file names (FS#323)Jo-Philipp Wich2016-12-091-0/+9
| | | | | | | | | | | | | | Now that the VERSION_NUMBER variable holds the human friendly name and not the commit ID anymore, we need to support adding the revision ID as well. Introduce a new config variable CONFIG_VERSION_CODE_FILENAMES which, if set, causes the resulting file names to contain a commit ID designation as printed by scripts/getver.sh. Also sanitize the input variables to ensure that the resulting strings are lowercased and no not contain spaces. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: add a hint in sysupgrade that shows what to do when the image ↵Felix Fietkau2016-12-041-0/+3
| | | | | | metadata check fails Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: adjust version number handlingJo-Philipp Wich2016-12-025-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the revision info to the VERSION_CODE variable and default VERSION_NUMBER to CURRENT for master branch builds. Also introduce a new menuconfig option CONFIG_VERSION_CODE which allows users to override the revision value put into VERSION_CODE and adjust the template files used by the base-files package to accomodate for the changed semantics. While we're at it, also adjust the various URLs to match the current web site. After this commit, the relevent files will look like the examples given below: # cat /etc/openwrt_version r2398+1 # cat /etc/openwrt_release DISTRIB_ID='LEDE' DISTRIB_RELEASE='CURRENT' DISTRIB_REVISION='r2398+1' DISTRIB_CODENAME='reboot' DISTRIB_TARGET='x86/64' DISTRIB_DESCRIPTION='LEDE Reboot CURRENT r2398+1' DISTRIB_TAINTS='no-all override' # cat /usr/lib/os-release NAME="LEDE" VERSION="CURRENT, Reboot" ID="lede" ID_LIKE="lede openwrt" PRETTY_NAME="LEDE Reboot CURRENT" VERSION_ID="current" HOME_URL="http://lede-project.org/" BUG_URL="http://bugs.lede-project.org/" SUPPORT_URL="http://forum.lede-project.org/" BUILD_ID="r2398+1" LEDE_BOARD="x86/64" LEDE_TAINTS="no-all override" LEDE_DEVICE_MANUFACTURER="LEDE" LEDE_DEVICE_MANUFACTURER_URL="http://lede-project.org/" LEDE_DEVICE_PRODUCT="Generic" LEDE_DEVICE_REVISION="v0" LEDE_RELEASE="LEDE Reboot CURRENT r2398+1" On a release branch, those files would look like: # cat /etc/openwrt_version r2399 # cat /etc/openwrt_release DISTRIB_ID='LEDE' DISTRIB_RELEASE='16.12-CURRENT' DISTRIB_REVISION='r2399' DISTRIB_CODENAME='test_release' DISTRIB_TARGET='x86/64' DISTRIB_DESCRIPTION='LEDE Test Release 16.12-CURRENT r2399' DISTRIB_TAINTS='no-all override' # cat /usr/lib/os-release NAME="LEDE" VERSION="16.12-CURRENT, Test Release" ID="lede" ID_LIKE="lede openwrt" PRETTY_NAME="LEDE Test Release 16.12-CURRENT" VERSION_ID="16.12-current" HOME_URL="http://lede-project.org/" BUG_URL="http://bugs.lede-project.org/" SUPPORT_URL="http://forum.lede-project.org/" BUILD_ID="r2399" LEDE_BOARD="x86/64" LEDE_TAINTS="no-all override" LEDE_DEVICE_MANUFACTURER="LEDE" LEDE_DEVICE_MANUFACTURER_URL="http://lede-project.org/" LEDE_DEVICE_PRODUCT="Generic" LEDE_DEVICE_REVISION="v0" LEDE_RELEASE="LEDE Test Release 16.12-CURRENT r2399" On a release tag, those files would look like: # cat /etc/openwrt_version r2500 # cat /etc/openwrt_release DISTRIB_ID='LEDE' DISTRIB_RELEASE='17.02.1' DISTRIB_REVISION='r2500' DISTRIB_CODENAME='mighty_unicorn' DISTRIB_TARGET='x86/64' DISTRIB_DESCRIPTION='LEDE Mighty Unicorn 17.02.1 r2500' DISTRIB_TAINTS='no-all override' # cat /usr/lib/os-release NAME="LEDE" VERSION="17.02.1, Mighty Unicorn" ID="lede" ID_LIKE="lede openwrt" PRETTY_NAME="LEDE Mighty Unicorn 17.02.1" VERSION_ID="17.02.1" HOME_URL="http://lede-project.org/" BUG_URL="http://bugs.lede-project.org/" SUPPORT_URL="http://forum.lede-project.org/" BUILD_ID="r2500" LEDE_BOARD="x86/64" LEDE_TAINTS="no-all override" LEDE_DEVICE_MANUFACTURER="LEDE" LEDE_DEVICE_MANUFACTURER_URL="http://lede-project.org/" LEDE_DEVICE_PRODUCT="Generic" LEDE_DEVICE_REVISION="v0" LEDE_RELEASE="LEDE Mighty Unicorn 17.02.1 r2500" Signed-off-by: Jo-Philipp Wich <jo@mein.io> Acked-by: Felix Fietkau <nbd@nbd.name>
* base-files: add a wrapper for init scripts in profileAlberto Bursi2016-11-291-0/+9
| | | | | | | | | | | "service" is a simple wrapper that will allow to call init.d scripts current method: # /etc/init.d/network reload with the wrapper: # service network reload If the wrapper is called without arguments or with a wrong init script name, it will print an error and list the content of /etc/init.d/ folder Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
* base-files: ignore failure of stopping services on removalJonas Gorski2016-11-211-1/+1
| | | | | | | | | Packages that do a killall <cmd> with the same name as the init script will fail the prerm step when the service isn't running. Do make them removable without having to restart the service, ignore the return code. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> Acked-by: Jo-Philipp Wich <jo@mein.io>
* base-files: don't modify enabled state of service on upgradeJonas Gorski2016-11-212-11/+13
| | | | | | | | Properly stop/start services on upgrade, but don't change the enabled state. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> Acked-by: Jo-Philipp Wich <jo@mein.io>
* base-files: validate metadata of sysupgrade imagesFelix Fietkau2016-11-193-2/+43
| | | | | | | | | | | Use fwtool to extract it, only require metadata to be present if the platform sysupgrade script sets REQUIRE_IMAGE_METADATA=1 Image metadata is in JSON format and contains a list of supported devices, along with version information that could be displayed by a UI later before the actual upgrade happens. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* base-files: Prefer busybox arp over /proc/net/arp aliasMarek Lindner2016-11-101-1/+1
| | | | | | | | | A firmware compiled with BUSYBOX_CONFIG_ARP should also use by default the arp binary from busybox. Otherwise the extra functionality the user requested can only be used when running arp with the path to the binary. Signed-off-by: Marek Lindner <marek.lindner@open-mesh.com> Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
* base-files, mac80211, broadcom-wl: wifi detection and configurationChristian Lamparter2016-11-032-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the wifi detection script is executed as part of the (early) boot process. Pluggable wifi USB devices, which are inserted at a later time are not automatically detected and therefore they don't show up in LuCI. A user has to deal with wifi detection manually, or restart the router. However, the current "sleep 1" window - which the boot process waits for wifi devices to "settle down" - is too short to detect wifi devices for some routers anyway. For example, this can happen with USB WLAN devices on the WNDR4700. This is because the usb controller needs to load its firmware from UBI and initialize, before it can operate. The issue can be seen on a BT HomeHub 5A as well as soon as the caldata are on an ubi volume. This is because the ath9k card has to be initialized by owl-loader first. Which has to wait for the firmware extraction script to retrieve the pci initialization values inside the caldata. This patch moves the wifi configuration to hotplug scripts. For mac80211, the wifi configuration will now automatically run any time a "ieee80211" device is added. Likewise broadcom-wl's script checks for new "net" devices which have the "wl$NUMBER" moniker. Issues with spawning multiple interface configuration - in case the detection script is run concurrently - have been resolved by using a named section for the initial configuration. Concurrent configuration scripts will now simply overwrite the same existing configuration. A workaround which preserves the "sleep 1" window for just the first boot has been added. This allows the existing brcm47xx boot and mvebu uci-default scripts to correctly setup the initial mac addresses and regulatory domain. And finally, the patch renames the "wifi detect" into "wifi config". As the script no longer produces any output that has to be redirected or appended to the configuration file. Thanks to Martin Blumenstingl for helping with the implementation and testing of the patch. Acked-by: Jo-Philipp Wich <jo@mein.io> Signed-off-by: Mathias Kresin <dev@kresin.me> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* base-files, mac80211, broadcom-wl: use uci to populate wireless configChristian Lamparter2016-11-031-5/+1
| | | | | | | | | | | | | | | | | | | | Previously, wifi detect simply dumped its generated wireless configuration to STDOUT. A second step was needed to append the configuration to /etc/config/wireless (or create it, if it didn't exist). With this patch, The wifi detection script will now use uci to update the wireless configuration directly. This patch also makes the initially created wifi-iface a named section ('default_radio$X' for mac80211 and 'default_wl$X' for broadcom). With this change, uci will not print the cfgHASH to STDOUT (which would now corrupt the wireless configuration). It will also prevent adding duplicated wifi interface configurations, if the wifi configuration is run concurrently. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* base-files: generate /etc/config/wireless, if it doesn't existMathias Kresin2016-11-031-0/+2
| | | | | | | | | | | | This patch adds a check in "wifi detect" to test if the wireless configuration file does exist. If it doesn't exist, an empty /etc/config/wireless file will be created. This is necessary because uci doesn't create new files, instead the tool just exits with "uci: Entry not found". Signed-off-by: Mathias Kresin <dev@kresin.me> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* base-files: uci-defaults: support requesting untagged switch port configurationJo-Philipp Wich2016-11-021-8/+14
| | | | | | | | | | | | | Introduce support for a new [0-9]u@netdev syntax to ucidev_add_switch() to let board.d network files request default network switch configurations which do not use tagged CPU ports. This commit itself has no effect on generated configurations at the moment since we still emit untagged configurations by default but it allows boards to opt-out from default tagged configs in case we start emitting tagged settings by default. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: sysfixtime: Keep RTC time in UTC timezonePetr Štetiar2016-10-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to tell hwclock with -u commandline option, that we would like to keep our RTC clock in UTC timezone. Linux kernel expects RTC in UTC timezone anyway. In current state of things, we don't tell hwclock to load/store time from/to RTC in UTC timezone so it uses the timezone from the system time. If it's set to different timezone then UTC, sysfixtime is going to screw the time in RTC. I've following in the setup script: uci set system.@system[0].timezone='CET-1CEST,M3.5.0,M10.5.0/3' uci set system.@system[0].zonename='Europe/Prague' I've this RTC setup (rtc1 is RTC on i.MX6 SoC, rtc0 is battery backed RTC mcp7941x): rtc-ds1307 3-006f: rtc core: registered mcp7941x as rtc0 snvs_rtc 20cc000.snvs:snvs-rtc-lp: rtc core: registered 20cc000.snvs:snvs-r as rtc1 Then we can experience following (current time is 10:15am): $ date Fri Oct 21 10:15:07 CEST 2016 $ hwclock -r -f /dev/rtc0 Fri Oct 21 08:14:46 2016 0.000000 seconds $ hwclock -u -r -f /dev/rtc0 Fri Oct 21 10:14:46 2016 0.000000 seconds And after current broken sysfixtime: $ /etc/init.d/sysfixtime stop $ date Fri Oct 21 10:15:25 CEST 2016 $ hwclock -r -f /dev/rtc0 Fri Oct 21 10:15:31 2016 0.000000 seconds Now we've time in our battery backed RTC in CEST timezone instead of UTC. Then once again, but with this patch applied to sysfixtime, where hwclock is using correctly the -u parameter: $ /etc/init.d/sysfixtime stop $ date Fri Oct 21 10:15:53 CEST 2016 $ hwclock -r -f /dev/rtc0 Fri Oct 21 08:15:55 2016 0.000000 seconds Signed-off-by: Petr Štetiar <ynezz@true.cz> Acked-by: Jo-Philipp Wich <jo@mein.io>
* base-files: Ensure reset only works if an overlay existsChris Blake2016-10-271-1/+5
| | | | | | | | | | | | | | Currently the reset script will try to run jffs2reset on boards that are running a rw rootfs, such as ext4. This will cause jffs2reset to fail and the board to never reboot while the LED blinks until a manual reboot. This commit does two different things: 1. Disables reset on boards that do not have an overlay mount 2. Disables the Blinking LED after 5 seconds if the board does not support reset Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
* package/basefiles: add mkfs.ext4 and losetup binaries to ramfs listAndré Valentin2016-10-261-0/+2
| | | | | | | mkfs.ext4 und losetup are needed for sysupgrade support on mmc devices with automatic rootfs split (loopback device usage). Signed-off-by: André Valentin <avalentin@marcant.net>
* base-files: add ucidef_set_led_usbport for full usbport supportRafał Miłecki2016-10-223-0/+34
| | | | | | | | | | | | | | | | | | | | This helper allows using usbport trigger directly. It requires usbport compatible syntax and supports specifying multiple USB ports, e.g.: ucidef_set_led_usbport "usb" "USB" "devicename:colour:function" "usb1-port1" "usb2-port1" This adds a proper object to the board.json, e.g. "usb": { "name": "USB", "type": "usbport", "sysfs": "devicename:colour:function", "ports": [ "usb1-port1", "usb2-port1" ] } and supports translating it into uci section. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* switch to the new usbport LED triggerRafał Miłecki2016-10-191-5/+16
| | | | | | | This makes init.d script handle existing UCI entries using the new trigger. It also switches all targets to use its package. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>