mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
BOARD-miyoo/patches: mv opkg patch to correct dir
also wait till `mount` cmd finished
This commit is contained in:
@@ -1,15 +1,15 @@
|
|||||||
From 0a6e768f91622c3455c8c4b0eda584331c18e1e0 Mon Sep 17 00:00:00 2001
|
From b86e04052bfb98d8204a5e8f676e9d17f1adb7df Mon Sep 17 00:00:00 2001
|
||||||
From: Apaczer <94932128+Apaczer@users.noreply.github.com>
|
From: Apaczer <94932128+Apaczer@users.noreply.github.com>
|
||||||
Date: Fri, 12 Jan 2024 21:18:42 +0100
|
Date: Fri, 12 Jan 2024 21:18:42 +0100
|
||||||
Subject: [PATCH] use mount(8) cmd to enable read-write on root
|
Subject: [PATCH] use mount(8) cmd to enable read-write on root
|
||||||
|
|
||||||
Signed-off-by: Apaczer <94932128+Apaczer@users.noreply.github.com>
|
Signed-off-by: Apaczer <94932128+Apaczer@users.noreply.github.com>
|
||||||
---
|
---
|
||||||
src/opkg.c | 13 +++++++++++++
|
src/opkg.c | 21 +++++++++++++++++++++
|
||||||
1 file changed, 13 insertions(+)
|
1 file changed, 21 insertions(+)
|
||||||
|
|
||||||
diff --git a/src/opkg.c b/src/opkg.c
|
diff --git a/src/opkg.c b/src/opkg.c
|
||||||
index 7510fe8..aa5e0f2 100644
|
index 7510fe8..3639a85 100644
|
||||||
--- a/src/opkg.c
|
--- a/src/opkg.c
|
||||||
+++ b/src/opkg.c
|
+++ b/src/opkg.c
|
||||||
@@ -400,6 +400,7 @@ int main(int argc, char *argv[])
|
@@ -400,6 +400,7 @@ int main(int argc, char *argv[])
|
||||||
@@ -20,7 +20,7 @@ index 7510fe8..aa5e0f2 100644
|
|||||||
opkg_cmd_t *cmd;
|
opkg_cmd_t *cmd;
|
||||||
int nocheckfordirorfile;
|
int nocheckfordirorfile;
|
||||||
int noreadfeedsfile;
|
int noreadfeedsfile;
|
||||||
@@ -470,8 +471,20 @@ int main(int argc, char *argv[])
|
@@ -470,8 +471,28 @@ int main(int argc, char *argv[])
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,6 +28,10 @@ index 7510fe8..aa5e0f2 100644
|
|||||||
+ if (system(cmd_mount) == -1) {
|
+ if (system(cmd_mount) == -1) {
|
||||||
+ opkg_perror(ERROR, "Can not mount root partition in RW mode");
|
+ opkg_perror(ERROR, "Can not mount root partition in RW mode");
|
||||||
+ return -1;
|
+ return -1;
|
||||||
|
+ } else {
|
||||||
|
+ while (system("pgrep mount") == 0) {
|
||||||
|
+ usleep(100000);
|
||||||
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
err = opkg_cmd_exec(cmd, argc - opts, (const char **)(argv + opts));
|
err = opkg_cmd_exec(cmd, argc - opts, (const char **)(argv + opts));
|
||||||
@@ -36,6 +40,10 @@ index 7510fe8..aa5e0f2 100644
|
|||||||
+ if (system(cmd_mount) == -1) {
|
+ if (system(cmd_mount) == -1) {
|
||||||
+ opkg_perror(ERROR, "Can not mount root partition in RDONLY mode");
|
+ opkg_perror(ERROR, "Can not mount root partition in RDONLY mode");
|
||||||
+ return -1;
|
+ return -1;
|
||||||
|
+ } else {
|
||||||
|
+ while (system("pgrep mount") == 0) {
|
||||||
|
+ usleep(100000);
|
||||||
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
opkg_download_cleanup();
|
opkg_download_cleanup();
|
||||||
Reference in New Issue
Block a user