0034-ipq806x-upgrade-fix-RAMFS_COPY_.patch 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Mon, 10 Jul 2017 18:03:39 +0200
  3. Subject: ipq806x: upgrade: fix RAMFS_COPY_*
  4. RAMFS_COPY_* are moved to platform.sh toplevel. The unneeded
  5. linksys_preupgrade function is removed, and the nand_do_upgrade call is
  6. moved to platform_do_upgrade.
  7. Fixes: 30f61a34b4cf "base-files: always use staged sysupgrade"
  8. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
  9. diff --git a/target/linux/ipq806x/base-files/lib/upgrade/linksys.sh b/target/linux/ipq806x/base-files/lib/upgrade/linksys.sh
  10. index 12f25efdae87979e79a252237f735932cb66d42f..0234ce0a51a0a92dcd719102f83e19686442574a 100644
  11. --- a/target/linux/ipq806x/base-files/lib/upgrade/linksys.sh
  12. +++ b/target/linux/ipq806x/base-files/lib/upgrade/linksys.sh
  13. @@ -99,12 +99,3 @@ platform_do_upgrade_linksys() {
  14. fi
  15. }
  16. }
  17. -
  18. -linksys_preupgrade() {
  19. - export RAMFS_COPY_BIN="${RAMFS_COPY_BIN} /usr/sbin/fw_printenv /usr/sbin/fw_setenv"
  20. - export RAMFS_COPY_BIN="${RAMFS_COPY_BIN} /bin/mkdir /bin/touch"
  21. - export RAMFS_COPY_DATA="${RAMFS_COPY_DATA} /etc/fw_env.config /var/lock/fw_printenv.lock"
  22. -
  23. -}
  24. -
  25. -append sysupgrade_pre_upgrade linksys_preupgrade
  26. diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
  27. index c3741f9ff242cddb3c185c2f638c7b4dff781e1b..6455b57cfb1346b7cc9e103065080d8ae92edc19 100644
  28. --- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
  29. +++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
  30. @@ -3,11 +3,14 @@
  31. PART_NAME=firmware
  32. REQUIRE_IMAGE_METADATA=1
  33. +RAMFS_COPY_BIN='/usr/sbin/fw_printenv /usr/sbin/fw_setenv'
  34. +RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
  35. +
  36. platform_check_image() {
  37. return 0;
  38. }
  39. -platform_pre_upgrade() {
  40. +platform_do_upgrade() {
  41. local board=$(ipq806x_board_name)
  42. case "$board" in
  43. @@ -17,18 +20,8 @@ platform_pre_upgrade() {
  44. r7500 |\
  45. r7500v2 |\
  46. r7800)
  47. - nand_do_upgrade "$1"
  48. - ;;
  49. - ea8500)
  50. - linksys_preupgrade "$1"
  51. + nand_do_upgrade "$ARGV"
  52. ;;
  53. - esac
  54. -}
  55. -
  56. -platform_do_upgrade() {
  57. - local board=$(ipq806x_board_name)
  58. -
  59. - case "$board" in
  60. c2600)
  61. PART_NAME="os-image:rootfs"
  62. MTD_CONFIG_ARGS="-s 0x200000"