1. 03 Jun, 2019 1 commit
  2. 01 Dec, 2016 2 commits
    • Federico Vaga's avatar
      userspace:init: load g_serial new dependencies · a2d0951f
      Federico Vaga authored
      The USB gadget framework has changed from Linux v2.6.39. As far as I
      understood it's now more modular, so it's not anymore enough to load
      just the g_serial.ko driver. Now we have to load also it's
      I'm not an expert about USB gadget, this patch is the result of my
      understanding in debugging the loading failure of the g_serial.ko
      module. Perhaps it will be necessary some adjustments to make it
      work the way we want. But for the time begin I will leave it like
      this until is clear what we have to adjust.
      Note that these dependecies depends also on the configfs file-system.
      I had problems to get this work because apparently by using a different
      corss-compiler some symbols where removed from the kernel, so our
      modules were not able to load because of "undefined symbols".
      Using the toolchain compiled within this project solved this issue.
      Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
    • Federico Vaga's avatar
      userspace:init: get kernel version at runtime · 722c3364
      Federico Vaga authored
      The kernel version is hardcoded here. Take it at runtime by using
      `uname -r`. This will reduce incompatibilities on kernel updates
      Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
  3. 07 Jul, 2016 4 commits
    • Adam Wujek's avatar
      rootfs: check md5sum of firmware before update · cfab080a
      Adam Wujek authored
      Check md5sums of files in the wrs-firmware.tar with stored in file
      checksums.md5. When checksum does not match abort the update.
      Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
    • Adam Wujek's avatar
      rootfs: add printouts during firmware update · dd245fae
      Adam Wujek authored
      Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
    • Adam Wujek's avatar
      rootfs: fix overwriting hwinfo during switch update (buildroot) · 88d2e085
      Adam Wujek authored
      When switch's firmware with buildroot older than 2016.02 was updated via
      copying wrs-firmware.tar with buildroot at least 2016.02 to the
      /update partition, then hwinfo in the flash was overwriten.
      Such behaviour was caused by crashing during execution of /wr/bin/sdb-read.
      Crashing sdb-read caused the following if's condition from the file
      /etc/init.d/hwinfo to be false.
      if /wr/bin/sdb-read /dev/mtd5ro > /dev/null; then
      This triggered later overwrite of hwinfo partition.
      /wr/bin/sdb-read was crashing because during update the binary /wr/bin/sdb-read
      was called from just extracted firmware. Problem pops up when libraries
      required by sdb-read are in the different versions in the old and the new
      firmware. Unfortunatelly, this problem cannot be easily solved, since we cannot
      change the update procedure in already installed firmware (the one that is
      performing update).
      Implemented solution does the following:
      --change the name of /wr/etc/sdb-for-dataflash to /wr/etc/sdb-for-dataflash.bin
        by this /etc/init.d/hwinfo script exits with an error without modification
        to the hwinfo partition.
      --rename link /etc/rcS/S90hwinfo to /etc/rcS/S10hwinfo, which will trigger
        update of hwinfo partition earlier during the boot.
      --restart switch after update of hwinfo in the flash
      --remove calls of /etc/init.d/hwinfo during the update
      Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
    • Adam Wujek's avatar
      rootfs: fix lack of reboot after update · 7c4a63a5
      Adam Wujek authored
      The problem is that the "reboot" command sends the signal to the init. However,
      it looks like init queues all incoming signals. They're handled after all
      "sysinit" commands from the inittab are finished.
      reboot -f skip sending the signal and triggers the reboot immediately.
      This problem pop up after update of a buildroot to version 2016.02.
      Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
  4. 17 Jun, 2015 1 commit
  5. 12 May, 2015 1 commit
    • Adam Wujek's avatar
      userspace/rootfs_override: save date of last update · b4d0a39b
      Adam Wujek authored
      Note: Be aware that date of last update may be not accurate.
      One reason is that it uses date stored before last restart, so time needed to restart is not taken into account.
      Additionally date stored before restart may be not accurate for many reasons like:
      --hard restart (last know date was not saved)
      --date was never received from ntp nor set manually
      Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
  6. 17 Oct, 2014 1 commit
  7. 16 Oct, 2014 1 commit
    • Alessandro Rubini's avatar
      boot procedure: use non-blocking write to /dev/ttyGS0 · 16d93070
      Alessandro Rubini authored
      If the usb cable is disconnected, any write to /dev/ttyGS0 goes to a
      buffer until it fills. Then, any further write will block. This means
      the messages towards the user ("uncompressing filesystem... done" etc)
      caused the update procedure to stop.
      This fixes the problem by using non-blocking write for the messages:
      if nobody`s reading the messages are just discarded by the kernel.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
  8. 30 Sep, 2014 2 commits
    • Alessandro Rubini's avatar
      userspace: some clean-up of wrs-boot-procedure · 23323d78
      Alessandro Rubini authored
      I was bored by repeated file names, so this uses WRS_KER and other
      variables to host the "magic" name.
      Similarly, the use of "-old" was inconsistent, and this uses the
      same pattern for all files. Actually, it should be a function
      to avoid repetitions. But I'm lazy and it is not.
      The upgrade we may do now is by placing files in /update, with
      magic names:
          - wrs-firmware.tar: is *must* include wrs-usr.tar.gz, because
            if this file exists /usr is recreated from scratch.
               - it may include zImage, wrs-initramfs.gz, barebox.bin
      	 (this happens in released firmware files, so the boot loader
      	 is being written twice, until we get rid of the sam-ba tools)
          - zImage: if present, the kernel is replaced
          - wrs-initramfs.gz: if present, the initramfs is replaced
          - barebox.bin: if presente, the boot loader is replaced
      This means, in practice, that you may change the whole system or one
      part at a time.  I suppose only we developers will use the "one part
      at a time".
      But the most important change is that barebox.bin is being replaced
      during boot.  In v4.0 we didn't expect to ever replace barebox, but
      then we found we needed it -- so let's provide for further updates.
      OTOH at91boot is not replaced, and it is not expected to, ever.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
    • Alessandro Rubini's avatar
  9. 01 Aug, 2014 1 commit
  10. 29 Jul, 2014 1 commit
  11. 27 Jul, 2014 1 commit
  12. 23 Jul, 2014 1 commit
  13. 17 Jul, 2014 2 commits
  14. 24 Jun, 2014 3 commits