summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/build-info.pl23
-rw-r--r--tools/builds.pm132
-rwxr-xr-xtools/buildzip.pl1
-rwxr-xr-xtools/configure40
-rwxr-xr-xtools/genlang54
-rwxr-xr-xtools/hibyos_nativepatcher/hibyos_nativepatcher.sh221
-rwxr-xr-xtools/hibyos_nativepatcher/patch_manifest.pl27
-rwxr-xr-xtools/release/manuals.pl4
-rwxr-xr-xtools/release/voices.pl13
-rwxr-xr-xtools/rockboxdev.sh8
-rwxr-xr-xtools/updatelang21
-rwxr-xr-xtools/voice.pl40
-rwxr-xr-xtools/xduoox3-updatebl.sh5
13 files changed, 473 insertions, 116 deletions
diff --git a/tools/build-info.pl b/tools/build-info.pl
index e4222643a1..fb89a80441 100755
--- a/tools/build-info.pl
+++ b/tools/build-info.pl
@@ -23,16 +23,29 @@ foreach my $b (&stablebuilds) {
23 my $ver; 23 my $ver;
24 if(exists($builds{$b}{release})) { 24 if(exists($builds{$b}{release})) {
25 $ver = $builds{$b}{release}; 25 $ver = $builds{$b}{release};
26 } 26 } else {
27 else {
28 $ver = $publicrelease; 27 $ver = $publicrelease;
29 } 28 }
30# print "$b=$ver,$baseurl/release/$ver/rockbox-$b-$ver.zip\n"; 29 if ($ver <= $publicrelease) {
31 print "$b=$ver\n"; 30 print "$b=$ver\n";
31 }
32} 32}
33 33
34print "[status]\n"; 34print "[status]\n";
35 35
36foreach my $b (&allbuilds) { 36foreach my $b (&allbuilds) {
37 print "$b=$builds{$b}{status}\n"; 37 my $ver;
38 my $status = $builds{$b}{status};
39
40 if(exists($builds{$b}{release})) {
41 $ver = $builds{$b}{release};
42 } else {
43 $ver = $publicrelease;
44 }
45 if ($ver > $publicrelease) {
46 $status=2;
47 }
48 print "$b=$status\n";
38} 49}
50
51print "\n";
diff --git a/tools/builds.pm b/tools/builds.pm
index 75d34dc079..0b7c768888 100644
--- a/tools/builds.pm
+++ b/tools/builds.pm
@@ -16,7 +16,7 @@ $releasenotes="/wiki/ReleaseNotes315";
16# icon => 'modelname3', # optional (uses modelname3's icon) 16# icon => 'modelname3', # optional (uses modelname3's icon)
17# voice => 'modelname4' # optional (uses modelname4's voice) 17# voice => 'modelname4' # optional (uses modelname4's voice)
18# release => '3.14', # optional (final release version, if different from above) 18# release => '3.14', # optional (final release version, if different from above)
19# manualok => 1, # optional (builds manual even if target is not stable) 19# manualok => 1, # optional (defaults 1 for status 3 and 0 for rest)
20# } 20# }
21 21
22%builds = ( 22%builds = (
@@ -71,10 +71,12 @@ $releasenotes="/wiki/ReleaseNotes315";
71 }, 71 },
72 'gogearhdd1630' => { 72 'gogearhdd1630' => {
73 name => 'Philips GoGear HDD1630', 73 name => 'Philips GoGear HDD1630',
74 manualok => 0,
74 status => 3, 75 status => 3,
75 }, 76 },
76 'gogearhdd6330' => { 77 'gogearhdd6330' => {
77 name => 'Philips GoGear HDD6330', 78 name => 'Philips GoGear HDD6330',
79 manualok => 0,
78 status => 3, 80 status => 3,
79 }, 81 },
80 'gogearsa9200' => { 82 'gogearsa9200' => {
@@ -369,6 +371,7 @@ $releasenotes="/wiki/ReleaseNotes315";
369 'creativezenxfi3' => { 371 'creativezenxfi3' => {
370 name => 'Creative Zen X-Fi3', 372 name => 'Creative Zen X-Fi3',
371 status => 3, 373 status => 3,
374 manualok => 0,
372 }, 375 },
373 'sonynwze350' => { 376 'sonynwze350' => {
374 name => 'Sony NWZ-E350', 377 name => 'Sony NWZ-E350',
@@ -378,10 +381,12 @@ $releasenotes="/wiki/ReleaseNotes315";
378 'sonynwze360' => { 381 'sonynwze360' => {
379 name => 'Sony NWZ-E360', 382 name => 'Sony NWZ-E360',
380 status => 3, 383 status => 3,
384 manualok => 0,
381 }, 385 },
382 'sonynwze370' => { 386 'sonynwze370' => {
383 name => 'Sony NWZ-E370/E380', 387 name => 'Sony NWZ-E370/E380',
384 status => 3, 388 status => 3,
389 manualok => 0,
385 }, 390 },
386 'sonynwze450' => { 391 'sonynwze450' => {
387 name => 'Sony NWZ-E450', 392 name => 'Sony NWZ-E450',
@@ -424,11 +429,13 @@ $releasenotes="/wiki/ReleaseNotes315";
424 }, 429 },
425 'creativezenxfi' => { 430 'creativezenxfi' => {
426 name => 'Creative Zen X-Fi', 431 name => 'Creative Zen X-Fi',
427 status => 3 432 status => 3,
433 manualok => 0,
428 }, 434 },
429 'creativezenxfistyle' => { 435 'creativezenxfistyle' => {
430 name => 'Creative Zen X-Fi Style', 436 name => 'Creative Zen X-Fi Style',
431 status => 3 437 status => 3,
438 manualok => 0,
432 }, 439 },
433 'creativezen' => { 440 'creativezen' => {
434 name => 'Creative Zen', 441 name => 'Creative Zen',
@@ -436,24 +443,30 @@ $releasenotes="/wiki/ReleaseNotes315";
436 }, 443 },
437 'creativezenmozaic' => { 444 'creativezenmozaic' => {
438 name => 'Creative Zen Mozaic', 445 name => 'Creative Zen Mozaic',
439 status => 3 446 status => 3,
447 manualok => 0,
440 }, 448 },
441 'agptekrocker' => { 449 'agptekrocker' => {
442 name => 'Agptek Rocker', 450 name => 'Agptek Rocker',
443 status => 2, 451 status => 3,
444 manualok => 1, # Remove once status moves to 3 452 release => '4.0', # Remove once 4.0 lands
445 }, 453 },
446 'xduoox3' => { 454 'xduoox3' => {
447 name => 'xDuoo X3', 455 name => 'xDuoo X3',
448 status => 3, 456 status => 3,
457 release => '4.0', # Remove once 4.0 lands
449 }, 458 },
450 'xduoox3ii' => { 459 'xduoox3ii' => {
451 name => 'xDuoo X3ii', 460 name => 'xDuoo X3ii',
452 status => 2, 461 manualok => 0, # Remove when manual is written
462 status => 3,
463 release => '4.0', # Remove once 4.0 lands
453 }, 464 },
454 'xduoox20' => { 465 'xduoox20' => {
455 name => 'xDuoo X20', 466 name => 'xDuoo X20',
456 status => 2, 467 manualok => 0, # Remove when manual is written
468 status => 3,
469 release => '4.0', # Remove once 4.0 lands
457 }, 470 },
458 'fiiom3klinux' => { 471 'fiiom3klinux' => {
459 name => 'FiiO M3K (Linux)', 472 name => 'FiiO M3K (Linux)',
@@ -461,16 +474,17 @@ $releasenotes="/wiki/ReleaseNotes315";
461 }, 474 },
462 'fiiom3k' => { 475 'fiiom3k' => {
463 name => 'FiiO M3K', 476 name => 'FiiO M3K',
464 status => 2, 477 status => 3,
465 manualok => 1, # Remove once status moves to 3 478 release => '4.0', # Remove once 4.0 lands
466 }, 479 },
467 'aigoerosq' => { 480 'aigoerosq' => {
468 name => 'AIGO EROS Q / K (Hosted)', 481 name => 'AIGO EROS Q / K (Hosted)',
469 status => 2, 482 status => 2, # Do we promote this to stable?
470 }, 483 },
471 'erosqnative' => { 484 'erosqnative' => {
472 name => 'AIGO EROS Q / K (Native)', 485 name => 'AIGO EROS Q / K (Native)',
473 status => 2, 486 status => 3,
487 release => '4.0', # Remove once 4.0 lands
474 }, 488 },
475 'ihifi770' => { 489 'ihifi770' => {
476 name => 'Xuelin iHIFI 770', 490 name => 'Xuelin iHIFI 770',
@@ -486,8 +500,8 @@ $releasenotes="/wiki/ReleaseNotes315";
486 }, 500 },
487 'shanlingq1' => { 501 'shanlingq1' => {
488 name => 'Shanling Q1', 502 name => 'Shanling Q1',
489 status => 2, 503 status => 3,
490 manualok => 1, # Remove once status moves to 3 504 release => '4.0', # Remove once 4.0 lands
491 }, 505 },
492); 506);
493 507
@@ -511,7 +525,18 @@ sub usablebuilds {
511 my @list; 525 my @list;
512 526
513 for my $b (sort byname keys %builds) { 527 for my $b (sort byname keys %builds) {
514 push @list, $b if ($builds{$b}{status} >= 2 || defined($builds{$b}{manualok})); 528 push @list, $b if ($builds{$b}{status} >= 2);
529 }
530
531 return @list;
532}
533
534sub manualbuilds {
535 my @list;
536
537 for my $b (sort byname keys %builds) {
538 push @list, $b if (($builds{$b}{status} > 2 && !defined($builds{$b}{manualok})) ||
539 (defined($builds{$b}{manualok}) && ($builds{$b}{manualok} > 0)));
515 } 540 }
516 541
517 return @list; 542 return @list;
@@ -572,21 +597,45 @@ sub simbuilds {
572 'lang' => 'english', 597 'lang' => 'english',
573 'name' => 'UK English', 598 'name' => 'UK English',
574 'short' => 'en-gb', 599 'short' => 'en-gb',
575 'defengine' => 'espeak', 600 'defengine' => 'piper',
576 'engines' => { 601 'engines' => {
577 'festival' => '--language english', 602 'festival' => '--language english',
578 'espeak' => '-ven-gb -k 5', 603 'espeak' => '-ven-gb -k 5',
579 'gtts' => '-l en -t co.uk', 604 'gtts' => '-l en -t co.uk',
580 'piper' => 'en_GB-cori-high.onnx', 605 'piper' => 'en_GB-semaine-medium.onnx',
581 }, 606 },
582 'enabled' => 1, 607 'enabled' => 1,
583 }, 608 },
584 # Everything else in alphabetical order 609 # Everything else in alphabetical order
610 'bulgarian' => {
611 'lang' => 'bulgarian',
612 'name' => 'Български (Bulgarian)',
613 'short' => 'bg',
614 'defengine' => 'espeak', # XXX Switch to gtts when buildserver is updated
615 'engines' => {
616 'espeak' => '-vbg',
617 'gtts' => '-l bg',
618 # No piper voice yet.
619 },
620 'enabled' => 1,
621 },
622 'chinese-simp' => { # Mandarin?
623 'lang' => 'chinese-simp',
624 'name' => '简体中文 (Chinese Simplified)',
625 'short' => 'zh_cn',
626 'defengine' => 'piper',
627 'engines' => {
628 'espeak' => '-vzh',
629 'gtts' => '-l zh',
630 'piper' => 'zh_CN-huayan-medium.onnx',
631 },
632 'enabled' => 1,
633 },
585 'czech' => { 634 'czech' => {
586 'lang' => 'czech', 635 'lang' => 'czech',
587 'name' => 'Čeština (Czech)', 636 'name' => 'Čeština (Czech)',
588 'short' => 'cs', 637 'short' => 'cs',
589 'defengine' => 'espeak', 638 'defengine' => 'piper',
590 'engines' => { 639 'engines' => {
591 'espeak' => '-vcs', 640 'espeak' => '-vcs',
592 'gtts' => '-l cs', 641 'gtts' => '-l cs',
@@ -598,7 +647,7 @@ sub simbuilds {
598 'lang' => 'dansk', 647 'lang' => 'dansk',
599 'name' => 'Dansk (Danish)', 648 'name' => 'Dansk (Danish)',
600 'short' => 'da', 649 'short' => 'da',
601 'defengine' => 'espeak', 650 'defengine' => 'piper',
602 'engines' => { 651 'engines' => {
603 'espeak' => '-vda', 652 'espeak' => '-vda',
604 'gtts' => '-l da', 653 'gtts' => '-l da',
@@ -610,7 +659,7 @@ sub simbuilds {
610 'lang' => 'deutsch', 659 'lang' => 'deutsch',
611 'name' => 'Deutsch (German)', 660 'name' => 'Deutsch (German)',
612 'short' => 'de', 661 'short' => 'de',
613 'defengine' => 'espeak', 662 'defengine' => 'piper',
614 'engines' => { 663 'engines' => {
615 'espeak' => '-vde', 664 'espeak' => '-vde',
616 'gtts' => '-l de', 665 'gtts' => '-l de',
@@ -634,7 +683,7 @@ sub simbuilds {
634 'lang' => 'english-us', 683 'lang' => 'english-us',
635 'name' => 'American English', 684 'name' => 'American English',
636 'short' => 'en-us', 685 'short' => 'en-us',
637 'defengine' => 'espeak', 686 'defengine' => 'piper',
638 'engines' => { 687 'engines' => {
639 'festival' => '--language english', 688 'festival' => '--language english',
640 'espeak' => '-ven-us -k 5', 689 'espeak' => '-ven-us -k 5',
@@ -647,7 +696,7 @@ sub simbuilds {
647 'lang' => 'espanol', 696 'lang' => 'espanol',
648 'name' => 'Spanish (Peninsular)', 697 'name' => 'Spanish (Peninsular)',
649 'short' => 'es-es', 698 'short' => 'es-es',
650 'defengine' => 'espeak', 699 'defengine' => 'piper',
651 'engines' => { 700 'engines' => {
652 'festival' => '--language spanish', 701 'festival' => '--language spanish',
653 'espeak' => '-ves -k 5', 702 'espeak' => '-ves -k 5',
@@ -672,7 +721,7 @@ sub simbuilds {
672 'lang' => 'francais', 721 'lang' => 'francais',
673 'name' => 'Français (French)', 722 'name' => 'Français (French)',
674 'short' => 'fr', 723 'short' => 'fr',
675 'defengine' => 'espeak', 724 'defengine' => 'piper',
676 'engines' => { 725 'engines' => {
677 'espeak' => '-vfr-fr', 726 'espeak' => '-vfr-fr',
678 'gtts' => '-l fr', 727 'gtts' => '-l fr',
@@ -684,7 +733,7 @@ sub simbuilds {
684 'lang' => 'greek', 733 'lang' => 'greek',
685 'name' => 'Ελληνικά (Greek)', 734 'name' => 'Ελληνικά (Greek)',
686 'short' => 'el', 735 'short' => 'el',
687 'defengine' => 'espeak', 736 'defengine' => 'piper',
688 'engines' => { 737 'engines' => {
689 'espeak' => '-vel', 738 'espeak' => '-vel',
690 'gtts' => '-l el', 739 'gtts' => '-l el',
@@ -696,7 +745,7 @@ sub simbuilds {
696 'lang' => 'italiano', 745 'lang' => 'italiano',
697 'name' => 'Italiano (Italian)', 746 'name' => 'Italiano (Italian)',
698 'short' => 'it', 747 'short' => 'it',
699 'defengine' => 'espeak', 748 'defengine' => 'piper',
700 'engines' => { 749 'engines' => {
701 'espeak' => '-vit', 750 'espeak' => '-vit',
702 'gtts' => '-l it', 751 'gtts' => '-l it',
@@ -704,11 +753,22 @@ sub simbuilds {
704 }, 753 },
705 'enabled' => 1, 754 'enabled' => 1,
706 }, 755 },
756 'korean' => { #
757 'lang' => 'korean',
758 'name' => '한국어 (Korean)',
759 'short' => 'ko',
760 'defengine' => 'espeak',
761 'engines' => {
762 'espeak' => '-vko',
763 'gtts' => '-l ko',
764 },
765 'enabled' => 1,
766 },
707 'nederlands' => { 767 'nederlands' => {
708 'lang' => 'nederlands', 768 'lang' => 'nederlands',
709 'name' => 'Nederlands (Dutch)', 769 'name' => 'Nederlands (Dutch)',
710 'short' => 'nl', 770 'short' => 'nl',
711 'defengine' => 'espeak', 771 'defengine' => 'piper',
712 'engines' => { 772 'engines' => {
713 'espeak' => '-vnl', 773 'espeak' => '-vnl',
714 'gtts' => '-l nl', 774 'gtts' => '-l nl',
@@ -720,7 +780,7 @@ sub simbuilds {
720 'lang' => 'norsk', 780 'lang' => 'norsk',
721 'name' => 'Norsk (Norwegian)', 781 'name' => 'Norsk (Norwegian)',
722 'short' => 'no', 782 'short' => 'no',
723 'defengine' => 'espeak', 783 'defengine' => 'piper',
724 'engines' => { 784 'engines' => {
725 'espeak' => '-vno', 785 'espeak' => '-vno',
726 'gtts' => '-l no', 786 'gtts' => '-l no',
@@ -732,7 +792,7 @@ sub simbuilds {
732 'lang' => 'polski', 792 'lang' => 'polski',
733 'name' => 'Polski (Polish)', 793 'name' => 'Polski (Polish)',
734 'short' => 'pl', 794 'short' => 'pl',
735 'defengine' => 'espeak', 795 'defengine' => 'piper',
736 'engines' => { 796 'engines' => {
737 'espeak' => '-vpl', 797 'espeak' => '-vpl',
738 'gtts' => '-l pl', 798 'gtts' => '-l pl',
@@ -744,7 +804,7 @@ sub simbuilds {
744 'lang' => 'russian', 804 'lang' => 'russian',
745 'name' => 'Русский (Russian)', 805 'name' => 'Русский (Russian)',
746 'short' => 'ru', 806 'short' => 'ru',
747 'defengine' => 'espeak', 807 'defengine' => 'piper',
748 'engines' => { 808 'engines' => {
749 'espeak' => '-vru', 809 'espeak' => '-vru',
750 'gtts' => '-l ru', 810 'gtts' => '-l ru',
@@ -768,7 +828,7 @@ sub simbuilds {
768 'lang' => 'srpski', 828 'lang' => 'srpski',
769 'name' => 'српски (Serbian)', 829 'name' => 'српски (Serbian)',
770 'short' => 'sr', 830 'short' => 'sr',
771 'defengine' => 'espeak', 831 'defengine' => 'piper',
772 'engines' => { 832 'engines' => {
773 'espeak' => '-vsr', 833 'espeak' => '-vsr',
774 'gtts' => '-l sr', 834 'gtts' => '-l sr',
@@ -780,7 +840,7 @@ sub simbuilds {
780 'lang' => 'svenska', 840 'lang' => 'svenska',
781 'name' => 'Svenska (Swedish)', 841 'name' => 'Svenska (Swedish)',
782 'short' => 'sr', 842 'short' => 'sr',
783 'defengine' => 'espeak', 843 'defengine' => 'piper',
784 'engines' => { 844 'engines' => {
785 'espeak' => '-vsv', 845 'espeak' => '-vsv',
786 'gtts' => '-l sv', 846 'gtts' => '-l sv',
@@ -792,7 +852,7 @@ sub simbuilds {
792 'lang' => 'turkce', 852 'lang' => 'turkce',
793 'name' => 'Türkçe (Turkish)', 853 'name' => 'Türkçe (Turkish)',
794 'short' => 'tr', 854 'short' => 'tr',
795 'defengine' => 'espeak', 855 'defengine' => 'piper',
796 'engines' => { 856 'engines' => {
797 'espeak' => '-vtr', 857 'espeak' => '-vtr',
798 'gtts' => '-l tr', 858 'gtts' => '-l tr',
@@ -802,14 +862,14 @@ sub simbuilds {
802 }, 862 },
803); 863);
804 864
805sub bylang { 865sub byshortname {
806 return uc $voices{$a}{lang} cmp uc $voices{$b}{lang}; 866 return uc $voices{$a}{short} cmp uc $voices{$b}{short};
807} 867}
808 868
809sub allvoices { 869sub allvoices {
810 my @list; 870 my @list;
811 871
812 for my $b (sort bylang keys %voices) { 872 for my $b (sort byshortname keys %voices) {
813 push @list, $b if (defined($voices{$b}->{enabled}) && $voices{$b}->{enabled}); 873 push @list, $b if (defined($voices{$b}->{enabled}) && $voices{$b}->{enabled});
814 } 874 }
815 875
@@ -820,7 +880,7 @@ sub voicesforlang($) {
820 my $l = shift @_; 880 my $l = shift @_;
821 my @list; 881 my @list;
822 882
823 for my $b (sort bylang keys %voices) { 883 for my $b (sort byshortname keys %voices) {
824 push @list, $b if ($voices{$b}{lang} eq $b && defined($voices{$b}->{enabled}) && $voices{$b}->{enabled}); 884 push @list, $b if ($voices{$b}{lang} eq $b && defined($voices{$b}->{enabled}) && $voices{$b}->{enabled});
825 } 885 }
826 886
diff --git a/tools/buildzip.pl b/tools/buildzip.pl
index fb26597290..12ca9de1d9 100755
--- a/tools/buildzip.pl
+++ b/tools/buildzip.pl
@@ -380,6 +380,7 @@ sub buildzip {
380 my $cmd = "$ROOT/tools/convbdf -f $ROOT/fonts/*bdf >/dev/null 2>&1"; 380 my $cmd = "$ROOT/tools/convbdf -f $ROOT/fonts/*bdf >/dev/null 2>&1";
381 print($cmd."\n") if $verbose; 381 print($cmd."\n") if $verbose;
382 system($cmd); 382 system($cmd);
383 copy("$ROOT/fonts/COPYING", "COPYING-fonts.txt");
383 chdir("../../"); 384 chdir("../../");
384 385
385 if($fonts < 2) { 386 if($fonts < 2) {
diff --git a/tools/configure b/tools/configure
index 35f4b6d107..43f119ae17 100755
--- a/tools/configure
+++ b/tools/configure
@@ -435,6 +435,9 @@ simcc () {
435 else 435 else
436 echo "Your sdl-config does not know about static libs, falling back to shared library" 436 echo "Your sdl-config does not know about static libs, falling back to shared library"
437 sdlldopts=$($sdl --libs) 437 sdlldopts=$($sdl --libs)
438# if [ "$win32crosscompile" = "yes" ] ; then
439 LDOPTS=`echo $LDOPTS | sed -e s/-static//`
440# fi
438 fi 441 fi
439 GCCOPTS="$GCCOPTS ${sdlccopts}" 442 GCCOPTS="$GCCOPTS ${sdlccopts}"
440 LDOPTS="$LDOPTS ${sdlldopts}" 443 LDOPTS="$LDOPTS ${sdlldopts}"
@@ -840,7 +843,7 @@ androidcc () {
840 endian="little" 843 endian="little"
841 gcctarget="i686-linux-android-" 844 gcctarget="i686-linux-android-"
842 echo "${make_toolchain} --toolchain=x86-${gccchoice} --platform=android-android-$ANDROID_PLATFORM_VERSION --install-dir=${pwd}/android-toolchain" 845 echo "${make_toolchain} --toolchain=x86-${gccchoice} --platform=android-android-$ANDROID_PLATFORM_VERSION --install-dir=${pwd}/android-toolchain"
843 ${make_toolchain} --toolchain=x86-${gccchoice} --platform=android-android-$ANDROID_PLATFORM_VERSION --install-dir=${pwd}/android-toolchain 846 ${make_toolchain} --toolchain=x86-${gccchoice} --platform=android-$ANDROID_PLATFORM_VERSION --install-dir=${pwd}/android-toolchain
844 if [ ${?} != 0 ]; then 847 if [ ${?} != 0 ]; then
845 exit 848 exit
846 fi 849 fi
@@ -1673,6 +1676,8 @@ cat <<EOF
1673 ==AIGO== 244) M3K Linux 1676 ==AIGO== 244) M3K Linux
1674 245) Eros Q / K 246) M3K baremetal ==Shanling== 1677 245) Eros Q / K 246) M3K baremetal ==Shanling==
1675 247) Eros Q / K native 260) Q1 1678 247) Eros Q / K native 260) Q1
1679 248) Eros Q / K native v3
1680 (GC9A01 LCD Controller)
1676EOF 1681EOF
1677 1682
1678 buildfor=`input`; 1683 buildfor=`input`;
@@ -4187,8 +4192,39 @@ fi
4187 t_cpu="mips" 4192 t_cpu="mips"
4188 t_manufacturer="ingenic_x1000" 4193 t_manufacturer="ingenic_x1000"
4189 t_model="erosqnative" 4194 t_model="erosqnative"
4195 # player version, for bootloader usage
4196 # versions 1 and 2 both use 1
4197 extradefines="$extradefines -DEROSQN_VER=1"
4190 ;; 4198 ;;
4191 4199
4200 248|erosqnative_v3)
4201 target_id=117
4202 modelname="erosqnative_v3"
4203 target="EROS_QN"
4204 memory=32
4205 mipsr2elcc
4206 appextra="recorder:gui"
4207 plugins="yes"
4208 tool="$rootdir/tools/scramble -add=erosqnative "
4209 boottool="$rootdir/tools/mkspl-x1000 -type=nand -ppb=2 -bpp=2 "
4210 output="rockbox.erosq"
4211 bootoutput="bootloader.erosq"
4212 sysfontbl="16-Terminus"
4213 # toolset is the tools within the tools directory that we build for
4214 # this particular target.
4215 toolset="$x1000tools"
4216 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
4217 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
4218 # architecture, manufacturer and model for the target-tree build
4219 t_cpu="mips"
4220 t_manufacturer="ingenic_x1000"
4221 t_model="erosqnative"
4222 # player version, for bootloader usage
4223 # version 3
4224 extradefines="$extradefines -DEROSQN_VER=3"
4225 ;;
4226
4227
4192 *) 4228 *)
4193 echo "Please select a supported target platform!" 4229 echo "Please select a supported target platform!"
4194 exit 7 4230 exit 7
@@ -4735,7 +4771,7 @@ cmdline=`echo $cmdline | sed -e s,--target=[a-zA-Z_0-9]\*,,g \
4735 -e s,--ram=[0-9]\*,,g \ 4771 -e s,--ram=[0-9]\*,,g \
4736 -e s,--rbdir=[./a-zA-Z0-9]\*,,g \ 4772 -e s,--rbdir=[./a-zA-Z0-9]\*,,g \
4737 -e s,--voice=[-_./a-zA-Z0-9]\*,,g \ 4773 -e s,--voice=[-_./a-zA-Z0-9]\*,,g \
4738 -e s,--type=[a-zA-Z]\*,,g` 4774 -e s,--type=[a-zA-Z0-9]\*,,g`
4739cmdline="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts" 4775cmdline="$cmdline --target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
4740 4776
4741### end of cmdline 4777### end of cmdline
diff --git a/tools/genlang b/tools/genlang
index 45f7bc82d9..6d0aa12528 100755
--- a/tools/genlang
+++ b/tools/genlang
@@ -21,14 +21,6 @@ my $LANGUAGE_FLAG_UNITS_FIRST = 0x02;
21my $HEADER_SIZE = 4; 21my $HEADER_SIZE = 4;
22my $SUBHEADER_SIZE = 6; 22my $SUBHEADER_SIZE = 6;
23 23
24# A note for future users and readers: The original v1 language system allowed
25# the build to create and use a different language than english built-in. We
26# removed that feature from our build-system, but the build scripts still had
27# the ability. But, starting now, this ability is no longer provided since I
28# figured it was boring and unnecessary to write support for now since we
29# don't use it anymore.
30
31
32if(!$ARGV[0]) { 24if(!$ARGV[0]) {
33 print <<MOO 25 print <<MOO
34Usage: genlang [options] <langv2 file> 26Usage: genlang [options] <langv2 file>
@@ -46,11 +38,7 @@ Usage: genlang [options] <langv2 file>
46 38
47 -e=<english lang file> 39 -e=<english lang file>
48 Point out the english (original source) file, to use that as master 40 Point out the english (original source) file, to use that as master
49 language template. Used in combination with -b, -u or -s. 41 language template. Used in combination with -b.
50
51 -s
52 Sort the Update language file in the same order as the strings in the
53 English file.
54 42
55 -t=<target> 43 -t=<target>
56 Specify which target you want the translations/phrases for. Required when 44 Specify which target you want the translations/phrases for. Required when
@@ -73,41 +61,26 @@ MOO
73 exit; 61 exit;
74} 62}
75 63
76# How update works:
77#
78# 1) scan the english file, keep the whole <phrase> for each phrase.
79# 2) read the translated file, for each end of phrase, compare:
80# A) all source strings, if there's any change there should be a comment about
81# it output
82# B) the desc fields
83#
84# 3) output the phrase with the comments from above
85# 4) check which phrases that the translated version didn't have, and spit out
86# the english version of those
87#
88
89my $prefix = $p; 64my $prefix = $p;
90my $binary = $b; 65my $binary = $b;
91my $sortfile = $s;
92my $binvoice = $c; 66my $binvoice = $c;
93 67
94my $english = $e; 68my $english = $e;
95my $voiceout = $o; 69my $voiceout = $o;
96 70
97my $check = ($binary?.5:0) + ($prefix?1:0) + ($voiceout?1:0) + ($sortfile?1:0) + ($binvoice?.5:0); 71my $check = ($binary?.5:0) + ($prefix?1:0) + ($voiceout?1:0) + ($binvoice?.5:0);
98 72
99if($check > 1) { 73if($check > 1) {
100 print STDERR "Please use only one of -p, -o, -b, -c and -s\n"; 74 print STDERR "Please use only one of -p, -o, -b, and -c\n";
101 exit; 75 exit;
102} 76}
103if(!$check) { 77if(!$check) {
104 print STDERR "Please use at least one of -p, -o, -c, -e and -s\n"; 78 print STDERR "Please use at least one of -p, -o, -c, and -e\n";
105 exit; 79 exit;
106} 80}
107 81
108 82if(($binary || $voiceout) && !$english) {
109if(($binary || $voiceout || $sortfile) && !$english) { 83 print STDERR "Please use -e too when you use -b, or -o\n";
110 print STDERR "Please use -e too when you use -b, -o, -u or -s\n";
111 exit; 84 exit;
112} 85}
113 86
@@ -118,7 +91,7 @@ if($binary && !$target_id) {
118} 91}
119 92
120my $target = $t; 93my $target = $t;
121if(!$target && !$sortfile) { 94if(!$target) {
122 print STDERR "Please specify a target (with -t)!\n"; 95 print STDERR "Please specify a target (with -t)!\n";
123 exit; 96 exit;
124} 97}
@@ -234,9 +207,8 @@ if($english) {
234} 207}
235 208
236sub readenglish { 209sub readenglish {
237 # For the cases where the english file needs to be scanned/read, we do 210 # For the cases where the english file needs to be scanned/read, we must
238 # it before we read the translated file. For -b it isn't necessary, but for 211 # do it before we read the translated file.
239 # -u it is convenient.
240 212
241 my @idnum = ((0)); # start with a true number 213 my @idnum = ((0)); # start with a true number
242 my @vidnum = ((0x8000)); # first voice id 214 my @vidnum = ((0x8000)); # first voice id
@@ -318,7 +290,7 @@ sub readenglish {
318 elsif($withindest && ($_ =~ / *([^:]+): *(.*)/)) { 290 elsif($withindest && ($_ =~ / *([^:]+): *(.*)/)) {
319 my ($name, $val)=($1, $2); 291 my ($name, $val)=($1, $2);
320 $dest=""; # in case it is left untouched for when the 292 $dest=""; # in case it is left untouched for when the
321 # model name isn't "our" 293 # model name isn't "ours"
322 dest($_, $name, $val); 294 dest($_, $name, $val);
323 295
324 if($dest) { 296 if($dest) {
@@ -358,7 +330,6 @@ for (keys %users) {
358 330
359open(LANG, "<$input") || die "Error: couldn't read language file named $input\n"; 331open(LANG, "<$input") || die "Error: couldn't read language file named $input\n";
360my @phrase; 332my @phrase;
361my $header = 1;
362my $langoptions = 0; 333my $langoptions = 0;
363 334
364while(<LANG>) { 335while(<LANG>) {
@@ -376,13 +347,8 @@ while(<LANG>) {
376 if ($_ =~ /LANGUAGE_UNITS_FIRST/) { 347 if ($_ =~ /LANGUAGE_UNITS_FIRST/) {
377 $langoptions |= $LANGUAGE_FLAG_UNITS_FIRST; 348 $langoptions |= $LANGUAGE_FLAG_UNITS_FIRST;
378 } 349 }
379
380 if ($header and $sortfile) {
381 print($_);
382 }
383 next; 350 next;
384 } 351 }
385 $header = 0;
386 352
387 my $ll = $_; 353 my $ll = $_;
388 354
diff --git a/tools/hibyos_nativepatcher/hibyos_nativepatcher.sh b/tools/hibyos_nativepatcher/hibyos_nativepatcher.sh
new file mode 100755
index 0000000000..3c6661863f
--- /dev/null
+++ b/tools/hibyos_nativepatcher/hibyos_nativepatcher.sh
@@ -0,0 +1,221 @@
1#!/bin/bash
2# hibyos_nativepatcher.sh
3#
4# NOTE: THIS SCRIPT IS NOT TOLERANT OF WHITESPACE IN FILENAMES OR PATHS
5
6usage="hibyos_nativepatcher.sh
7
8 USAGE:
9
10 hibyos_nativepatcher.sh <mkrbinstall/mkstockuboot> [arguments depend on mode, see below]
11
12 hibyos_nativepatcher.sh mkrbinstall <OFVERNAME (erosq or eros_h2)>
13 <path/to/output> <path/to/bootloader.erosq> <HWVER (hw1hw2 or hw3)>
14 Output file will be path/to/output/erosqnative_RBVER-HWVER-OFVERNAME.upt.
15 Only the Hifiwalker H2 v1.3 uses "eros_h2", everything else uses "erosq".
16
17 hibyos_nativepatcher.sh mkstockuboot <path/to/OFupdatefile.upt>
18 Output file will be path/to/OFupdatefile-rbuninstall.upt.
19
20 NOTE: THIS SCRIPT IS NOT TOLERANT OF WHITESPACE IN FILENAMES OR PATHS!"
21
22# check OS type and for any needed tools
23if [[ "$OSTYPE" == "darwin"* ]]; then
24 echo "$OSTYPE DETECTED"
25elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
26 echo "$OSTYPE DETECTED"
27 if !(which 7z > /dev/null); then
28 echo "PLEASE INSTALL 7z (usually part of p7zip-full package)"
29 exit 1
30 fi
31 if !(which genisoimage > /dev/null); then
32 echo "PLEASE INSTALL genisoimage"
33 exit 1
34 fi
35else
36 echo "SCRIPT NOT IMPLEMENTED ON $OSTYPE YET!"
37 exit 1
38fi
39
40# make sure we can find patch_manifest
41SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
42if !(which $SCRIPT_DIR/patch_manifest.pl > /dev/null); then
43 echo "couldn't find patch_manifest.pl!"
44 exit 1
45fi
46
47###########################################################################
48# MKRBINSTALL
49###########################################################################
50if [[ "$1" == "mkrbinstall" ]]; then
51 echo "Creating installation image from bootloader file..."
52
53 # make sure all arguments are accounted for...
54 if [[ -z "$5" ]]; then
55 echo "not all parameters included, please see usage:"
56 echo "$usage"
57 exit 1
58 fi
59
60 # validate arguments
61 outputdir=$(realpath --relative-base=$(pwd) $3)
62 if !(ls $outputdir >& /dev/null); then
63 echo "directory $outputdir doesn't seem to exist. Please make sure it exists, then re-run hibyos_nativepatcher.sh."
64 exit 1
65 fi
66
67 # note, bootloaderfile might still be a valid path, but not a valid bootloader file... check to make sure tar can extract it okay.
68 bootloaderfile=$(realpath --relative-base=$(pwd) $4)
69 if !(ls $bootloaderfile >& /dev/null); then
70 echo "bootloader file $bootloaderfile doesn't seem to exist. Please make sure it exists, then re-run hibyos_nativepatcher.sh."
71 exit 1
72 fi
73
74 # make working directory...
75 mkdir $outputdir/working_dir
76 workingdir=$(realpath $outputdir/working_dir)
77 mkdir $workingdir/bootloader
78
79 # extract bootloader file
80 if [[ "$OSTYPE" == "darwin"* ]]; then
81 # macos
82 tar -xvf $bootloaderfile --cd $workingdir/bootloader
83 elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
84 # linux-gnu
85 tar -xvf $bootloaderfile -C $workingdir/bootloader
86 fi
87
88 # make sure we got what we wanted
89 if !(ls $workingdir/bootloader/bootloader.ucl >& /dev/null); then
90 echo "can't find bootloader.ucl! help!"
91 rm -rf $workingdir
92 exit 1
93 elif !(ls $workingdir/bootloader/spl.erosq >& /dev/null); then
94 echo "can't find spl.erosq! help!"
95 rm -rf $workingdir
96 exit 1
97 fi
98
99 bootver=$(cat $workingdir/bootloader/bootloader-info.txt)
100 if [ -z "$bootver" ]; then
101 echo "COULDN'T FIND BOOTLOADER-INFO!"
102 rm -rf $workingdir
103 exit 1
104 fi
105
106 # if uboot.bin already exists, something is weird.
107 if (ls $workingdir/image_contents/uboot.bin >& /dev/null); then
108 echo "$workingdir/image_contents/uboot.bin already exists, something went weird."
109 rm -rf $workingdir
110 exit 1
111 fi
112
113 # everything exists, make the bin
114 mkdir $workingdir/image_contents/
115 touch $workingdir/image_contents/uboot.bin
116 echo "PATCHING!"
117 dd if=$workingdir/bootloader/spl.erosq of=$workingdir/image_contents/uboot.bin obs=1 seek=0 conv=notrunc
118 dd if=$workingdir/bootloader/bootloader.ucl of=$workingdir/image_contents/uboot.bin obs=1 seek=26624 conv=notrunc
119
120 # create update.txt
121 md5=($(md5sum $workingdir/image_contents/uboot.bin))
122 if [ -z "$md5" ]; then
123 echo "COULDN'T MD5SUM UBOOT.BIN!"
124 rm -rf $workingdir
125 exit 1
126 fi
127 echo "Create update manifest with md5sum $md5"
128 echo "" > $workingdir/image_contents/update.txt
129 $SCRIPT_DIR/patch_manifest.pl $md5 $workingdir/image_contents/update.txt
130
131 # create version.txt
132 echo "version={
133 name=$2
134 ver=2024-09-10T14:42:18+08:00
135}" > $workingdir/image_contents/version.txt
136
137 outputfilename="erosqnative_$bootver-$5-$2"
138
139
140###########################################################################
141# MKSTOCKUBOOT
142###########################################################################
143elif [[ "$1" == "mkstockuboot" ]]; then
144 echo "Creating uninstallation image from stock update image..."
145
146 # make sure all arguments are accounted for...
147 if [[ -z "$2" ]]; then
148 echo "not all parameters included, please see usage:"
149 echo "$usage"
150 exit 1
151 fi
152
153 updatefile=$(realpath --relative-base=$(pwd) $2)
154 updatefile_path=$(echo "$updatefile" | perl -ne "s/\/[\w\.\_\-]*$// && print")
155 updatefile_name=$(basename $updatefile)
156 updatefile_name_noext=$(echo "$updatefile_name" | perl -ne "s/\.\w*$// && print")
157 outputdir=$updatefile_path
158 outputfilename="$updatefile_name_noext-rbuninstall"
159
160 mkdir $updatefile_path/working_dir
161 workingdir=$(realpath $updatefile_path/working_dir)
162
163 # copy update.upt to update.iso
164 cp $updatefile $workingdir/$updatefile_name_noext-cpy.iso
165
166 mkdir $workingdir/image_contents
167
168 # extract iso
169 if [[ "$OSTYPE" == "darwin"* ]]; then
170 # macos
171 hdiutil attach $workingdir/$updatefile_name_noext-cpy.iso -mountpoint $workingdir/contentsiso
172
173 # copy out iso contents
174 cp $workingdir/contentsiso/* $workingdir/image_contents
175
176 # unmount iso
177 hdiutil detach $workingdir/contentsiso
178 elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
179 # linux-gnu
180 7z -o$workingdir/image_contents x $workingdir/$updatefile_name_noext-cpy.iso
181 fi
182
183 chmod 777 $workingdir/image_contents/*
184
185 # modify update.txt
186 md5=($(md5sum $workingdir/image_contents/uboot.bin))
187 if [ -z "$md5" ]; then
188 echo "COULDN'T MD5SUM UBOOT.BIN!"
189 rm -rf $working_dir
190 exit 1
191 fi
192 echo "add to update manifest with md5sum $md5"
193 $SCRIPT_DIR/patch_manifest.pl $md5 $workingdir/image_contents/update.txt
194
195######################################################################
196# PRINT USAGE
197######################################################################
198else
199 echo "$usage"
200 exit 1
201fi
202
203######################################################################
204# Common: make the image
205######################################################################
206# make the image
207if [[ "$OSTYPE" == "darwin"* ]]; then
208 # macos
209 hdiutil makehybrid -iso -joliet -o $outputdir/output.iso $workingdir/image_contents/
210elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
211 # linux-gnu
212 genisoimage -o $outputdir/output.iso $workingdir/image_contents/
213fi
214
215# rename
216mv $outputdir/output.iso $outputdir/$outputfilename.upt
217
218# cleaning up
219rm -rf $workingdir
220
221exit 0
diff --git a/tools/hibyos_nativepatcher/patch_manifest.pl b/tools/hibyos_nativepatcher/patch_manifest.pl
new file mode 100755
index 0000000000..82c6378c65
--- /dev/null
+++ b/tools/hibyos_nativepatcher/patch_manifest.pl
@@ -0,0 +1,27 @@
1#!/usr/bin/perl
2# add bootloader info to update manifest
3# usage: ./patch_manifest.pl <md5sum> <path/to/update.txt>
4
5my $md5 = $ARGV[0];
6my $updatefile = $ARGV[1];
7my $bootloader_manif =
8"bootloader={
9 name=uboot
10 file_path=autoupdate/uboot.bin
11 md5=$md5
12}\n";
13
14# read in existing manifest
15open(FH, '<', "$updatefile");
16read(FH, my $manifest, -s FH);
17close(FH);
18
19# delete existing bootloader entry if exists
20$manifest =~ s/bootloader\s*=\s*{[^}]*}//;
21
22# add our own bootloader entry
23$manifest = "$bootloader_manif$manifest";
24
25open(FH, '>', "$updatefile");
26print FH $manifest;
27close(FH);
diff --git a/tools/release/manuals.pl b/tools/release/manuals.pl
index 61d298fd38..3493aac86d 100755
--- a/tools/release/manuals.pl
+++ b/tools/release/manuals.pl
@@ -28,7 +28,7 @@ sub runone {
28 28
29 chdir ".."; 29 chdir "..";
30 30
31 my $o="buildm-$dir/rockbox-$dir-$version.pdf"; 31 my $o="buildm-$dir/rockbox-manual.pdf";
32 if (-f $o) { 32 if (-f $o) {
33 my $newo="$outdir/rockbox-$dir-$version.pdf"; 33 my $newo="$outdir/rockbox-$dir-$version.pdf";
34 system("mv $o $newo"); 34 system("mv $o $newo");
@@ -74,6 +74,6 @@ sub buildit {
74 74
75`mkdir -p $outdir`; 75`mkdir -p $outdir`;
76 76
77for my $b (&usablebuilds) { 77for my $b (&manualbuilds) {
78 runone($b); 78 runone($b);
79} 79}
diff --git a/tools/release/voices.pl b/tools/release/voices.pl
index 42bf533118..1b08123673 100755
--- a/tools/release/voices.pl
+++ b/tools/release/voices.pl
@@ -68,12 +68,13 @@ sub buildit {
68# run make in tools first to make sure they're up-to-date 68# run make in tools first to make sure they're up-to-date
69`(cd tools && make ) >/dev/null 2>&1`; 69`(cd tools && make ) >/dev/null 2>&1`;
70 70
71my $home=$ENV{'HOME'}; 71if (!defined($ENV{'POOL'}) {
72 72 my $home=$ENV{'HOME'};
73my $pool="$home/tmp/rockbox-voices-$version/voice-pool"; 73 my $pool="$home/tmp/rockbox-voices-$version/voice-pool";
74`mkdir -p $pool`; 74 `mkdir -p $pool`;
75`rm -f $pool/*`; 75 $ENV{'POOL'}="$pool";
76$ENV{'POOL'}="$pool"; 76}
77# `rm -f $pool/*`;
77 78
78`mkdir -p $outdir`; 79`mkdir -p $outdir`;
79 80
diff --git a/tools/rockboxdev.sh b/tools/rockboxdev.sh
index 63b1a1f5a1..f8e9ab2140 100755
--- a/tools/rockboxdev.sh
+++ b/tools/rockboxdev.sh
@@ -378,8 +378,14 @@ buildtool() {
378 $config_opt 378 $config_opt
379 elif [ "$config_opt" != "NO_CONFIGURE" ]; then 379 elif [ "$config_opt" != "NO_CONFIGURE" ]; then
380 echo "ROCKBOXDEV: $toolname/configure" 380 echo "ROCKBOXDEV: $toolname/configure"
381 cflags='-U_FORTIFY_SOURCE -fgnu89-inline -O2'
382 if [ "$tool" == "glib" ]; then
383 run_cmd "$logfile" sed -i -e 's/m4_copy/m4_copy_force/g' "$cfg_dir/m4macros/glib-gettext.m4"
384 run_cmd "$logfile" autoreconf -fiv "$cfg_dir"
385 cflags="$cflags -Wno-format-nonliteral -Wno-format-overflow"
386 fi
381 # NOTE glibc requires to be compiled with optimization 387 # NOTE glibc requires to be compiled with optimization
382 CFLAGS='-U_FORTIFY_SOURCE -fgnu89-inline -O2' CXXFLAGS="$CXXFLAGS" run_cmd "$logfile" \ 388 CFLAGS="$cflags" CXXFLAGS="$CXXFLAGS" run_cmd "$logfile" \
383 "$cfg_dir/configure" "--prefix=$prefix" \ 389 "$cfg_dir/configure" "--prefix=$prefix" \
384 --disable-docs $config_opt 390 --disable-docs $config_opt
385 fi 391 fi
diff --git a/tools/updatelang b/tools/updatelang
index a05011e645..ff4ce340e0 100755
--- a/tools/updatelang
+++ b/tools/updatelang
@@ -158,7 +158,7 @@ sub reduceformat($) {
158################## 158##################
159 159
160if($#ARGV != 2) { 160if($#ARGV != 2) {
161 print "Usage: updatelang <english.lang> <otherlang> <outfile|->\n"; 161 print "Usage: [ENGLISHORDER=1] updatelang <english.lang> <otherlang> <outfile|->\n";
162 exit; 162 exit;
163} 163}
164 164
@@ -402,9 +402,9 @@ foreach my $id (@langorder) {
402 402
403 my $sane = $lang{$id}{'dest'}{$tgt}; 403 my $sane = $lang{$id}{'dest'}{$tgt};
404 $sane =~ s/^~?(.*)/$1/; # Strip off leading ~ if it's there as it's not a legal character otherwise 404 $sane =~ s/^~?(.*)/$1/; # Strip off leading ~ if it's there as it's not a legal character otherwise
405 if ($sane =~ tr/"~//) { 405 if ($sane =~ tr/"~<>//) {
406 # If it has suspicious characters that are not allowed 406 # If it has suspicious characters that are not allowed
407 $lang{$id}{'notes'} .= "### The <dest> section for '$id:$tgt' has some suspicious characters (eg '~'), please double-check!\n"; 407 $lang{$id}{'notes'} .= "### The <dest> section for '$id:$tgt' has some suspicious characters (eg \",~,<,>), please double-check!\n";
408# print "#!! '$id:$tgt' suspicious characters\n"; 408# print "#!! '$id:$tgt' suspicious characters\n";
409 } 409 }
410 } 410 }
@@ -476,9 +476,9 @@ foreach my $id (@langorder) {
476 } 476 }
477 my $sane = $lang{$id}{'voice'}{$tgt}; 477 my $sane = $lang{$id}{'voice'}{$tgt};
478 $sane =~ s/^~?(.*)/$1/; # Strip off leading ~ if it's there as it's not a legal character otherwise 478 $sane =~ s/^~?(.*)/$1/; # Strip off leading ~ if it's there as it's not a legal character otherwise
479 if ($sane =~ tr/%"~//) { 479 if ($sane =~ tr/%"~:\[\]<>{}\|//) {
480 # If it has suspicious characters that are not normally voiced.. 480 # Suspicious characters that are not typically voiced..
481 $lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' has some suspicious characters (eg '%' or '~'), please double-check!\n"; 481 $lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' has some suspicious characters (eg %,\",~,:,<,>,[,],{,},|), please correct!\n";
482# print "#!! '$id:$tgt' suspicious characters\n"; 482# print "#!! '$id:$tgt' suspicious characters\n";
483 } 483 }
484 if ($lang{$id}{'voice'}{$tgt} =~ /\.\.\./) { 484 if ($lang{$id}{'voice'}{$tgt} =~ /\.\.\./) {
@@ -502,7 +502,14 @@ foreach (@langheader) {
502 print $fh $_; 502 print $fh $_;
503} 503}
504 504
505my @finalorder = @langorder; # TODO make configurable vs @englishorder 505my @finalorder;
506
507if ($ENV{'ENGLISHORDER'}) {
508 @finalorder = @englishorder;
509} else {
510 @finalorder = @langorder;
511}
512
506foreach my $id (@finalorder) { 513foreach my $id (@finalorder) {
507 if (!defined($english{$id})) { 514 if (!defined($english{$id})) {
508 next; 515 next;
diff --git a/tools/voice.pl b/tools/voice.pl
index 1c547c7d96..1180565b64 100755
--- a/tools/voice.pl
+++ b/tools/voice.pl
@@ -8,6 +8,7 @@
8# $Id$ 8# $Id$
9# 9#
10# Copyright (C) 2007 Jonas Häggqvist 10# Copyright (C) 2007 Jonas Häggqvist
11# Copyright (C) 2020 Solomon Peachy
11# 12#
12# All files in this archive are subject to the GNU General Public License. 13# All files in this archive are subject to the GNU General Public License.
13# See the file COPYING in the source tree root for full license agreement. 14# See the file COPYING in the source tree root for full license agreement.
@@ -87,6 +88,8 @@ my %festival_lang_map = (
87 88
88my %gtts_lang_map = ( 89my %gtts_lang_map = (
89 'english' => '-l en -t co.uk', # Always first, it's the golden master 90 'english' => '-l en -t co.uk', # Always first, it's the golden master
91 'bulgarian' => '-l bg',
92 'chinese-simp' => '-l zh',
90 'czech' => '-l cs', 93 'czech' => '-l cs',
91 'dansk' => '-l da', 94 'dansk' => '-l da',
92 'deutsch' => '-l de', 95 'deutsch' => '-l de',
@@ -95,8 +98,9 @@ my %gtts_lang_map = (
95 'espanol' => '-l es', 98 'espanol' => '-l es',
96 'francais' => '-l fr', 99 'francais' => '-l fr',
97 'greek' => '-l el', 100 'greek' => '-l el',
98 'magyar' => '-l hu',
99 'italiano' => '-l it', 101 'italiano' => '-l it',
102 'korean' => '-l ko',
103 'magyar' => '-l hu',
100 'nederlands' => '-l nl', 104 'nederlands' => '-l nl',
101 'norsk' => '-l no', 105 'norsk' => '-l no',
102 'polski' => '-l pl', 106 'polski' => '-l pl',
@@ -109,6 +113,8 @@ my %gtts_lang_map = (
109 113
110my %espeak_lang_map = ( 114my %espeak_lang_map = (
111 'english' => '-ven-gb -k 5', # Always first, it's the golden master 115 'english' => '-ven-gb -k 5', # Always first, it's the golden master
116 'bulgarian' => '-vbg',
117 'chinese-simp' => '-vzh',
112 'czech' => '-vcs', 118 'czech' => '-vcs',
113 'dansk' => '-vda', 119 'dansk' => '-vda',
114 'deutsch' => '-vde', 120 'deutsch' => '-vde',
@@ -117,9 +123,10 @@ my %espeak_lang_map = (
117 'espanol' => '-ves', 123 'espanol' => '-ves',
118 'francais' => '-vfr-fr', 124 'francais' => '-vfr-fr',
119 'greek' => '-vel', 125 'greek' => '-vel',
120 'magyar' => '-vhu',
121 'italiano' => '-vit', 126 'italiano' => '-vit',
122 'japanese' => '-vja', 127 'japanese' => '-vja',
128 'korean' => '-vko',
129 'magyar' => '-vhu',
123 'nederlands' => '-vnl', 130 'nederlands' => '-vnl',
124 'norsk' => '-vno', 131 'norsk' => '-vno',
125 'polski' => '-vpl', 132 'polski' => '-vpl',
@@ -131,7 +138,9 @@ my %espeak_lang_map = (
131 ); 138 );
132 139
133my %piper_lang_map = ( 140my %piper_lang_map = (
134 'english' => 'en_GB-cori-high.onnx', # Always first, it's the golden master 141 'english' => 'en_GB-semaine-medium.onnx', # Always first, it's the golden master
142# 'bulgarian' => '-vbg',
143 'chinese-simp' => 'zh_CN-huayan-medium.onnx',
135 'czech' => 'cs_CZ-jirka-medium.onnx', 144 'czech' => 'cs_CZ-jirka-medium.onnx',
136 'dansk' => 'da_DK-talesyntese-medium.onnx', 145 'dansk' => 'da_DK-talesyntese-medium.onnx',
137 'deutsch' => 'de_DE-thorsten-high.onnx', 146 'deutsch' => 'de_DE-thorsten-high.onnx',
@@ -140,9 +149,10 @@ my %piper_lang_map = (
140 'espanol' => 'es_ES-sharvard-medium.onnx', 149 'espanol' => 'es_ES-sharvard-medium.onnx',
141 'francais' => 'fr_FR-siwis-medium.onnx', 150 'francais' => 'fr_FR-siwis-medium.onnx',
142 'greek' => 'el_GR-rapunzelina-low.onnx', 151 'greek' => 'el_GR-rapunzelina-low.onnx',
143 'magyar' => 'hu_HU-anna-medium.onnx',
144 'italiano' => 'it_IT-paola-medium.onnx', 152 'italiano' => 'it_IT-paola-medium.onnx',
145# 'japanese' => '-vja', 153# 'japanese' => '-vja',
154# 'korean' => '-vko',
155 'magyar' => 'hu_HU-anna-medium.onnx',
146 'nederlands' => 'nl_NL-mls-medium.onnx', 156 'nederlands' => 'nl_NL-mls-medium.onnx',
147 'norsk' => 'no_NO-talesyntese-medium.onnx', 157 'norsk' => 'no_NO-talesyntese-medium.onnx',
148 'polski' => 'pl_PL-gosia-medium.onnx', 158 'polski' => 'pl_PL-gosia-medium.onnx',
@@ -153,7 +163,7 @@ my %piper_lang_map = (
153 'turkce' => 'tr_TR-fettah-medium.onnx', 163 'turkce' => 'tr_TR-fettah-medium.onnx',
154); 164);
155 165
156my $trim_thresh = 500; # Trim silence if over this, in ms 166my $trim_thresh = 250; # Trim silence if over this, in ms
157my $force = 0; # Don't regenerate files already present 167my $force = 0; # Don't regenerate files already present
158 168
159# Initialize TTS engine. May return an object or value which will be passed 169# Initialize TTS engine. May return an object or value which will be passed
@@ -476,7 +486,7 @@ sub generateclips {
476 # If we have a pool of snippets, see if the string exists there first 486 # If we have a pool of snippets, see if the string exists there first
477 if (defined($ENV{'POOL'})) { 487 if (defined($ENV{'POOL'})) {
478 $pool_file = sprintf("%s/%s-%s.enc", $ENV{'POOL'}, 488 $pool_file = sprintf("%s/%s-%s.enc", $ENV{'POOL'},
479 md5_hex(Encode::encode_utf8("$voice ". $tts_object->{"name"}." $tts_engine_opts $encoder_opts")), 489 md5_hex(Encode::encode_utf8("$voice ". $tts_object->{"name"}." $tts_engine_opts ".$tts_object->{"ttsoptions"}." $encoder_opts")),
480 $language); 490 $language);
481 if (-f $pool_file) { 491 if (-f $pool_file) {
482 printf("Re-using %s (%s) from pool\n", $id, $voice) if $verbose; 492 printf("Re-using %s (%s) from pool\n", $id, $voice) if $verbose;
@@ -585,17 +595,21 @@ sub gentalkclips {
585 print("."); 595 print(".");
586 } 596 }
587 597
588 # Convert to a complete path
589 my $path = sprintf("%s/%s", $dir, $file);
590
591 $voice = $file;
592 $wav = sprintf("%s.talk.wav", $path);
593
594 # Ignore dot-dirs and talk files 598 # Ignore dot-dirs and talk files
595 if ($file eq '.' || $file eq '..' || $file =~ /\.talk$/) { 599 if ($file eq '.' || $file eq '..' || $file =~ /\.talk$/) {
596 next; 600 next;
597 } 601 }
598 602
603 $voice = $file;
604
605 # Convert some symbols to spaces
606 $voice =~ tr/_-/ /;
607
608 # Convert to a complete path
609 my $path = sprintf("%s/%s", $dir, $file);
610
611 $wav = sprintf("%s.talk.wav", $path);
612
599 if ( -d $path) { # Element is a dir 613 if ( -d $path) { # Element is a dir
600 $enc = sprintf("%s/_dirname.talk", $path); 614 $enc = sprintf("%s/_dirname.talk", $path);
601 if (! -e "$path/talkclips.ignore") { # Skip directories containing "talkclips.ignore" 615 if (! -e "$path/talkclips.ignore") { # Skip directories containing "talkclips.ignore"
@@ -670,7 +684,7 @@ if ($V == 1) {
670 684
671 printf("Generating voice\n Target: %s\n Language: %s\n Encoder (options): %s (%s)\n TTS Engine (options): %s (%s)\n Pool directory: %s\n", 685 printf("Generating voice\n Target: %s\n Language: %s\n Encoder (options): %s (%s)\n TTS Engine (options): %s (%s)\n Pool directory: %s\n",
672 defined($t) ? $t : "unknown", 686 defined($t) ? $t : "unknown",
673 $l, $e, $E, $s, $S, defined($ENV{'POOL'}) ? $ENV{'POOL'} : "<none>"); 687 $l, $e, $E, $s, "$S $tts_object->{ttsoptions}", defined($ENV{'POOL'}) ? $ENV{'POOL'} : "<none>");
674 generateclips($l, $t, $e, $E, $tts_object, $S, $f); 688 generateclips($l, $t, $e, $E, $tts_object, $S, $f);
675 shutdown_tts($tts_object); 689 shutdown_tts($tts_object);
676 createvoice($l, $i, $f); 690 createvoice($l, $i, $f);
diff --git a/tools/xduoox3-updatebl.sh b/tools/xduoox3-updatebl.sh
new file mode 100755
index 0000000000..efb52bff8c
--- /dev/null
+++ b/tools/xduoox3-updatebl.sh
@@ -0,0 +1,5 @@
1#!/bin/sh
2unzip $1 rockbox.bin
3dd if=bootloader-x3.bin of=rockbox.bin bs=2048 seek=4 conv=nocreat conv=notrunc
4zip -o $1 rockbox.bin rockbox-info.txt
5rm rockbox.bin