The workaround that I created has been working for me for everything I released so far. But I know it's not a real solution. Then again, the current solution works for everything that I personally need right now, so there is no urgent need from my (personal) perspective.

You can safely remove the code to enable/disable refreshOnTurn from setorientation.sh as the new firmware does not lock after 6 pages refresh.
You could use the code from the original launcher 1.0 which doesn't need setorientation.sh at all.

Thanks for the hint. I'll take it into account for the next release. Until then, it doesn't seem to hurt and can trivially be disabled.

@JustAMan: You're welcome to try my KindleTool fork, if you're on a Linux box, it should (hopefully) work, and if it doesn't, I'll try to fix it . I haven't checked K4/K5 packages yet, but I've successfully built (and ran) my old K2/K3 stuff with it, so, either way, I'd be glad for some feedback .

@JustAMan: You're welcome to try my KindleTool fork, if you're on a Linux box, it should (hopefully) work, and if it doesn't, I'll try to fix it . I haven't checked K4/K5 packages yet, but I've successfully built (and ran) my old K2/K3 stuff with it, so, either way, I'd be glad for some feedback .

Thanks for taking the initiative! So, here you go with the feedback

I'm on Ubuntu 10.4.2 64-bit.

First: version.sh throws loads of errors because of "[[" syntax. I tried changing #!/bin/sh to #!/bin/bash, but that doesn't help either. So I replaced these double-brackets by single-brackets, and at least that stage goes through without errors. I'm attaching a diff, but please verify that the result is actually sensible. What is that "[[" thing about anyway?

Second: even after applying that, I get the following errors when running "make":

The first /bin/sh and/or /bin/bash is the result of /bin/dash -
Say: "Thank You, Canonical"

Under 10.4 you may have to explicitly install bash (apt-get install bash).

It is certainly the /bin/sh problem (linked to /bin/dash) and from your report, I would say that your 10.4 also has /bin/bash linked to /bin/dash.

Nope.
I'm aware of Ubuntu's "dash initiative", or whatever you want to call it, and I don't fully understand it either. But in any case, if at all, it was only ever advocated as a replacement for sh, not for bash.

@ixtab: Huh, I've been using double brackets tests for a good while, never thought there'd be such an issue, I knew it wasn't the most portable syntax, but still... Will keep it in mind in the future .

As for the libarchive stuff, yep, apparently some stuff, most notably a good part of the the *disk stuff was added in libarchive 3... I'll make that more clear in the readme, and kill some useless ifdef I had for some other libarchive 2 stuff . (FYI, that's also most likely the cause of the implicit declaration warnings).

Also, what in the hell is happening with the LFS handling on Ubuntu? All those lli arg type mismatch warnings should not be here with the _FILE_OFFSET_BITS define, especially on an amd64 system, where it should be the default anyway, so I'll look into that as well...

EDIT: Well, the first one at least, stat/lstat should be pulling *stat64 symbols, not *stat, and that should be an __off64_t... What does your features/stdio header files look like, and what would seem to be needed to get proper LFS support?

The double bracket is an implicit (built into the shell) test, whereas "test" and "[" are external programs that get loaded from the search path. I use double brackets too. They even work in all the kindles.

The linked page says that "[[" is a keyword, but "[" is a built-in command. To clarify: the kindles use busybox, and although /bin contains symlinks that point to busybox, it appears that they are only used if you launch a non-busybox shell. Busybox does NOT follow the search path for commands that it has built-in, even if symlinks are provided. Replacing /bin symlinks to point to different programs only works from within a different shell (like a "real" bash).

In the case of the kindles, using the "[[" keyword instead of the "[" implicit command may well save a process fork (another instance of busybox), but if busybox is already cached, either way should be reasonable fast (you are running interpreted scripting code after all...), but I think that there were OTHER benefits to using "[[" as I recall (enough to convince me to use the extra characters when I normally use the shortest commands to fit more on a line, but I do not remember the detals).

So, in the case of the kindles, using the "[[" keyword instead of the "[" implicit command may well save a process fork (another instance of busybox), but if busybox is already cached, either way should be reasonable fast (you are running interpreted scripting code after all...)

Which is also why the "[[" is found to work across all kindles - they are all Busybox which supports that syntax since about the same time (2002) Bash adopted it from ksh88.

The problem in this thread came about from off-kindle builds using something other than Bash (specifically here, sh is linked to dash rather than bash).

Developers here just need to know that sometimes they have to populate a chroot or linux-vserver instance with the things a development script expects. (I.E: Not everything "sh" will work under "dash" and not everything Bash-3 will work under Bash-4.)

The problem in this thread came about from off-kindle builds using something other than Bash (specifically here, sh is linked to dash rather than bash).

Developers here just need to know that sometimes they have to populate a chroot or linux-vserver instance with the things a development script expects. (I.E: Not everything "sh" will work under "dash" and not everything Bash-3 will work under Bash-4.)

My linux mint (ubuntu-based) host PC even has a /mnt/us populated with some arm-linux SDL stuff from before I switched to using raw framebuffer and input devices.

You can safely remove the code to enable/disable refreshOnTurn from setorientation.sh as the new firmware does not lock after 6 pages refresh.
You could use the code from the original launcher 1.0 which doesn't need setorientation.sh at all.

I see this was committed a couple of days ago into to git Could you post a binary for this, ixtab?