Skip to content
Snippets Groups Projects
  1. May 14, 2017
  2. May 03, 2017
  3. Apr 12, 2017
    • Alexandru Ardelean's avatar
      base-files: use restart if no reload hook for service · 6713694f
      Alexandru Ardelean authored
      
      This was also working before, with a slightly
      different semantic.
      
      [ Original semantic ]
      If no reload hooks was implemented, the default one would
      kick in, it would return fail, and restart would happen.
      
      This would happen also in the case where a reload hook
      would be implemented, it would fail, and it would restart
      the service.
      
      [ New semantic ]
      The default reload hook calls restart.
      Services can implement their own reload.
      
      If reload fails, then the '/etc/init.d/<service> reload'
      would return a non-zero code, and the caller can choose
      a way to handle this.
      
      Signed-off-by: default avatarAlexandru Ardelean <ardeleanalex@gmail.com>
      6713694f
  4. Mar 22, 2017
  5. Mar 11, 2017
  6. Feb 13, 2017
  7. Feb 01, 2017
    • Jo-Philipp Wich's avatar
      base-files: emit tagged switch configuration by default · 73d923ed
      Jo-Philipp Wich authored
      
      Instead of only using tagged CPU port configurations when more than one VLAN
      is present on the switch, always emit tagged configurations unless a board
      explicitely opts out of this behaviour by using the previously introduced
      [0-9]u@netdev syntax.
      
      Emitting default tagged configurations has the following benefits:
      
       - Relation of switch vlans to netdevs is easier to understand, especially
         for multi-cpu-port switches
      
       - Adding additional VLANs (e.g. to break out a LAN port for other purposes)
         becomes easier as users are not forced to change the existing untagged
         VLAN to tagged and the existing ifname notation from ethX to ethX.Y
         anymore, drastly reducing the likelyhood of soft-bricks.
      
      Signed-off-by: default avatarJo-Philipp Wich <jo@mein.io>
      73d923ed
  8. Jan 30, 2017
  9. Jan 26, 2017
  10. Jan 24, 2017
  11. Jan 18, 2017
  12. Jan 16, 2017
  13. Jan 06, 2017
  14. Jan 05, 2017
  15. Jan 02, 2017
    • Alberto Bursi's avatar
      base-files: fix message of initscript wrapper · 8496659e
      Alberto Bursi authored
      
      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: default avatarAlberto Bursi <alberto.bursi@outlook.it>
      8496659e
  16. Dec 20, 2016
  17. Dec 12, 2016
  18. Dec 04, 2016
  19. Dec 02, 2016
    • Jo-Philipp Wich's avatar
      build: adjust version number handling · 5f3c96c2
      Jo-Philipp Wich authored
      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: default avatarJo-Philipp Wich <jo@mein.io>
      Acked-by: default avatarFelix Fietkau <nbd@nbd.name>
      5f3c96c2
  20. Nov 29, 2016
  21. Nov 21, 2016
  22. Nov 19, 2016
    • Felix Fietkau's avatar
      base-files: validate metadata of sysupgrade images · cc853810
      Felix Fietkau authored
      
      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: default avatarFelix Fietkau <nbd@nbd.name>
      cc853810
  23. Nov 10, 2016
  24. Nov 03, 2016
    • Christian Lamparter's avatar
      base-files, mac80211, broadcom-wl: wifi detection and configuration · 5f8f8a36
      Christian Lamparter authored
      
      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: default avatarJo-Philipp Wich <jo@mein.io>
      Signed-off-by: default avatarMathias Kresin <dev@kresin.me>
      Signed-off-by: default avatarChristian Lamparter <chunkeey@gmail.com>
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      5f8f8a36
    • Christian Lamparter's avatar
      base-files, mac80211, broadcom-wl: use uci to populate wireless config · 5e35b456
      Christian Lamparter authored
      
      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: default avatarChristian Lamparter <chunkeey@gmail.com>
      5e35b456
    • Mathias Kresin's avatar
      base-files: generate /etc/config/wireless, if it doesn't exist · ba3540db
      Mathias Kresin authored
      
      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: default avatarMathias Kresin <dev@kresin.me>
      Signed-off-by: default avatarChristian Lamparter <chunkeey@gmail.com>
      ba3540db
  25. Nov 02, 2016
    • Jo-Philipp Wich's avatar
      base-files: uci-defaults: support requesting untagged switch port configuration · 5e0441aa
      Jo-Philipp Wich authored
      
      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: default avatarJo-Philipp Wich <jo@mein.io>
      5e0441aa
  26. Oct 31, 2016
    • Petr Štetiar's avatar
      base-files: sysfixtime: Keep RTC time in UTC timezone · 9e8e8b72
      Petr Štetiar authored
      
      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: default avatarPetr Štetiar <ynezz@true.cz>
      Acked-by: default avatarJo-Philipp Wich <jo@mein.io>
      9e8e8b72
  27. Oct 27, 2016
    • Chris Blake's avatar
      base-files: Ensure reset only works if an overlay exists · b745bfa6
      Chris Blake authored
      
      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: default avatarChris Blake <chrisrblake93@gmail.com>
      b745bfa6
  28. Oct 26, 2016
  29. Oct 22, 2016
    • Rafał Miłecki's avatar
      base-files: add ucidef_set_led_usbport for full usbport support · 2187f57d
      Rafał Miłecki authored
      
      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: default avatarRafał Miłecki <rafal@milecki.pl>
      2187f57d
  30. Oct 19, 2016
  31. Oct 18, 2016
  32. Oct 05, 2016
  33. Oct 04, 2016
  34. Sep 26, 2016
Loading