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] 3

Author Topic: HiBy R1  (Read 3648 times)

Offline Milardo

  • Member
  • *
  • Posts: 103
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

Online 7o9

  • Member
  • *
  • Posts: 174
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 73 times.)
Logged

Offline Milardo

  • Member
  • *
  • Posts: 103
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

Online 7o9

  • Member
  • *
  • Posts: 174
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 51 times.)
« Last Edit: June 05, 2025, 12:50:53 AM by 7o9 »
Logged

Offline Milardo

  • Member
  • *
  • Posts: 103
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

Online 7o9

  • Member
  • *
  • Posts: 174
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: 103
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

Online 7o9

  • Member
  • *
  • Posts: 174
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

Offline Milardo

  • Member
  • *
  • Posts: 103
Re: HiBy R1
« Reply #23 on: June 16, 2025, 12:52:50 AM »
Quote from: 7o9 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.


OK.

How do you access R1 to check "amixer", etc.?

Is it through adb?

If so, how do you get R1 to be recognized by adb?

I noticed that there is an option to start adb through your rockbox bootloader.

Is that the correct way to get R1 to be recognized by adb?

It does come up as an Ingenic device and there is to something related to alsa in:  " /dev/snd "

Not sure I'm doing that right though.

Logged

Online 7o9

  • Member
  • *
  • Posts: 174
Re: HiBy R1
« Reply #24 on: June 16, 2025, 11:24:03 AM »
Yes, through adb.

You can turn on adb in the boot menu and then connect over usb to play around.

It does not matter if you run Rockbox or the HiBy player after that.
Logged

Offline Milardo

  • Member
  • *
  • Posts: 103
Re: HiBy R1
« Reply #25 on: June 21, 2025, 02:47:41 AM »
Quote from: 7o9 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.

Does this help in any way? Specifically, (google translate)

https://www.ingenic.com.cn/news-detail/nid-338.html


     7. Updating the Audio driver

         a. Deprecate amixer and configure the data path in the form specified in the board header file

     7. Update Audio Driver

         a. Abandon amixer and configure the data path in the board header file
Logged

Offline vitt13

  • Member
  • *
  • Posts: 97
Re: HiBy R1
« Reply #26 on: June 21, 2025, 03:31:54 AM »
Quote from: Milardo on June 21, 2025, 02:47:41 AM
Does this help in any way? Specifically, (google translate)
Yes, at least You found the way to access their FTP with dev resources. pan.baidu link -> M300-> 01_SW -> 08_M300_kernel... leads to ReadMe.md.txt
and under last "* Download USBCloner" You may find link to Ingenic FTP.
And this is kernel source code path on FTP /DevSupport/X1600/01_SW/08_kernel5.10_X1600-sdk_v6.0-20250410/01_ingenic-linux-kernel5.10-x1600-v6.0-20250410
* ReadMe.md.txt (0.77 kB - downloaded 39 times.)
« Last Edit: June 21, 2025, 06:25:31 AM by vitt13 »
Logged

Offline Milardo

  • Member
  • *
  • Posts: 103
Re: HiBy R1
« Reply #27 on: July 06, 2025, 03:11:32 PM »
Quote from: 7o9 on June 16, 2025, 11:24:03 AM
Yes, through adb.

You can turn on adb in the boot menu and then connect over usb to play around.

It does not matter if you run Rockbox or the HiBy player after that.


Did this help in any way? Specifically, (google translate)

https://www.ingenic.com.cn/news-detail/nid-338.html


     7. Updating the Audio driver

         a. Deprecate amixer and configure the data path in the form specified in the board header file

     7. Update Audio Driver

         a. Abandon amixer and configure the data path in the board header file
Logged

Offline kae0

  • Member
  • *
  • Posts: 3
Re: HiBy R1
« Reply #28 on: July 13, 2025, 09:44:47 AM »
Sadly i also haven't been successful at repacking the upt files, your genisoimage turns out to be the closest with it's binary content, though I noticed the structure of rootfs changing which could totally answer our question of why it didn't boot.

Changing settings in genisoimage to get the untouched rootfs structure didn't work in a timely manner, so i used xorriso  ;D

xorriso -as mkisofs -volid 'CDROM' -JRU -joliet-long -o $workingdir_out/$updatefile $workingdir_out/image_contents/

This one didn't modify rootfs, and from what i have seen the beginning of xImage is also in tact, so i believe it could work.

I have to wait for Tempotec to drop an update to test doe

Also while i was trying to fix my mistakenly wiped mtd2 partition, i've found Ingenic ftp server and credentials, cuz they seem to change that thing once in a while.

ftp.ingenic.com.cn
szingenic
hq7Wy0gws



I've noticed Tempotec Variations* V1's firmware is based mostly on Hiby R1 firmware, in my case amixer shows:

Simple mixer control 'DOP_EN',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Digital Filter',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 4
  Mono: 0 [0%]
Simple mixer control 'Left',0
  Capabilities: pvolume pvolume-joined
  Playback channels: Mono
  Limits: Playback 0 - 255
  Mono: Playback 0 [0%]
Simple mixer control 'Mute Output',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'NOS_EN',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Right',0
  Capabilities: pvolume pvolume-joined
  Playback channels: Mono
  Limits: Playback 0 - 255
  Mono: Playback 0 [0%]
Simple mixer control 'Soft Mute',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
« Last Edit: July 13, 2025, 10:47:41 AM by kae0 »
Logged

Online 7o9

  • Member
  • *
  • Posts: 174
Re: HiBy R1
« Reply #29 on: July 13, 2025, 10:24:57 AM »
You tried to repack the .upt file without making changes and that failed? That suggests the problem is with the iso generation indeed. I still have no idea why.

Tempotec confuses me. Is this V1 a new device (using the X1600) or an old one (using the X1000E)? There was a V1 in 2019 already.

I thought all X1600 devices use this ‘new’ way without amixer.
Logged

  • Print
Pages: 1 [2] 3
« 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.073 seconds with 16 queries.