summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-10-08 09:47:40 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-10-11 16:37:17 -0400
commit2a471e288c16b91a7186a60b3fb84dd55a494c7a (patch)
tree3e746212c5fa69b59f61d19b6e29d11aa8a5e31b /tools
parent5efaa9ef8073bb216e3dcdbb4476f2fa7c672b76 (diff)
downloadrockbox-2a471e288c16b91a7186a60b3fb84dd55a494c7a.tar.gz
rockbox-2a471e288c16b91a7186a60b3fb84dd55a494c7a.tar.bz2
rockbox-2a471e288c16b91a7186a60b3fb84dd55a494c7a.zip
New port: AIGO EROS Q / EROS K
The Q and K have a slightly different case, but the hardware under the shell is completely identical. These models are rebadged versions: * Hifiwalker H2 (== Q) * AGPTek H3 (== K) * Surfans F20 (== K) Other notes: * Significant improvements in the shared Hiby-platform launcher/loader * SD card can theoretically be hot-swapped now * Support external USB mass storage! * Some consolidation of Hiby-platform targets * Some consolidation of plugin keymaps Todo/known issues: * Keymaps need to be gone over properly * Convert to HAVE_SCROLLWHEEL? Change-Id: I5a8a4f22c38a5b69392ca7c0a8ad8c4e07d9523c
Diffstat (limited to 'tools')
-rw-r--r--tools/builds.pm4
-rwxr-xr-xtools/configure32
-rwxr-xr-xtools/hiby_patcher.pl77
-rw-r--r--tools/root.make6
4 files changed, 108 insertions, 11 deletions
diff --git a/tools/builds.pm b/tools/builds.pm
index 6f0c4d0445..36c6e9b1fb 100644
--- a/tools/builds.pm
+++ b/tools/builds.pm
@@ -448,6 +448,10 @@ $releasenotes="/wiki/ReleaseNotes315";
name => 'FiiO M3K',
status => 1,
},
+ 'erosq' => {
+ name => 'AIGO EROS Q / K',
+ status => 1,
+ },
'ihifi770' => {
name => 'Xuelin iHIFI 770',
status => 2,
diff --git a/tools/configure b/tools/configure
index f5fb6351c0..2b34ed4cff 100755
--- a/tools/configure
+++ b/tools/configure
@@ -1589,7 +1589,8 @@ cat <<EOF
==AgpTek== 252) 800 227) NW-A20 series
240) Rocker 228) NWZ-A860 series
==FiiO== 229) NWZ-S750 series
- 244) M3K
+ ==AIGO== 244) M3K
+ 245) Eros Q / K
EOF
@@ -4056,7 +4057,7 @@ fi
t_cpu="hosted"
t_manufacturer="xduoo"
t_model="xduoo_x3ii"
-# sysfont="20-Terminus-Bold"
+ sysfont="16-Terminus"
;;
243|xduoox20)
@@ -4079,7 +4080,7 @@ fi
t_cpu="hosted"
t_manufacturer="xduoo"
t_model="xduoo_x20"
-# sysfont="20-Terminus-Bold"
+ sysfont="16-Terminus"
;;
244|fiiom3k)
@@ -4102,7 +4103,30 @@ fi
t_manufacturer="fiio"
t_model="m3k"
mipsellinuxcc
-# sysfont="20-Terminus-Bold"
+ sysfont="16-Terminus"
+ ;;
+
+ 245|erosq)
+ target_id=113
+ application=yes
+ app_type="erosq"
+ modelname="erosq"
+ target="EROS_Q"
+ memory=8
+ mipsellinuxcc
+ tool="cp "
+ boottool="cp "
+ bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
+ bmp2rb_native="$rootdir/tools/bmp2rb -f 10"
+ output="rockbox.erosq"
+ bootoutput="bootloader.erosq"
+ appextra="recorder:gui:hosted"
+ plugins="yes"
+ # architecture, manufacturer and model for the target-tree build
+ t_cpu="hosted"
+ t_manufacturer="aigo"
+ t_model="erosq"
+ sysfont="16-Terminus"
;;
250|ihifi770c)
diff --git a/tools/hiby_patcher.pl b/tools/hiby_patcher.pl
index 9c45ce6dd3..86b8ad3d3f 100755
--- a/tools/hiby_patcher.pl
+++ b/tools/hiby_patcher.pl
@@ -38,6 +38,10 @@ if ($model eq 'rocker') {
@ubiopts = ("-e", "124KiB", "-c", "1024", "-m", "2048", "-j", "8192KiB", "-U");
} elsif ($model eq 'x20') {
@ubiopts = ("-e", "124KiB", "-c", "1024", "-m", "2048", "-j", "8192KiB", "-U");
+} elsif ($model eq 'eros_q') {
+ @ubiopts = ("-e", "124KiB", "-c", "1024", "-m", "2048", "-j", "8192KiB", "-U");
+} elsif ($model eq 'm3k') {
+ @ubiopts = ("-e", "124KiB", "-c", "2048", "-m", "2048", "-j", "8192KiB", "-U");
} else {
die ("Unknown hiby model: $model\n");
}
@@ -81,7 +85,6 @@ while (<UPDATE>) {
if ($rootfs_found) {
if (/file_path=(.*)/) {
$ubiname = basename($1);
- $ubiname =~ tr/[a-z]/[A-Z]/;
last;
}
} else {
@@ -92,7 +95,11 @@ while (<UPDATE>) {
}
close UPDATE;
-die("can't locate rootfs image") if (! -e "$isowork/$ubiname");
+if (! -e "$isowork/$ubiname") {
+ $ubiname =~ tr/[a-z]/[A-Z]/;
+ die("can't locate rootfs image ($ubiname)") if (! -e "$isowork/$ubiname");
+}
+
$ubiname = "$isowork/$ubiname";
### Extract RootFS
@@ -102,6 +109,7 @@ mkdir($rootfsdir) || die ("Can't create '$rootfsdir'");
@sysargs = ("ubireader_extract_files", "-k", "-o", $rootfsdir, $ubiname);
system(@sysargs);
+# exit(0);
### Mangle RootFS
# Generate rb_bootloader.sh
@@ -109,19 +117,74 @@ my $rbbasename = basename($rbbname);
my $bootloader_sh =
"#!/bin/sh
-mount /dev/mmcblk0 /mnt/sd_0 &>/dev/null || \
-mount /dev/mmcblk0p1 /mnt/sd_0 &>/dev/null
+#mkdir -p /mnt/sd_0
+#
+#mount /dev/mmcblk0 /mnt/sd_0 &>/dev/null || \
+#mount /dev/mmcblk0p1 /mnt/sd_0 &>/dev/null
+
+killall hiby_player &>/dev/null
+killall -9 hiby_player &>/dev/null
+
+killall $rbbasename &>/dev/null
+killall -9 $rbbasename &>/dev/null
-killall $rbbasename
-killall -9 $rbbasename
+# /etc/init.d/K90adb start
+# Rockbox launcher!
/usr/bin/$rbbasename
sleep 1
reboot
- ";
+";
open FILE, ">$rootfsdir/usr/bin/hiby_player.sh" || die ("can't write bootloader script!");
print FILE $bootloader_sh;
close FILE;
+chmod 0755, "$rootfsdir/usr/bin/hiby_player.sh";
+
+# Auto mount/unmount external USB drives
+open FILE, ">>$rootfsdir/etc/mdev.conf" || die ("can't access mdev conf!");
+print FILE "sd[a-z][0-9]+ 0:0 664 @ /etc/rb_inserting.sh\n";
+print FILE "mmcblk[0-9]p[0-9] 0:0 664 @ /etc/rb_inserting.sh\n";
+print FILE "mmcblk[0-9] 0:0 664 @ /etc/rb_inserting.sh\n";
+print FILE "sd[a-z] 0:0 664 \$ /etc/rb_removing.sh";
+print FILE "mmcblk[0-9] 0:0 664 \$ /etc/rb_removing.sh\n";
+close FILE;
+
+my $insert_sh = '
+#!/bin/sh
+# $MDEV is the device
+
+case $MDEV in
+ mmc*)
+ MNT_POINT=/mnt/sd_0
+ ;;
+ sd*)
+ MNT_POINT=/mnt/sd_0/USB
+ ;;
+esac
+
+if [ ! -d $MNT_POINT ];then
+ mkdir $MNT_POINT
+fi
+
+mount $MDEV $MNT_POINT
+';
+
+open FILE, ">$rootfsdir/etc/rb_inserting.sh" || die("can't write hotplug helpers!");
+print FILE $insert_sh;
+close FILE;
+chmod 0755, "$rootfsdir/etc/rb_inserting.sh";
+
+my $remove_sh = '
+#!/bin/sh
+# $MDEV is the device
+sync;
+unmount -f $MDEV;
+';
+
+open FILE, ">$rootfsdir/etc/rb_removing.sh" || die("can't write hotplug helpers!");
+print FILE $remove_sh;
+close FILE;
+chmod 0755, "$rootfsdir/etc/rb_removing.sh";
# Copy bootloader over
@sysargs=("cp", "$rbbname", "$rootfsdir/usr/bin/$rbbasename");
diff --git a/tools/root.make b/tools/root.make
index fd42f9b6b2..3f5b4bca17 100644
--- a/tools/root.make
+++ b/tools/root.make
@@ -104,6 +104,8 @@ ifneq (,$(findstring bootloader,$(APPSDIR)))
include $(ROOTDIR)/firmware/target/hosted/agptek/rocker.make
else ifneq (,$(findstring xduoo,$(APP_TYPE)))
include $(ROOTDIR)/firmware/target/hosted/xduoo/xduoo.make
+ else ifneq (,$(findstring erosq,$(APP_TYPE)))
+ include $(ROOTDIR)/firmware/target/hosted/aigo/erosq.make
else ifneq (,$(findstring fiio,$(APP_TYPE)))
include $(ROOTDIR)/firmware/target/hosted/fiio/fiio.make
else
@@ -156,6 +158,10 @@ else # core
include $(ROOTDIR)/firmware/target/hosted/fiio/fiio.make
endif
+ ifneq (,$(findstring erosq,$(APP_TYPE)))
+ include $(ROOTDIR)/firmware/target/hosted/aigo/erosq.make
+ endif
+
ifneq (,$(findstring android_ndk, $(APP_TYPE)))
include $(ROOTDIR)/firmware/target/hosted/ibasso/android_ndk.make
else