From: Markham Date: Thu, 30 May 2019 11:58:37 +0000 (+0200) Subject: ofgwrite: update and change source url X-Git-Url: https://git.webhop.me/?a=commitdiff_plain;h=a819804a534264ed3732b17d47b54bb784c483f2;p=bs-cst-neutrino-hd.git ofgwrite: update and change source url --- diff --git a/archive-patches/ofgwrite-neutrino.patch b/archive-patches/ofgwrite-neutrino.patch new file mode 100644 index 0000000..53f4aee --- /dev/null +++ b/archive-patches/ofgwrite-neutrino.patch @@ -0,0 +1,206 @@ +diff --git a/fb.c b/fb.c +index ee80682..09b81b7 100644 +--- a/fb.c ++++ b/fb.c +@@ -546,6 +546,10 @@ int loadBackgroundImage() + int ret; + + // search for background image ++ if (access("/share/tuxbox/neutrino/icons/flashback.jpg", R_OK) != 0) ++ return 0; ++ else ++ ret = system("/bin/logoview -t 1 -l /share/tuxbox/neutrino/icons/flashback.jpg"); + #if 0 + if (access("/etc/enigma2/bootlogo.mvi", R_OK) != 0) + if (access("/etc/enigma2/backdrop.mvi", R_OK) != 0) +diff --git a/ofgwrite.c b/ofgwrite.c +index d21d105..382af18 100644 +--- a/ofgwrite.c ++++ b/ofgwrite.c +@@ -18,7 +18,7 @@ const char ofgwrite_version[] = "4.5.0"; + int flash_kernel = 0; + int flash_rootfs = 0; + int no_write = 0; +-int force_e2_stop = 0; ++int force_neutrino_stop = 0; + int quiet = 0; + int show_help = 0; + int newroot_mounted = 0; +@@ -128,13 +128,15 @@ int find_image_files(char* p) + stat(kernel_filename, &kernel_file_stat); + my_printf("Found kernel file: %s\n", kernel_filename); + } +- if (strcmp(entry->d_name, "rootfs.bin") == 0 // ET-xx00, XP1000 ++/* //M if (strcmp(entry->d_name, "rootfs.bin") == 0 // ET-xx00, XP1000 + || strcmp(entry->d_name, "root_cfe_auto.bin") == 0 // Solo2 + || strcmp(entry->d_name, "root_cfe_auto.jffs2") == 0 // other VU boxes + || strcmp(entry->d_name, "oe_rootfs.bin") == 0 // DAGS boxes + || strcmp(entry->d_name, "e2jffs2.img") == 0 // Spark boxes + || strcmp(entry->d_name, "rootfs.tar.bz2") == 0 // solo4k + || strcmp(entry->d_name, "rootfs.ubi") == 0 // Zgemma H9 ++*/ ++ if (strcmp(entry->d_name, "rootfs.tar.bz2") == 0 + || (strcmp(entry->d_name, "rootfs1.tar.bz2") == 0 && !strcmp(vumodel, "solo4k") && multiboot_partition == 1) // solo4k multiboot + || (strcmp(entry->d_name, "rootfs2.tar.bz2") == 0 && !strcmp(vumodel, "solo4k") && multiboot_partition == 2) // solo4k multiboot + || (strcmp(entry->d_name, "rootfs3.tar.bz2") == 0 && !strcmp(vumodel, "solo4k") && multiboot_partition == 3) // solo4k multiboot +@@ -222,7 +224,7 @@ int read_args(int argc, char *argv[]) + no_write = 1; + break; + case 'f': +- force_e2_stop = 1; ++ force_neutrino_stop = 1; + break; + case 'q': + quiet = 1; +@@ -323,9 +325,12 @@ int read_mtd_file() + strcpy(&kernel_device[5], kernel_device_arg); + if (kernel_file_stat.st_size <= devsize) + { ++/* //M + if ((strcmp(name, "\"kernel\"") == 0 + || strcmp(name, "\"nkernel\"") == 0 + || strcmp(name, "\"kernel2\"") == 0)) ++*/ ++ if ((strcmp(name, "\"kernel\"") == 0)) + { + if (kernel_filename[0] != '\0') + my_printf(" -> %s <- User selected!!\n", kernel_filename); +@@ -354,8 +359,11 @@ int read_mtd_file() + if (rootfs_file_stat.st_size <= devsize + && strcmp(esize, "0001f000") != 0) + { ++/* //M + if (strcmp(name, "\"rootfs\"") == 0 + || strcmp(name, "\"rootfs2\"") == 0) ++*/ ++ if (strcmp(name, "\"rootfs\"") == 0) + { + if (rootfs_filename[0] != '\0') + my_printf(" -> %s <- User selected!!\n", rootfs_filename); +@@ -382,9 +390,13 @@ int read_mtd_file() + } + } + // auto kernel ++/* //M + else if (!user_kernel + && (strcmp(name, "\"kernel\"") == 0 + || strcmp(name, "\"nkernel\"") == 0)) ++*/ ++ else if (!user_kernel ++ && (strcmp(name, "\"kernel\"") == 0)) + { + if (found_kernel_device) + { +@@ -606,9 +618,9 @@ int check_neutrino_stopped() + my_printf("Checking Neutrino is running...\n"); + while (time < max_time && neutrino_found) + { +-// neutrino_found = exec_ps(); ++ //M neutrino_found = exec_ps(); //FIXME + +- system("init 4"); ++ //M + system("killall start_neutrino 2>/dev/null"); + int ret = system("pidof neutrino >/dev/null"); + if (ret == 0) +@@ -727,24 +739,32 @@ int umount_rootfs(int steps) + // create directories + ret += chdir("/newroot"); + ret += mkdir("/newroot/bin", 777); ++ ret += mkdir("/newroot/boot", 777); //M + ret += mkdir("/newroot/dev", 777); + ret += mkdir("/newroot/etc", 777); + ret += mkdir("/newroot/dev/pts", 777); + ret += mkdir("/newroot/lib", 777); + ret += mkdir("/newroot/media", 777); +- ret += mkdir("/newroot/mnt", 777); ++ ret += mkdir("/newroot/mnt", 777); //M + ret += mkdir("/newroot/oldroot", 777); + ret += mkdir("/newroot/oldroot_remount", 777); + ret += mkdir("/newroot/proc", 777); + ret += mkdir("/newroot/run", 777); + ret += mkdir("/newroot/sbin", 777); ++ ret += mkdir("/newroot/srv", 777); //M + ret += mkdir("/newroot/sys", 777); +- ret += mkdir("/newroot/tmp", 777); ++ ret += mkdir("/newroot/tmp", 777); //M ++/* //M + ret += mkdir("/newroot/usr", 777); + ret += mkdir("/newroot/usr/lib", 777); + ret += mkdir("/newroot/usr/lib/autofs", 777); ++*/ + ret += mkdir("/newroot/var", 777); +- ret += mkdir("/newroot/var/volatile", 777); ++ ret += mkdir("/newroot/var/lib", 777); //NI ++ ret += mkdir("/newroot/var/lib/nfs", 777); //NI ++ ret += mkdir("/newroot/var/samba", 777); //NI ++ ++//M ret += mkdir("/newroot/var/volatile", 777); + + #if 0 + if (multilib) +@@ -880,7 +900,9 @@ int umount_rootfs(int steps) + { + my_printf("Error Neutrino can't be stopped! Abort flashing.\n"); + set_error_text("Error neutrino can't be stopped! Abort flashing."); ++/* //M + ret = system("init 3"); ++*/ + return 0; + } + +@@ -899,20 +921,28 @@ int umount_rootfs(int steps) + my_printf("Error executing pivot_root!\n"); + set_error_text("Error pivot_root! Abort flashing."); + sleep(5); ++/* //M + ret = system("init 3"); ++*/ + return 0; + } + + ret = chdir("/"); + // move mounts to new root + ret = mount("/oldroot/dev/", "dev/", NULL, MS_MOVE, NULL); ++ ret = mount("/oldroot/boot/", "boot/", NULL, MS_MOVE, NULL); //NI + ret += mount("/oldroot/proc/", "proc/", NULL, MS_MOVE, NULL); + ret += mount("/oldroot/sys/", "sys/", NULL, MS_MOVE, NULL); + ret += mount("/oldroot/mnt/", "mnt/", NULL, MS_MOVE, NULL); + ret += mount("/oldroot/tmp/", "tmp/", NULL, MS_MOVE, NULL); ++ ret += mount("/oldroot/tmp/", "tmp/", NULL, MS_MOVE, NULL); //NI ++ ret += mount("/oldroot/var/lib/nfs/", "var/lib/nfs/", NULL, MS_MOVE, NULL); //NI ++ ret += mount("/oldroot/var/samba/", "var/samba/", NULL, MS_MOVE, NULL); //NI ++/* //M + ret += mount("/oldroot/var/volatile", "var/volatile/", NULL, MS_MOVE, NULL); + // create link for tmp + ret += symlink("/var/volatile/tmp", "/tmp"); ++*/ + if (ret != 0) + { + my_printf("Error move mounts to newroot\n"); +@@ -952,6 +982,8 @@ int umount_rootfs(int steps) + // create link for mount/umount for autofs + ret = symlink("/bin/busybox", "/bin/mount"); + ret += symlink("/bin/busybox", "/bin/umount"); ++ ret += symlink("/bin/busybox", "/bin/sh"); //M ++ ret += symlink("/bin/busybox", "/sbin/init"); //M + + #if 0 + // try to restart autofs +@@ -1193,7 +1225,7 @@ void find_kernel_rootfs_device() + + if (((current_rootfs_sub_dir[0] == '\0' && strcmp(rootfs_device, current_rootfs_device) != 0) || + ( current_rootfs_sub_dir[0] != '\0' && strcmp(current_rootfs_sub_dir, rootfs_sub_dir) != 0 ) +- ) && !force_e2_stop ++ ) && !force_neutrino_stop + ) + { + stop_neutrino_needed = 0; +@@ -1426,6 +1458,7 @@ int main(int argc, char *argv[]) + // stop autofs + ret = system("/etc/init.d/autofs stop"); + #endif ++ ret = system("/etc/init.d/rcK"); + // ignore return values, because the processes might not run + } + diff --git a/archive-patches/ofgwrite-reactivate-correct-input-to-make-ofgwrite-visible-again.patch b/archive-patches/ofgwrite-reactivate-correct-input-to-make-ofgwrite-visible-again.patch deleted file mode 100644 index 31788d2..0000000 --- a/archive-patches/ofgwrite-reactivate-correct-input-to-make-ofgwrite-visible-again.patch +++ /dev/null @@ -1,128 +0,0 @@ ---- a/ofgwrite.c -+++ b/ofgwrite.c -@@ -553,7 +553,9 @@ - int max_time = 70; - int neutrino_found = 1; - -+ if (!stop_neutrino_needed) // M - set_step_progress(0); -+ - if (!quiet) - my_printf("Checking Neutrino is running...\n"); - while (time < max_time && neutrino_found) -@@ -580,11 +582,26 @@ - if (!quiet) - my_printf("Neutrino still running\n"); - } -+ if (!stop_neutrino_needed) // M - set_step_progress(time * 100 / max_time); - } - - if (neutrino_found) - return 0; -+ else -+ { -+ /* -+ Reactivate correct input to make ofgrite visible again. -+ libstb-hal set input to "aux" when cVideo is deleted. -+ */ -+ FILE *f; -+ f = fopen("/proc/stb/avs/0/input","w"); -+ if (f != NULL) -+ { -+ fputs("encoder", f); -+ fclose(f); -+ } -+ } - - return 1; - } -@@ -657,6 +674,7 @@ - // create directories - ret += chdir("/newroot"); - ret += mkdir("/newroot/bin", 777); -+ ret += mkdir("/newroot/boot", 777); - ret += mkdir("/newroot/dev", 777); - ret += mkdir("/newroot/etc", 777); - ret += mkdir("/newroot/dev/pts", 777); -@@ -670,9 +688,13 @@ - ret += mkdir("/newroot/sys", 777); - ret += mkdir("/newroot/tmp", 777); - ret += mkdir("/newroot/usr", 777); -+/* - ret += mkdir("/newroot/usr/lib", 777); - ret += mkdir("/newroot/usr/lib/autofs", 777); -+*/ - ret += mkdir("/newroot/var", 777); -+ ret += mkdir("/newroot/var/lib", 777); -+ ret += mkdir("/newroot/var/lib/nfs", 777); - if (ret != 0) - { - my_printf("Error creating necessary directories\n"); -@@ -725,6 +747,7 @@ - - // it can take several seconds until Neutrino is shut down - // wait because otherwise remounting read only is not possible -+#if 0 // M - set_step("Wait until Neutrino is stopped"); - if (!check_neutrino_stopped()) - { -@@ -735,8 +758,10 @@ - #endif - return 0; - } -+#endif // M - show_main_window(1, ofgwrite_version); - set_overall_text("Flashing image"); -+ if (stop_neutrino_needed) // M - set_step_without_incr("Wait until Neutrino is stopped"); - sleep(2); - -@@ -1117,7 +1142,18 @@ - my_printf(", because rootfs type is unknown\n"); - return EXIT_FAILURE; - } -- -+// M -+ if (stop_neutrino_needed) -+ { -+ set_step("Wait until Neutrino is stopped"); -+ if (!check_neutrino_stopped()) -+ { -+ my_printf("Error Neutrino can't be stopped! Abort flashing.\n"); -+ set_error_text("Error Neutrino can't be stopped! Abort flashing."); -+ return EXIT_FAILURE; -+ } -+ } -+// M - if (flash_kernel && !flash_rootfs) // flash only kernel - { - if (!quiet) -@@ -1142,7 +1178,10 @@ - { - my_printf("failed. System won't boot. Please flash backup!\n"); - set_error_text1("Error flashing kernel. System won't boot!"); -- set_error_text2("Please flash backup! Go back to Neutrino in 60 sec"); -+// M -+// set_error_text2("Please flash backup! Go back to Neutrino in 60 sec"); -+ set_error_text2("Please flash backup! Go back to prompt in 60 sec"); -+// M - sleep(60); - } - closelog(); -@@ -1199,6 +1238,7 @@ - // stop autofs - ret = system("/etc/init.d/autofs stop"); - #endif -+ ret = system("/etc/init.d/rcK"); // M - // ignore return values, because the processes might not run - } - -@@ -1313,6 +1353,7 @@ - sleep(3); - if (!no_write && stop_neutrino_needed) - { -+ set_step_progress(100); // M - my_printf("Rebooting in 3 seconds...\n"); - set_step("Successfully flashed! Rebooting in 3 seconds..."); - sleep(3); diff --git a/archive-patches/ofgwrite.patch b/archive-patches/ofgwrite.patch index 0bf9ee2..2accfd6 100644 --- a/archive-patches/ofgwrite.patch +++ b/archive-patches/ofgwrite.patch @@ -1,9 +1,11 @@ ---- a/ofgwrite 2017-12-27 12:04:51.000000000 +0100 -+++ b/ofgwrite 2018-03-29 21:48:23.425887268 +0200 -@@ -5,5 +5,5 @@ - if [ -e /tmp/backup_flash.tar.gz ]; then - mv /tmp/backup_flash.tar.gz /newroot/ +--- a/ofgwrite ++++ b/ofgwrite +@@ -12,7 +12,7 @@ if [ -e /tmp/backup_flash.tar.gz ]; then fi + + echo "Copying ofgwrite_bin to /newroot" -cp /usr/bin/ofgwrite_bin /newroot/ +cp /bin/ofgwrite_bin /newroot/ + + echo "Calling /newroot/ofgwrite_bin $@" /newroot/ofgwrite_bin "$@" diff --git a/make/applications.mk b/make/applications.mk index bca89d3..616cdd6 100755 --- a/make/applications.mk +++ b/make/applications.mk @@ -897,13 +897,13 @@ $(D)/ofgwrite: $(ARCHIVE)/ofgwrite-git-$(OFGWRITE_VER).tar.bz2 | $(TARGETPREFIX) $(UNTAR)/ofgwrite-git-$(OFGWRITE_VER).tar.bz2 set -e; cd $(BUILD_TMP)/ofgwrite-git-$(OFGWRITE_VER); \ $(PATCH)/ofgwrite.patch; \ - $(PATCH)/ofgwrite-reactivate-correct-input-to-make-ofgwrite-visible-again.patch; \ + $(PATCH)/ofgwrite-neutrino.patch; \ export CC=$(TARGET)-gcc && \ export AR=$(TARGET)-ar && \ $(BUILDENV); \ $(MAKE); \ install -m 755 $(BUILD_TMP)/ofgwrite-git-$(OFGWRITE_VER)/ofgwrite_bin $(TARGETPREFIX)/bin - install -m 755 $(BUILD_TMP)/ofgwrite-git-$(OFGWRITE_VER)/ofgwrite_tgz $(TARGETPREFIX)/bin + install -m 755 $(BUILD_TMP)/ofgwrite-git-$(OFGWRITE_VER)/ofgwrite_caller $(TARGETPREFIX)/bin install -m 755 $(BUILD_TMP)/ofgwrite-git-$(OFGWRITE_VER)/ofgwrite $(TARGETPREFIX)/bin $(REMOVE)/ofgwrite-git-$(OFGWRITE_VER) $(TOUCH) diff --git a/make/archives.mk b/make/archives.mk index 62d09b4..803af5b 100755 --- a/make/archives.mk +++ b/make/archives.mk @@ -361,7 +361,7 @@ $(ARCHIVE)/tzdata$(TZ_VER).tar.gz: $(WGET) ftp://ftp.iana.org/tz/releases/tzdata$(TZ_VER).tar.gz $(ARCHIVE)/ofgwrite-git-$(OFGWRITE_VER).tar.bz2: - get-git-archive.sh https://github.com/Duckbox-Developers/ofgwrite-ddt.git $(OFGWRITE_VER) $(notdir $@) $(ARCHIVE) + get-git-archive.sh https://bitbucket.org/max_10/ofgwrite-nmp.git $(OFGWRITE_VER) $(notdir $@) $(ARCHIVE) $(ARCHIVE)/u-boot-$(U-BOOT_VER).tar.bz2: $(WGET) ftp://ftp.denx.de/pub/u-boot/u-boot-$(U-BOOT_VER).tar.bz2 diff --git a/make/versions.mk b/make/versions.mk index cccde42..f0ebad1 100644 --- a/make/versions.mk +++ b/make/versions.mk @@ -183,7 +183,7 @@ NTFS_3G_VER=2016.2.22 NTP_VER=4.2.8p6 # ofgwrite from Betacentauri: Based upon: mtd-utils-native-1.5.1 and busybox 1.24.1 -OFGWRITE_VER = b7808ce +OFGWRITE_VER = b2823ee # openssl; toolkit for the SSL v2/v3 and TLS v1 protocol OPENSSL_VER=1.0.2