Skip to contentSkip to conversation

package/swupdate: Backport fixes

PATCH New Joris Offouga 1 participant 1 message Jul 16, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/swupdate: Backport fixes

Applied same commit [1] of meta-swupdate for fixes:

[2] Shellscript stops before completing
[3] diskpart: force kernel to reread partition table

[1]: https://github.com/sbabic/meta-swupdate/commit/3fccf23e2816b176075588309e3e4702a318dfc7
[2]: https://github.com/sbabic/swupdate/commit/1078af97a5ac5c3091c8e601b836cd69a7aab7fc
[3]: https://github.com/sbabic/swupdate/commit/e3a6b120ff88f6dc34570002de97754b607966ec

---
Changed v1-> v2:
Add my signed-off-by on the patches

 ...rce-kernel-to-reread-partition-table.patch | 32 ++++++++++++
 ...-Shellscript-stops-before-completing.patch | 52 +++++++++++++++++++
 2 files changed, 84 insertions(+)
 create mode 100644 package/swupdate/0001-diskpart-force-kernel-to-reread-partition-table.patch
 create mode 100644 package/swupdate/0002-Shellscript-stops-before-completing.patch
package/swupdate/0001-diskpart-force-kernel-to-reread-partition-table.patch new file +32 -0
new file mode 100644
index 0000000000..81e26a1797
@@ -0,0 +1,32 @@
+From 305a7a5a74a612801d9df2b2efc86dd952b8c4e7 Mon Sep 17 00:00:00 2001
+From: Stefano Babic <[email protected]>
+Date: Tue, 9 Jun 2020 13:58:06 +0000
+Subject: [PATCH 1/2] diskpart: force kernel to reread partition table
+
+After writing a partition table to disk, the kernel should be informed
+(like the partconf tool does), else it is not possible to install images
+in the new created partitions.
+
+Signed-off-by: Stefano Babic <[email protected]>
+Signed-off-by: Joris Offouga <[email protected]>
+---
+ handlers/diskpart_handler.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/handlers/diskpart_handler.c b/handlers/diskpart_handler.c
+index 16adc17..372412b 100644
+--- a/handlers/diskpart_handler.c
++++ b/handlers/diskpart_handler.c
+@@ -273,7 +273,8 @@ static int diskpart(struct img_type *img,
+ 	/*
+ 	 * Everything done, write into disk
+ 	 */
+-	ret = fdisk_write_disklabel(cxt);
++	ret = fdisk_write_disklabel(cxt) |
++		fdisk_reread_partition_table(cxt);
+ 
+ handler_exit:
+ 	if (fdisk_deassign_device(cxt, 0))
+-- 
+2.25.1
+
package/swupdate/0002-Shellscript-stops-before-completing.patch new file +52 -0

52 lines not on this page · raw message

Signature · 1 line
2.25.1