![]() |
#1 |
fbdev
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 107
Karma: 70177
Join Date: Jul 2011
Device: kindle
|
bash for kindle
i couldn't stand busybox; so i built bash.
in case you don't feel like building it yourself, here's the binary. (source) md5: 4b5000f232e96db8aba5722ee90aff7a bash.tar.bz2 sha512: 0d59e498dfd576a48f2294a81e61665ca5e402c254add6d24a 79aeb3379971bfcfc6db5aee2ec8a425dbdfb0ccdd0db425fb 786d0ad66599c9c0ac4a13deb9b2 bash.tar.bz2 |
![]() |
![]() |
![]() |
#2 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jan 2011
Device: Kindle 2 Intl
|
YAY
Thanks fbdev!
What toolchain did you use to compile it ? |
![]() |
![]() |
![]() |
#3 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jan 2011
Device: Kindle 2 Intl
|
![]()
I worked out how to cross compile for the Kindle... so here's the nano editor if anyone wants it.
There are two bz2 files, just merge their contents with the root filesystem (you'll need to type "mntroot rw" first). b96a6ee4c5d0b624baaf03729e616857 ncurses.tar.bz2 6bdc743d751b0d779dc10546b88ead58 nano.tar.bz2 Last edited by aquarat; 08-09-2011 at 04:52 AM. Reason: Added md5 sums |
![]() |
![]() |
![]() |
#5 |
Member
![]() Posts: 11
Karma: 10
Join Date: May 2011
Device: Kindle 3
|
You sir, are a very good man indeed. The frustration of writing and debugging a script in bash, only to find that busybox's ash just doesn't know what to do with it is considerable. This is a much better alternative than learning the bourne shell. Thank you
|
![]() |
![]() |
![]() |
#6 |
fbdev
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 107
Karma: 70177
Join Date: Jul 2011
Device: kindle
|
it was compiled with scratchbox.
it's only the executable, so if i'm going to use it i just drop it into /tmp and add it to /tmp/root/.profile like so: if test $SHELL = "/bin/sh" && test -x /tmp/bash; then export SHELL=/bin/bash exec /tmp/bash fi |
![]() |
![]() |
![]() |
#7 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79
Karma: 2718
Join Date: Aug 2011
Device: Kindle 3G
|
Oh this is so nice.
|
![]() |
![]() |
![]() |
#8 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 58
Karma: 9096
Join Date: Apr 2012
Device: none
|
I need more guide!
Quote:
And how to install it in kindle.I have a terminal in kindle 3.3 now. Please just in detail. ![]() |
|
![]() |
![]() |
![]() |
#9 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 608
Karma: 1588610
Join Date: Jan 2012
Device: Kindle Scribe
|
Nice module linux.so
![]() |
![]() |
![]() |
![]() |
#10 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
|
xueyou2: Do not touch the root filesystem if you don't know what you are doing.
Better stay in the document partition and install there. Just put the binaries somewhere and point the dynamic linker to where your libraries are (if the binary comes with any) via LD_LIBRARY_PATH environment setting. |
![]() |
![]() |
![]() |
#11 | |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
You can "temporarily merge" things into the root fs using a "bind mount", which temporarily "replaces" a file on root with a file on mmc. See how I do that to replace /usr/lib/libc.so in my "tccmake" script used in my "simple tcc guide" thread. Also, adding additional symlinks to root that point to files on /mnt/us is generally safe, but DO NOT link files into /etc/upstart until they are fully tested. An upstart script that returns error status can prevent OTHER critical scripts from loading during startup. And beware that symlinks are permanent, unlike bind mounts. The IMPORTANT thing is to not use significant space on the root fs, which may be needed for firmware updates. Unsafe changes to the root fs can brick your kindle (but we know how to fix that -- just rewrite the root fs partition). ![]() Last edited by geekmaster; 04-21-2012 at 10:11 AM. |
|
![]() |
![]() |
![]() |
#12 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 58
Karma: 9096
Join Date: Apr 2012
Device: none
|
Thanks for your help!I decide study linux first .
Quote:
![]() But I find that I need to study linux first .Then .... Thank you for help. ![]() Last edited by xueyou2; 04-21-2012 at 08:55 AM. |
|
![]() |
![]() |
![]() |
#13 |
hub
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 715
Karma: 2151032
Join Date: Jan 2012
Location: Iranian in Canada
Device: K3G, DXG, Kobo mini
|
A quick question my friends: How can one replace busybox with bash? Is it safe?
|
![]() |
![]() |
![]() |
#14 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
You do not replace anything. Just run bash and it opens up a bash shell inside the busybox ash shell, in the same terminal window. If you type "exit" you leave bash and are back in busybox.
|
![]() |
![]() |
![]() |
#15 | |
hub
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 715
Karma: 2151032
Join Date: Jan 2012
Location: Iranian in Canada
Device: K3G, DXG, Kobo mini
|
Quote:
Edit: I did the above thing and then ran this code just to check I'm actually using bash not busybox. test.sh Code:
#!/bin/bash history |
|
![]() |
![]() |
![]() |
Tags |
bash |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bash-Skript für Pocketbook Reader schreiben | Hildegunst | PocketBook | 19 | 09-02-2024 05:07 PM |
Bash Script/SQL Query for ISBN in filename? | zenrhino | Calibre | 1 | 09-26-2010 08:55 AM |
Is it possible to execute a bash script from the SD card? | godel10 | iRex | 25 | 06-25-2009 03:55 PM |
manga2pdf - Linux bash scripts for the Cybook, Sony Reader and iLiad | IceHand | 52 | 03-09-2009 06:36 PM | |
BASH script for *2lrf utilities (thanks Kovid!)... | KaiGoth | Sony Reader | 0 | 08-05-2007 01:30 AM |