Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
translations translations
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Hardware
| | |-+  HiBy R1
« previous next »
  • Print
Pages: 1 [2]

Author Topic: HiBy R1  (Read 2376 times)

Offline Milardo

  • Member
  • *
  • Posts: 99
Re: HiBy R1
« Reply #15 on: June 02, 2025, 04:26:32 AM »
Quote from: vitt13 on June 02, 2025, 03:32:59 AM
Quote from: Milardo on June 01, 2025, 07:43:20 PM
I got a bunch of file that are like this: rootfs.squashfs.0000.f08ba94d72d4ec0412a054058a08cdcb

Can I get the exact cmdline thanks in advance.
Rename bunch of file to omit hash at the end of filename
like rootfs.squashfs.0000.f08ba94d72d4ec0412a054058a08cdcb to rootfs.squashfs.0000 and so on.
Then do command
cat rootfs.squashfs.* > rootfs_full.squashfs

Hi, thanks for your reply.

the script will work if you include the r1.upt filename: "./extract.sh r1.upt"
Logged

Offline 7o9

  • Member
  • *
  • Posts: 171
Re: HiBy R1
« Reply #16 on: June 02, 2025, 01:56:16 PM »
Yes, sorry, you need to supply the name of the file to the extract script.

The rebuild script runs without errors on current (native) Ubuntu and the firmware updater seems to accept it but refuses to succesfully flash the player. The exact same script oddly generates a working firmware update when I try to run it on Ubuntu on WSL2. It must be related to the versions or the (default) parameters of genisoimage or mksquashfs. I cannot explain it.

In an attempt to create a patch file against the current Rockbox source the inspiration struck to fix an old issue: Finally the bootloader icons have the correct colors (I was calling the bmp2rb with the wrong parameter for the lcd bit depth setting I configured). Unfortunately the icons are still rotated 90 degrees. The Rockbox logo when booting is still garbled.

Attached is my attempt at a patch file. Most of it was borrowed from other hosted targets, specifically the recent Surfans F28 addition. There are some files in there that are not actually used (mostly audio related, which is disabled anyway).

I can provide the patched firmware update file if someone can host it somewhere.
* hibyr1.patch.txt (36.74 kB - downloaded 33 times.)
Logged

Offline Milardo

  • Member
  • *
  • Posts: 99
Re: HiBy R1
« Reply #17 on: June 04, 2025, 09:57:58 PM »
Quote from: 7o9 on June 02, 2025, 01:56:16 PM
Yes, sorry, you need to supply the name of the file to the extract script.

The rebuild script runs without errors on current (native) Ubuntu and the firmware updater seems to accept it but refuses to succesfully flash the player. The exact same script oddly generates a working firmware update when I try to run it on Ubuntu on WSL2. It must be related to the versions or the (default) parameters of genisoimage or mksquashfs. I cannot explain it.

In an attempt to create a patch file against the current Rockbox source the inspiration struck to fix an old issue: Finally the bootloader icons have the correct colors (I was calling the bmp2rb with the wrong parameter for the lcd bit depth setting I configured). Unfortunately the icons are still rotated 90 degrees. The Rockbox logo when booting is still garbled.

Attached is my attempt at a patch file. Most of it was borrowed from other hosted targets, specifically the recent Surfans F28 addition. There are some files in there that are not actually used (mostly audio related, which is disabled anyway).

I can provide the patched firmware update file if someone can host it somewhere.

I tried  to use ubuntu wsl2, native ubuntu 24.04.2 LTS, ubuntu 18.04, but for some reason I cannot make my own .upt file that will succesfully flash on the player. It just gets stuck on flashing. I even just took your .upt file, and extracted and rebuilt it with no mods and it won't flash successfully.

By itself the .upt file flashed successfully.

for the rebuild script, do I just type this: " ./rebuild.sh "

or do I need to specify  " ./rebuild.sh r1.upt " ?

Also, it's the "out" folder that contains the new/modded firmware file?
« Last Edit: June 04, 2025, 10:05:39 PM by Milardo »
Logged

Offline 7o9

  • Member
  • *
  • Posts: 171
Re: HiBy R1
« Reply #18 on: June 05, 2025, 12:17:40 AM »
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/).
* rebuild.txt (2.08 kB - downloaded 25 times.)
« Last Edit: June 05, 2025, 12:50:53 AM by 7o9 »
Logged

Offline Milardo

  • Member
  • *
  • Posts: 99
Re: HiBy R1
« Reply #19 on: June 12, 2025, 10:14:54 PM »
Quote from: 7o9 on June 05, 2025, 12:17:40 AM
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.

Logged

Offline 7o9

  • Member
  • *
  • Posts: 171
Re: HiBy R1
« Reply #20 on: June 13, 2025, 10:39:17 AM »
If I ever figure out what made my WSL version work, I will gladly share.

The patch was a bit of a mess. I was struggling to get it cleaned up but nice that you got it sorted.

I compiled my Rockbox version without plugins but if the keymap issues are so minor I will adapt your changes and try again with them included.
Logged

Offline Milardo

  • Member
  • *
  • Posts: 99
Re: HiBy R1
« Reply #21 on: June 13, 2025, 02:05:30 PM »
Quote from: 7o9 on June 13, 2025, 10:39:17 AM
If I ever figure out what made my WSL version work, I will gladly share.

The patch was a bit of a mess. I was struggling to get it cleaned up but nice that you got it sorted.

I compiled my Rockbox version without plugins but if the keymap issues are so minor I will adapt your changes and try again with them included.

Ok.

You mentioned that you disabled audio, what  files(s) are needed to be modified to re-enable audio support and which one(s) do I modify that would potentially get audio playback working?
Logged

Offline 7o9

  • Member
  • *
  • Posts: 171
Re: HiBy R1
« Reply #22 on: June 13, 2025, 02:26:17 PM »
In firmware/export/config/hibyr1.h I have set HAVE_DUMMY_CODEC.

If you enable HAVE_HIBY_R1_LINUX_CODEC instead, you would have to implement firmware/drivers/audio/hibylinux_codec.c.

However, ALSA shows no devices when you run ‘amixer’ or ‘amixer contents’ like described here for the AGPtEK Rocker device: https://www.rockbox.org/wiki/AgptekRocker.html

This part seems to be different in this ‘X1600E’ generation of HibyOS.
Logged

  • Print
Pages: 1 [2]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Hardware
| | |-+  HiBy R1
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.058 seconds with 18 queries.