24b152725f
Basic support for the Tolino Shine 2 HD ebook reader. Waveform handling shares the same oddities as for the Kobo Clara HD but the file epdc_E060SCM.fw from the IMX6SL BSP from NXP does also work. The existing waveform from SD card is used. Preferred way to install is to clone the internal SD, keeping the original as a backup, install on that clone. U-Boot is a more recent one than the factory u-boot, so devicetrees are nicely supported. Kernel is the near mainline kernel also used by the Kobo Clara HD. About Wifi: Handling of the configuration file for boards with brcmfmac is not supported yet. [ci:skip-build] already built successfully in CI
24 lines
765 B
Perl
24 lines
765 B
Perl
#!/usr/bin/env perl
|
|
# SPDX-License-Identifier: GPL-2.0+
|
|
# (c) 2020, Andreas Kemnade
|
|
|
|
sub usage {
|
|
print "Usage: $0 disk epdc.fw\ndisk is the Kobo/Toline disk (image) containing a waveform\n";
|
|
exit(1);
|
|
}
|
|
|
|
&usage unless $#ARGV == 1;
|
|
|
|
open IMGFILE, '<:raw', @ARGV[0] or die "cannot open @ARGV[0]";
|
|
seek IMGFILE, 0x700000-16, 0;
|
|
read IMGFILE, $magic, 8;
|
|
(unpack("x0 H16", $magic) eq "fff5afff78563412") or die "invalid magic";
|
|
|
|
seek IMGFILE, 0x700000-8, 0;
|
|
read IMGFILE, $lengthbytes, 4;
|
|
$length = unpack("x0 V", $lengthbytes) or die "invalid length";
|
|
print $length . " bytes\n" ;
|
|
seek IMGFILE, 0x700000, 0 or die "seek failed, file too short?";
|
|
open OUTFILE, '>:raw', @ARGV[1] or die "cannot open @ARGV[1]";
|
|
read IMGFILE, $waveform, $length;
|
|
print OUTFILE $waveform;
|