Compare commits

...

360 Commits

Author SHA1 Message Date
Michel-FK
d50676f1ca Merge branch 'develop' of github.com:FunKey-Project/FunKey-OS into develop 2022-01-06 13:38:10 +01:00
Vincent-FK
bfd37970b2 added mona and the witch\'s hat deluxe to default included GBC games 2022-01-06 13:37:15 +01:00
Michel-FK
dbddad6f77 trigger adbd by /mnt/adb file detection 2022-01-05 19:25:28 +01:00
Michel-FK
5cdcd6ab80 add ADB to FunKey-OS 2022-01-01 21:25:41 +01:00
Vincent-FK
7507bdd845 added mona and the witch\'s hat deluxe to default included GBC games 2021-08-20 17:20:38 +02:00
Vincent-FK
7a15dcc3ef Merge branch 'develop' 2021-06-25 15:43:05 +02:00
Vincent-FK
208303ed0b added user theme RetroDex 2021-06-25 15:23:05 +02:00
Vincent-FK
f7d1bfb43b added new theme "EmuStation" in /mnt 2021-06-25 01:23:38 +02:00
Vincent-FK
34241ca5d5 bumped picodrive to ### Release version 1.3.1 of the picodrive package 2021-06-21 10:51:42 +02:00
Vincent-FK
7038bdbbb9 fixed broken instant play (kill instead of pkil when using pid directly) 2021-06-20 00:16:28 +02:00
Vincent-FK
f60111fa45 fixed merge conflicts 2021-06-20 00:02:27 +02:00
Vincent-FK
977a7f48db saving PID_PATH during "pid record" calls, not during powerdown anymore 2021-06-19 23:57:10 +02:00
Michel-FK
2155537e62 use pid script wherever possible
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-06-19 12:03:58 +02:00
Michel-FK
04570f0499 fix indentation
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-06-19 12:01:25 +02:00
Michel-FK
29f5f5b3f3 update Recovery version to 2.3.0
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-06-19 09:26:52 +02:00
Vincent-FK
0f174bd18e updated soft version to 2.3.0 2021-06-19 01:06:25 +02:00
Vincent-FK
2ae4604084 fixed frontend look cases where lask_opk file could be removed after the instant action SIGUSR1 signal 2021-06-19 00:58:41 +02:00
Vincent-FK
5cd95016d9 corrected instant play that could only be launched once 2021-06-19 00:14:04 +02:00
Vincent-FK
305aa2ba83 latest packages version, changed FunKey and Recovery version 2021-06-18 20:18:36 +02:00
Vincent-FK
b10b3ccb48 removed unnecessary copy/pasted line 2021-06-18 19:57:24 +02:00
Vincent-FK
0b5a4a30db corrections for instant play with opks 2021-06-18 17:32:26 +02:00
Vincent-FK
8cd07a9898 updated bibi 2021-06-18 00:54:28 +02:00
Vincent-FK
b56b9009f9 .retrofe folder in /mnt/FunKey to store new themes (in layouts folder), increased image size by 20M, bibi 2021-06-18 00:26:39 +02:00
Vincent-FK
7dae96d0bf bibi 2021-06-17 23:47:48 +02:00
Vincent-FK
d7707c4aae added bios folders for gba and sega Genesis folders of free roms 2021-06-09 23:59:54 +02:00
Vincent-FK
21fe588593 Picodrive-irixxxx as main picodrive version and volume notif centered 2021-06-09 23:51:32 +02:00
Michel-FK
ff83118833 quote rom names with single quotes
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-06-09 23:35:34 +02:00
Vincent-FK
bfed99494e fixed little regression when handling previous prevent_launcher file 2021-06-09 00:26:46 +02:00
Michel-FK
b2847c1cd4 add alias functions for compatibility
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-06-08 22:41:42 +02:00
Michel-FK
bc35b7e59c save last OPK for instant_play
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-06-08 22:22:00 +02:00
Michel-FK
50d83ed555 fix compatibility issue with older Recovery notifications
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-06-07 22:54:31 +02:00
Michel-FK
8ba4b07964 use new share script
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-06-07 22:34:57 +02:00
Michel-FK
67ee9f1520 use new single system_stats script
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-06-06 22:16:04 +02:00
Michel-FK
1d7ccfd67d use single system_stats script
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-06-04 22:27:33 +02:00
Michel-FK
7d80bc7eed use single powerdown script
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-06-03 23:55:21 +02:00
Michel-FK
cefbb581ee fix issue #25
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-05-24 23:17:10 +02:00
Michel-FK
6a43bca1e6 fix notif in update_partition script
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-05-24 23:01:42 +02:00
Michel-FK
4b519d9911 change for new pid script
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-05-15 23:48:45 +02:00
Michel-FK
8c3bdba798 change for new notif script
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-05-15 23:02:06 +02:00
Michel-FK
547c1fe5b9 fix issue #24
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-05-13 22:06:00 +02:00
Michel-FK
ffa35c0983 fix issue #22
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-05-11 23:21:40 +02:00
Michel-FK
f9d5f09520 cleanup scripts
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-05-11 23:20:14 +02:00
Michel-FK
961e7dbf24 replace xxx_launcher scripts by frontend script
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-05-11 23:19:41 +02:00
Michel-FK
ee49693543 instant_play save/load
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-05-09 23:09:52 +02:00
Michel-FK
0d19c7a7f1 rename start_audio_amp to audio_amp
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-05-08 23:21:10 +02:00
Michel-FK
52cf2a0f5d remove write_args_quick_load_file
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-05-08 10:25:20 +02:00
Michel-FK
d6ba530bf1 remove write_args_quick_load_file
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-05-08 10:24:40 +02:00
Michel-FK
6e008cc539 unify brightness & volume scripts
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-05-02 22:39:29 +02:00
Michel-FK
d5175b091c fix message box help
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-30 08:23:44 +02:00
Michel-FK
83519eeedb fix typo in snap
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-28 23:22:11 +02:00
Michel-FK
50d8df9895 Inconsistent and misleading wording in the Recoery menu
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-28 23:10:27 +02:00
Michel-FK
2d764e398a do not remove GPIOs from monitored GPIO mask when unmapping
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-28 22:43:47 +02:00
Michel-FK
ffa1595cd3 use single quote around keymap name
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-28 22:17:31 +02:00
Michel-FK
c8593fac19 use system() rather than popen() in FunKey menu
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-27 23:23:18 +02:00
Michel-FK
1e709b5553 add keymap handling in FunKey menu
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-26 23:18:29 +02:00
Michel-FK
fff025d51a handle relative path for OPK keymaps
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-26 22:17:52 +02:00
Michel-FK
240b8fea15 make keymap work with Instant Play
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-26 21:33:53 +02:00
Vincent-FK
484d4e6905 Merge branch 'develop' 2021-04-22 09:39:03 +02:00
Michel-FK
d36b044b51
Update build_sdk.yml 2021-04-21 22:44:10 +02:00
Michel-FK
44708bfbd3
Create build_sdk.yml 2021-04-21 22:43:20 +02:00
Vincent-FK
fd35689bdf bump libopk version 2021-04-20 00:08:27 +02:00
Michel-FK
7155485b41 bump hardware revision
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-20 00:03:10 +02:00
Michel-FK
afa336a963 bump fkgpiod version
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-19 23:56:14 +02:00
Vincent-FK
c7b8895d5e Merge branch 'develop' of https://github.com/FunKey-Project/FunKey-OS into develop 2021-04-19 23:52:40 +02:00
Vincent-FK
af75789294 changed release version for Recovery and FunKey 2021-04-19 23:52:33 +02:00
Michel-FK
de57db21fd bump libopk version
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-19 23:47:00 +02:00
Vincent-FK
52d20491c4 reset default mapping in start_launcher 2021-04-19 23:39:31 +02:00
Michel-FK
ab7e5ae158 restore messages in libopk
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-19 23:31:23 +02:00
Michel-FK
8532918f00 bump fkgpiod & libopk version
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-19 23:26:29 +02:00
Vincent-FK
13201b7f69 bump retroFe to the latests release 2021-04-19 18:45:53 +02:00
Vincent-FK
7408d35142 removed build badge in README, github actions fails when compilations is too long even thoug it is successful (which is our case) 2021-04-19 17:09:09 +02:00
Vincent-FK
7976bcc7c1 removed build badge in README, github actions fails when compilations is too long even thoug it is successful (which is our case) 2021-04-19 17:07:22 +02:00
Vincent-FK
4909b67d29 Set official release versions in mk files 2021-04-19 17:04:06 +02:00
Michel-FK
b291b0f2b4 Merge branch 'develop' of fk:FunKey-Project/FunKey-OS into develop 2021-04-17 22:26:47 +02:00
Michel-FK
1e1c164aaf fix pclose before fgets in init_menu_system
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-17 22:26:33 +02:00
Vincent-FK
805f709542 latest picodrive version 2021-04-17 18:55:45 +02:00
Michel-FK
750d9e8455 bump PCSX-ReARMed & PocketSNES version
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-16 08:18:26 +02:00
Vincent-FK
1daa9fc386 ugly but working patch to avoid ALSA DMA callback traps on FunKey S 2021-04-15 18:10:34 +02:00
Michel-FK
bc8f05ea52 bump mednafen version
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-15 15:55:19 +02:00
Michel-FK
7a6ecc55f6 bump gnuboy & gpsp version
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-15 13:59:08 +02:00
Michel-FK
0b2342ad9d bump gmenu2x version
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-14 23:37:22 +02:00
Michel-FK
6b05f7b8e6 bump FCEUX & picodrive version
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-14 23:25:58 +02:00
Michel-FK
7f5cf7c430 bump retrofe version
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-13 23:24:02 +02:00
Michel-FK
3f3a1ad794 Merge branch 'develop' of fk:FunKey-Project/FunKey-OS into develop 2021-04-13 18:42:58 +02:00
Michel-FK
320c699689 remove update file and reboot in normal mode when update file is corrupted
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-13 18:38:30 +02:00
Michel-FK
e6d932c8c7 remove funkey_gpio_management from update
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-13 16:39:31 +02:00
Vincent-FK
a8e063874f removed cp of funkey_gpio_manager in update_partition and sw-description, Change FunKey config files extension from .cfg to .fkcfg in update partition, and bumped emulators version for saving funkey configs as .fkcfg 2021-04-12 20:39:24 +02:00
Michel-FK
853d7e3096 mask GPIOs to monitor only valid ones in U-Boot boot selection
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-12 17:17:01 +02:00
Vincent-FK
dfc375ee33 Merge branch 'develop' of https://github.com/FunKey-Project/FunKey-OS into develop 2021-04-12 10:24:09 +02:00
Michel-FK
81dfe214d4 add keymap script
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-12 10:23:07 +02:00
Michel-FK
9a61dd6500 bump fkgpiod version
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-12 10:23:07 +02:00
Michel-FK
0b48940dc3 remove funkey_gpio_management from update file
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-12 10:23:07 +02:00
Michel-FK
226d623cf5 bump to fkgpiod with syslog
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-12 10:23:07 +02:00
Michel-FK
14452674e7 use fkgpiod in Recovery too
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-12 10:23:07 +02:00
Michel-FK
ab65bc508e bump fkgpiod version
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-12 10:23:07 +02:00
Michel-FK
9309849d41 bump toolchain version
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-12 10:23:07 +02:00
Michel-FK
8164185024 change RESET to CLEAR in fkgpiod.conf
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-12 10:23:07 +02:00
Michel-FK
0a9e3d8ffe bump commander bersion
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-12 10:23:07 +02:00
Vincent-FK
fc7b0f49e6 Alsa sound downmixed to mono 2021-04-12 10:23:07 +02:00
Vincent-FK
583715ca18 segfault correction in fkgpiod 2021-04-12 10:23:07 +02:00
Vincent-FK
f689129516 new fkgpiod package instead of previous gpiomanager 2021-04-12 10:23:07 +02:00
Vincent-FK
5c9bb0470e Add zip, cue, cso,... extensions support (from DrUm78 script) 2021-04-12 10:23:07 +02:00
Vincent-FK
65c9057265 added libvorbis to SDK 2021-04-12 10:23:07 +02:00
Vincent-FK
a94d77dc39 added libvorbis to rootfs 2021-04-12 10:23:07 +02:00
Vincent-FK
81d2ddd95e fixed typo for pce_mednaefn_funkey-s.opk 2021-04-12 10:23:07 +02:00
Vincent-FK
59cc6faf55 First boot creates "Native games" and "Applications" and copy correctly emulators because they are also missing 2021-04-12 10:23:07 +02:00
Vincent-FK
7ca2dd67fa latest gpio manager version with PCAL9539A compatibility 2021-04-12 10:23:07 +02:00
Michel-FK
097e961b22 add keymap script
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-12 08:17:26 +02:00
Michel-FK
45343de238 bump fkgpiod version
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-12 08:17:07 +02:00
Vincent-FK
dc654d9e65 added battery voltages checks in assembly tests 2021-04-11 16:48:23 +02:00
Michel-FK
d2e65cd657 remove funkey_gpio_management from update file
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-10 21:59:32 +02:00
Michel-FK
0434095392 bump to fkgpiod with syslog
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-10 21:57:31 +02:00
Michel-FK
b3bde9a4db use fkgpiod in Recovery too
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-10 11:11:45 +02:00
Michel-FK
0e4fd2b01a bump fkgpiod version
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-10 11:10:29 +02:00
Michel-FK
4fff8cdb5b bump toolchain version
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-10 10:47:59 +02:00
Michel-FK
2ee0987dd3 change RESET to CLEAR in fkgpiod.conf
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-10 10:47:08 +02:00
Michel-FK
d7563346b0 bump commander bersion
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-04-10 10:46:29 +02:00
Vincent-FK
32d005f84e Alsa sound downmixed to mono 2021-04-06 08:40:06 +02:00
Vincent-FK
613b32137c segfault correction in fkgpiod 2021-04-05 17:35:53 +02:00
Vincent-FK
462e886c71 new fkgpiod package instead of previous gpiomanager 2021-04-05 16:54:10 +02:00
Vincent-FK
f56ac1ccb6 Add zip, cue, cso,... extensions support (from DrUm78 script) 2021-04-05 11:09:56 +02:00
Vincent-FK
65a52717c8 added libvorbis to SDK 2021-04-05 10:44:59 +02:00
Vincent-FK
ca46745bc9 added libvorbis to rootfs 2021-04-05 10:38:49 +02:00
Vincent-FK
bae44ebf27 fixed typo for pce_mednaefn_funkey-s.opk 2021-04-05 10:33:33 +02:00
Vincent-FK
e079747a5c First boot creates "Native games" and "Applications" and copy correctly emulators because they are also missing 2021-04-05 10:26:25 +02:00
Vincent-FK
78c6514bf5 latest gpio manager version with PCAL9539A compatibility 2021-04-05 10:13:30 +02:00
Vincent-FK
8a5fe96fc7 changed soft version 2021-03-12 11:36:30 +01:00
Vincent-FK
4e71aa1eca corrected button mapping for NGP, gnuboy launched in mono (sound) 2021-03-12 01:51:16 +01:00
Vincent-FK
d7a8d0c6ac Emulators, Applications and Native games folders for opks, libopk updated to the latest version 2021-03-12 00:12:17 +01:00
Vincent-FK
03d65c70f2 updated all emulators to handle cfg files (now aspect ratio is saved by roms and roms_folders) 2021-03-11 00:37:54 +01:00
Michel-FK
bedcde05df add commander package, increased image size
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-03-10 22:12:20 +01:00
Vincent-FK
2077caf06f added BR2_PACKAGE_LZO 2021-03-10 14:09:02 +01:00
Michel-FK
7c8ff8178f change version in sw-description
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-03-02 10:26:35 +01:00
Michel-FK
bd762a952e Merge branch 'develop' of fk:FunKey-Project/FunKey-OS into develop 2021-03-02 10:25:13 +01:00
Michel-FK
800ff3b306 force OPk update
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-03-02 10:25:05 +01:00
Vincent-FK
20983034d9 merged 2021-03-02 09:09:09 +01:00
Vincent-FK
180c3ef440 added ); in swb_update 2021-03-02 09:08:35 +01:00
Michel-FK
f7dec069cd Merge branch 'develop' of fk:FunKey-Project/FunKey-OS into develop 2021-03-02 09:04:50 +01:00
Michel-FK
4017482c63 make firmware update work
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-03-02 09:04:40 +01:00
Vincent-FK
3e4458901b added some default extensions for some emulators, added sms.opk, changed os release, fixed theme in gmenu2x 2021-03-02 00:43:22 +01:00
Michel-FK
e8fe02a086 fix high pitch noise issue
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-03-01 23:34:43 +01:00
Michel-FK
1862c4d21e add fix for funkey_gpio_management in Recovery
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-03-01 23:23:34 +01:00
Vincent-FK
7678fcab13 buildroot version change 2021-01-27 17:12:26 +01:00
Vincent-FK
b596ed1aea new buildroot version 2021-01-27 14:55:58 +01:00
Vincent-FK
d802c7a257 fixed assembly tests issues 2021-01-19 01:33:44 +01:00
Michel-FK
d472581e8c increase prod image size
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-01-18 23:49:37 +01:00
Michel-FK
429a66c73e set absolute path for snapshots
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-01-18 23:23:50 +01:00
Vincent-FK
7f418686bb gmenu2x release 1.0.1 2021-01-18 23:13:39 +01:00
Michel-FK
6aad3d29e8 silent SDK build
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-01-18 22:26:19 +01:00
Vincent-FK
d4e9dbb360 new pcsx release 1.1.1 2021-01-18 22:08:07 +01:00
Vincent-FK
17dd23cc6c no more umount in shutdown_funkey (which caused issues with sd card writing of instant action files)), back in inittab 2021-01-18 21:42:58 +01:00
Vincent-FK
98c64da4cd force sync at shutdown: instant action now working all the time 2021-01-18 20:57:58 +01:00
Michel-FK
51bb45c9c3 change Dockerfile for release 2.0.0
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-01-18 17:33:51 +01:00
Michel-FK
252eba806b rename instant_play file before resuming a game
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-01-18 17:30:37 +01:00
Michel-FK
902df88622 add missing gdbserver in SDK
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-01-18 11:26:31 +01:00
Michel-FK
041120fbbc Merge branch 'develop' 2021-01-18 09:28:09 +01:00
Michel-FK
59b33c35d8 add SDK build to CI workflow
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-01-18 09:24:37 +01:00
Michel-FK
4669209598 add back gdbserver
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-01-18 09:22:53 +01:00
Michel-FK
110afa175c FunKey-OS Release 2.0.0
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-01-15 16:20:08 +01:00
Vincent-FK
f95a8303de /mnt/Emulators now default folder to reinstall opks 2021-01-15 15:02:18 +01:00
Michel-FK
aa1d880800 restore -D__ARM_NEON__ in config
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-01-15 11:48:08 +01:00
Vincent-FK
afeaa5719c new emulators versions with better framing for DISPLAY MODE notif 2021-01-15 11:44:50 +01:00
Michel-FK
6cdb1b67fa Merge branch 'develop' of fk:FunKey-Project/FunKey-OS into develop 2021-01-15 11:42:48 +01:00
Michel-FK
f150595176 version 2.0.0
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-01-15 11:42:26 +01:00
Vincent-FK
8293770a3f bug correction ampli was not started when raising from 0 2021-01-15 10:28:06 +01:00
Michel-FK
4e32b1fa1f rescan opk when exiting from FunKey menu in gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-01-13 21:56:59 +01:00
Michel-FK
fccc5410a1 remove debug in first_boot
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-01-13 21:56:24 +01:00
Michel-FK
4f03f243eb fix fw_setenv in first_boot, add first_boot enable/disbale in Recovery mode
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-01-13 13:55:41 +01:00
Michel-FK
f05e8aa1c0 use die_notif() in first_boot
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-01-13 11:37:30 +01:00
Michel-FK
49ef2304d5 make first_boot re-entrant
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-01-13 11:18:32 +01:00
Michel-FK
32dd326342 add IP address to Recovery information
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-01-12 11:53:38 +01:00
Vincent-FK
c1fd9e55d6 no more loop in start_launcher after shutdown 2021-01-11 18:51:26 +01:00
Vincent-FK
8a62ff605e gmenu2x searches opks in /mnt/*/*opk; launcher now stored in /mnt/FunKey/Launchers/launcher.txt 2021-01-11 12:07:40 +01:00
Vincent-FK
a77c5e67d9 audio ampli now started/stopped at the right times, bug corrections in snap, remount of mnt in case of error no more in ro 2021-01-11 10:14:12 +01:00
Vincent-FK
a0b6d3f8e8 retrofe new version that stops ampli when necessary, start_launcher stopping/restrarting ampli when necessary 2021-01-06 02:04:52 +01:00
Vincent-FK
4243dd85b6 Merge branch 'develop' of https://github.com/FunKey-Project/FunKey-OS into develop 2021-01-05 23:44:19 +01:00
Vincent-FK
9d5c1baeb8 PREVENT_LAUNCHER_FILE was missing in start_launcher, new retrofe version to record back retrofe pid after a game finishes 2021-01-05 23:44:09 +01:00
Michel-FK
127b338d70 simplify snpshot autoincrement
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-01-05 18:23:34 +01:00
Michel-FK
61b1ec3d8d save pid of launched executable in pid file in opkrun
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-01-04 23:18:18 +01:00
Vincent-FK
7c8666a5b3 added lockfile handling to snapshot script (necessary since fbgrab must run in bg not to block the buttons while gaming) 2021-01-04 19:14:15 +01:00
Vincent-FK
af69d8d030 added fbgrab to funkey_defconfig 2021-01-04 18:49:12 +01:00
Vincent-FK
55046aa82b funkey_gpio_mapping.conf snap correct exec name 2021-01-04 18:40:27 +01:00
Vincent-FK
7dc82e3635 snapshot msg 2s duration, funkey_gpio_mapping.conf with 0.1 timeout for sched_shutdown 2021-01-04 18:33:30 +01:00
Vincent-FK
e07f2428b4 register assy tests PID after LOCK checked otherwise launcher PID is always rewritten after an ssh login 2021-01-04 18:17:30 +01:00
Michel-FK
9caf05fe1c add screen snapshot
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-01-02 19:32:47 +01:00
Michel-FK
88ba4641cc use new Instant Play system
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-01-02 14:20:55 +01:00
Michel-FK
329cc0c055 use new Instant Play system
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-01-01 17:30:07 +01:00
Michel-FK
c709ba0eff use new Instant Play system
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-01-01 17:26:10 +01:00
Michel-FK
7cc4acff1a use new Instant Play system
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2021-01-01 16:02:43 +01:00
Vincent-FK
8952620d72 corrected % not displayed in quick shortcut manual AR in PCSX, picodrive, gpsp 2020-12-30 16:37:40 +01:00
Vincent-FK
d4e3445736 new mednafen version correcting aspect ratio and scaling for PCE and GG 2020-12-30 11:28:02 +01:00
Vincent-FK
504ff1b66a New mednafen version to handle aspect ratio and more straighforward/faster scaling. Scaling still not perfect for PCEfast and GG 2020-12-29 19:58:05 +01:00
Michel-FK
04d118f951 change buildroot path in .gitsubmodules
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-28 14:18:29 +01:00
Michel-FK
428b3198dc create images directory for SDK
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-28 11:01:39 +01:00
Michel-FK
866ee950c0 build FunKey-OS using FunKey SDK
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-27 12:22:36 +01:00
Michel-FK
58d32976ee add latest tinyalsa
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-25 18:03:50 +01:00
Michel-FK
c5d71641b1 add latest tinyalsa
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-25 18:02:11 +01:00
Michel-FK
2e1990a653 optimize SDK
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-25 15:46:52 +01:00
Michel-FK
63bb57f1b8 add compatibilty with kernel with dates on 32 bits
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-21 21:43:48 +01:00
Michel-FK
7f802e37a2 compile FunKey-OS with musl + GCC 10.x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-19 23:59:56 +01:00
Michel-FK
71f4e7e919 test custom musl libc toolchain
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-16 11:01:48 +01:00
Michel-FK
69ab9a706a Merge branch 'gmenu2x' of fk:FunKey-Project/FunKey-OS into gmenu2x 2020-12-15 17:35:56 +01:00
Vincent-FK
005f2e92a4 gmenu2x new version to perform a clean poweroff whan the console closes 2020-12-15 17:33:34 +01:00
Vincent-FK
a514d86f45 gmenu2x: no clock and menu that switches to retrofe, Retrofe: clock and menu that switches to gmenu2x 2020-12-15 17:33:34 +01:00
Michel-FK
d6dc05e4ba create opk during build
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 17:31:55 +01:00
Michel-FK
83f6d93425 use correct icon for gamegear in gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 17:28:57 +01:00
Vincent-FK
5d83b1d725 changed mapping for gmenu2x, bug correction bpp declared 16 instead of 32 in package mk 2020-12-15 17:28:57 +01:00
Michel-FK
4799bacb8a add emulators and translations in gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 17:28:35 +01:00
Michel-FK
2b723deb77 show clock in gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 17:27:58 +01:00
Michel-FK
1e6a9b73e9 completely remove gmenu2x inefficient PowerSaver
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 17:27:58 +01:00
Michel-FK
831ca59078 remove skins and translations from rootfs overlay
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 17:24:51 +01:00
Vincent-FK
7b49da5733 rootfs_overlay for gmenu2x files 2020-12-15 17:24:27 +01:00
Michel-FK
ad559c2923 use our forked repos for gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 17:20:32 +01:00
Michel-FK
b043815b7e add gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 17:19:29 +01:00
Vincent-FK
33b27f30ae gmenu2x: no clock and menu that switches to retrofe, Retrofe: clock and menu that switches to gmenu2x 2020-12-15 17:17:47 +01:00
Michel-FK
992d6a22dd create opk during build
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 17:15:57 +01:00
Michel-FK
6d3211d352 use correct icon for gamegear in gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 17:11:50 +01:00
Vincent-FK
0f5f1da248 changed mapping for gmenu2x, bug correction bpp declared 16 instead of 32 in package mk 2020-12-15 17:11:50 +01:00
Michel-FK
5384a4ee0a add emulators and translations in gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 17:11:25 +01:00
Michel-FK
440d6705a5 show clock in gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 17:10:48 +01:00
Michel-FK
0ebb4e16c3 completely remove gmenu2x inefficient PowerSaver
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 17:10:48 +01:00
Michel-FK
229a95771c remove skins and translations from rootfs overlay
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 17:07:33 +01:00
Vincent-FK
c0c5276fc9 rootfs_overlay for gmenu2x files 2020-12-15 17:05:30 +01:00
Michel-FK
a2962db41e use our forked repos for gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:56:46 +01:00
Michel-FK
f2f3a40412 add gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:55:15 +01:00
Vincent-FK
d61eea8905 gmenu2x: no clock and menu that switches to retrofe, Retrofe: clock and menu that switches to gmenu2x 2020-12-15 15:47:41 +01:00
Michel-FK
49a504881d create opk during build
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:41 +01:00
Michel-FK
d8dfb19352 use correct icon for gamegear in gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:41 +01:00
Vincent-FK
f3e6189351 changed mapping for gmenu2x, bug correction bpp declared 16 instead of 32 in package mk 2020-12-15 15:47:41 +01:00
Michel-FK
a13f826567 add emulators and translations in gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:41 +01:00
Michel-FK
56fba206e2 show clock in gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:41 +01:00
Michel-FK
f0bd6a1433 completely remove gmenu2x inefficient PowerSaver
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:41 +01:00
Michel-FK
68962d9e6e remove skins and translations from rootfs overlay
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:41 +01:00
Vincent-FK
fd302c369c rootfs_overlay for gmenu2x files 2020-12-15 15:47:41 +01:00
Michel-FK
8e06c42a8f use our forked repos for gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
d3f8c11f8a add default gmenu2x files to rootfs
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
26cd7d558d add gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Vincent-FK
bc9b87f2e1 gmenu2x: no clock and menu that switches to retrofe, Retrofe: clock and menu that switches to gmenu2x 2020-12-15 15:47:40 +01:00
Michel-FK
7cb240543f add missing rom argument to gmenu2x launch scripts
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
5bec48c5e0 open gmenu2x in Emulator section by default
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
a02b1a8237 copy opk to /mnt/apps if it does not exist yet
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
269c3f3567 add ip address to system_stats
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
e4ae1337a7 adapt gmenu2x keyboard
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
003dbdec06 suffix opk name with emulator and platform
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
1619db5e64 remove problematic lynx icon
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
ca161be4d0 shorten gmenu2x commit hash
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Vincent-FK
d75f41e186 new version of Gmenu2X with Funkey menu called by home button 2020-12-15 15:47:40 +01:00
Michel-FK
bb0f2b4302 create opk during build
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
8e15b18a5c use correct icon for gamegear in gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Vincent-FK
1372f14a0c changed mapping for gmenu2x, bug correction bpp declared 16 instead of 32 in package mk 2020-12-15 15:47:40 +01:00
Michel-FK
cd420403be add emulators and translations in gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
195db3df69 show clock in gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
a3ec6e56d6 completely remove gmenu2x inefficient PowerSaver
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
0c08cf93c6 disable screen blanking in gmenu2x for now, as unblaning does not work
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
812fc1c689 enable both OPK and normal files in gmenu2x context menu
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
b13207547e push /opk.empty directories
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
87fa30bd52 use patched gmenu2x for FunKey
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
e2be7d1156 set /media for gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
1ce74b8dca turn off backlightTimeout
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
134edcfc90 move gmenu2x settings to /mnt
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
6e9df57977 add system_info script
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
53674684cc add check in start_launcher for gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
b2bc701995 fetch gmenu2x with minimal changes and add required symbolic links
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
77220c7041 remove skins and translations from rootfs overlay
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Vincent-FK
563d2cce28 rootfs_overlay for gmenu2x files 2020-12-15 15:47:40 +01:00
Michel-FK
a2c15a84e9 clear the screen on exit & force 16bpp surface
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
a62f5c1c08 fix font path
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
693e7266cb install DroidSansFallbackFull.ttf
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
7cff145ddf add native resolution for FunKey S
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
3ec1810907 use our forked repos for gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Michel-FK
a8a53935b1 add default gmenu2x files to rootfs
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Vincent-FK
965cde9142 128mb img 2020-12-15 15:47:40 +01:00
Michel-FK
dd9a96b777 add gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 15:47:40 +01:00
Vincent-FK
b50de3f689 gmenu2x new version to perform a clean poweroff whan the console closes 2020-12-15 15:40:52 +01:00
Michel-FK
124ec1ffad Merge branch 'gmenu2x' of fk:FunKey-Project/FunKey-OS into gmenu2x 2020-12-15 14:20:32 +01:00
Vincent-FK
9c5b7e5847 gmenu2x: no clock and menu that switches to retrofe, Retrofe: clock and menu that switches to gmenu2x 2020-12-15 14:19:59 +01:00
Michel-FK
3efcd72086 add missing rom argument to gmenu2x launch scripts
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
fe94c8854f open gmenu2x in Emulator section by default
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
9d371bdcc1 copy opk to /mnt/apps if it does not exist yet
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
3fb448651c add ip address to system_stats
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
3152ffdd70 adapt gmenu2x keyboard
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
7df1959bd2 suffix opk name with emulator and platform
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
aea9ff5548 remove problematic lynx icon
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
a2fd0cf6f4 shorten gmenu2x commit hash
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Vincent-FK
b4bc8aedbb new version of Gmenu2X with Funkey menu called by home button 2020-12-15 14:19:59 +01:00
Michel-FK
777f1f8051 create opk during build
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
92b16b9883 use correct icon for gamegear in gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Vincent-FK
360b2fe986 changed mapping for gmenu2x, bug correction bpp declared 16 instead of 32 in package mk 2020-12-15 14:19:59 +01:00
Michel-FK
d72bfae27f add emulators and translations in gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
422e7a5e3a show clock in gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
39cd04aa15 completely remove gmenu2x inefficient PowerSaver
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
236df1d44d disable screen blanking in gmenu2x for now, as unblaning does not work
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
449acd45f8 enable both OPK and normal files in gmenu2x context menu
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
a23339e36e push /opk.empty directories
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
358fe33b26 use patched gmenu2x for FunKey
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
c8f0ce97a8 set /media for gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
19348a2640 turn off backlightTimeout
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
347bbf3ee9 move gmenu2x settings to /mnt
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
f6f2293fc3 add system_info script
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
5a3fd024dc add check in start_launcher for gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
9c694e7d25 fetch gmenu2x with minimal changes and add required symbolic links
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
5c68473704 remove skins and translations from rootfs overlay
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Vincent-FK
f458b797c3 rootfs_overlay for gmenu2x files 2020-12-15 14:19:59 +01:00
Michel-FK
7f9b4894c8 clear the screen on exit & force 16bpp surface
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
5fad29cb14 fix font path
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
aa4f88b9d8 install DroidSansFallbackFull.ttf
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
3b59cf4a74 add native resolution for FunKey S
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
5e17d55017 use our forked repos for gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Michel-FK
73394dc3d3 add default gmenu2x files to rootfs
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Vincent-FK
86dfe25eb9 128mb img 2020-12-15 14:19:59 +01:00
Michel-FK
59929c47e4 add gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-15 14:19:59 +01:00
Vincent-FK
e44d07ac08 gmenu2x: no clock and menu that switches to retrofe, Retrofe: clock and menu that switches to gmenu2x 2020-12-13 15:35:46 +01:00
Michel-FK
e1f868f5e9 add missing rom argument to gmenu2x launch scripts
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-13 12:02:40 +01:00
Michel-FK
b0979156cf open gmenu2x in Emulator section by default
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-12 19:37:45 +01:00
Michel-FK
952086f635 copy opk to /mnt/apps if it does not exist yet
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-12 19:24:32 +01:00
Michel-FK
133f2a479e add ip address to system_stats
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-12 13:57:46 +01:00
Michel-FK
75f58ae1da adapt gmenu2x keyboard
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-12 10:20:25 +01:00
Michel-FK
91953c3c61 suffix opk name with emulator and platform
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-12 09:49:00 +01:00
Michel-FK
9a26b58cf5 remove problematic lynx icon
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-11 23:56:05 +01:00
Michel-FK
b43ad98065 shorten gmenu2x commit hash
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-11 23:43:38 +01:00
Michel-FK
514b73cdf0 Merge branch 'gmenu2x' of fk:FunKey-Project/FunKey-OS into gmenu2x 2020-12-11 23:38:02 +01:00
Michel-FK
4cdd246fac create opk during build
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-11 23:37:33 +01:00
Vincent-FK
f9e898f043 Merge branch 'gmenu2x' of https://github.com/FunKey-Project/FunKey-OS into gmenu2x 2020-12-11 19:41:34 +01:00
Vincent-FK
86b0f44728 new version of Gmenu2X with Funkey menu called by home button 2020-12-11 19:41:21 +01:00
Michel-FK
342457cf01 use correct icon for gamegear in gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-11 15:17:51 +01:00
Vincent-FK
991f4f8fa5 changed mapping for gmenu2x, bug correction bpp declared 16 instead of 32 in package mk 2020-12-11 15:02:28 +01:00
Michel-FK
7cf0a58588 add emulators and translations in gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-10 23:49:03 +01:00
Michel-FK
d82ceb8c40 show clock in gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-10 23:47:39 +01:00
Michel-FK
23901cc01b completely remove gmenu2x inefficient PowerSaver
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-10 23:46:06 +01:00
Michel-FK
7a08337282 disable screen blanking in gmenu2x for now, as unblaning does not work
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-09 23:16:27 +01:00
Michel-FK
c2604aec3d enable both OPK and normal files in gmenu2x context menu
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-08 23:59:03 +01:00
Michel-FK
52d4ef46fc push /opk.empty directories
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-08 23:25:36 +01:00
Michel-FK
c6f69b98c8 use patched gmenu2x for FunKey
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-08 22:46:14 +01:00
Michel-FK
5e7dcec348 set /media for gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-08 22:45:41 +01:00
Michel-FK
43c372fe9c turn off backlightTimeout
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-08 22:45:03 +01:00
Michel-FK
1d5a5cd50c move gmenu2x settings to /mnt
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-08 22:44:11 +01:00
Michel-FK
5c4ad6f278 add system_info script
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-08 22:42:36 +01:00
Michel-FK
f91b499ece add check in start_launcher for gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-06 13:12:13 +01:00
Michel-FK
bec57da3a3 fetch gmenu2x with minimal changes and add required symbolic links
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-06 13:11:40 +01:00
Michel-FK
04a7eb19a3 remove skins and translations from rootfs overlay
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-06 13:10:16 +01:00
Vincent-FK
e4ac7ac148 rootfs_overlay for gmenu2x files 2020-12-05 17:43:18 +01:00
Vincent-FK
9d21d6821d Merge branch 'gmenu2x' of https://github.com/FunKey-Project/FunKey-OS into gmenu2x 2020-12-05 17:37:46 +01:00
Michel-FK
76e8110779 clear the screen on exit & force 16bpp surface
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-05 17:37:29 +01:00
Vincent-FK
520507231e Merge branch 'gmenu2x' of https://github.com/FunKey-Project/FunKey-OS into gmenu2x 2020-12-05 17:09:44 +01:00
Michel-FK
64fd9b198b fix font path
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-05 17:09:01 +01:00
Michel-FK
c8e679f912 install DroidSansFallbackFull.ttf
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-05 17:08:48 +01:00
Vincent-FK
8f23d2d74f Merge branch 'gmenu2x' of https://github.com/FunKey-Project/FunKey-OS into gmenu2x 2020-12-05 17:04:24 +01:00
Michel-FK
94916cba31 add native resolution for FunKey S
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-05 16:56:36 +01:00
Vincent-FK
32303fbd50 Merge branch 'gmenu2x' of https://github.com/FunKey-Project/FunKey-OS into gmenu2x 2020-12-05 16:45:28 +01:00
Michel-FK
bbddf7004a use our forked repos for gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-05 15:33:09 +01:00
Vincent-FK
60f18fa15a Merge branch 'gmenu2x' of https://github.com/FunKey-Project/FunKey-OS into gmenu2x 2020-12-05 09:45:15 +01:00
Vincent-FK
f34d1d107e 128mb img 2020-12-05 09:45:13 +01:00
Michel-FK
707d8f5b8e add default gmenu2x files to rootfs
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-05 09:43:38 +01:00
Michel-FK
9e45468ce1 increase rootfs size
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-05 09:38:58 +01:00
Michel-FK
d4dc552bf8 add gmenu2x
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-12-04 22:59:23 +01:00
Michel-FK
f6d4b3f7b3
Fix dd source filename 2020-11-27 10:27:18 +01:00
Vincent-FK
292928d1d9 removed Cave Story from free games 2020-11-27 00:03:13 +01:00
Michel-FK
7a7eef2fae revert to MBR
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-11-26 23:23:26 +01:00
Michel-FK
7688c3fcf7 modify docker artifact paths
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-11-22 13:55:11 +01:00
Michel-FK
d860a03fbe trigger workflow on workflow_dispatch
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
2020-11-22 11:33:03 +01:00
311 changed files with 21917 additions and 1681 deletions

View File

@ -5,6 +5,8 @@ on:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
branches: [ master ]
jobs:
build:
@ -22,6 +24,8 @@ jobs:
sudo rm -rf /var/lib/apt/lists/*
sudo sed -i 's/# \(en_US.UTF-8\)/\1/' /etc/locale.gen
sudo locale-gen --purge --lang en_US.UTF-8
- name: Build SDK
run: make sdk
- name: Build FunKey-OS
run: make
- uses: actions/upload-artifact@v2

30
.github/workflows/build_sdk.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: FunKey SDK Build
on:
workflow_dispatch:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y -q --no-install-recommends make binutils build-essential gcc g++ patch bzip2 perl cpio unzip rsync file bc wget python python-dev xxd libncurses5-dev cvs git mercurial rsync liblscp-dev subversion python3 python3-dev python3-distutils python3-setuptools ca-certificates openssh-client expect locales sudo procps
sudo apt-get -y autoremove
sudo apt-get -y clean
sudo rm -rf /var/lib/apt/lists/*
sudo sed -i 's/# \(en_US.UTF-8\)/\1/' /etc/locale.gen
sudo locale-gen --purge --lang en_US.UTF-8
- name: Build SDK
run: make sdk
- uses: actions/upload-artifact@v2
with:
name: Upload artifacts
path: |
images/*
br.log

2
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "buildroot"]
path = buildroot
url = git://git.buildroot.net/buildroot
url = https://github.com/FunKey-Project/buildroot.git

View File

@ -1,5 +1,5 @@
source "$BR2_EXTERNAL_FUNKEY_PATH/package/mednafen/Config.in"
source "$BR2_EXTERNAL_FUNKEY_PATH/package/FunKey-GPIO-Mapping/Config.in"
source "$BR2_EXTERNAL_FUNKEY_PATH/package/fkgpiod/Config.in"
source "$BR2_EXTERNAL_FUNKEY_PATH/package/retrofe/Config.in"
source "$BR2_EXTERNAL_FUNKEY_PATH/package/PCSX-ReARMed/Config.in"
source "$BR2_EXTERNAL_FUNKEY_PATH/package/FCEUX/Config.in"
@ -9,3 +9,13 @@ source "$BR2_EXTERNAL_FUNKEY_PATH/package/PocketSNES/Config.in"
source "$BR2_EXTERNAL_FUNKEY_PATH/package/gpsp/Config.in"
source "$BR2_EXTERNAL_FUNKEY_PATH/package/dmtx-utils/Config.in"
source "$BR2_EXTERNAL_FUNKEY_PATH/package/ProdScreens/Config.in"
source "$BR2_EXTERNAL_FUNKEY_PATH/package/fonts-droid/Config.in"
source "$BR2_EXTERNAL_FUNKEY_PATH/package/libini/Config.in"
source "$BR2_EXTERNAL_FUNKEY_PATH/package/libopk/Config.in"
source "$BR2_EXTERNAL_FUNKEY_PATH/package/libxdgmime/Config.in"
source "$BR2_EXTERNAL_FUNKEY_PATH/package/gmenu2x/Config.in"
source "$BR2_EXTERNAL_FUNKEY_PATH/package/agg/Config.in"
source "$BR2_EXTERNAL_FUNKEY_PATH/package/fluidlite/Config.in"
source "$BR2_EXTERNAL_FUNKEY_PATH/package/libmikmod/Config.in"
source "$BR2_EXTERNAL_FUNKEY_PATH/package/commander/Config.in"
source "$BR2_EXTERNAL_FUNKEY_PATH/package/bibi/Config.in"

View File

@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Busybox version: 1.31.1
# Mon Nov 9 00:34:05 2020
# Busybox version: 1.32.0
# Tue Apr 6 08:18:28 2021
#
CONFIG_HAVE_DOT_CONFIG=y
@ -76,6 +76,7 @@ CONFIG_PREFIX="./_install"
# CONFIG_DEBUG_SANITIZE is not set
# CONFIG_UNIT_TEST is not set
# CONFIG_WERROR is not set
# CONFIG_WARN_SIMPLE_MSG is not set
CONFIG_NO_DEBUG_LIB=y
# CONFIG_DMALLOC is not set
# CONFIG_EFENCE is not set
@ -462,6 +463,7 @@ CONFIG_FEATURE_FIND_SIZE=y
CONFIG_FEATURE_FIND_PRUNE=y
CONFIG_FEATURE_FIND_QUIT=y
# CONFIG_FEATURE_FIND_DELETE is not set
CONFIG_FEATURE_FIND_EMPTY=y
CONFIG_FEATURE_FIND_PATH=y
CONFIG_FEATURE_FIND_REGEX=y
# CONFIG_FEATURE_FIND_CONTEXT is not set
@ -692,6 +694,7 @@ CONFIG_FEATURE_SETPRIV_CAPABILITY_NAMES=y
CONFIG_SWITCH_ROOT=y
# CONFIG_TASKSET is not set
# CONFIG_FEATURE_TASKSET_FANCY is not set
# CONFIG_FEATURE_TASKSET_CPULIST is not set
CONFIG_UEVENT=y
CONFIG_UMOUNT=y
CONFIG_FEATURE_UMOUNT_ALL=y
@ -805,6 +808,7 @@ CONFIG_MAKEDEVS=y
CONFIG_FEATURE_MAKEDEVS_TABLE=y
# CONFIG_MAN is not set
CONFIG_MICROCOM=y
CONFIG_MIM=y
CONFIG_MT=y
# CONFIG_NANDWRITE is not set
# CONFIG_NANDDUMP is not set
@ -1095,6 +1099,7 @@ CONFIG_SH_IS_ASH=y
# CONFIG_BASH_IS_ASH is not set
# CONFIG_BASH_IS_HUSH is not set
CONFIG_BASH_IS_NONE=y
CONFIG_SHELL_ASH=y
CONFIG_ASH=y
CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
CONFIG_ASH_INTERNAL_GLOB=y
@ -1115,6 +1120,7 @@ CONFIG_ASH_GETOPTS=y
CONFIG_ASH_CMDCMD=y
# CONFIG_CTTYHACK is not set
# CONFIG_HUSH is not set
# CONFIG_SHELL_HUSH is not set
# CONFIG_HUSH_BASH_COMPAT is not set
# CONFIG_HUSH_BRACE_EXPANSION is not set
# CONFIG_HUSH_LINENO_VAR is not set
@ -1177,6 +1183,7 @@ CONFIG_FEATURE_ROTATE_LOGFILE=y
CONFIG_FEATURE_REMOTE_LOG=y
# CONFIG_FEATURE_SYSLOGD_DUP is not set
# CONFIG_FEATURE_SYSLOGD_CFG is not set
# CONFIG_FEATURE_SYSLOGD_PRECISE_TIMESTAMPS is not set
CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256
# CONFIG_FEATURE_IPC_SYSLOG is not set
CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0

View File

@ -11,7 +11,6 @@ CONFIG_PERF_EVENTS=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_PARTITION_ADVANCED=y
# CONFIG_MSDOS_PARTITION is not set
CONFIG_ARCH_SUNXI=y
# CONFIG_MACH_SUN4I is not set
# CONFIG_MACH_SUN5I is not set
@ -26,6 +25,7 @@ CONFIG_CPU_FREQ=y
CONFIG_CPUFREQ_DT=y
CONFIG_VFP=y
CONFIG_NEON=y
CONFIG_KERNEL_MODE_NEON=y
# CONFIG_COREDUMP is not set
CONFIG_HIBERNATION=y
CONFIG_PM_STD_PARTITION="/dev/mmcblk0p2"
@ -120,6 +120,9 @@ CONFIG_USB_ZERO=m
CONFIG_USB_ETH=m
CONFIG_USB_ETH_EEM=y
CONFIG_USB_G_NCM=m
CONFIG_USB_FUNCTIONFS=m
CONFIG_USB_FUNCTIONFS_ETH=y
CONFIG_USB_FUNCTIONFS_RNDIS=y
CONFIG_USB_MASS_STORAGE=m
CONFIG_USB_G_SERIAL=m
CONFIG_USB_G_ACM_MS=m
@ -153,7 +156,7 @@ CONFIG_AUTOFS4_FS=y
CONFIG_VFAT_FS=y
CONFIG_TMPFS=y
CONFIG_CONFIGFS_FS=y
# CONFIG_MISC_FILESYSTEMS is not set
CONFIG_SQUASHFS=y
# CONFIG_NETWORK_FILESYSTEMS is not set
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ISO8859_1=y

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,26 @@
Merge this bug as it can affect performance :
https://github.com/OpenDingux/SDL/commit/e51100dce8da9099278dac9f5affbecf6396378b
--- a/src/audio/alsa/SDL_alsa_audio.c
+++ b/src/audio/alsa/SDL_alsa_audio.c
@@ -479,6 +479,10 @@
return(-1);
}
+ /* Switch to blocking mode for playback */
+ /* Note: this must happen before hw/sw params are set. */
+ SDL_NAME(snd_pcm_nonblock)(pcm_handle, 0);
+
/* Figure out what the hardware is capable of */
snd_pcm_hw_params_alloca(&hwparams);
status = SDL_NAME(snd_pcm_hw_params_any)(pcm_handle, hwparams);
@@ -611,9 +615,6 @@
}
SDL_memset(mixbuf, spec->silence, spec->size);
- /* Switch to blocking mode for playback */
- SDL_NAME(snd_pcm_nonblock)(pcm_handle, 0);
-
/* We're ready to rock and roll. :-) */
return(0);
}

View File

@ -0,0 +1,22 @@
diff --git a/src/video/fbcon/SDL_fbevents.c b/src/video/fbcon/SDL_fbevents.c
index 5e369a4..549a7ad 100644
--- a/src/video/fbcon/SDL_fbevents.c
+++ b/src/video/fbcon/SDL_fbevents.c
@@ -270,17 +270,6 @@ int FB_OpenKeyboard(_THIS)
fprintf(stderr, "vtpath = %s, fd = %d\n",
vtpath, keyboard_fd);
#endif /* DEBUG_KEYBOARD */
-
- /* This needs to be our controlling tty
- so that the kernel ioctl() calls work
- */
- if ( keyboard_fd >= 0 ) {
- tty0_fd = open("/dev/tty", O_RDWR, 0);
- if ( tty0_fd >= 0 ) {
- ioctl(tty0_fd, TIOCNOTTY, 0);
- close(tty0_fd);
- }
- }
}
}
if ( keyboard_fd < 0 ) {

View File

@ -0,0 +1,15 @@
pcm.monocard{
slave.pcm "hw:0"
slave.channels 2
type route
ttable {
# Copy both input channels to output channel 1 (Right).
0.1 1
1.1 1
# Send nothing to output channel 0 (Left).
0.0 0
1.0 0
}
}
pcm.!default monocard

View File

@ -0,0 +1,25 @@
CLEAR
MAP FN TO KEY KEY_K
MAP START TO KEY KEY_S
MAP UP TO KEY KEY_U
MAP LEFT TO KEY KEY_L
MAP FN+LEFT TO KEY KEY_J
MAP DOWN TO KEY KEY_D
MAP FN+DOWN TO KEY KEY_H
MAP RIGHT TO KEY KEY_R
MAP FN+RIGHT TO KEY KEY_I
MAP R TO KEY KEY_N
MAP L TO KEY KEY_M
MAP A TO KEY KEY_A
MAP B TO KEY KEY_B
MAP X TO KEY KEY_X
MAP Y TO KEY KEY_Y
MAP MENU TO KEY KEY_Q
MAP FN+UP TO COMMAND snapshot
MAP FN+A TO COMMAND volume up
MAP FN+Y TO COMMAND volume down
MAP FN+X TO COMMAND brightness up
MAP FN+B TO COMMAND brightness down
MAP FN+L TO KEY KEY_V
MAP FN+R TO KEY KEY_O
MAP FN+L+R TO COMMAND system_stats toggle

View File

@ -8,4 +8,4 @@ tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0
sysfs /sys sysfs defaults 0 0
/dev/mmcblk0p3 none swap sw 0 0
configfs /sys/kernel/config configfs rw,relatime 0 0
/dev/mmcblk0p4 /mnt vfat rw,relatime,fmask=0022,dmask=0022,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
/dev/mmcblk0p4 /mnt vfat rw,relatime,fmask=0022,dmask=0022,iocharset=iso8859-1,shortname=mixed 0 0

View File

@ -1,66 +0,0 @@
##################################
# Funkey GPIO keymap config file #
##################################
# Format:
#
# - First all GPIO Pin numbers must be declared (integers separated by commas)
# By default, pins are declared active high, to declare them active low, add char '*'
# Example: 0,1,2,3,4,6,7,10*,11,12,13,14,15
#
# - Then the mapping can be done as follows (one line per mapping):
# Pin_number[+Pin_number...], type_mapping, value, str_help_name_pin, str_help_fct_pin
#
# args: * Pin_number is the pin number concerned by the maping,
# add +Pin_number for multiple touch mapping (not limited in nb of pins)
# * type_mapping can be KEYBOARD or SHELL_COMMAND
# * value is :
# if type_mapping==KEYBOARD: the keycode from /usr/include/linux/input.h]
# if type_mapping==SHELL_COMMAND: the shell command to exec
# * str_help_name_pin is a sweet name for the pin (ex: PB5)
# * str_help_fct_pin is an help str to indicate the function of this mapping
###################################
# Pins declaration:
0,1,2,3,4,6,7,10*,11,12,13,14,15
###################################
# Mapping:
#7, KEYBOARD, KEY_F, KEY_F, Fn
#7+6, KEYBOARD, KEY_K, KEY_K, Select
7, KEYBOARD, KEY_K, KEY_K, Select
6, KEYBOARD, KEY_S, KEY_S, Start
3, KEYBOARD, KEY_U, KEY_U, Up
7+3, KEYBOARD, KEY_P, KEY_P, Quick Save
4, KEYBOARD, KEY_L, KEY_L, Left
7+4, KEYBOARD, KEY_J, KEY_J, Aspect ratio factor --
1, KEYBOARD, KEY_D, KEY_D, Down
7+1, KEYBOARD, KEY_H, KEY_H, Aspect ratio mode change
0, KEYBOARD, KEY_R, KEY_R, Right
7+0, KEYBOARD, KEY_I, KEY_I, Aspect ratio factor ++
15, KEYBOARD, KEY_N, KEY_N, R1
7+15, KEYBOARD, KEY_O, KEY_O, R2
2, KEYBOARD, KEY_M, KEY_M, L1
7+2, KEYBOARD, KEY_V, KEY_V, L2
12, KEYBOARD, KEY_A, KEY_A, A
14, KEYBOARD, KEY_B, KEY_B, B
13, KEYBOARD, KEY_Y, KEY_Y, Y
11, KEYBOARD, KEY_X, KEY_X, X
7+12, SHELL_COMMAND, quick_action_volume_up, Fn+Y, Volume++
7+13, SHELL_COMMAND, quick_action_volume_down, Fn+A, Volume--
7+11, SHELL_COMMAND, quick_action_bright_up, Fn+B, Brightness++
7+14, SHELL_COMMAND, quick_action_bright_down, Fn+X, Brightness--
10, SHELL_COMMAND, sched_shutdown 1 & signal_usr1_to_emulators, N_OE, Quick save and Poweroff because of N_OE
7+15+2, SHELL_COMMAND, display_notif_system_stats, Fn+L1+L2, display system cpu and ram usage
#7+12, KEYBOARD, KEY_G, KEY_G, Brightness++
#7+14, KEYBOARD, KEY_E, KEY_E, Volume--
#7+13, KEYBOARD, KEY_W, KEY_W, Brightness--
#7+11, KEYBOARD, KEY_C, KEY_C, Volume++
#10, KEYBOARD, KEY_T, KEY_T, Should Poweroff because N_OE_received
#7+15, KEYBOARD, KEY_Q, 7+11, Launch menu

View File

@ -1 +1 @@
FunKey_S Rev.E
FunKey_S Rev.F

View File

@ -4,19 +4,9 @@ THIS=$(basename $0)
case "$1" in
start)
# Check is SWAP partition already created
sgdisk -p /dev/mmcblk0 | grep swap > /dev/null
if [ $? -ne 0 ]; then
first_boot_ok=$(fw_printenv -n first_boot_ok 2>/dev/null)
if ! [ ! "${first_boot_ok}" -ne "${first_boot_ok}" ] 2> /dev/null; then
first_boot
exit $?
fi
# Check is share partition already created
sgdisk -p /dev/mmcblk0 | grep share > /dev/null
if [ $? -ne 0 ]; then
first_boot
exit $?
fi
;;
stop)

View File

@ -5,6 +5,6 @@
|___| |_____|__|__||__|\__||_____|___ |
FUN ON A KEYCHAIN |_____|
-----------------------------------------------------
Version 1.0.1
Version 2.3.0
-----------------------------------------------------

View File

@ -1,12 +1,12 @@
NAME="FunKey-OS"
VERSION="1.0.1 (Funky Fish)"
VERSION="2.3.0 (Zen Zebu)"
ID=funkey
ID_LIKE=buildroot
PRETTY_NAME="FunKey-OS 1.0.1"
VERSION_ID="1.0.1"
PRETTY_NAME="FunKey-OS 2.3.0"
VERSION_ID="2.3.0"
HOME_URL="https://www.funkey-project.com/"
SUPPORT_URL="https://www.funkey-project.com/"
BUG_REPORT_URL="https://www.funkey-project.com/"
PRIVACY_POLICY_URL="https://www.funkey-project.com"
VERSION_CODENAME=Funky
UBUNTU_CODENAME=Funky
VERSION_CODENAME=Zen
UBUNTU_CODENAME=Zen

View File

@ -11,7 +11,6 @@ fi
export PAGER='/bin/more'
export EDITOR='/usr/bin/nano'
export SDL_NOMOUSE=1
export MEDNAFEN_HOME=/tmp/funkey/.mednafen
# Source configuration files from /etc/profile.d
for i in /etc/profile.d/*.sh ; do

View File

@ -1 +1 @@
rootfs 1.0.1
rootfs 2.3.0

View File

@ -2,7 +2,7 @@ args_mmc=setenv bootargs console=ttyS0,115200 panic=5 rootwait fbcon=map:10 fbco
baudrate=115200
bootcmd=run getbootpart; run check_keys; if test ${found} = 1; then setenv bootpart 1; fi; run args_mmc; run loadfdt; run loadimage; bootz ${loadaddr} - ${fdtaddr}
bootdelay=0
check_keys=run set_pullups; setenv found 0; setenv timeout ${delay}; while test ${timeout} > 0; do run read_keys; if test ${keys} = f83f; then setenv found 1; setenv timeout 0; else setexpr timeout ${timeout} - 1; fi; done
check_keys=run probe_i2c; run set_pullups; setenv found 0; setenv timeout ${delay}; while test ${timeout} > 0; do run read_keys; echo ${keys}; if test ${keys} = f83f; then setenv found 1; setenv timeout 0; else setexpr timeout ${timeout} - 1; fi; done
console=ttyS0,115200
delay=1
fdt_high=0xffffffff
@ -11,8 +11,9 @@ getbootpart=part list mmc 0 -bootable bootpart
loadaddr=0x41000000
loadfdt=load mmc 0:${bootpart} ${fdtaddr} /boot/sun8i-v3s-funkey.dtb
loadimage=load mmc 0:${bootpart} ${loadaddr} /boot/zImage
read_keys=i2c read 20 0 2 1c20500; setexpr.w keys *1c20500
set_pullups=i2c mw 20 46 df; i2c mw 20 47 f8
probe_i2c=if i2c probe 76; then setenv i2caddr 76; else setenv i2caddr 20; fi
read_keys=i2c read ${i2caddr} 0 2 1c20500; setexpr.w keys *1c20500 \\& 0xf8ff
set_pullups=i2c mw ${i2caddr} 46 df; i2c mw ${i2caddr} 47 f8
stderr=serial@01c28000
stdin=serial@01c28000
stdout=serial@01c28000

View File

@ -0,0 +1 @@
/mnt

View File

@ -0,0 +1 @@
/mnt/funkey/.gmenu2x

View File

@ -18,6 +18,47 @@ alias l='ls $LS_OPTIONS -lA'
# alias cp='cp -i'
# alias mv='mv -i'
# Alias functions for compatibility
volume_get() {
volume get "$@"
}
volume_set() {
volume set "$@"
}
brightness_get() {
brightness get "$@"
}
brightness_set() {
brightness set "$@"
}
notif_set() {
notif set "$@"
}
start_audio_amp() {
audio_amp "$@"
}
cancel_sched_powerdown() {
powerdown handle
}
# Relocate HOME into the r/w partition
export HOME=/mnt/FunKey
mkdir -p "${HOME}"
export MEDNAFEN_HOME=$HOME/.mednafen
mkdir -p "${MEDNAFEN_HOME}"
cp "/usr/games/lynxboot.img" "/usr/games/mednafen-09x.cfg" "${MEDNAFEN_HOME}/"
export GMENU2X_HOME="$HOME/.gmenu2x"
mkdir -p "${GMENU2X_HOME}"
export RETROFE_HOME="$HOME/.retrofe"
mkdir -p "${RETROFE_HOME}"
mkdir -p "${RETROFE_HOME}/layouts"
# Resize the console to the terminal dimensions
resize() {
if [[ -t 0 && $# -eq 0 ]]; then
@ -36,24 +77,20 @@ resize() {
fi
}
# Restore saved volume
echo "Restore saved volume"
volume set $(volume get) >/dev/null 2>&1
# Start ampli if necessary
echo "Start audio amplifier if necessary"
if [[ "$(volume_get)" -ne "0" ]]; then
start_audio_amp 1 >/dev/null 2>&1
fi
# Force unmute sound card and reset volume
echo "Force unmute sound card and reset volume"
volume_set $(volume_get) >/dev/null 2>&1
# Reset saved brightness
echo "Reset saved brightness"
brightness_set $(brightness_get) >/dev/null 2>&1
# Restore saved brightness
echo "Restore saved brightness"
brightness set $(brightness get) >/dev/null 2>&1
# Start Assembly tests (blocking process)
assembly_tests >/dev/null 2>&1
# Start launcher
echo "Start launcher"
start_launcher >/dev/null 2>&1 &
# Restart saved application/game if any
instant_play load
# Start frontend
echo "Start frontend"
frontend init >/dev/null 2>&1 &

View File

@ -1,7 +1,7 @@
# Uncomment and edit the following line to use a different ROM path.
list.path = %BASE_ITEM_PATH%/%ITEM_COLLECTION_NAME%
list.includeMissingItems = false
list.extensions = gba,GBA
list.extensions = gba,GBA,zip,ZIP
list.menuSort = yes
launcher = gba

View File

@ -1,7 +1,7 @@
# Uncomment and edit the following line to use a different ROM path.
list.path = %BASE_ITEM_PATH%/%ITEM_COLLECTION_NAME%
list.includeMissingItems = false
list.extensions = nes,NES
list.extensions = nes,NES,fds,FDS,zip,ZIP
list.menuSort = yes
launcher = NES

View File

@ -1,7 +1,7 @@
# Uncomment and edit the following line to use a different ROM path.
list.path = %BASE_ITEM_PATH%/%ITEM_COLLECTION_NAME%
list.includeMissingItems = false
list.extensions = zip,ZIP,pce,PCE,sgx,SGX
list.extensions = zip,ZIP,pce,PCE,sgx,SGX,cue,CUE
list.menuSort = yes
launcher = pce

View File

@ -1,7 +1,7 @@
# Uncomment and edit the following line to use a different ROM path.
list.path = %BASE_ITEM_PATH%/%ITEM_COLLECTION_NAME%
list.includeMissingItems = false
list.extensions = sfc,SFC,smc,SMC
list.extensions = sfc,SFC,smc,SMC,zip,ZIP
list.menuSort = yes
launcher = snes

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -19,7 +19,7 @@ list.includeMissingItems = true
###############################################################################
# Extensions are comma separated without spaces
###############################################################################
list.extensions = zip,ZIP,md,MD
list.extensions = zip,ZIP,md,MD,bin,BIN,32x,32X,cue,CUE,cso,CSO,chd,CHD,smd,SMD
###############################################################################
# If a menu.xml file exists, it will display the menu alphabetically. To

Binary file not shown.

After

Width:  |  Height:  |  Size: 1007 B

View File

@ -19,7 +19,7 @@ list.includeMissingItems = true
###############################################################################
# Extensions are comma separated without spaces
###############################################################################
list.extensions = zip,ZIP,sms,SMS
list.extensions = zip,ZIP,sms,SMS,bin,BIN
###############################################################################
# If a menu.xml file exists, it will display the menu alphabetically. To

View File

@ -1,7 +1,7 @@
# Uncomment and edit the following line to use a different ROM path.
list.path = %BASE_ITEM_PATH%/%ITEM_COLLECTION_NAME%
list.includeMissingItems = false
list.extensions = zip,ZIP,wsc,WSC
list.extensions = zip,ZIP,wsc,WSC,ws,WS
list.menuSort = yes
launcher = wonderswan

View File

@ -1,8 +1,10 @@
#!/bin/sh
# Security
cp /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
export HOME=/tmp/funkey
mkdir -p ${HOME}
cd ${HOME}
mednafen -fs 1 -gg.stretch full "$1"
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
mednafen -fs 1 -gg.stretch full "$1"&
pid record $!
wait $!
pid erase

View File

@ -1,6 +1,8 @@
#!/bin/sh
export HOME=/tmp/funkey
mkdir -p ${HOME}
cd ${HOME}
sdlgnuboy --syncrtc "$1"
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
sdlgnuboy --syncrtc --stereo=0 "$1"&
pid record $!
wait $!
pid erase

View File

@ -1,6 +1,10 @@
#!/bin/sh
export HOME=/tmp/funkey
mkdir -p ${HOME}
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
cd ${HOME}
gpsp "$1"
gpsp "$1"&
pid record $!
wait $!
pid erase

View File

@ -1,6 +1,8 @@
#!/bin/sh
export HOME=/tmp/funkey
mkdir -p ${HOME}
cd ${HOME}
gpsp "$1"
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
gpsp "$1"&
pid record $!
wait $!
pid erase

View File

@ -1,8 +1,10 @@
#!/bin/sh
# Security
cp /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
export HOME=/tmp/funkey
mkdir -p ${HOME}
cd ${HOME}
mednafen -fs 1 -lynx.stretch full "$1"
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
mednafen -fs 1 -lynx.stretch full "$1"&
pid record $!
wait $!
pid erase

View File

@ -1,8 +1,10 @@
#!/bin/sh
# Security
cp /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
export HOME=/tmp/funkey
mkdir -p ${HOME}
cd ${HOME}
mednafen -sound 1 -soundrate 22050 -soundbufsize 100 -vdriver sdl -frameskip 1 -fs 0 "$1"
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
mednafen -sound 1 -soundrate 22050 -soundbufsize 100 -vdriver sdl -frameskip 1 -fs 0 "$1"&
pid record $!
wait $!
pid erase

View File

@ -1,6 +1,8 @@
#!/bin/sh
export HOME=/tmp/funkey
mkdir -p ${HOME}
cd ${HOME}
PicoDrive "$1"
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
PicoDrive "$1"&
pid record $!
wait $!
pid erase

View File

@ -1,7 +1,8 @@
#!/bin/sh
export HOME=/tmp/funkey
mkdir -p ${HOME}
cd ${HOME}
fceux "$1"
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
fceux "$1"&
pid record $!
wait $!
pid erase

View File

@ -1,8 +1,10 @@
#!/bin/sh
# Security
cp /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
export HOME=/tmp/funkey
mkdir -p ${HOME}
cd ${HOME}
mednafen -fs 1 -ngp.stretch full "$1"
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
mednafen -fs 1 -ngp.stretch full "$1"&
pid record $!
wait $!
pid erase

View File

@ -1,8 +1,10 @@
#!/bin/sh
# Security
cp /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
export HOME=/tmp/funkey
mkdir -p ${HOME}
cd ${HOME}
mednafen -fs 1 -force_module pce_fast -pce_fast.stretch full "$1"
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
mednafen -fs 1 -force_module pce_fast -pce_fast.stretch full "$1"&
pid record $!
wait $!
pid erase

View File

@ -1,6 +1,8 @@
#!/bin/sh
export HOME=/tmp/funkey
mkdir -p ${HOME}
cd ${HOME}
pcsx -frameskip -cdfile "$1"
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
pcsx -frameskip -cdfile "$1"&
pid record $!
wait $!
pid erase

View File

@ -1,7 +1,8 @@
#!/bin/sh
export HOME=/tmp/funkey
mkdir -p ${HOME}
cd ${HOME}
#pcsx -frameskip -cdfile "$1"
pcsx -cdfile "$1"
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
pcsx -cdfile "$1"&
pid record $!
wait $!
pid erase

View File

@ -1,6 +1,8 @@
#!/bin/sh
export HOME=/tmp/funkey
mkdir -p ${HOME}
cd ${HOME}
PicoDrive "$1"
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
PicoDrive "$1"&
pid record $!
wait $!
pid erase

View File

@ -1,6 +1,8 @@
#!/bin/sh
export HOME=/tmp/funkey
mkdir -p ${HOME}
cd ${HOME}
psnes "$1"
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
psnes "$1"&
pid record $!
wait $!
pid erase

View File

@ -1,6 +1,8 @@
#!/bin/sh
export HOME=/tmp/funkey
mkdir -p ${HOME}
cd ${HOME}
psnes "$1"
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
psnes "$1"&
pid record $!
wait $!
pid erase

View File

@ -1,8 +1,10 @@
#!/bin/sh
# Security
cp /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
export HOME=/tmp/funkey
mkdir -p ${HOME}
cd ${HOME}
mednafen -fs 1 -wswan.stretch full "$1"
# Launch the process in background, record the PID into a file, wait
# for the process to terminate and erase the recorded PID
mednafen -fs 1 -wswan.stretch full "$1"&
pid record $!
wait $!
pid erase

View File

@ -3021,10 +3021,10 @@ ngp.enable 1
ngp.forcemono 1
;ngp, Built-In, Gamepad: A
ngp.input.builtin.gamepad.a keyboard 97
ngp.input.builtin.gamepad.a keyboard 98~keyboard 120
;ngp, Built-In, Gamepad: B
ngp.input.builtin.gamepad.b keyboard 98
ngp.input.builtin.gamepad.b keyboard 97~keyboard 121
;ngp, Built-In, Gamepad: DOWN ↓
ngp.input.builtin.gamepad.down keyboard 100

View File

@ -17,13 +17,12 @@ if [ $? -ne 0 ]; then
warn "$@"
exit $return_code
}
die_notif () {
local return_code=$1
shift
warn "$@"
notif set 0 "$@"
exit $return_code
}
fi
notif () {
info "$@"
printf "$@" > /sys/class/graphics/fb0/notification
}
clear_notif () {
printf "clear" > /sys/class/graphics/fb0/notification
}

View File

@ -0,0 +1,154 @@
#!/bin/sh
#set -xv
SELF=${SELF:-$(basename $0)}
source /usr/local/lib/utils
source usb_gadget
# The composite gadget directory
GADGET=/sys/kernel/config/usb_gadget/FunKey
# USB VID for Intel
ID_VENDOR="0x8087"
# USB PID for Multifunction Composite Gadget
ID_PRODUCT="0x011e"
# Get the CPU serial number
SERIAL="$(grep Serial /proc/cpuinfo | sed 's/Serial\s*: \(\w*\)/\1/')"
# Initialize the ADB
init_adb() {
# Don't proceed if existing gadget is present
if [ -e ${GADGET} ]; then
return 0
fi
# Get the legacy drivers out of the way
modprobe -r g_ether
modprobe -r g_mass_storage
# Load the libcomposite USB driver, configfs and various other drivers
modprobe libcomposite
modprobe usb_f_serial
modprobe usb_f_fs
modprobe usb_f_acm
# USB Device Controller Driver
local udc_driver=$(ls /sys/class/udc | cut -f1 | head -n 1)
# Create our gadget directory
mkdir ${GADGET}
mkdir ${GADGET}/strings/0x409
mkdir ${GADGET}/configs/FunKey.1
mkdir ${GADGET}/configs/FunKey.1/strings/0x409
mkdir ${GADGET}/functions/acm.GS0
mkdir ${GADGET}/functions/ffs.adb
# USB VID and PID
echo ${ID_VENDOR} > ${GADGET}/idVendor
echo ${ID_PRODUCT} > ${GADGET}/idProduct
# Device String Descriptiors
echo "Intel" > ${GADGET}/strings/0x409/manufacturer
echo "FunKey S" > ${GADGET}/strings/0x409/product
echo ${SERIAL} > ${GADGET}/strings/0x409/serialnumber
# Configuration
# Maximum power is 120 mA
echo 120 > ${GADGET}/configs/FunKey.1/MaxPower
# Configuration String Descriptors
echo "ADB+CDC" > ${GADGET}/configs/FunKey.1/strings/0x409/configuration
# Add the ACM function to the FunKey.1 configuration
ln -s ${GADGET}/functions/acm.GS0 ${GADGET}/configs/FunKey.1
# Add the FunctionFS function to the FunKey.1 configuration
ln -s ${GADGET}/functions/ffs.adb ${GADGET}/configs/FunKey.1
# Create the function filesystem
mkdir /dev/usb-ffs
mkdir /dev/usb-ffs/adb
# Mount the ADB function filesystem
mount -t functionfs adb /dev/usb-ffs/adb
# Bring up the loopback network
ifup lo
# Launch the ADB daemon
adbd >/dev/null &
# Sleeping is required to wait for the UDC to come up
sleep 5
# Bind the USB Gadget
echo ${udc_driver} > ${GADGET}/UDC
return 0
}
# Deinitialize the ADB
deinit_adb() {
# Unbind the device
echo > ${GADGET}/UDC
# Kill the ADB daemon
killall adbd
# Bring down the local network
ifdown lo
# Unmount the ADB function filesystem
umount /dev/usb-ffs/adb
# Delete the function filesystem
rmdir /dev/usb-ffs/adb
rmdir /dev/usb-ffs
# Remove functions from configurations
rm ${GADGET}/configs/FunKey.1/acm.GS0
rm ${GADGET}/configs/FunKey.1/ffs.adb
# Remove string directories in configurations
rmdir ${GADGET}/configs/FunKey.1/strings/0x409
# Remove configurations
rmdir ${GADGET}/configs/FunKey.1
# Remove functions
rmdir ${GADGET}/functions/acm.GS0
rmdir ${GADGET}/functions/ffs.adb
# Remove strings
rmdir ${GADGET}/strings/0x409
# Finallyy remove the gadget
rmdir ${GADGET}
# Unload the kernel modules
modprobe -r usb_f_serial usb_f_fs usb_f_acm
}
case "$1" in
start)
deinit_usb_gadget
init_adb
;;
stop)
deinit_adb
init_usb_gadget
;;
*)
die 15 "Usage $0 {start|stop}"
;;
esac
exit $?

View File

@ -16,6 +16,10 @@ if [ -f ${LOCK_FILE} ]; then
fi
touch ${LOCK_FILE}
## Register ourself as the running FunKey task for receiving USR1
## signal for shutting down
pid record $$
## Binaries
PROD_SCREEN_BIN="/usr/local/sbin/funkey_prod_screens"
GET_PROC_UID="/usr/local/sbin/get_sid"
@ -28,7 +32,7 @@ stop_loop=false
proc_uid=$($GET_PROC_UID)
## Defines
VERSION="1.00"
VERSION="1.01"
LOG_FILE="/root/logs/assembly_tests/assy_tests_${proc_uid}.log"
[ -d $(dirname $LOG_FILE) ] || mkdir -p $(dirname $LOG_FILE)
MAGNET_DETECTED_FILE="/root/.assembly_tests_magnet_detected"
@ -38,7 +42,7 @@ QR_CODE_IMG="/root/logs/assembly_tests/qrcode.png"
## Function called when SIGURS1 is caught while waiting for it
function function_magnet_detected_ok {
## Kill scheduled shutdown
pkill sched_shutdown
pkill -f "powerdown schedule"
## Write magnet_detected file
if $test_failed; then
@ -51,13 +55,16 @@ function function_magnet_detected_ok {
## Clean shutdown
echo " Caught SIGUSR1 signal: magnet detected"
echo " Rebooting now..."
shutdown_funkey
powerdown now
exit 0
}
## Function called when SIGUSR1 is caught while NOT waiting for it
function function_magnet_detected_ko {
echo "ERROR: Caught SIGUSR1 signal (magnet detected!)"
## Kill the funkey_prod_screen binary
killall -s USR1 "${PROD_SCREEN_BIN}" > /dev/null 2>&1
sync
}
@ -71,7 +78,7 @@ function launch_tests_up_until_magnet {
termfix_all > /dev/null
## Clear all notifs
notif_clear
notif clear
## Test if log file aleady exists
if [[ -f $LOG_FILE ]]; then
@ -92,10 +99,7 @@ function launch_tests_up_until_magnet {
echo " OK"
sync
## Check if battery present
if [[ $(cat /sys/class/power_supply/axp20x-battery/present) == "0" ]]; then
## Launch screen to wait for battery
## Battery tests
echo "TEST BATTERY:"
sync
$PROD_SCREEN_BIN WAIT_BATTERY 2>&1
@ -107,10 +111,6 @@ function launch_tests_up_until_magnet {
echo " FAIL"
test_failed=true
fi
else
echo "TEST BATTERY:"
echo " OK"
fi
sync
## Dump power info from AXP209
@ -158,7 +158,7 @@ function launch_tests_up_until_magnet {
## Play 1kHz sine wave
echo " Play 2kHz sine wave"
notif_set 0 "^^^ PLAYING SINE WAVE...^^^ ...... ^ ... ...^ .. ..^.. .^. . .^ . ..^ .. ..^ ... ...^ .......^^"
notif set 0 "^^^ PLAYING SINE WAVE...^^^ ...... ^ ... ...^ .. ..^.. .^. . .^ . ..^ .. ..^ ... ...^ .......^^"
speaker-test -t sine -s 1 -f 2000 >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo " ERROR: SPEAKER SINE"
@ -166,7 +166,7 @@ function launch_tests_up_until_magnet {
return
fi
sync
notif_clear
notif clear
## Launch prod screen test speaker
$PROD_SCREEN_BIN SPEAKER 2>&1
@ -213,7 +213,7 @@ function launch_tests_up_until_magnet {
sync
# Catch SIGUSR1 events
trap function_magnet_detected_ok SIGUSR1
#trap function_magnet_detected_ok SIGUSR1
## Launch prod screen test magnet
echo "TEST MAGNET:"
@ -221,8 +221,15 @@ function launch_tests_up_until_magnet {
$PROD_SCREEN_BIN MAGNET 2>&1
res="$?"
echo " $res"
## Register ourself back as the running FunKey task for receiving USR1
## signal for shutting down
pid record $$
# check magnet test result
if [[ "$res" == "0" ]]; then
echo " OK"
function_magnet_detected_ok
else
echo " FAILED"
test_failed=true
@ -241,7 +248,7 @@ function launch_tests_after_magnet {
#termfix_all > /dev/null
## Clear all notifs
#notif_clear
#notif clear
# Log from magnet file
echo " Found file: " $MAGNET_DETECTED_FILE
@ -363,6 +370,6 @@ if ! $test_failed; then
exit 0
else
## Shutdown
shutdown_funkey &
powerdown now &
exit 1
fi

View File

@ -0,0 +1,59 @@
#!/bin/sh
# Uncomment the following line to get debug info
#set -x
SELF="$(basename ${0})"
SYSTEM_GPIO="/sys/class/gpio"
# Power Audio Amplifier enable GPIO (('F' - 'A') * 32 + 6 = 166)
GPIO_PF6=166
usage() {
>2& echo "Usage: ${SELF} [1|on|ON|On for ON, 0|off|OFF|Off for OFF]"
exit 1
}
# Check number of arguments
if [ ${#} -ne 1 ]; then
usage
fi
case "${1}" in
1|on|ON|On)
# Turn ON only if volume is not null
if [ "$(volume get)" -ne "0" ]; then
echo "Turning audio amplifier ON"
else
exit 0
fi
new_state=1
;;
0|off|OFF|Off)
echo "Turning audio amplifier OFF"
new_state=0
;;
*)
usage
;;
esac
# Export the GPIO if necessary
if [ ! -d "${SYSTEM_GPIO}/gpio${GPIO_PF6}" ]; then
echo ${GPIO_PF6} > "${SYSTEM_GPIO}/export"
fi
# Set the power audio amplifier GPIO as output
echo "out" > "${SYSTEM_GPIO}/gpio${GPIO_PF6}/direction"
# Read the current power audio amplifier state
current_state=$(cat "${SYSTEM_GPIO}/gpio${GPIO_PF6}/value")
# Enable/disable the power audio amplifier if necessary
if [ ${current_state} -ne ${new_state} ]; then
echo ${new_state} > "${SYSTEM_GPIO}/gpio${GPIO_PF6}/value"
fi
exit 0

View File

@ -0,0 +1,128 @@
#!/bin/sh
# Uncomment the following line to get debug info
#set -x
SELF="$(basename ${0})"
SYSTEM_BRIGHTNESS="/sys/class/backlight/backlight/brightness"
DEFAULT_BRIGHTNESS_VALUE=100
BRIGHTNESS_STEP=10
NOTIF_DURATION=2
usage() {
>&2 echo "Usage: ${SELF} get"
>&2 echo " ${SELF} set new_brightness_percentage"
exit 1
}
increase_brightness() {
# Get current value
local current_brightness=$(get_brightness)
# Compute new brightness value
local new_brightness=0
let new_brightness=${current_brightness}+${BRIGHTNESS_STEP}
if [ ${new_brightness} -gt 100 ]; then
new_brightness=100
fi
# Change brightness
if [ ${new_brightness} -ne ${current_brightness} ]; then
set_brightness ${new_brightness}
fi
# Notif
notif set ${NOTIF_DURATION} " BRIGHTNESS: ${new_brightness}%%"
}
decrease_brightness() {
# Get current value
local current_brightness=$(get_brightness)
# Compute new brightness value
local new_brightness=0
if [ ${current_brightness} -gt ${BRIGHTNESS_STEP} ]; then
let new_brightness=${current_brightness}-${BRIGHTNESS_STEP}
fi
# Change brightness
if [ ${new_brightness} -ne ${current_brightness} ]; then
set_brightness ${new_brightness}
fi
# Notif
notif set ${NOTIF_DURATION} " BRIGHTNESS: ${new_brightness}%%"
}
get_brightness() {
local brightness=$(fw_printenv -n brightness 2>/dev/null)
if ! [ ! "${brightness}" -ne "${brightness}" ] 2> /dev/null; then
brightness=${DEFAULT_BRIGHTNESS_VALUE}
fw_setenv brightness ${brightness}
fi
echo ${brightness}
}
set_brightness() {
# Set the new brightness percentage in the kernel driver
local brightness=${1}
local kernel_brightness
let kernel_brightness=${brightness}+10
let kernel_brightness/=10
echo ${kernel_brightness} > "${SYSTEM_BRIGHTNESS}"
# Set the new brightness value in a bootloader variable
if [ ${?} -eq 0 -a $(get_brightness) -ne ${brightness} ]; then
fw_setenv brightness ${brightness}
fi
}
# Check number of arguments
if [ ${#} -lt 1 -o ${#} -gt 2 ]; then
usage
fi
case "${1}" in
up)
if [ ${#} -ne 1 ]; then
usage
fi
increase_brightness
;;
down)
if [ ${#} -ne 1 ]; then
usage
fi
decrease_brightness
;;
get)
if [ ${#} -ne 1 ]; then
usage
fi
get_brightness
;;
set)
if [ ${#} -ne 2 ]; then
usage
fi
# Make sure the argument is a positive number <= 100
if [ -n "${2}" ] && [ "${2}" -eq "${2}" ] 2>/dev/null && \
[ "${2}" -ge 0 ] && [ "${2}" -le 100 ]; then
set_brightness "${2}"
else
usage
fi
;;
*)
usage
;;
esac
exit 0

View File

@ -1,18 +0,0 @@
#!/bin/sh
BRIGHTNESS_DEFAULT_VALUE=100
# Check args
if [ ${#} -ne 0 ]; then
echo "Usage: $(basename ${0})"
exit 1
fi
# Sanity check: Check if integer
brightness=$(fw_printenv -n brightness 2>/dev/null)
if ! [ ! "${brightness}" -ne "${brightness}" ] 2> /dev/null; then
brightness=${BRIGHTNESS_DEFAULT_VALUE}
fw_setenv brightness ${brightness}
fi
echo ${brightness}
exit 0

View File

@ -1,13 +0,0 @@
#!/bin/sh
SYSTEM_BRIGHTNESS=/sys/class/backlight/backlight/brightness
# Check args
if [ ${#} -ne 0 ]; then
echo "Usage: $(basename ${0})"
exit 1
fi
let brightness=$(cat ${SYSTEM_BRIGHTNESS})*10-10
echo ${brightness}
exit 0

View File

@ -1,27 +0,0 @@
#!/bin/sh
SYSTEM_BRIGHTNESS=/sys/class/backlight/backlight/brightness
# Check args
if [ ${#} -ne 1 ]; then
echo "Usage: $(basename ${0}) new_brightness_percentage"
exit 1
fi
# Check value's range
if [ ${1} -gt 100 ]; then
echo "Usage: Wrong brightness percentage (${1}), must be between 0 and 100"
exit 1
fi
brightness_percentage=${1}
# Set new brightness percentage
let value=${1}+10
let value/=10
echo ${value} > ${SYSTEM_BRIGHTNESS}
# Set new brightness value in brightness file
if [ ${?} -eq 0 -a $(brightness_get) -ne ${brightness_percentage} ]; then
fw_setenv brightness ${brightness_percentage}
fi
exit 0

View File

@ -1,21 +0,0 @@
#!/bin/sh
SYSTEM_BRIGHTNESS=/sys/class/backlight/backlight/brightness
# Check args
if [ ${#} -ne 1 ]; then
echo "Usage: $(basename ${0}) new_brightness_percentage"
exit 1
fi
# Check value's range
if [ ${1} -gt 100 ]; then
echo "Usage: Wrong brightness percentage (${1}), must be between 0 and 100"
exit 1
fi
# Set new brightness percentage
let value=${1}+10
let value/=10
echo ${value} > ${SYSTEM_BRIGHTNESS}
exit 0

View File

@ -1,5 +0,0 @@
#!/bin/sh
notif_set 0 "Getting system stats..."
killall -s USR1 system_stats
exit 0

View File

@ -3,6 +3,9 @@
# Uncomment the following line to get debug info
#set -x
# This is to avoid expanding '*' in fdisk results
set -f
source /usr/local/lib/utils
SELF=$(basename $0)
@ -11,165 +14,231 @@ SELF=$(basename $0)
root_part=$(cat /proc/cmdline | sed -n 's|^.*root=\([^ ]*\).*|\1|p')
root_part_num=${root_part#/dev/mmcblk0p}
if [ "${root_part_num}" -eq 1 ]; then
die 0 "recovery mode"
die_notif 0 "recovery mode"
elif [ "${root_part_num}" = "{$root_part}" ]; then
die 1 "${root_part} is not an SD card partition, aborting"
die_notif 1 "${root_part} is not an SD card partition, aborting"
elif [ "${root_part_num}" -ne 2 ]; then
die 2 "unknown partition layout, aborting"
die_notif 2 "unknown partition layout, aborting"
fi
let swap_part_num=${root_part_num}+1
swap_part=/dev/mmcblk0p${swap_part_num}
let share_part_num=${swap_part_num}+1
share_part=/dev/mmcblk0p${share_part_num}
check_first_boot () {
[ -f /.first_boot ] && die 0 "nothing to do"
return 0
}
let usb_part_num=${swap_part_num}+1
usb_part=/dev/mmcblk0p${usb_part_num}
check_root_id () {
[ $(id -u) -ne 0 ] && die 3 "this script must be run as root, aborting"
[ $(id -u) -ne 0 ] && die_notif 3 "this script must be run as root, aborting"
return 0
}
resize_rootfs_partition () {
# Check if root partition is already resized
local rootfs_part_line=$(fdisk -l /dev/mmcblk0 2>/dev/null | grep ${root_part})
set ${rootfs_part_line}
local rootfs_part_size=${6}
if [ "${rootfs_part_size}" = "1G" ]; then
info "root partition is already resized"
return 0
fi
# Check that the last partition is the rootfs partition
local last_part_line=$(sgdisk -p /dev/mmcblk0 | tail -n 1)
local last_part_line=$(fdisk -l /dev/mmcblk0 2>/dev/null | tail -n 1)
set ${last_part_line}
local last_part=${1}
if [ "${last_part}" != "${root_part_num}" ]; then
die 4 "rootfs is not the last partition. Don't know how to expand, aborting"
local last_part_num=${1#/dev/mmcblk0p}
local part_start=${3}
if [ "${last_part_num}" != "${root_part_num}" ]; then
die_notif 4 "rootfs is not the last partition. Don't know how to expand, aborting"
fi
# Remove (temporarily) the rootfs partition
sgdisk -d ${root_part_num} /dev/mmcblk0 >/dev/null 2>&1 || die 5 "cannot remove the rootfs partition, aborting"
# Re-create the rootfs partition with a 1GB size
sgdisk -n ${root_part_num}:0:+1G -c ${root_part_num}:rootfs /dev/mmcblk0 >/dev/null 2>&1 || die 6 "cannot resize the rootfs partition, aborting"
fdisk /dev/mmcblk0 >/dev/null 2>&1 <<EOF
d
${root_part_num}
n
p
${root_part_num}
${part_start}
+1G
w
EOF
# Mark the rootfs partition as bootable
sgdisk -A ${root_part_num}:set:2 /dev/mmcblk0 >/dev/null 2>&1 || die 7 "cannot make the rootfs partition bootable, aborting"
sfdisk -A /dev/mmcblk0 ${root_part_num} >/dev/null 2>&1 || die_notif 7 "cannot make the rootfs partition bootable, aborting"
# Copy the primary GPT to the end of the disk
sgdisk -e /dev/mmcblk0 >/dev/null 2>&1 || die 8 "cannot move the GPT to the end of the disk"
sync
return 0
}
# Reload the partition table
partprobe /dev/mmcblk0 >/dev/null 2>&1 || die_notif 8 "cannot reload the partition table, aborting"
reload_partition_table () {
partprobe /dev/mmcblk0 >/dev/null 2>&1 || die 9 "cannot reload the partition table, aborting"
return 0
}
resize_rootfs_filesystem () {
local rootfs_line=$(df | grep /dev/root)
set ${rootfs_line}
local rootfs_size=${2}
if [ ${rootfs_size} -gt 1000000 ]; then
info "rootfs already resized"
return 0
fi
rw
resize2fs ${root_part} >/dev/null 2>&1 || die 10 "cannot resize the root filesystem, aborting"
resize2fs ${root_part} >/dev/null 2>&1 || die_notif 9 "cannot resize the root filesystem, aborting"
ro
return 0
}
create_swap () {
mount | grep -q ${share_part}
# Check if swap partition already exists
fdisk -l /dev/mmcblk0 2>/dev/null | grep "Linux swap" >/dev/null 2>&1
if [ $? -eq 0 ]; then
info "swap partition already exists"
else
mount | grep -q ${usb_part}
if [ $? -ne 0 ]; then
# Check that the last partition is the rootfs partition
local last_part_line=$(sgdisk -p /dev/mmcblk0 2>/dev/null | tail -n 1)
local last_part_line=$(fdisk -l /dev/mmcblk0 2>/dev/null | tail -n 1)
set ${last_part_line}
local last_part_num=${1}
local last_part_num=${1#/dev/mmcblk0p}
if [ "$last_part_num" != "$root_part_num" ]; then
die 11 "rootfs is not the last partition. Don't know how to create the backing store partition"
die_notif 10 "rootfs is not the last partition. Don't know how to create the backing store partition"
fi
# Create an additional linux swap partition
let swap_part_num=${last_part_num}+1
swap_part=/dev/mmcblk0p${swap_part_num}
sgdisk -n ${swap_part_num}:0:+128M -c ${swap_part_num}:swap -t ${swap_part_num}:8200 /dev/mmcblk0 >/dev/null 2>&1 || die 12 "cannot create the swap partition, aborting"
sync
partprobe /dev/mmcblk0 >/dev/null 2>&1 || die 13 "cannot reload the partition table, aborting"
fdisk /dev/mmcblk0 >/dev/null 2>&1 <<EOF
n
p
${swap_part_num}
+128M
t
${wap_part_num}
82
w
EOF
fi
fi
# Check if swap is enabled
local swap_line=$(free | grep Swap)
set ${swap_line}
local swap_size=${2}
if [ ${swap_size} -eq 0 ]; then
mkswap ${swap_part} >/dev/null 2>&1
if [ $? -ne 0 ]; then
die 14 "cannot create swap file, aborting"
die_notif 11 "cannot create swap file, aborting"
fi
# Enable swap
swapon -a >/dev/null 2>&1 || die_notif 12 "cannot enable swap file, aborting"
fi
return 0
}
enable_swap () {
swapon -a >/dev/null 2>&1 || die 15 "cannot enable swap file, aborting"
return 0
}
create_usb_partition () {
create_backing_store_partition () {
mount | grep -q ${share_part}
# Check if the USB partition already exists
fdisk -l /dev/mmcblk0 2>/dev/null | grep "W95 FAT32" >/dev/null 2>&1
if [ $? -eq 0 ]; then
info "USB partition already exists"
return 0
fi
mount | grep -q ${usb_part}
if [ $? -ne 0 ]; then
# Check that the last partition is the swap partition
local last_part_line=$(sgdisk -p /dev/mmcblk0 2>/dev/null | tail -n 1)
local last_part_line=$(fdisk -l /dev/mmcblk0 2>/dev/null | tail -n 1)
set ${last_part_line}
local last_part_num=${1}
local last_part_num=${1#/dev/mmcblk0p}
if [ "${last_part_num}" != "${swap_part_num}" ]; then
die 15 "rootfs is not the last partition. Don't know how to create the backing store partition"
die_notif 13 "rootfs is not the last partition. Don't know how to create the backing store partition"
fi
# Create an additional Microsoft basic data partition share partition that fills the disk
let share_part_num=${last_part_num}+1
share_part=/dev/mmcblk0p${share_part_num}
sgdisk -n ${share_part_num}:0:-0 -c ${share_part_num}:share -t ${share_part_num}:0700 /dev/mmcblk0 >/dev/null 2>&1 || die 16 "cannot create the backing store partition, aborting"
# Create an additional FAT32 USB partition that fills the disk
let usb_part_num=${last_part_num}+1
usb_part=/dev/mmcblk0p${usb_part_num}
fdisk /dev/mmcblk0 >/dev/null 2>&1 <<EOF
n
p
${usb_part_num}
t
${usb_part_num}
c
w
EOF
sync
fi
# Reload the partition table
partprobe /dev/mmcblk0 >/dev/null 2>&1 || die_notif 14 "cannot reload the partition table, aborting"
return 0
}
format_backing_store_partition () {
format_usb_partition () {
# Check if the USB partition is already mounted
mount | grep /mnt > /dev/null 2>&1
if [ $? -eq 0 ]; then
info "USB partition already mounted"
return 0
fi
# Format the backing store as FAT32
mkfs.vfat ${share_part} >/dev/null 2>&1 || die 17 "cannot format the backing store partition"
mkfs.vfat ${usb_part} >/dev/null 2>&1 || die_notif 15 "cannot format the backing store partition"
return 0
}
copy_files_to_store_partition () {
# Add file to force assembly tests
copy_files_to_usb_partition () {
# Check if the USB partition is already mounted
mount | grep /mnt > /dev/null 2>&1
if [ $? -ne 0 ]; then
mount /mnt/ || die_notif 16 "Cannot mount /mnt"
fi
mount /mnt/ || die 18 "Cannot mount /mnt"
unzip -q -o /usr/local/share/mnt_freware_games.zip -d /mnt/
umount /mnt/ || die 20 "Cannot unmount /mnt"
# Copy freware games and other necessary mnt files
unzip -q -o /usr/local/share/mnt_files.zip -d /mnt/
# Copy OPKs
set +f
cp -r /usr/local/share/OPKs/* /mnt
set -f
# Unmount USB partition
umount /mnt/ || die_notif 17 "Cannot unmount /mnt"
return 0
}
check_root_id
check_first_boot
notif " FIRST BOOT DETECTED"
notif set 0 " FIRST BOOT DETECTED"
notif " 1/9 RESIZE ROOT PARTITION"
notif set 0 " 1/6 RESIZE ROOT PARTITION"
resize_rootfs_partition
notif " 2/9 RELOAD ROOT PARTITION"
reload_partition_table
notif " 3/9 RESIZE ROOT FILESYSTEM"
notif set 0 " 2/6 RESIZE ROOT FILESYSTEM"
resize_rootfs_filesystem
notif " 4/9 CREATE SWAP"
notif set 0 " 3/6 CREATE SWAP"
create_swap
notif " 5/9 ENABLE SWAP"
enable_swap
notif set 0 " 4/6 CREATE USB PARTITION"
create_usb_partition
notif " 6/9 CREATE USB PARTITION"
create_backing_store_partition
notif set 0 " 5/6 FORMAT USB PARTITION"
format_usb_partition
notif " 7/9 RELOAD PARTITION TABLE"
reload_partition_table
notif set 0 " 6/6 COPY FILES TO ^ USB PARTITION"
copy_files_to_usb_partition
notif " 8/9 FORMAT USB PARTITION"
format_backing_store_partition
notif set 0 " FIRST BOOT SETUP FINISHED!"
notif " 9/9 COPY FILES TO ^ USB PARTITION"
copy_files_to_store_partition
notif " FIRST BOOT SETUP FINISHED!"
fw_setenv first_boot_ok 1
sleep 1
clear_notif
notif clear

View File

@ -0,0 +1,161 @@
#!/bin/sh
# Uncomment the following line to get debug info
#set -x
SELF="$(basename ${0})"
LAUNCHER_FILE="$HOME/Launchers/launcher.txt"
FRONTEND_FILE="$HOME/.frontend"
PREVENT_LAUNCHER_FILE="/mnt/prevent_launcher"
DISABLE_FRONTEND_FILE="/mnt/disable_frontend"
DEFAULT_FRONTEND=retrofe
LOCK_FILE="/var/lock/frontend.lock"
REBOOTING_FILE="/run/rebooting"
LAST_OPK_FILE="/mnt/last_opk"
# Convert old launcher file to new frontend
if [ -f "${LAUNCHER_FILE}" ]; then
mv "${LAUNCHER_FILE}" "${FRONTEND_FILE}"
rm -rf $(dirname "${LAUNCHER_FILE}") 2>/dev/null
fi
# Convert old prevent launcher file to new frontend disable file
if [ -f "${PREVENT_LAUNCHER_FILE}" ]; then
mv "${PREVENT_LAUNCHER_FILE}" "${DISABLE_FRONTEND_FILE}"
fi
usage() {
>&2 echo "Usage: ${SELF} init"
>&2 echo " ${SELF} get"
>&2 echo " ${SELF} set gmenu2x|retrofe|none"
exit 1
}
set_frontend() {
mkdir -p "$(dirname "$FRONTEND_FILE")"
local frontend=$(get_frontend)
local new_frontend="${1}"
echo "Setting frontend: ${new_frontend}"
if [ "${new_frontend}" = "none" ]; then
touch "${DISABLE_FRONTEND_FILE}"
else
rm -f "${DISABLE_FRONTEND_FILE}"
fi
if [ "${frontend}" != "none" ]; then
pkill "${frontend}"
fi
echo "${new_frontend}" > "${FRONTEND_FILE}"
}
get_frontend() {
local frontend=$(cat "${FRONTEND_FILE}" 2>/dev/null | head -1)
# Check if not empty
if [ "x${frontend}" = "x" ]; then
frontend="${DEFAULT_FRONTEND}"
echo "${frontend}" > "${FRONTEND_FILE}"
fi
# Return frontend name
echo "${frontend}"
}
init_frontend() {
if [ -f "${LOCK_FILE}" ]; then
>&2 echo "${LOCK_FILE} already exists"
exit 1
fi
touch "${LOCK_FILE}"
# Then loop to launch the frontend indefinitely
while true; do
# Check if frontend disable file is present
if [ -f "${DISABLE_FRONTEND_FILE}" -o -f "${REBOOTING_FILE}" ]; then
echo "${DISABLE_FRONTEND_FILE} file found, not starting frontend"
sleep 5
else
# Umount any remaining OPK, if any
umount /opk >/dev/null 2>&1
if [ -r "${LAST_OPK_FILE}" -a ! -f "${REBOOTING_FILE}" ]; then
rm "${LAST_OPK_FILE}"
fi
# Launch selected frontend
local frontend="$(get_frontend)"
case "${frontend}" in
gmenu2x|retrofe)
"${frontend}"&
;;
none)
echo "no frontend"
sleep 5
;;
*)
DEFAULT_FRONTEND=retrofe
echo "Unrecognized frontend: $frontend, setting $DEFAULT_FRONTEND"
set_frontend "${DEFAULT_FRONTEND}"
;;
esac
# Record the PID into a file, wait for the process to
# terminate and erase the recorded PID
pid record $!
wait $!
pid erase
# In case retrofe/opkrun quits with errors, clear graphic VT
termfix_all
# In case retrofe/opkrun quits with errors, reset default key mapping
keymap default
fi
# Prevent 100% CPU usage
sleep 0.5
# Exit if console rebooting
if [ -f "${REBOOTING_FILE}" ]; then
break
fi
done
# Remove lock file and exit
rm "${LOCK_FILE}"
}
# Check number of arguments
if [ ${#} -lt 1 -o ${#} -gt 2 ]; then
usage
fi
case "${1}" in
set)
if [ ${#} -ne 2 ]; then
usage
fi
set_frontend "${2}"
;;
get)
if [ ${#} -ne 1 ]; then
usage
fi
get_frontend
;;
init)
if [ ${#} -ne 1 ]; then
usage
fi
init_frontend
;;
*)
usage
;;
esac
exit 0

View File

@ -0,0 +1,105 @@
#!/bin/sh
# Uncomment the following line to get debug info
#set -x
SELF="$(basename ${0})"
INSTANT_PLAY_FILE="/mnt/instant_play"
RESUME_PLAY_FILE="/mnt/resume_play"
LAST_OPK_FILE="/mnt/last_opk"
PID_PATH="/var/run/pid_path"
REBOOTING_FILE="/run/rebooting"
usage() {
>&2 echo "Usage: ${SELF} load"
>&2 echo " ${SELF} save application args..."
exit 1
}
# Check number of arguments
if [ ${#} -lt 1 ]; then
usage
fi
case ${1} in
load)
if [ ${#} -ne 1 ]; then
usage
fi
# Umount any remaining OPK, if any
umount /opk >/dev/null 2>&1
# Mount last OPK, if any
if [ -r "${LAST_OPK_FILE}" ]; then
last_opk=$(cat "${LAST_OPK_FILE}")
mount -t squashfs "${last_opk}" /opk
fi
# Remove unnecessary files
rm -f "${RESUME_PLAY_FILE}"
# Launch Previous Game if any
if [ -f "${INSTANT_PLAY_FILE}" ]; then
keymap resume
echo -n "Found Instant Play file, restarting previous game with command: "
cat "${INSTANT_PLAY_FILE}"
mv "${INSTANT_PLAY_FILE}" "${RESUME_PLAY_FILE}"
source "${RESUME_PLAY_FILE}"
rm -f "${RESUME_PLAY_FILE}"
keymap default
termfix_all
fi
# Unmount last OPK, if any
if [ -r "${LAST_OPK_FILE}" -a ! -f "${REBOOTING_FILE}" ]; then
umount /opk
rm "${LAST_OPK_FILE}"
fi
;;
save)
if [ ${#} -lt 2 ]; then
usage
fi
shift
# Get curent binary real path
bin=$(printf %s "$1" | sed "s/'/'\\\\''/g")
bin_name=$(basename "$bin")
bin_path="$(cat $PID_PATH)"/"$bin_name"
# Write quick load file args
echo -n "" > "${INSTANT_PLAY_FILE}"
printf "'" >> "${INSTANT_PLAY_FILE}"
echo -n "$bin_path" >> "${INSTANT_PLAY_FILE}"
printf "' " >> "${INSTANT_PLAY_FILE}"
shift
while [ "$#" != "0" ]
do
printf "'" >> "${INSTANT_PLAY_FILE}"
printf %s "$1" | sed "s/'/'\\\\''/g" >> "${INSTANT_PLAY_FILE}"
printf "' " >> "${INSTANT_PLAY_FILE}"
shift
done
# Add the magic sauce to launch the process in background,
# record the PID into a file, wait for the process to
# terminate and erase the recorded PID
cat << EOF >> "${INSTANT_PLAY_FILE}"
&
pid record \$!
wait \$!
pid erase
EOF
# Now terminate gracefully
exec powerdown now
;;
*)
usage
;;
esac
exit 0

View File

@ -1,20 +0,0 @@
#!/bin/sh
# Uncomment the following line to get debug info
#set -x
# Get USB state
usb_present=$(cat /sys/class/power_supply/axp20x-usb/present)
# Get udc state
udc_state=$(cat /sys/class/udc/musb-hdrc.1.auto/state)
if [[ x"$udc_state" == "xconfigured" -a "$usb_present" == "1" ]]; then
# Connected succesfully to a host
echo "yes"
exit 0
else
echo "no"
exit 1
fi

View File

@ -0,0 +1,116 @@
#!/bin/sh
# Uncomment the following line to get debug info
#set -x
SELF=$(basename ${0})
LAST_MAPPING="/mnt/FunKey/.last_mapping.key"
FIFO="/tmp/fkgpiod.fifo"
usage() {
echo "Usage: ${SELF} default"
echo " ${SELF} load <config_file>"
echo " ${SELF} resume"
echo " ${SELF} rom <rom_path>"
echo " ${SELF} save <config_file>"
exit 1
}
log() {
logger -t "${SELF}[$$]" "$*"
}
write_fifo() {
echo "${1}" >"${FIFO}" 2>/dev/null
}
# Check number of args
if [ ${#} -lt 1 ]; then
usage
fi
# Create FIFO it it does not exist yet
if [ ! -p "${FIFO}" ]; then
rm -f "${FIFO}"
log "FIFO does not exist, create it"
mkfifo "${FIFO}"
chmod 0640 "${FIFO}"
fi
case "${1}" in
default)
if [ ${#} -ne 1 ]; then
usage
fi
log "default: LOAD /etc/fkgpiod.conf"
write_fifo "LOAD /etc/fkgpiod.conf"
;;
load)
if [ ${#} -ne 2 ]; then
usage
fi
config_file="${2}"
log "load: LOAD ${config_file}"
write_fifo "LOAD ${config_file}"
log "load: SAVE ${LAST_MAPPING}"
write_fifo "SAVE ${LAST_MAPPING}"
;;
resume)
if [ ${#} -ne 1 ]; then
usage
fi
if [ -f "${LAST_MAPPING}" ]; then
log "resume: LOAD ${LAST_MAPPING}"
write_fifo "LOAD ${LAST_MAPPING}"
fi
;;
rom)
if [ ${#} -gt 2 ]; then
usage
elif [ ${#} -eq 1 ]; then
console_keymap=""
rom_keymap=""
else
rom_path="${2}"
console_keymap="$(dirname "${rom_path}")/default_config.key"
rom_keymap="${rom_path%.*}.key"
fi
if [ -f "${console_keymap}" ]; then
log "rom: LOAD ${console_keymap}"
write_fifo "LOAD ${console_keymap}"
fi
for desktop_file in $(ls /opk/*.desktop 2>/dev/null); do
opk_keymap=$(grep FK-Keymap= "${desktop_file}" | cut -d '=' -f 2)
if [ "${opk_keymap:0:1}" != "/" ]; then
opk_keymap="/opk/${opk_keymap}"
fi
if [ -f "${opk_keymap}" ]; then
log "rom: LOAD ${opk_keymap}"
write_fifo "LOAD ${opk_keymap}"
fi
done
if [ -f "${rom_keymap}" ]; then
log "rom: LOAD ${rom_keymap}"
write_fifo "LOAD ${rom_keymap}"
fi
log "rom: SAVE ${LAST_MAPPING}"
write_fifo "SAVE ${LAST_MAPPING}"
;;
save)
if [ ${#} -ne 2 ]; then
usage
fi
config_file="${2}"
log "save: SAVE ${config_file}"
write_fifo "SAVE ${config_file}"
;;
*)
usage
;;
esac
exit 0

View File

@ -1,4 +0,0 @@
#!/bin/sh
killall mednafen gpsp psnes pcsx sdlgnuboy PicoDriveBin
exit 0

View File

@ -3,32 +3,28 @@
# General constants declaration
THRESHOLD_PERCENT_LOW_BAT=5
THRESHOLD_PERCENT_EXTREMELY_LOW_BAT=2
MAX_EXTREMELY_LOW_BAT_BEFORE_SHUTDOWN=5
MAX_LOW_BAT_COUNT=5
SLEEP_SECS=2
RESCALE_MAX_PERCENTAGE=120
# Blink Low bat constants declaration
BLINK_ICON=0
LOW_BAT_SECS_DISPLAYED=5
LOW_BAT_SECS_NOT_DISPLAYED=5
LOW_BAT_DISPLAY_TIMEOUT=5
# Files and commands declaration
USB_PRESENT_FILE=/sys/class/power_supply/axp20x-usb/present
USB_PRESENT_FILE="/sys/class/power_supply/axp20x-usb/present"
# Cheat for no USB present simulation when debugging
#USB_PRESENT_FILE=/sys/class/power_supply/axp20x-ac/present
BAT_PRESENT_FILE=/sys/class/power_supply/axp20x-battery/present
BAT_PERCENT_FILE=/sys/class/power_supply/axp20x-battery/capacity
BAT_PERCENT_RESCALED_FILE=/tmp/current_battery_percentage
LOW_BAT_ICON=/sys/class/graphics/fb0/low_battery
SCHEDULE_SHUTDOWN_CMD=sched_shutdown
SIGNAL_URS1_TO_EMULATORS_CMD=signal_usr1_to_emulators
BAT_PRESENT_FILE="/sys/class/power_supply/axp20x-battery/present"
BAT_PERCENT_FILE="/sys/class/power_supply/axp20x-battery/capacity"
BAT_PERCENT_RESCALED_FILE="/tmp/current_battery_percentage"
LOW_BAT_ICON="/sys/class/graphics/fb0/low_battery"
# Variables declaration
low_bat_status=0
low_bat_displayed=0
cur_secs_disp=0
cur_nb_extremely_low_bat_before_shutdown=0
low_bat_count=0
# Default: Hide Low Bat Icon
echo 0 > ${LOW_BAT_ICON}
@ -73,7 +69,7 @@ while true; do
# Reset status
low_bat_status=0
cur_nb_extremely_low_bat_before_shutdown=0
low_bat_count=0
echo 0 > ${LOW_BAT_ICON}
fi
fi
@ -82,7 +78,7 @@ while true; do
# Reset status
low_bat_status=0
cur_nb_extremely_low_bat_before_shutdown=0
low_bat_count=0
echo 0 > ${LOW_BAT_ICON}
fi
fi
@ -92,24 +88,24 @@ while true; do
# Check extremely low bat for clean shutdown
if [ ${cur_bat_percent} -le ${THRESHOLD_PERCENT_EXTREMELY_LOW_BAT} ]; then
let cur_nb_extremely_low_bat_before_shutdown++
echo "cur_nb_extremely_low_bat_before_shutdown = ${cur_nb_extremely_low_bat_before_shutdown}"
let low_bat_count++
echo "low_bat_count = ${low_bat_count}"
# Clean shutdown
if [ ${cur_nb_extremely_low_bat_before_shutdown} -ge ${MAX_EXTREMELY_LOW_BAT_BEFORE_SHUTDOWN} ]; then
if [ ${low_bat_count} -ge ${MAX_LOW_BAT_COUNT} ]; then
echo "Battery extremely low, shutting down now..."
sched_shutdown 1 & signal_usr1_to_emulators
powerdown schedule 1
exit 0
fi
fi
# Blinking process
if [ ${BLINK_ICON} -eq 1 ]; then
if [ ${low_bat_displayed} -eq 1 -a ${cur_secs_disp} -ge ${LOW_BAT_SECS_DISPLAYED} ]; then
if [ ${low_bat_displayed} -eq 1 -a ${cur_secs_disp} -ge ${LOW_BAT_DISPLAY_TIMEOUT} ]; then
low_bat_displayed=0
cur_secs_disp=0
echo 0 > ${LOW_BAT_ICON}
elif [ ${low_bat_displayed} -eq 0 -a ${cur_secs_disp} -ge ${LOW_BAT_SECS_NOT_DISPLAYED} ]; then
elif [ ${low_bat_displayed} -eq 0 -a ${cur_secs_disp} -ge ${LOW_BAT_DISPLAY_TIMEOUT} ]; then
low_bat_displayed=1
cur_secs_disp=0
echo 1 > ${LOW_BAT_ICON}

View File

@ -0,0 +1,78 @@
#!/bin/sh
# Uncomment the following line to get debug info
#set -x
SELF="$(basename ${0})"
NOTIFICATION_DISPLAY=/sys/class/graphics/fb0/notification
usage() {
>&2 echo "Usage: ${SELF} set duration message"
>&2 echo " ${SELF} display duration message"
>&2 echo " ${SELF} clear"
exit 1
}
notif_clear() {
printf "clear" > "${NOTIFICATION_DISPLAY}"
}
notif_display() {
local duration="${1}"
local message="${*:2}"
if ! [ ! "${duration}" -ne "${duration}" ] 2> /dev/null; then
>&2 echo "error: ${duration} is not a number"
exit 3
fi
printf "${message}" > "${NOTIFICATION_DISPLAY}"
if [ ${duration} -ne 0 ]; then
sleep ${duration}
notif_clear
fi
}
notif_set() {
local duration="${1}"
local message="${*:2}"
if ! [ ! "${duration}" -ne "${duration}" ]; then
>&2 echo "error: ${duration} is not a number"
exit 2
fi
# Kill previous notif disp process
pkill -f "notif display" 2> /dev/null
# Print new notif
notif display "${duration}" "${message}" &
}
case "${1}" in
set)
if [ ${#} -ne 3 ]; then
usage
fi
shift
notif_set "${1}" "${2}"
;;
clear)
if [ ${#} -ne 1 ]; then
usage
fi
notif_clear
;;
display)
if [ ${#} -ne 3 ]; then
usage
fi
shift
notif_display "${1}" "${2}"
;;
*)
usage
;;
esac
exit 0

View File

@ -1,8 +0,0 @@
#!/bin/sh
# Clear all current notifications
NOTIFICATION_DISPLAY=/sys/class/graphics/fb0/notification
printf "clear" > ${NOTIFICATION_DISPLAY}
exit 0

View File

@ -1,38 +0,0 @@
#!/bin/sh
# Display notification for a certain amount of time
# Special char: ^ to add a new line
# Set seconds to 0 to display indefinitely (until the next notif)
NOTIFICATION_DISPLAY=/sys/class/graphics/fb0/notification
display_usage() {
echo -e "Usage:\n$(basename ${0}) nb_seconds_display message_to_display\n"
}
# If less than two arguments supplied, display usage
if [ ${#} -le 1 ]; then
echo "Display notification for a certain amount of time"
display_usage
exit 1
fi
# Get number of seconds to display notif
nb_secs=${1}
if ! [ ! "${nb_secs}" -ne "${nb_secs}" ] 2> /dev/null; then
echo "error: ${nb_secs} is not a number" >&2
exit 1
fi
# Print notif
printf "${*:2}" > ${NOTIFICATION_DISPLAY}
# Clear notif if NB_SECS is not 0, otherwise never clear
if [ ${nb_secs} -ne 0 ]; then
# Wait time before clearing notif
sleep ${nb_secs}
# Clear notif
printf "clear" > ${NOTIFICATION_DISPLAY}
fi
exit 0

View File

@ -1,36 +0,0 @@
#!/bin/sh
# Erase previous notif and display new one in background process for a certain amount of seconds
# Special char: ^ to add a new line
# Set seconds to 0 to display indefinitely (until the next notif_set)
NOTIFICATION_DISPLAY=/sys/class/graphics/fb0/notification
display_usage() {
echo -e "Usage:\n$(basename ${0}) nb_seconds_display message_to_display\n"
}
# If less than two arguments supplied, display usage
if [ ${#} -le 1 ]; then
echo "Erase previous notif and display new one in background process for a certain amount of time"
echo "Special char: ^ to add a new line"
echo "Set seconds to 0 to display indefinitely (until the next $(basename ${0}))"
display_usage
exit 1
fi
# Get number of seconds to display notif
nb_secs=${1}
if ! [ ! "${nb_secs}" -ne "${nb_secs}" ]; then
echo "error: ${nb_secs} is not a number" >&2
exit 1
fi
# Kill previous notif_disp process
pkill notif_disp 2> /dev/null
## Clear previous notif
#printf "clear" > ${NOTIFICATION_DISPLAY}
# Print new notif
notif_disp "$@" &
exit 0

View File

@ -0,0 +1,59 @@
#!/bin/sh
# Uncomment the following line to get debug info
#set -x
SELF="$(basename ${0})"
PID_FILE="/var/run/funkey.pid"
PID_PATH="/var/run/pid_path"
usage() {
>&2 echo "Usage: ${SELF} record pid"
>&2 echo " ${SELF} erase"
>&2 echo " ${SELF} print"
exit 1
}
record_pid() {
local pid="${1}"
if ! [ ! "${pid}" -ne "${pid}" ]; then
>&2 echo "error: ${pid} is not a number"
exit 2
fi
# Save PID
echo "${1}" > "${PID_FILE}"
# Save current pid path
pid_path=$(dirname $(readlink /proc/${pid}/exe))
echo -n "$pid_path" > "$PID_PATH"
}
erase_pid() {
rm -f "${PID_FILE}"
}
case "${1}" in
record)
if [ ${#} -ne 2 ]; then
usage
fi
record_pid "${2}"
;;
erase)
if [ ${#} -ne 1 ]; then
usage
fi
erase_pid
;;
print)
cat "${PID_FILE}"
;;
*)
usage
;;
esac
exit 0

View File

@ -0,0 +1,83 @@
#!/bin/sh
# Uncomment the following line to get debug info
#set -x
SELF="$(basename ${0})"
REBOOTING_FILE="/run/rebooting"
usage() {
>&2 echo "Usage: ${SELF} schedule delay"
>&2 echo " ${SELF} handle"
>&2 echo " ${SELF} now"
exit 1
}
schedule_powerdown() {
# Send USR1 signal to the running FunKey process to warn about
# impending shutdown
kill -USR1 "$(pid print)" > /dev/null 2>&1
# Delay for the given grace period seconds to catch signal USR2.
# If the signal is caught, then it means the running FunKey
# process canceled this shutdown and will handle it by itself.
sleep ${1}
# Delay expired, initiate final powerdown
powerdown_now
}
handle_powerdown() {
pkill -f "powerdown schedule"
}
powerdown_now() {
# Sync before all else
sync
# Notif fullscreen "Shutting down"
notif set 0 "^^^^^^^^ SHUTTING DOWN...^^^^^^^^"
# Notify system, reboot in progress
touch "${REBOOTING_FILE}"
# Shutdown amp
audio_amp off >/dev/null 2>&1
# Force Read Only
ro
# Poweroff
poweroff
}
action="${1:-now}"
case "${action}" in
schedule)
if [ ${#} != 2 -o "${2}" == "0" ]; then
usage
fi
schedule_powerdown ${2}
;;
handle)
if [ ${#} -ne 1 ]; then
usage
fi
handle_powerdown
;;
now)
if [ ${#} -gt 1 ]; then
usage
fi
powerdown_now
;;
*)
usage
;;
esac
exit 0

View File

@ -1,22 +0,0 @@
#!/bin/sh
STEP_BRIGHTNESS=10
NOTIF_DURATION=2
# Get current value
current_brightness=$(brightness_get)
# Compute new brightness value
new_brightness=0
if [ ${current_brightness} -gt ${STEP_BRIGHTNESS} ]; then
let new_brightness=${current_brightness}-${STEP_BRIGHTNESS}
fi
# Change brightness
if [ ${new_brightness} -ne ${current_brightness} ]; then
brightness_set ${new_brightness}
fi
# Notif
notif_set ${NOTIF_DURATION} " BRIGHTNESS: ${new_brightness}%%"
exit 0

View File

@ -1,22 +0,0 @@
#!/bin/sh
STEP_BRIGHTNESS=10
NOTIF_DURATION=2
# Get current value
current_brightness=$(brightness_get)
# Compute new brightness value
let new_brightness=${current_brightness}+${STEP_BRIGHTNESS}
if [ ${new_brightness} -gt 100 ]; then
new_brightness=100
fi
# Change brightness
if [ ${new_brightness} -ne ${current_brightness} ]; then
brightness_set ${new_brightness}
fi
# Notif
notif_set ${NOTIF_DURATION} " BRIGHTNESS: ${new_brightness}%%"
exit 0

View File

@ -1,22 +0,0 @@
#!/bin/sh
STEP_VOLUME=10
NOTIF_DURATION=2
# Get current value
current_volume=$(volume_get)
# Compute new volume value
new_volume=0
if [ ${current_volume} -gt ${STEP_VOLUME} ]; then
let new_volume=${current_volume}-${STEP_VOLUME}
fi
# Change volume
if [ ${new_volume} -ne ${current_volume} ]; then
volume_set ${new_volume}
fi
# Notif
notif_set ${NOTIF_DURATION} " VOLUME: ${new_volume}%%"
exit 0

View File

@ -1,22 +0,0 @@
#!/bin/sh
STEP_VOLUME=10
NOTIF_DURATION=2
# Get current value
current_volume=$(volume_get)
# Compute new volume value
let new_volume=${current_volume}+${STEP_VOLUME}
if [ ${new_volume} -gt 100 ]; then
new_volume=100
fi
# Change volume
if [ ${new_volume} -ne ${current_volume} ]; then
volume_set ${new_volume}
fi
# Notif
notif_set ${NOTIF_DURATION} " VOLUME: ${new_volume}%%"
exit 0

View File

@ -1,9 +1,4 @@
#!/bin/sh
sgdisk -A 1:set:2 -A 2:clear:2 /dev/mmcblk0 >/dev/null 2>&1
recovery=$(sgdisk -A 1:get:2 /dev/mmcblk0 | cut -d : -f3)
if [ ${recovery} -eq 1 ]; then
echo "Next boot will be in recovery mode"
else
echo "Next boot will be in normal mode"
fi
sfdisk -A /dev/mmcblk0 1 >/dev/null 2>&1
echo "Next boot will be in recovery mode"
reboot

View File

@ -1,15 +0,0 @@
#!/bin/sh
if [ ${#} != 1 ]; then
echo "Usage: $0 seconds_before_shutdown"
exit 1
fi
nb_secs_to_wait=$1
# Wait $nb_secs_to_wait seconds to catch signal USR2
# If the signal is caught, then it means a process canceled this shutdown
sleep ${nb_secs_to_wait}
# Too late to cancel: init shutdown
shutdown_funkey

View File

@ -48,12 +48,13 @@ mount_share () {
fi
# Create the directory structure if required
(cd /mnt; mkdir -p "Atari lynx" "Game Boy" "Game Boy Color" "Game Boy Advance" "Game Gear" "Neo Geo Pocket" "NES" "PS1" "PS1/bios" "Sega Genesis" "Sega Master System" "SNES" "WonderSwan" "PCE-TurboGrafx")
#(cd /mnt; mkdir -p "Applications" "Emulators" "Games" "Atari lynx" "Game Boy" "Game Boy Color" "Game Boy Advance" "Game Gear" "Neo Geo Pocket" "NES" "PS1" "PS1/bios" "Sega Genesis" "Sega Master System" "SNES" "WonderSwan" "PCE-TurboGrafx")
(cd /mnt; mkdir -p "Emulators" "Atari lynx" "Game Boy" "Game Boy Color" "Game Boy Advance" "Game Gear" "Neo Geo Pocket" "NES" "PS1" "PS1/bios" "Sega Genesis" "Sega Master System" "SNES" "WonderSwan" "PCE-TurboGrafx")
# Check if there is a firmware update file
if [ -f /mnt/FunKey-*.fwu ]; then
warn "found a firmware update file, going into recovery mode"
notif "^^^^^^^^ UPDATING...^^^^^^^^"
notif set 0 "^^^^^^^^ UPDATING...^^^^^^^^"
recovery_mode
fi
@ -126,6 +127,25 @@ is_share_started () {
return $res
}
is_usb_data_connected () {
# Get USB state
local usb_present=$(cat /sys/class/power_supply/axp20x-usb/present)
# Get udc state
local udc_state=$(cat /sys/class/udc/musb-hdrc.1.auto/state)
if [ "x${udc_state}" = "xconfigured" -a "${usb_present}" -eq 1 ]; then
# Connected succesfully to a host
echo "yes"
return 0
else
echo "no"
return 1
fi
}
case "$1" in
init)
@ -144,6 +164,9 @@ case "$1" in
is_share_started
;;
is_usb_data_connected)
is_usb_data_connected
;;
*)
die 15 "Usage $0 {init|start|stop|is_sharing}"

View File

@ -1,13 +0,0 @@
#!/bin/sh
# Notif fullscreen "Shutting down"
notif_set 0 "^^^^^^^^ SHUTTING DOWN...^^^^^^^^"
# Shutdown amp
start_audio_amp 0 >/dev/null 2>&1
# Force Read Only
ro
# Poweroff
poweroff

View File

@ -1,23 +0,0 @@
#!/bin/sh
# This should replaced by storing the correct PID before
# launching an emulator and signaling only this one.
RUN_ENV_VAR=$(fw_printenv -n assembly_tests 2>/dev/null)
if [ "x${RUN_ENV_VAR}" == "x1" ]; then
# First this one
killall -s USR1 assembly_tests > /dev/null 2>&1
# Then this one
killall -s USR1 funkey_prod_screens > /dev/null 2>&1
fi
# Send signal to all PCSX first (time critical)
killall -s USR1 pcsx > /dev/null 2>&1
# Send signal to all other emulators
killall -s USR1 gpsp psnes sdlgnuboy PicoDrive mednafen fceux > /dev/null 2>&1
# Send signal to launcher
killall -s USR1 retrofe > /dev/null 2>&1
exit 0

View File

@ -0,0 +1,33 @@
#!/bin/sh
# Uncomment the following line to get debug info
#set -x
# Check args
if [ ${#} -ne 0 ]; then
echo "Usage: $(basename ${0})"
exit 1
fi
# Lock file (necessary since fbgrab must run in bg not to block the buttons while gaming)
LOCK_FILE="/var/lock/snap.lock"
if [ -f "${LOCK_FILE}" ]; then
echo "${LOCK_FILE} already exists"
exit 1
fi
touch "${LOCK_FILE}"
# Increment name and save snapshot
SNAPSHOT_EXT=PNG
SNAPSHOT_DIR=/mnt/FunKey/snapshots
mkdir -p "${SNAPSHOT_DIR}"
last=$(cd ${SNAPSHOT_DIR}; ls IMG_*.${SNAPSHOT_EXT} 2> /dev/null | tail -1 | sed 's/^IMG_0*\([0-9]\+\)\.'${SNAPSHOT_EXT}'$/\1/')
let last=${last}+1
snapshot_file=$(printf "IMG_%04d.${SNAPSHOT_EXT}" $last)
notif set 2 " SCREENSHOT ${snapshot_file}"
fbgrab "${SNAPSHOT_DIR}/${snapshot_file}" >/dev/null 2>&1 &
# Remove lock file
rm -f "${LOCK_FILE}"
exit 0

View File

@ -1,31 +0,0 @@
#!/bin/sh
# Check number of args
if [ ${#} -ne 1 ]; then
echo "Usage: $(basename ${0}) [1 for on, 0 for off]"
exit 1
fi
# Check Enable arg
enable=${1}
if [ ${enable} -eq 1 ]; then
echo "Turning audio amplifier ON"
elif [ ${enable} -eq 0 ]; then
echo "Turning audio amplifier OFF"
else
echo "Usage: $(basename ${0}) [1 for on, 0 for off]"
exit 1
fi
# PA enable GPIO
GPIO_PF6=166
# Export GPIO
if [ ! -d /sys/class/gpio/gpio${GPIO_PF6} ]; then
echo ${GPIO_PF6} > /sys/class/gpio/export
fi
# Enable/disable cmd
echo "out" > /sys/class/gpio/gpio${GPIO_PF6}/direction
echo ${enable} > /sys/class/gpio/gpio${GPIO_PF6}/value
exit 0

View File

@ -1,12 +0,0 @@
#!/bin/sh
LOCK_FILE=/var/lock/gpio_manager.lock
if [ -f ${LOCK_FILE} ]; then
echo "${LOCK_FILE} already exists"
exit 1
fi
touch ${LOCK_FILE}
funkey_gpio_management
rm "${LOCK_FILE}"
exit 0

View File

@ -1,46 +0,0 @@
#!/bin/sh
LOCK_FILE=/var/lock/launcher.lock
PREVENT_LAUNCHER_FILE=/mnt/prevent_launcher
PREVENT_LAUNCHER_FILE2=/boot/prevent_launcher
QUICK_LOAD_FILE=/mnt/quick_load_cmd
if [ -f ${LOCK_FILE} ]; then
echo "${LOCK_FILE} already exists"
exit 1
fi
touch ${LOCK_FILE}
mkdir -p ${MEDNAFEN_HOME}
cp /usr/games/lynxboot.img /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
# Launch Previous Game
if [ -f ${QUICK_LOAD_FILE} ]; then
command=$(cat ${QUICK_LOAD_FILE})
echo "Found quick load file, restarting previous game with command:"
echo ${command}
rm ${QUICK_LOAD_FILE}
eval ${command}
termfix_all
fi
# Loop to launch launcher indefinitely
while true; do
# Check if prevent launcher file present
if [ -f ${PREVENT_LAUNCHER_FILE} ]; then
echo "Found file: ${PREVENT_LAUNCHER_FILE}, not launching launcher"
sleep 5
elif [ -f ${PREVENT_LAUNCHER_FILE2} ]; then
echo "Found file: ${PREVENT_LAUNCHER_FILE2}, not launching launcher"
sleep 5
else
# Launch Retrofe
retrofe
# In case retrofe quits with errors, clear graphic VT
termfix_all
fi
done
rm ${LOCK_FILE}
exit 0

View File

@ -0,0 +1,18 @@
#!/bin/sh
. /etc/os-release
ROOTFS_VERSION=`echo $VERSION | sed -e 's/.*-g/g/'`
ROOTFS_DATE=`date -r /etc/os-release '+%a %b %d %Y' `
KERNEL_VERSION=`uname -r`
KERNEL_DATE=`uname -v |cut -d ' ' -f 3-5,8`
PROCESSOR=`cat /proc/cpuinfo |head -1 |sed 's/^.*: //' `
RAM=`cat /proc/meminfo | head -1 |sed 's/^MemTotal: \+//' `
SWAP=`awk 'BEGIN { getline } { print "\t"$1": "$3" kB" }' /proc/swaps 2>/dev/null`
[ "$SWAP" ] && SWAP="Swap: $SWAP\n"
echo -e "Kernel version: $KERNEL_VERSION\nCompiled: $KERNEL_DATE\n
Root FS version: $ROOTFS_VERSION\nCompiled: $ROOTFS_DATE\n
Processor: $PROCESSOR\nUsable RAM: $RAM\n$SWAP
Network interfaces:"
ip -o -4 address list | awk '{if ($2 != "lo") { printf "%7s %s\n", $2, gensub("/.*$", "", "g", $4) ; outlines++ } } END { if (outlines == 0) print " (none)" }'

View File

@ -1,7 +1,25 @@
#!/bin/sh
# Uncomment the following line to get debug info
#set -x
SELF="$(basename ${0})"
UPDATE_PERIOD=2 #seconds
usage() {
>2& echo "Usage: ${SELF} [toggle]"
exit 1
}
# Check number of arguments
if [ ${#} -eq 1 -a "${1}" = "toggle" ]; then
notif set 0 " Getting system stats..."
killall -s USR1 "${SELF}"
exit 0
elif [ ${#} -ne 0 ]; then
usage
fi
notif_dirty=0
perform=0
@ -10,7 +28,7 @@ function toggle_perform()
{
let perform=1-${perform}
if [ ${perform} -eq 0 ]; then
notif_clear
notif clear
notif_dirty=1
fi
}
@ -20,16 +38,21 @@ while true; do
if [ ${perform} -eq 1 ]; then
# Compute stats
cpu=$(printf "%.1f\n" $(mpstat -P ALL $UPDATE_PERIOD 1 | tail -1 | awk '{print 100-$12}'))
ram_mem=$(printf "%.1f\n" $(free | grep Mem | awk '{print $3/$2 * 100.0}'))
ram_swap=$(printf "%.1f\n" $(free | grep Swap | awk '{print $3/$2 * 100.0}'))
cpu=$(printf "%.0f\n" $(mpstat -P ALL $UPDATE_PERIOD 1 | tail -1 | awk '{print 100-$12}'))
ram_mem=$(printf "%.0f\n" $(free | grep Mem | awk '{print $3/$2 * 100.0}'))
ram_swap=$(printf "%.0f\n" $(free | grep Swap | awk '{print $3/$2 * 100.0}'))
ip_addr=$(ifconfig usb0 | grep "inet " | awk -F'[: ]+' '{ print $4 }')
# Notif
if [ ${notif_dirty} -eq 1 ]; then
notif_clear
notif clear
notif_dirty=0
else
notif_set 0 "CPU:${cpu}%% RAM:${ram_mem}%% SWAP:${ram_swap}%%"
if [ "x${ip_addr}" != "x" ]; then
notif set 0 " CPU:${cpu}%% RAM:${ram_mem}%% SWAP:${ram_swap}%%^IP:${ip_addr}"
else
notif set 0 " CPU:${cpu}%% RAM:${ram_mem}%% SWAP:${ram_swap}%%"
fi
fi
else
sleep ${UPDATE_PERIOD}

View File

@ -6,13 +6,17 @@ SELF=${SELF:-$(basename $0)}
source /usr/local/lib/utils
# The composite gadget directory
# The composite gadget directory
GADGET=/sys/kernel/config/usb_gadget/FunKey
# Check if Ethernet over USB network is requested
[ ! -f /mnt/usbnet ]
USBNET=${?}
# Check if Android Debug Bridge is requested
[ ! -f /mnt/adb ]
ADB=${?}
# USB VID for Linux Foundation
ID_VENDOR="0x1d6b"
@ -37,6 +41,12 @@ init_usb_gadget() {
return 0
fi
# ADB has precedence over USB Mass Storage / Ethernet over USB
if [ ${ADB} -eq 1 ]; then
adb start
return 0
fi
# Get the legacy drivers out of the way
modprobe -r g_ether
modprobe -r g_mass_storage
@ -167,3 +177,48 @@ init_usb_gadget() {
echo ${udc_driver} > ${GADGET}/UDC
return 0
}
# Deinitialize the USB gadget
deinit_usb_gadget() {
# Unbind the device
echo > ${GADGET}/UDC
# Remove functions from configurations
rm ${GADGET}/configs/FunKey.1/mass_storage.mmcblk0p4
if [ ${USBNET} -eq 1 ]; then
rm ${GADGET}/configs/FunKey.1/rndis.usb0
fi
# Remove string directories in configurations
rmdir ${GADGET}/configs/FunKey.1/strings/0x409
# Remove configurations from OS descriptors
if [ ${USBNET} -eq 1 ]; then
rm ${GADGET}/os_desc/FunKey.1
fi
# Remove configurations
rmdir ${GADGET}/configs/FunKey.1
# Remove extended properties from OS descriptors
if [ ${USBNET} -eq 1 ]; then
rmdir ${GADGET}/functions/rndis.usb0/os_desc/interface.rndis/Icons
rmdir ${GADGET}/functions/rndis.usb0/os_desc/interface.rndis/Label
fi
# Remove functions
rmdir ${GADGET}/functions/mass_storage.mmcblk0p4
if [ ${USBNET} -eq 1 ]; then
rmdir ${GADGET}/functions/rndis.usb0
fi
# Remove strings
rmdir ${GADGET}/strings/0x409
# Finallyy remove the gadget
rmdir ${GADGET}
# Unload the kernel modules
modprobe -r usb_f_mass_storage usb_f_rndis
}

View File

@ -0,0 +1,136 @@
#!/bin/sh
# Uncomment the following line to get debug info
#set -x
SELF="$(basename ${0})"
DEFAULT_VOLUME_VALUE=50
MINIMUM_VOLUME=16
VOLUME_STEP=10
NOTIF_DURATION=2
usage() {
>&2 echo "Usage: ${SELF} get"
>&2 echo " ${SELF} set new_volume_percentage"
exit 1
}
increase_volume() {
# Get current value
local current_volume=$(get_volume)
# Compute new volume value
local new_volume=0
let new_volume=${current_volume}+${VOLUME_STEP}
if [ ${new_volume} -gt 100 ]; then
new_volume=100
fi
# Change volume
if [ ${new_volume} -ne ${current_volume} ]; then
set_volume ${new_volume}
fi
# Notif
notif set ${NOTIF_DURATION} " VOLUME: ${new_volume}%%"
}
decrease_volume() {
# Get current value
local current_volume=$(get_volume)
# Compute new volume value
local new_volume=0
if [ ${current_volume} -gt ${VOLUME_STEP} ]; then
let new_volume=${current_volume}-${VOLUME_STEP}
fi
# Change volume
if [ ${new_volume} -ne ${current_volume} ]; then
set_volume ${new_volume}
fi
# Notif
notif set ${NOTIF_DURATION} " VOLUME: ${new_volume}%%"
}
get_volume() {
local volume=$(fw_printenv -n volume 2>/dev/null)
if ! [ ! "${volume}" -ne "${volume}" ] 2> /dev/null; then
volume=${DEFAULT_VOLUME_VALUE}
fw_setenv volume ${volume}
fi
echo ${volume}
}
set_volume() {
local current_volume=$(get_volume)
# Set the new volume value (from 0 to 63) into ALSA
local new_volume=${1}
local alsa_volume=$(echo "a = $new_volume * (63 - $MINIMUM_VOLUME) / 100 + \
$MINIMUM_VOLUME + 0.5; scale = 0; a / 1" | bc -l)
amixer -q sset 'Headphone' ${alsa_volume} unmute
# Set the new volume value in a bootloader variable
if [ ${?} -eq 0 -a ${current_volume} -ne ${new_volume} ]; then
fw_setenv volume ${new_volume}
fi
# Turn on/off audio amplifier if necessary
if [ ${new_volume} -eq 0 ]; then
audio_amp off
else
audio_amp on
fi
}
# Check number of arguments
if [ ${#} -lt 1 -o ${#} -gt 2 ]; then
usage
fi
case "${1}" in
up)
if [ ${#} -ne 1 ]; then
usage
fi
increase_volume
;;
down)
if [ ${#} -ne 1 ]; then
usage
fi
decrease_volume
;;
get)
if [ ${#} -ne 1 ]; then
usage
fi
get_volume
;;
set)
if [ ${#} -ne 2 ]; then
usage
fi
# Make sure the argument is a positive number <= 100
if [ -n "${2}" ] && [ "${2}" -eq "${2}" ] 2>/dev/null && \
[ "${2}" -ge 0 ] && [ "${2}" -le 100 ]; then
set_volume "${2}"
else
usage
fi
;;
*)
usage
;;
esac
exit 0

View File

@ -1,18 +0,0 @@
#!/bin/sh
VOLUME_DEFAULT_VALUE=50
# Check args
if [ ${#} -ne 0 ]; then
echo "Usage: $(basename ${0})"
exit 1
fi
# Sanity check: Check if integer
volume=$(fw_printenv -n volume 2>/dev/null)
if ! [ ! "${volume}" -ne "${volume}" ] 2> /dev/null; then
volume=${VOLUME_DEFAULT_VALUE}
fw_setenv volume ${volume}
fi
echo ${volume}
exit 0

View File

@ -1,4 +0,0 @@
#!/bin/sh
amixer sget 'Headphone' | tail -1 | cut -d' ' -f7 | sed 's/[^0-9]//g'
exit 0

View File

@ -1,38 +0,0 @@
#!/bin/sh
# Check args
if [ ${#} -ne 1 ]; then
echo "Usage: $(basename ${0}) new_volume_percentage"
exit 1
fi
# Check value's range
if [ ${1} -gt 100 ]; then
echo "Usage: Wrong volume percentage (${1}), must be between 0 and 100"
exit 1
fi
# Scale new volume value between 0 and 63
volume_percent=${1}
vol_mini=16;
volume_scaled=$(echo "a = $volume_percent * (63 - $vol_mini) / 100 + $vol_mini + 0.5; scale = 0; a / 1" | bc -l)
#echo $volume_scaled
# Get current value
current_volume=$(volume_get)
# Turn on/off audio amplifier if necessary
if [ ${current_volume} -eq 0 -a ${volume_percent} -ne 0 ]; then
start_audio_amp 1
elif [ ${current_volume} -ne 0 -a ${volume_percent} -eq 0 ]; then
start_audio_amp 0
fi
# Set new volume
amixer -q sset 'Headphone' ${volume_scaled} unmute
# Change new volume value in volume file
if [ ${?} -eq 0 -a ${current_volume} -ne ${volume_percent} ]; then
fw_setenv volume ${volume_percent}
fi
exit 0

View File

@ -1,31 +0,0 @@
#!/bin/sh
# Check args
if [ ${#} -ne 1 ]; then
echo "Usage: ${0} new_volume_percentage"
exit 1
fi
# Check value's range
if [ ${1} -gt 100 ]; then
echo "Usage: Wrong volume percentage (${1}), must be between 0 and 100"
exit 1
fi
# Scale new volume value between 0 and 63
volume_percent=${1}
volume_scaled=$(echo "a = ${1} * 63 / 100 + 0.5; scale = 0; a / 1" | bc -l)
# Get current value
current_volume=$(volume_get)
# Turn on/off ampli if necessary
if [ ${current_volume} -eq 0 -a ${volume_scaled} -ne 0 ]; then
start_audio_amp 1
elif [ ${current_volume} -ne 0 -a ${volume_scaled} -eq 0 ]; then
start_audio_amp 0
fi
# Set new volume
amixer -q sset 'Headphone' ${volume_scaled} unmute
exit 0

View File

@ -1,18 +0,0 @@
#!/bin/sh
# Write quick load file args
QUICK_LOAD_FILE=/mnt/quick_load_cmd
echo -n "" > $QUICK_LOAD_FILE
for i in "$@"; do
if $(echo "$i" | egrep -q '[[:space:]]'); then
# Add quotes around arguments containing spaces
echo -n "\"$i\" " >> ${QUICK_LOAD_FILE}
else
echo -n "$i " >> ${QUICK_LOAD_FILE}
fi
done
echo "" >> ${QUICK_LOAD_FILE}
exit 0

View File

@ -0,0 +1 @@
This is the folder where you can put all your standalone applications opks

View File

@ -0,0 +1 @@
This is the folder where you can put all your emulators opks

View File

@ -0,0 +1 @@
This is the folder where you can put all your standalone games opks

View File

@ -0,0 +1 @@
.

Some files were not shown because too many files have changed in this diff Show More