diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/builds.pm | 4 | ||||
-rwxr-xr-x | tools/configure | 32 | ||||
-rwxr-xr-x | tools/hiby_patcher.pl | 77 | ||||
-rw-r--r-- | tools/root.make | 6 |
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"; | |||
448 | name => 'FiiO M3K', | 448 | name => 'FiiO M3K', |
449 | status => 1, | 449 | status => 1, |
450 | }, | 450 | }, |
451 | 'erosq' => { | ||
452 | name => 'AIGO EROS Q / K', | ||
453 | status => 1, | ||
454 | }, | ||
451 | 'ihifi770' => { | 455 | 'ihifi770' => { |
452 | name => 'Xuelin iHIFI 770', | 456 | name => 'Xuelin iHIFI 770', |
453 | status => 2, | 457 | 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 | |||
1589 | ==AgpTek== 252) 800 227) NW-A20 series | 1589 | ==AgpTek== 252) 800 227) NW-A20 series |
1590 | 240) Rocker 228) NWZ-A860 series | 1590 | 240) Rocker 228) NWZ-A860 series |
1591 | ==FiiO== 229) NWZ-S750 series | 1591 | ==FiiO== 229) NWZ-S750 series |
1592 | 244) M3K | 1592 | ==AIGO== 244) M3K |
1593 | 245) Eros Q / K | ||
1593 | 1594 | ||
1594 | EOF | 1595 | EOF |
1595 | 1596 | ||
@@ -4056,7 +4057,7 @@ fi | |||
4056 | t_cpu="hosted" | 4057 | t_cpu="hosted" |
4057 | t_manufacturer="xduoo" | 4058 | t_manufacturer="xduoo" |
4058 | t_model="xduoo_x3ii" | 4059 | t_model="xduoo_x3ii" |
4059 | # sysfont="20-Terminus-Bold" | 4060 | sysfont="16-Terminus" |
4060 | ;; | 4061 | ;; |
4061 | 4062 | ||
4062 | 243|xduoox20) | 4063 | 243|xduoox20) |
@@ -4079,7 +4080,7 @@ fi | |||
4079 | t_cpu="hosted" | 4080 | t_cpu="hosted" |
4080 | t_manufacturer="xduoo" | 4081 | t_manufacturer="xduoo" |
4081 | t_model="xduoo_x20" | 4082 | t_model="xduoo_x20" |
4082 | # sysfont="20-Terminus-Bold" | 4083 | sysfont="16-Terminus" |
4083 | ;; | 4084 | ;; |
4084 | 4085 | ||
4085 | 244|fiiom3k) | 4086 | 244|fiiom3k) |
@@ -4102,7 +4103,30 @@ fi | |||
4102 | t_manufacturer="fiio" | 4103 | t_manufacturer="fiio" |
4103 | t_model="m3k" | 4104 | t_model="m3k" |
4104 | mipsellinuxcc | 4105 | mipsellinuxcc |
4105 | # sysfont="20-Terminus-Bold" | 4106 | sysfont="16-Terminus" |
4107 | ;; | ||
4108 | |||
4109 | 245|erosq) | ||
4110 | target_id=113 | ||
4111 | application=yes | ||
4112 | app_type="erosq" | ||
4113 | modelname="erosq" | ||
4114 | target="EROS_Q" | ||
4115 | memory=8 | ||
4116 | mipsellinuxcc | ||
4117 | tool="cp " | ||
4118 | boottool="cp " | ||
4119 | bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" | ||
4120 | bmp2rb_native="$rootdir/tools/bmp2rb -f 10" | ||
4121 | output="rockbox.erosq" | ||
4122 | bootoutput="bootloader.erosq" | ||
4123 | appextra="recorder:gui:hosted" | ||
4124 | plugins="yes" | ||
4125 | # architecture, manufacturer and model for the target-tree build | ||
4126 | t_cpu="hosted" | ||
4127 | t_manufacturer="aigo" | ||
4128 | t_model="erosq" | ||
4129 | sysfont="16-Terminus" | ||
4106 | ;; | 4130 | ;; |
4107 | 4131 | ||
4108 | 250|ihifi770c) | 4132 | 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') { | |||
38 | @ubiopts = ("-e", "124KiB", "-c", "1024", "-m", "2048", "-j", "8192KiB", "-U"); | 38 | @ubiopts = ("-e", "124KiB", "-c", "1024", "-m", "2048", "-j", "8192KiB", "-U"); |
39 | } elsif ($model eq 'x20') { | 39 | } elsif ($model eq 'x20') { |
40 | @ubiopts = ("-e", "124KiB", "-c", "1024", "-m", "2048", "-j", "8192KiB", "-U"); | 40 | @ubiopts = ("-e", "124KiB", "-c", "1024", "-m", "2048", "-j", "8192KiB", "-U"); |
41 | } elsif ($model eq 'eros_q') { | ||
42 | @ubiopts = ("-e", "124KiB", "-c", "1024", "-m", "2048", "-j", "8192KiB", "-U"); | ||
43 | } elsif ($model eq 'm3k') { | ||
44 | @ubiopts = ("-e", "124KiB", "-c", "2048", "-m", "2048", "-j", "8192KiB", "-U"); | ||
41 | } else { | 45 | } else { |
42 | die ("Unknown hiby model: $model\n"); | 46 | die ("Unknown hiby model: $model\n"); |
43 | } | 47 | } |
@@ -81,7 +85,6 @@ while (<UPDATE>) { | |||
81 | if ($rootfs_found) { | 85 | if ($rootfs_found) { |
82 | if (/file_path=(.*)/) { | 86 | if (/file_path=(.*)/) { |
83 | $ubiname = basename($1); | 87 | $ubiname = basename($1); |
84 | $ubiname =~ tr/[a-z]/[A-Z]/; | ||
85 | last; | 88 | last; |
86 | } | 89 | } |
87 | } else { | 90 | } else { |
@@ -92,7 +95,11 @@ while (<UPDATE>) { | |||
92 | } | 95 | } |
93 | close UPDATE; | 96 | close UPDATE; |
94 | 97 | ||
95 | die("can't locate rootfs image") if (! -e "$isowork/$ubiname"); | 98 | if (! -e "$isowork/$ubiname") { |
99 | $ubiname =~ tr/[a-z]/[A-Z]/; | ||
100 | die("can't locate rootfs image ($ubiname)") if (! -e "$isowork/$ubiname"); | ||
101 | } | ||
102 | |||
96 | $ubiname = "$isowork/$ubiname"; | 103 | $ubiname = "$isowork/$ubiname"; |
97 | 104 | ||
98 | ### Extract RootFS | 105 | ### Extract RootFS |
@@ -102,6 +109,7 @@ mkdir($rootfsdir) || die ("Can't create '$rootfsdir'"); | |||
102 | @sysargs = ("ubireader_extract_files", "-k", "-o", $rootfsdir, $ubiname); | 109 | @sysargs = ("ubireader_extract_files", "-k", "-o", $rootfsdir, $ubiname); |
103 | system(@sysargs); | 110 | system(@sysargs); |
104 | 111 | ||
112 | # exit(0); | ||
105 | ### Mangle RootFS | 113 | ### Mangle RootFS |
106 | 114 | ||
107 | # Generate rb_bootloader.sh | 115 | # Generate rb_bootloader.sh |
@@ -109,19 +117,74 @@ my $rbbasename = basename($rbbname); | |||
109 | my $bootloader_sh = | 117 | my $bootloader_sh = |
110 | "#!/bin/sh | 118 | "#!/bin/sh |
111 | 119 | ||
112 | mount /dev/mmcblk0 /mnt/sd_0 &>/dev/null || \ | 120 | #mkdir -p /mnt/sd_0 |
113 | mount /dev/mmcblk0p1 /mnt/sd_0 &>/dev/null | 121 | # |
122 | #mount /dev/mmcblk0 /mnt/sd_0 &>/dev/null || \ | ||
123 | #mount /dev/mmcblk0p1 /mnt/sd_0 &>/dev/null | ||
124 | |||
125 | killall hiby_player &>/dev/null | ||
126 | killall -9 hiby_player &>/dev/null | ||
127 | |||
128 | killall $rbbasename &>/dev/null | ||
129 | killall -9 $rbbasename &>/dev/null | ||
114 | 130 | ||
115 | killall $rbbasename | 131 | # /etc/init.d/K90adb start |
116 | killall -9 $rbbasename | ||
117 | 132 | ||
133 | # Rockbox launcher! | ||
118 | /usr/bin/$rbbasename | 134 | /usr/bin/$rbbasename |
119 | sleep 1 | 135 | sleep 1 |
120 | reboot | 136 | reboot |
121 | "; | 137 | "; |
122 | open FILE, ">$rootfsdir/usr/bin/hiby_player.sh" || die ("can't write bootloader script!"); | 138 | open FILE, ">$rootfsdir/usr/bin/hiby_player.sh" || die ("can't write bootloader script!"); |
123 | print FILE $bootloader_sh; | 139 | print FILE $bootloader_sh; |
124 | close FILE; | 140 | close FILE; |
141 | chmod 0755, "$rootfsdir/usr/bin/hiby_player.sh"; | ||
142 | |||
143 | # Auto mount/unmount external USB drives | ||
144 | open FILE, ">>$rootfsdir/etc/mdev.conf" || die ("can't access mdev conf!"); | ||
145 | print FILE "sd[a-z][0-9]+ 0:0 664 @ /etc/rb_inserting.sh\n"; | ||
146 | print FILE "mmcblk[0-9]p[0-9] 0:0 664 @ /etc/rb_inserting.sh\n"; | ||
147 | print FILE "mmcblk[0-9] 0:0 664 @ /etc/rb_inserting.sh\n"; | ||
148 | print FILE "sd[a-z] 0:0 664 \$ /etc/rb_removing.sh"; | ||
149 | print FILE "mmcblk[0-9] 0:0 664 \$ /etc/rb_removing.sh\n"; | ||
150 | close FILE; | ||
151 | |||
152 | my $insert_sh = ' | ||
153 | #!/bin/sh | ||
154 | # $MDEV is the device | ||
155 | |||
156 | case $MDEV in | ||
157 | mmc*) | ||
158 | MNT_POINT=/mnt/sd_0 | ||
159 | ;; | ||
160 | sd*) | ||
161 | MNT_POINT=/mnt/sd_0/USB | ||
162 | ;; | ||
163 | esac | ||
164 | |||
165 | if [ ! -d $MNT_POINT ];then | ||
166 | mkdir $MNT_POINT | ||
167 | fi | ||
168 | |||
169 | mount $MDEV $MNT_POINT | ||
170 | '; | ||
171 | |||
172 | open FILE, ">$rootfsdir/etc/rb_inserting.sh" || die("can't write hotplug helpers!"); | ||
173 | print FILE $insert_sh; | ||
174 | close FILE; | ||
175 | chmod 0755, "$rootfsdir/etc/rb_inserting.sh"; | ||
176 | |||
177 | my $remove_sh = ' | ||
178 | #!/bin/sh | ||
179 | # $MDEV is the device | ||
180 | sync; | ||
181 | unmount -f $MDEV; | ||
182 | '; | ||
183 | |||
184 | open FILE, ">$rootfsdir/etc/rb_removing.sh" || die("can't write hotplug helpers!"); | ||
185 | print FILE $remove_sh; | ||
186 | close FILE; | ||
187 | chmod 0755, "$rootfsdir/etc/rb_removing.sh"; | ||
125 | 188 | ||
126 | # Copy bootloader over | 189 | # Copy bootloader over |
127 | @sysargs=("cp", "$rbbname", "$rootfsdir/usr/bin/$rbbasename"); | 190 | @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))) | |||
104 | include $(ROOTDIR)/firmware/target/hosted/agptek/rocker.make | 104 | include $(ROOTDIR)/firmware/target/hosted/agptek/rocker.make |
105 | else ifneq (,$(findstring xduoo,$(APP_TYPE))) | 105 | else ifneq (,$(findstring xduoo,$(APP_TYPE))) |
106 | include $(ROOTDIR)/firmware/target/hosted/xduoo/xduoo.make | 106 | include $(ROOTDIR)/firmware/target/hosted/xduoo/xduoo.make |
107 | else ifneq (,$(findstring erosq,$(APP_TYPE))) | ||
108 | include $(ROOTDIR)/firmware/target/hosted/aigo/erosq.make | ||
107 | else ifneq (,$(findstring fiio,$(APP_TYPE))) | 109 | else ifneq (,$(findstring fiio,$(APP_TYPE))) |
108 | include $(ROOTDIR)/firmware/target/hosted/fiio/fiio.make | 110 | include $(ROOTDIR)/firmware/target/hosted/fiio/fiio.make |
109 | else | 111 | else |
@@ -156,6 +158,10 @@ else # core | |||
156 | include $(ROOTDIR)/firmware/target/hosted/fiio/fiio.make | 158 | include $(ROOTDIR)/firmware/target/hosted/fiio/fiio.make |
157 | endif | 159 | endif |
158 | 160 | ||
161 | ifneq (,$(findstring erosq,$(APP_TYPE))) | ||
162 | include $(ROOTDIR)/firmware/target/hosted/aigo/erosq.make | ||
163 | endif | ||
164 | |||
159 | ifneq (,$(findstring android_ndk, $(APP_TYPE))) | 165 | ifneq (,$(findstring android_ndk, $(APP_TYPE))) |
160 | include $(ROOTDIR)/firmware/target/hosted/ibasso/android_ndk.make | 166 | include $(ROOTDIR)/firmware/target/hosted/ibasso/android_ndk.make |
161 | else | 167 | else |