0034-kirkwood-upgrade-fix-RAMFS_COPY_.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Mon, 10 Jul 2017 18:16:23 +0200
  3. Subject: kirkwood: upgrade: fix RAMFS_COPY_*
  4. RAMFS_COPY_* are moved to platform.sh toplevel. The nand_do_upgrade call is
  5. moved to platform_do_upgrade.
  6. Fixes: 30f61a34b4cf "base-files: always use staged sysupgrade"
  7. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
  8. diff --git a/target/linux/kirkwood/base-files/lib/upgrade/linksys.sh b/target/linux/kirkwood/base-files/lib/upgrade/linksys.sh
  9. index 13a8f1cb554462acf39a59c9d5c1e6cd4ec222f5..dde3bd1b2190d68ce54e6c2883a45032d58599b2 100644
  10. --- a/target/linux/kirkwood/base-files/lib/upgrade/linksys.sh
  11. +++ b/target/linux/kirkwood/base-files/lib/upgrade/linksys.sh
  12. @@ -69,11 +69,3 @@ platform_do_upgrade_linksys() {
  13. fi
  14. }
  15. }
  16. -
  17. -linksys_preupgrade() {
  18. - export RAMFS_COPY_BIN="${RAMFS_COPY_BIN} /usr/sbin/fw_printenv /usr/sbin/fw_setenv"
  19. - export RAMFS_COPY_BIN="${RAMFS_COPY_BIN} /bin/mkdir /bin/touch"
  20. - export RAMFS_COPY_DATA="${RAMFS_COPY_DATA} /etc/fw_env.config /var/lock/fw_printenv.lock"
  21. -}
  22. -
  23. -append sysupgrade_pre_upgrade linksys_preupgrade
  24. diff --git a/target/linux/kirkwood/base-files/lib/upgrade/platform.sh b/target/linux/kirkwood/base-files/lib/upgrade/platform.sh
  25. index e7c6a1120a90147380f4fcf644eb7078c1bc1659..c8c66c1b9d67759305ee836f9d84b9a2968a9493 100644
  26. --- a/target/linux/kirkwood/base-files/lib/upgrade/platform.sh
  27. +++ b/target/linux/kirkwood/base-files/lib/upgrade/platform.sh
  28. @@ -1,5 +1,8 @@
  29. . /lib/kirkwood.sh
  30. +RAMFS_COPY_BIN='/usr/sbin/fw_printenv /usr/sbin/fw_setenv'
  31. +RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
  32. +
  33. platform_check_image() {
  34. [ "$#" -gt 1 ] && return 1
  35. local board="$(kirkwood_board_name)"
  36. @@ -33,19 +36,7 @@ platform_do_upgrade() {
  37. platform_do_upgrade_linksys "$ARGV"
  38. ;;
  39. *)
  40. - default_do_upgrade "$@"
  41. - ;;
  42. - esac
  43. -}
  44. -
  45. -platform_pre_upgrade() {
  46. - local board=$(kirkwood_board_name)
  47. -
  48. - case "$board" in
  49. - "linksys-audi"|\
  50. - "linksys-viper") ;;
  51. - *)
  52. - nand_do_upgrade $1
  53. + nand_do_upgrade "$ARGV"
  54. ;;
  55. esac
  56. }