0013-procd-prepare-NAND-sysupgrade-for-making-upgraded-dynamically-linked.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Wed, 3 May 2017 08:28:05 +0200
  3. Subject: procd: prepare NAND sysupgrade for making upgraded dynamically linked
  4. Use install_bin to copy upgraded with all dependencies. The old name
  5. /tmp/upgraded is temporarily retained as a symlink to avoid breaking
  6. things.
  7. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
  8. diff --git a/package/system/procd/files/nand.sh b/package/system/procd/files/nand.sh
  9. index 8a164ee08537014936a8608f5a60fe0e27dcabd6..6bd2005344c081df20e5a330a69e49e37225c39f 100644
  10. --- a/package/system/procd/files/nand.sh
  11. +++ b/package/system/procd/files/nand.sh
  12. @@ -333,7 +333,7 @@ nand_upgrade_stage1() {
  13. [ "$SAVE_CONFIG" != 1 -a -f "$CONF_TAR" ] &&
  14. rm $CONF_TAR
  15. - ubus call system nandupgrade "{\"path\": \"$path\" }"
  16. + ubus call system nandupgrade "{\"prefix\": \"$RAM_ROOT\", \"path\": \"$path\" }"
  17. exit 0
  18. }
  19. }
  20. @@ -370,6 +370,7 @@ nand_do_platform_check() {
  21. # $(1): file to be used for upgrade
  22. nand_do_upgrade() {
  23. echo -n $1 > /tmp/sysupgrade-nand-path
  24. - cp /sbin/upgraded /tmp/
  25. + install_bin /sbin/upgraded
  26. + ln -s "$RAM_ROOT"/sbin/upgraded /tmp/upgraded
  27. nand_upgrade_stage1
  28. }