You are trying everything I tried too. I cannot explain why it works for me on WSL2 (Ubuntu 24.04.2 LTS) but not on ‘real’ Ubuntu.
My suspects are the parameters for unsquashfs/mksquashfs/genisoimage. Running the scripts as root might also matter.
I think I might have uploaded the wrong rebuild script though, I will compare it with mine. The one I shared seems just to split the previously extracted file and make an iso of it.
I have attached the correct version I actually used, sorry about that.
You need to run this version like: ./rebuild.sh r1.upt
It is still weird the previous version did not produce a working update file. It basically extracted and then repacked the exact same thing. Did you try to extract/rebuild an original firmware file? Did that work?
The only thing I added to the original contents is bootloader.r1 (the Rockbox 'bootloader') and a modified hiby_player.sh (both in /usr/bin/).
Tried your correct version on WSL, still doesn't work for me even using the original firmware file.
No problem though.
Tried to compile rockbox with the diff file you provided.
"git apply hibyr1.patch.diff"
got this error: "error: patch failed: bootloader/hibyos_linux.c:504
error: bootloader/hibyos_linux.c: patch does not apply"
Had to manually put what you had below into the hibyos_linux.c file and I comment out that section in the diff file.
@@ -504,7 +515,11 @@ static void adb(int start)
pid_t pid = fork();
if(pid == 0)
{
+#if defined(HIBY_R1)
execlp("/etc/init.d/T90adb", "T90adb", start ? "start" : "stop", NULL);
+#else
+ execlp("/etc/init.d/K90adb", "K90adb", start ? "start" : "stop", NULL);
+#endif
_exit(42);
}
int status;
Next, there were some warning/errors that later had to be dealt with:
In file included from /home/patrick/Downloads/compilehibyr1rockbox/rockbox/apps/plugins/reversi/reversi-gui.c:44:0:
/home/patrick/Downloads/compilehibyr1rockbox/rockbox/apps/plugins/reversi/reversi-gui.h:377:2: error: #error No keymap defined!
#error No keymap defined!
^
/home/patrick/Downloads/compilehibyr1rockbox/rockbox/apps/plugins/clix.c:329:2: error: #error "no keymap"
#error "no keymap"
^
This error :
"CC apps/keymaps/keymap-hibyr1.c
/home/patrick/Downloads/compilehibyr1rockbox/rockbox/apps/keymaps/keymap-hibyr1.c:32:33: error: ‘BUTTON_PREV’ undeclared here (not in a function)"
I had to delete lines 32,33,48,51,52 from /rockbox/apps/keymaps/keymap-hibyr1.c because I got similar errors like the above.
For the plugins clix and reversi :
I just put in the below to get rid of the errors from above.
in clix.c
added:
#elif CONFIG_KEYPAD == HIBY_R1_PAD
#define CLIX_BUTTON_UP BUTTON_UP
#define CLIX_BUTTON_DOWN BUTTON_DOWN
#define CLIX_BUTTON_LEFT BUTTON_LEFT
#define CLIX_BUTTON_RIGHT BUTTON_RIGHT
#define CLIX_BUTTON_SELECT BUTTON_SELECT
#define CLIX_BUTTON_QUIT BUTTON_POWER
in reversi-gui.h
added:
#elif CONFIG_KEYPAD == HIBY_R1_PAD
/* use touchscreen */
Was able to get rockbox compiled and seems similar in functionality to your initial build.