Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 05-14-2016, 08:20 AM   #196
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
The (implied) question being answered was: "My application has a slow start-up from KUAL, I have to use . . .".

No reference made to amount of memory being used by cvm, either before, during, or after.
knc1 is offline   Reply With Quote
Old 05-14-2016, 08:22 AM   #197
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
I am recompressing bunny.gmv to bunny.gmv.xz as follows:
xz -z9 bunny.gmv

For some reason the xv in the busybox-armv5l was not happy with the previous version. If this fails, I will see about building the xv in usbnet, because it worked with gmplay on my k5. For my pre-dithered videos, xz compresses them to about one-fourth the size of gzip versions.
geekmaster is offline   Reply With Quote
Advert
Old 05-14-2016, 08:29 AM   #198
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by knc1 View Post
The (implied) question being answered was: "My application has a slow start-up from KUAL, I have to use . . .".

No reference made to amount of memory being used by cvm, either before, during, or after.
My application does not have a slow startup, though in some versions I did wait a bit before starting the native app to let cvm stop updating the title bar before I take over the framebuffer. I do remember that particular question being asked nor implied, but I have a tendency to construct and interpret language a bit more formally, with fewer hidden assumptions and unexpressed implications (like Spock from Star Trek, or Sheldon Cooper from The Big Bang Theory). This was a problem in various forums in the past, before I overcame my burning desire to defend my honor and to refute (perceived) false accusations. Such things no longer matter, most of the time. Life is too short...

Anyway, I will have gmplay playing movies (with sound) on my K1 (and newer kindles) very soon (though I have chores to do, so hobby time is about to go on hold).
geekmaster is offline   Reply With Quote
Old 05-14-2016, 08:33 AM   #199
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by NiLuJe View Post
(Just a quick reminder that the K1 doesn't support Kindlets ).
Aware of that. No kindlets unless somebody ADDS such support, anyway. I do not plan to do that, though I may make my native mode launcher menu KUAL-compatible to some extent. There is no reason to NOT add java support (and lua too) to a K1, is there?
geekmaster is offline   Reply With Quote
Old 05-14-2016, 08:50 AM   #200
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Now this is strange. Even the bunny.gmv.gz that is a fresh download, working with gmplay (and zcat) on a K5, fails on the K1. For some reason, zcat reports "bad magic" when decompressing the video. I just compressed xv and bzip2 versions using my linux mint, but the .gz version did not change.

I could TRY using the zcat in the busybox-armv4l instead of /bin/zcat, but its xv already failed on me. I am curious why the (pre-build) decompressors are failing on the K1... I have yet to try bzcat though -- I will do that now. Perhaps it is because I compressed the files with -9 compression?

Hmm... bzcat "decompression failed" too. Maybe old versions do not support -9 compression?

Okay, time to copy the 300MB raw uncompressed video to my K1, and just use "cat"... Oops, K1 only has a 180MB userstore -- need to find my SD card and put vids there.

Last edited by geekmaster; 05-14-2016 at 09:05 AM.
geekmaster is offline   Reply With Quote
Advert
Old 05-14-2016, 09:04 AM   #201
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by geekmaster View Post
Aware of that. No kindlets unless somebody ADDS such support, anyway. I do not plan to do that, though I may make my native mode launcher menu KUAL-compatible to some extent. There is no reason to NOT add java support (and lua too) to a K1, is there?
It should be possible to build Lua for the K1 - -
Once you have figured out building dynamically linked applications for the K1.

(Lua depends on using dlopen - it can only be built static for a specific purpose (I.E: all modules are statically linked in) ).

I don't recall if Java pre-dates ARMv4 or not, I think it does.
Maybe a little searching for ARMv4JT<...> would help answer that question. (I think Jazerle (sp?) implies thumb also)
knc1 is offline   Reply With Quote
Old 05-14-2016, 09:07 AM   #202
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by knc1 View Post
It should be possible to build Lua for the K1 - -
Once you have figured out building dynamically linked applications for the K1.

(Lua depends on using dlopen - it can only be built static for a specific purpose (I.E: all modules are statically linked in) ).

I don't recall if Java pre-dates ARMv4 or not, I think it does.
Maybe a little searching for ARMv4JT<...> would help answer that question. (I think Jazerle (sp?) implies thumb also)
The K1 is armv5te, not armv5tej, so no java byte-code interpreter BUILT IN. However, that is no reason to prevent a software-based JVM, like on x86 hardware, AFAIK.
geekmaster is offline   Reply With Quote
Old 05-14-2016, 10:03 AM   #203
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by geekmaster View Post
The K1 is armv5te, not armv5tej, so no java byte-code interpreter BUILT IN. However, that is no reason to prevent a software-based JVM, like on x86 hardware, AFAIK.
Not if the source was written with ARMv4 (which your building for) in mind.

The comment about 'j' option was just to coordinate the dates.
The sources of the hardware assisted JVM are still under NDA.
So only the relative dates of JVM introduction and ARMv4 being in use are possibly relevant.
knc1 is offline   Reply With Quote
Old 05-14-2016, 11:08 AM   #204
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Java runs on arduino, so it can run on my K1.

http://forum.arduino.cc/index.php?topic=263727.0
geekmaster is offline   Reply With Quote
Old 05-15-2016, 02:03 PM   #205
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
After modifying gmplay (my kindle video player) to use "/dev/fb/0" if "/dev/fb0" fails, it is now playing video on my K1. Though "playing" is relative. I am not packing the dithered pixels into 2-bit pixels, so the pixels are displaying double-width. And the video is negative (like the K4 in one of its modes). And it is only displaying about one frame every 2.5 seconds (significantly slower than on the DX).

I can probably speed it up if I shrink the video and only do partial updates of that smaller image. I already know I can do that on the DX and DXG, from how fast "newtrix" displays eink updates when the "random temporal dither" demo shrinks the work area way down. I can do that for video too.

However, I am actually surprised that the ioctl video updates (two versions) in gmplay work on the K1, and that gmplay did not do the fallback to eips '' (which does not work on the K1).

I need to tweak the "formula" so it treats the K1 like the K4, and inverts the video so no longer a negative image, and to do 2-bit packing so the pixels are no longer double width (displaying only the bottom half of the rotated image).

Considering that gmplay had to have tweaks for each kindle model, and for various firmware versions, and for both main and diags boots, I was quite surprised to see it work with no changes on the PW1 (and later), and now also on the K1 by just changing the file name of the video framebuffer.

When I do the output display size adjustments for higher speed, the DX and DXG should be a lot faster too. I guess what surprises me most is that display updates are even triggered by the existing code, considering that it does not use the "update_display" /proc file.

EDIT: For this test, I piped the UNCOMPRESSED bunny.gmv into gmplay, because for some reason the built-in (busybox) zcat and bzcat (and the xz busybox-armv4l downloaded from busybox.net) ALL fail on the K1 when trying to decompress bunny.gmv.gz, or bunny.gmv,bz2, or bunny.gmv.xz, even though all those compression formats decompress just fine on newer kindles. I had to put the uncompressed bunny.gmv on SD card because it was much too big (286MB) for the 180MB K1 userstore. Interestingly, it my pre-dithered video is so "predictable" that it compresses all the way down to 15MB using xz (16MB for some versions of vx), about 20x compression ratio. I find it very strange that ALL the K1 decompressors claim the various formats of compressed files are "corrupt". What's up with that? Could it be that I used maximum (-9) compression, and the K1 decompressors are just too old to support that?

Last edited by geekmaster; 05-15-2016 at 04:34 PM.
geekmaster is offline   Reply With Quote
Old 05-15-2016, 02:24 PM   #206
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@geekmaster: If you were using -9, it *might* be an OOM issue?
NiLuJe is offline   Reply With Quote
Old 05-15-2016, 02:49 PM   #207
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by NiLuJe View Post
@geekmaster: If you were using -9, it *might* be an OOM issue?
Good point. Putting a swap file on SD card might resolve Out-Of-Memory issues, but with SD access SO SLOW on the K1, it may be a lot better to just use a lower compression rate (smaller compression block sizes). I cannot do swap over nbd when the K1 has no USB networking (or wifi), eh? And corkscrewing nbd through the amazon Whispernet proxy would be unwise (for many reasons), besides certainly being slower and higher latency than the SD card.

Regarding the low video frame rate on my K1, I already pointed out how the SD card is PAINFULLY SLOW when mounted in the K1. I have not done speed tests, but it is HUGELY FASTER to remove the SD card and connect it directly to my computer to transfer files. I suspect that either the K1 is doing 1-bit serial access (SPI) to the SD card, or the mmc kernel driver has the same problems it did when I "fixed" it (made it MUCH faster, then lost my source code) a decade ago: http://uanr.com/mmc/

Beware that a bad power supply can kill your work drive and ALL your backup hard drives. I should have backed up to CD and/or DVD back then...

Another problem is that gmplay naively does simple blocking reads and writes (and ioctl calls), to keep the code short and to the point (i.e. a demo). I could do async calls with double buffering, so the slow SD access overlaps the slow eink updates (but there was no need to add such extra complexity until now, discounting the slowness on DX/DXG).

It all depends on how I want to invest my limited hobby time (unless somebody is willing to PAY me to do kindle development).

Last edited by geekmaster; 05-15-2016 at 03:39 PM.
geekmaster is offline   Reply With Quote
Old 05-15-2016, 04:32 PM   #208
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Instead of using the huge busybox-armv4l (with tons of features, as listed previously in this thread), which was downloaded from busybox.net (only used so far to decompress xz archives), I see that busybox in the aboriginal armv4l rootfs is tiny (few functions) and still supports xz decompression:
PHP Code:
(armv4l:1) /home ls -al /bin/busybox
-rwxr-xr-x 1 root root 354648 2016-01-11 18:49 /bin/busybox

(armv4l:1) /home busybox
BusyBox v1.24.1 
(2016-01-11 12:47:37 CSTmulti-call binary.
BusyBox is copyrighted by many authors between 1998-2015.
Licensed under GPLv2
See source distribution for detailed
copyright notices
.

Usagebusybox [function [arguments]...]
   or: 
busybox --list
   or: function [
arguments]...

    
BusyBox is a multi-call binary that combines many common Unix
    utilities into a single executable
.  Most people will create a
    link to busybox 
for each function they wish to use and BusyBox
    will act like whatever it was invoked 
as.

Currently defined functions:
    [, [[, 
awkbunzip2bzcatbzip2dddiffexprfdiskftpdftpget,
    
ftpputgunzipgziphushlesspgreppingpkillroutesh,
    
sha512sumtartesttrunxzviwgetxzcatzcat 
This should save a lot of memory (needed for decompression buffers), with a much smaller static-linked busybox occupying scarce memory resources. Too bad busybox on vfat cannot execute directly from OneNAND (because of the STL filesystem virtualization), which could save a lot of valuable RAM during execution.
geekmaster is offline   Reply With Quote
Old 05-15-2016, 05:19 PM   #209
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Just to put these all in one place, here are all the busybox versions I found that work on my K1:
PHP Code:
#> ls -al /mnt/us/bin
drwxr-xr-x    2 root     root         2048 May 15 15:37 .
drwxr-xr-x   12 root     root         4096 May 15 16:12 ..
-
rwxr-xr-x    1 root     root       354648 May 15 15:36 busybox
-rwxr-xr-x    1 root     root      1072032 May  6 15:08 busybox-armv4l
-rwxr-xr-x    1 root     root       620140 May 15 15:55 busybox_k1
-rwxr-xr-x    1 root     root        44328 May 13 22:47 gmplay
-rwxr-xr-x    1 root     root          288 Mar 24 21:25 gmv.sh

#> /mnt/us/bin/busybox_k1
BusyBox v1.01 (2008.03.31-00:04+0000multi-call binary

Usage
busybox [function] [arguments]...
   or: [function] [
arguments]...

    
BusyBox is a multi-call binary that combines many common Unix
    utilities into a single executable
.  Most people will create a
    link to busybox 
for each function they wish to use and BusyBox
    will act like whatever it was invoked 
as!

Currently defined functions:
    [, 
addgroupadduseradjtimexashawkbasenamebunzip2busybox,
    
bzcatcatchgrpchmodchownchrootclearcmpcpcrond,
    
crontabcutdatedddelgroupdeluserdfdirnamedmesg,
    
du, echo, envexprfalsefdiskfgrepfindfreeramdiskgetty,
    
grepgunzipgziphaltheadhexdumphostnamehwclockid,
    
ifconfigifdownifupinitinstallipipaddriplinkiproute,
    
killkillallklogdlinuxrclnloggerloginlognamelogread,
    
losetuplsmakedevsmd5summkdirmknodmktempmoremount,
    
mvncnetstatpasswdpidofpingpipe_progresspivot_root,
    
printfpwdrdatereadlinkrealpathrebootrenicereset,
    
rmrmdirrouterun-partssedseqshsleepsortstart-stop-daemon,
    
stringssttysusuloginsyncsysctlsyslogdtailtar,
    
teetelnettesttimetouchtrtraceroutetruettyudhcpc,
    
umountunameuniquptimeusleepviwcwgetwhichwho,
    
whoamixargsyeszcat

#> /mnt/us/bin/busybox-armv4l
BusyBox v1.21.1 (2013-07-08 10:00:38 CDTmulti-call binary.
BusyBox is copyrighted by many authors between 1998-2012.
Licensed under GPLv2
See source distribution for detailed
copyright notices
.

Usagebusybox [function [arguments]...]
   or: 
busybox --list[-full]
   or: 
busybox --install [-s] [DIR]
   or: function [
arguments]...

    
BusyBox is a multi-call binary that combines many common Unix
    utilities into a single executable
.  Most people will create a
    link to busybox 
for each function they wish to use and BusyBox
    will act like whatever it was invoked 
as.

Currently defined functions:
    [, [[, 
acpidadd-shelladdgroupadduseradjtimexarparpingash,
    
awkbase64basenamebeepblkidblockdevbootchartdbrctl,
    
bunzip2bzcatbzip2calcatcatvchatchattrchgrpchmod,
    
chownchpasswdchpstchrootchrtchvtcksumclearcmpcomm,
    
conspycpcpiocrondcrontabcryptpwcttyhackcutdatedcdd,
    
deallocvtdelgroupdeluserdepmoddevmemdfdhcprelaydiff,
    
dirnamedmesgdnsddnsdomainnamedos2unixdudumpkmap,
    
dumpleases, echo, edegrepejectenvenvdirenvuidgidether-wake,
    
expandexprfakeidentdfalsefbsetfbsplashfdflushfdformat,
    
fdiskfgconsolefgrepfindfindfsflockfoldfreefreeramdisk,
    
fsckfsck.minixfsyncftpdftpgetftpputfusergetoptgetty,
    
grepgroupsgunzipgziphalthdhdparmheadhexdumphostid,
    
hostnamehttpdhushhwclockidifconfigifdownifenslave,
    
ifplugdifupinetdinitinsmodinstallioniceiostatip,
    
ipaddripcalcipcrmipcsiplinkiprouteipruleiptunnel,
    
kbd_modekillkillallkillall5klogdlastlesslinux32linux64,
    
linuxrclnloadfontloadkmaploggerloginlognamelogread,
    
losetuplpdlpqlprlslsattrlsmodlsoflspcilsusblzcat,
    
lzmalzoplzopcatmakedevsmakemimemanmd5summdevmesg,
    
microcommkdirmkdosfsmke2fsmkfifomkfs.ext2mkfs.minix,
    
mkfs.vfatmknodmkpasswdmkswapmktempmodinfomodprobemore,
    
mountmountpointmpstatmtmvnameifnanddumpnandwrite,
    
nbd-clientncnetstatnicenmeternohupnslookupntpdod,
    
openvtpasswdpatchpgreppidofpingping6pipe_progress,
    
pivot_rootpkillpmappopmaildirpoweroffpowertopprintenv,
    
printfpspscanpstreepwdpwdxraidautorunrdaterdev,
    
readaheadreadlinkreadprofilerealpathrebootreformime,
    
remove-shellreniceresetresizerevrmrmdirrmmodrouterpm,
    
rpm2cpiortcwakerun-partsrunlevelrunsvrunsvdirrxscript,
    
scriptreplaysedsendmailseqsetarchsetconsolesetfont,
    
setkeycodessetlogconssetserialsetsidsetuidgidshsha1sum,
    
sha256sumsha3sumsha512sumshowkeyslattachsleepsmemcap,
    
softlimitsortsplitstart-stop-daemonstatstringssttysu,
    
suloginsumsvsvlogdswapoffswaponswitch_rootsyncsysctl,
    
syslogdtactailtartcpsvdteetelnettelnetdtesttftp,
    
tftpdtimetimeouttoptouchtrtraceroutetraceroute6true,
    
ttyttysizetunctludhcpcudhcpdudpsvdumountunameunexpand,
    
uniqunix2dosunlzmaunlzopunxzunzipuptimeusersusleep,
    
uudecodeuuencodevconfigvivlockvolnamewallwatchwatchdog,
    
wcwgetwhichwhowhoamiwhoisxargsxzxzcatyeszcatzcip

#> /mnt/us/bin/busybox
BusyBox v1.24.1 (2016-01-11 12:47:37 CSTmulti-call binary.
BusyBox is copyrighted by many authors between 1998-2015.
Licensed under GPLv2
See source distribution for detailed
copyright notices
.

Usagebusybox [function [arguments]...]
   or: 
busybox --list
   or: function [
arguments]...

    
BusyBox is a multi-call binary that combines many common Unix
    utilities into a single executable
.  Most people will create a
    link to busybox 
for each function they wish to use and BusyBox
    will act like whatever it was invoked 
as.

Currently defined functions:
    [, [[, 
awkbunzip2bzcatbzip2dddiffexprfdiskftpdftpget,
    
ftpputgunzipgziphushlesspgreppingpkillroutesh,
    
sha512sumtartesttrunxzviwgetxzcatzcat 
The busybox-armv4l was downloaded from busybox.net, and that filename IS the name of the download. The busybox_k1 is a copy of /bin/busybox (FW 1.2) from the K1. And the version of interest, busybox, was copied from /bin/busybox from the mounted rootfs of aboriginal linux system-rootfs.

As can easily be seen, the busybox_k1 had no xv function, and the busybox-armv4l was more than a megabyte larger than the aborignal armv4l busybox. That memory savings more than makes up for the maximum buffer size needed for xv -9 compression (unless xv uses double-buffering, of course). We shall see. I am about to test with -4 compression.

Last edited by geekmaster; 05-15-2016 at 05:22 PM.
geekmaster is offline   Reply With Quote
Old 05-15-2016, 05:37 PM   #210
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Woohoo! xz-compressed (level -4) is playing video on my K1. There is no problem using 900KB compression buffers if you use a version of busybox that is more than 1MB smaller than the version that fails. That huge full-featured busybox-v4l is fine and dandy, provided you only do stuff that needs very little RAM.

And now Big Buck Bunny is playing at about 2.5FPS (it will say how many measured FPS in the log file when in finishes), reading COMPRESSED data from SD card. I will try again with -9 compression instead of -4 compression, and that should increase the framerate (still limited by sequential waits for SD card reads AND framebuffer updates). Eventually, though it will make my code bigger, I will do double buffering, so I can do simultaneous waitings (as opposed to much less efficient simultaneous waits). Asynchronous I/O has its benefits when extra speed is essential, as is using multithreaded execution (the simplest way to go when we add sound playback into the mix).

So yeah, as mentioned in that 10-year-old "mmc" link I provided recently, reading from really slow SD card interfaces is much less of a problem if you are reading highly compressed data, and pre-dithered video compresses quite highly, which is a good thing when using eink displays.

I have chores to do now -- I will fix my "double-width pixel" problem by adding 2-bit pixels packing to gmplay, and then I will port my changes into my "video plus sound" version of gmplay.

EDIT: Big Buck Bunny finished played, and it reported on competion:
1163 frames in 621.7 secs = 1.9 FPS
I thought it was faster than that, but that means that my estimated speed was probably also slower for the uncompressed video playing from SD card. Now I am going to try -9 xz compressed playback. The videos are copying to my SD card (slowly via the kindle on USB) now.


EDIT2: Nope! With -9 compression it is reporting "xzcat: corrupted data" just like before. Perhaps the busybox xz function *is* double-buffering (which makes sense for a production program) and it needs almost 2MB to support a pair of 900KB compression buffers, and my smaller busybox only freed up about half that. That seems like an inappropriate error message though, in this case. I guess I could binary-search compression buffer sizes to see what works, but I may end up using something that will break on the next firmware update (if it leaves less free memory). I will just stick with -4 compression for now (diminishing returns, and other things to do with my limited time).

EDIT3: I suspect that at some point I *will* add a swapfile (or swap partition on my SD card), and then perhaps I will revisit using xz -9 compression on my kindle videos, to see it it *can* work on my K1. I do not see any other way to free up RAM, because I am already running in the "update install" environment (though I *could* free up some by having my install script "exec /mnt/us/RUNME.sh" instead of "sh /mnt/us/RUNME.sh", but then my install script would have no opportunity to clean up after itself -- but I can design for that).

Last edited by geekmaster; 05-15-2016 at 06:11 PM.
geekmaster is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
geekmaster vacation geekmaster Kindle Developer's Corner 2 03-19-2012 09:18 PM


All times are GMT -4. The time now is 10:46 AM.


MobileRead.com is a privately owned, operated and funded community.