Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 10-15-2013, 03:06 PM   #1
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021142
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Post Hello world.. and world.. and world... twobobs tips

I keep finding myself searching back to other threads for titbits that I keep forgetting...

So. I fully intend to just jam them all in one thread.

This one.

so.. pursuant to this. Here is post one

http://fedoraforum.org/forum/showthr...=282039&page=2

Hello world. in one or two languages

Quote:
80 examples in 35 languages.
Spoiler:

Here's a summary of what we have right now, first organized by programming language with the corresponding toolkit:
  • C: XForms, Motif, MGUI, EZWGL, GTK+, Tk, XView, X Athena Widgets, OpenGL, WINGs
  • Python: Tk, Qt, GTK+, Swing, Kivy, wxWidgets, FLTK
  • C++: Qt, FOX, FLTK, GTK+ (gtkmm, c++-gtk-utils), wxWidgets, SDL
  • Java: Swing, Qt, SWT, AWT, JavaFX, GTK+
  • Perl: Tk, wxWidgets, Prima, GTK+, Qt
  • Tcl: Tk, GTK+, Qt, FLTK
  • Ruby: Tk, Swing, Qt, FOX
  • Haskell: GTK+, Tk, HGL
  • R: Tk, Qt
  • Guile: GTK+, Tk
  • JavaScript: Swing, jQuery
  • Lua: Tk, Qt
  • Matlab: Swing, Matlab GUI
  • Ada: Qt, Tk
  • Fantom: FWT, Swing
  • Objective-C: GNUstep
  • Icon: Icon
  • Vala: GTK+
  • Genie: GTK+
  • OCaml: Tk
  • Pure: Tk
  • SNOBOL: Tk
  • Scala: Swing
  • BeanShell: Swing
  • Groovy: Swing
  • Clojure: Swing
  • Scilab: Tk
  • ksh: Motif
  • Julia: Tk
  • X10: Swing
  • Nimrod: Tk
  • Mirah: Swing
  • Pascal: GTK+
  • ROOT: Xclass
  • Qore: Qt

Here's the list organized by toolkit with the corresponding language bindings:
  • Tk: Tcl, Perl, Python, Ruby, R, OCaml, Pure, SNOBOL, C, Lua, Guile, Haskell, Ada, Scilab, Julia, Nimrod
  • Swing: Java, Python, Ruby, Scala, BeanShell, Groovy, Clojure, JavaScript, Matlab, Fantom, X10, Mirah
  • GTK+: Haskell, Python, Perl, C++ (gtkmm, c++-gtk-utils), Vala, Genie, C, Tcl, Guile, Java, Pascal
  • Qt: Python, C++, Java, Perl, Ruby, Tcl, R, Lua, Ada, Qore
  • FLTK: C++, Python, Tcl
  • wxWidgets: Perl, Python, C++
  • FOX: C++, Ruby
  • Motif: C, ksh
  • XForms: C
  • GNUstep: Objective-C
  • Icon: Icon
  • Prima: Perl
  • MGUI: C
  • EZWGL: C
  • SWT: Java
  • AWT: Java
  • XView: C
  • JavaFX: Java
  • jQuery: JavaScript
  • Kivy: Python
  • Matlab GUI: Matlab
  • X Athena Widgets: C
  • FWT: Fantom
  • SDL: C++
  • HGL: Haskell
  • Xclass: ROOT
  • OpenGL: C
  • WINGs: C
That's should be enough to get even the most obscure development effort "Hello Worlding"

Last edited by twobob; 10-17-2013 at 11:49 PM.
twobob is offline   Reply With Quote
Old 10-15-2013, 04:03 PM   #2
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021142
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
building with static libstdc++ and rpaths for configure:

LDFLAGS="-Wl,-rpath,/mnt/us/extensions/thing/usr/lib -static-libstdc++" ./configure --prefix=/mnt/us/extensions/thing/usr
twobob is offline   Reply With Quote
Old 10-16-2013, 10:14 AM   #3
Aeris
Developer's Corner Mascot
Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.
 
Aeris's Avatar
 
Posts: 484
Karma: 1274186
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
Thanks for sharing!
Aeris is offline   Reply With Quote
Old 10-17-2013, 03:28 PM   #4
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021142
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
kindle-friendly arm debian run on a local machine
http://www.mobileread.com/forums/sho...46&postcount=6

Last edited by twobob; 10-17-2013 at 08:30 PM.
twobob is offline   Reply With Quote
Old 10-17-2013, 07:38 PM   #5
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021142
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
"-static-libgcc -static-libstdc++"
chatter http://gcc.gnu.org/ml/gcc-help/2011-01/msg00228.html

Linking libc statically
http://www.trilithium.com/johan/2005/06/static-libstdc/

and the LSB tools
http://www.linuxfoundation.org/colla...workgroups/lsb

This stuff is all experimental thoughts for making SID stuff run on ancient devices.

EDIT: This will probably never happen as qemu "Segmentation fault (core dumped)"
more often than not on SID... will wait for a newer qemu or maybe even throw it at Jessie.

Last edited by twobob; 10-17-2013 at 07:55 PM.
twobob is offline   Reply With Quote
Old 10-17-2013, 11:31 PM   #6
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021142
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
running a custom gdb.

Quote:
PYTHONHOME=/mnt/us/extensions/python XDG_DATA_HOME=/mnt/us/extensions/midori/pixmaps XDG_CACHE_HOME=/mnt/us/extension GTK2_RC_FILES=/mnt/us/extensions/midori/pixmaps/gtkrc LD_LIBRARY_PATH=/mnt/us/extensions/midori/usr/lib:/mnt/us/extensions/gdb/lib:/usr
/lib:/lib:/mnt/us/extensions/python/usr/lib GDK_PIXBUF_MODULE_FILE=/mnt/us/extensions/midori/usr/lib/gtk-2.0/2.10.0/loaders.cache /mnt/us/extensions/gdb/bin/gdb --args /mnt/us/extensions/midori/usr/bin/midori --g-fatal-warnings
or just...

Quote:
PYTHONHOME=/mnt/us/extensions/python /mnt/us/extensions/gdb/bin/gdb --args /mnt/us/extensions/thing/usr/bin/thing --g-fatal-warnings
twobob is offline   Reply With Quote
Old 10-17-2013, 11:33 PM   #7
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021142
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
http://pippin.gimp.org/a_dither/

AWSOME!!

(thanks <MonkeyofDoom>)
twobob is offline   Reply With Quote
Old 10-18-2013, 03:37 AM   #8
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021142
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Creating patches with diff

To create a patch for a single file:

diff -u original.c new.c > original.patch

To create a patch for an entire source tree:

diff -rupN original/ new/ > original.patch
twobob is offline   Reply With Quote
Old 10-21-2013, 06:40 PM   #9
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021142
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Creating swap file (for extreme situations only)

mknod /dev/swap b 7 8 #b=block device, 7=use loop driver, 8=loop device number

mkdir /mnt/base-us/swap

cd /mnt/base-us/swap

dd if=/dev/zero of=swapfile bs=1M count=512
Quote:
512+0 records in
512+0 records out
536870912 bytes (512.0MB) copied, 269.558543 seconds, 1.9MB/s
losetup /dev/swap /mnt/base-us/swap/swapfile

mkswap /dev/swap
Quote:
Setting up swapspace version 1, size = 536866 kB
no label, UUID=4b002686-89e2-4a8d-b9b1-a947538baa3f
swapon /dev/swap



OR:

dd if=/dev/zero of=/mnt/base-us/swap.img bs=1M count=1K # 1GB!
mkswap /mnt/base-us/swap.img
swapon /mnt/base-us/swap.img

Last edited by twobob; 10-21-2013 at 10:04 PM.
twobob is offline   Reply With Quote
Old 10-21-2013, 07:38 PM   #10
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021142
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
the following example will make the seed 500MB into a 2 Gb partition

FILENAME=/mnt/base-us/deb.5gb.ext3
dd if=/dev/zero of=$FILENAME bs=1M count=1500 oflag=append conv=notrunc
e2fsck -f $FILENAME
resize2fs $FILENAME


(You can choose ANY size just swap the 1500 for however many MB you want ADDED)
SEE THIS POST FOR A KINDLE DD THAT SUPPORTS THE RIGHT OPTIONS, (or do it on your PC)

That seems an efficient solution.

Alternately as pointed out by Icantbebothered:
FILENAME=/mnt/base-us/deb.5gb.ext3
dd if=/dev/zero bs=1M count=512 >> $FILENAME
e2fsck -f $FILENAME
resize2fs $FILENAME


that last command is to be used on a NON MOUNTED system only...

Spoiler:
Code:
#!/bin/sh
unset LD_PRELOAD
rm /dev/loop/debian
mknod -m0660 /dev/loop/debian b 7 250
echo "[*] Mounting Rootfs..."
/bin/mount -o loop=/dev/loop/debian,noatime -t ext3 /mnt/base-us/debian.ext3 /mnt/us/debian
echo "[*] Preparing Filesystem..."
/bin/mount -o bind /dev /mnt/us/debian/dev
/bin/mount -o bind /proc /mnt/us/debian/proc
/bin/mount -o bind /sys /mnt/us/debian/sys
/bin/mount -o bind /dev/pts /mnt/us/debian/dev/pts

#optionally make the kindle available inside debian...
#mount -o bind /mnt/base-us /mnt/us/debian/kindle/mnt/us
#mount -o bind /mnt/base-us /mnt/us/debian/kindle/mnt/base-us

echo "[*] Preparing Network Connections..."
cp /etc/hosts /mnt/us/debian/etc/hosts
cp /etc/resolv.conf /mnt/us/debian/etc/resolv.conf
echo "[*] Starting Debian shell..."
chroot /mnt/us/debian /bin/bash $@
#chroot /mnt/debian 
echo
echo "[*] Unmounting Rootfs..."

#optionally remove that kindle inside the debian stuff
#umount /mnt/us/debian/kindle/mnt/us
#umount /mnt/us/debian/kindle/mnt/base-us

/bin/umount /mnt/us/debian/dev/pts
/bin/umount /mnt/us/debian/dev
/bin/umount /mnt/us/debian/proc
/bin/umount /mnt/us/debian/sys
/bin/umount -d /mnt/us/debian
echo "[*] Debian unmounted."

Last edited by twobob; 10-21-2013 at 08:02 PM.
twobob is offline   Reply With Quote
Old 10-24-2013, 10:39 AM   #11
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021142
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Setting up a swapfile over NBD

on donor PC:

apt-get nbd-server
then after you make a swapfile (see dd command above)
share it.
nbd-server 1024 /home/me/STUFF-FOR-DEBIAN/swapfile (thats port 1024)

Quote:
** (process:392): WARNING **: Specifying an export on the command line is deprecated.
** (process:392): WARNING **: Please use a configuration file instead.
make it a swapfile
mkswap /home/me/STUFF-FOR-DEBIAN/swapfile
Quote:
Setting up swapspace version 1, size = 1957884 KiB
no label, UUID=2bbac2d8-d5c7-41eb-a499-064a1af85061
======================================

THEN on debian (on kindle)

dump the relevant kernel modules in /lib/modules

I needed:
https://bitbucket.org/twobob/kual-sy...b126?at=master

(if you don't do this step.. the next step will error like:
Starting NBD client process: libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open moddep file '/lib/modules/2.6.31-rt11-lab126/modules.dep.bin')

then install nbd-client

root@kindle:/usr/local/src/webkit-1.8.1# apt-get install nbd-client
Quote:
Reading package lists... Done
Building dependency tree
..elided..
Setting up nbd-client (1:3.2-4~deb7u3) ...
Stopping NBD client process:
Error: Module nbd is not currently loaded
nbd-client.
Starting NBD client process: Connecting...Activating...
nbd-client.
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools ...
root@kindle:/usr/local/src/webkit-1.8.1# lsmod
Module Size Used by
nbd 10564 0
g_ether 27444 0
...
so it loaded okay

next up EDIT the file in /etc/nbd-client

Quote:
# If you don't want to reconfigure this package after installing, uncomment
# the following line:
#AUTO_GEN="n"
# If you don't want the init script to kill nbd-client devices that aren't
# specified in this configuration file, set the following to "false":
KILLALL="false"
# Note that any statical settings in this file will be preserved
# regardless of the setting of AUTO_GEN, so its use is only recommended
# if you set things in a dynamical way (e.g., through a database)
#
# Name of the first used nbd /dev-entry:
NBD_DEVICE[0]=/dev/nbd0
#
# Type; s=swap, f=filesystem (with entry in /etc/fstab), r=raw (no other setup
# than to run the client)
NBD_TYPE[0]=s
#
# The host on which the nbd-server process is running
#NBD_HOST[0]=<your.server.ip.or.name>
NBD_HOST[0]=192.168.1.20
#
# The port on which this client needs to connect. Optional for
# new-style exports (which use a single port, and export names).
NBD_PORT[0]=1024
#
# The name of the export. Required for new-style exports.
#NBD_NAME[0]=swapspace
#
# Any extra parameters you would want to specify
NBD_EXTRA[0]=
# The second networked block device could look like:
# NBD_DEVICE[1]=/dev/nbd1
# NBD_TYPE[1]="f"
# NBD_HOST[1]="localhost"
# NBD_NAME[1]="disk1"
#
# You can add as many as you want, but don't skip any number in the variable
# names, or the initscript will fail.
Let's start that...

root@kindle:/usr/local/src/webkit-1.8.1# /etc/init.d/nbd-client start
Quote:
Starting NBD client process: Connecting...Negotiation: ..size = 1912MB
bs=1024, sz=2004877312 bytes
connected /dev/nbd0
Activating...
Setting up swapspace version 1, size = 1957884 KiB
no label, UUID=05bbbd40-ed4a-4ccf-94dc-ac6fffa69cd0
/dev/nbd0: swap activated.
nbd-client.
boom. Happy days.

EDIT:

This is also HIGHLY risky...
see... http://thread.gmane.org/gmane.linux.kernel.mm/62008
http://article.gmane.org/gmane.linux.kernel.mm/62008
Attached Thumbnails
Click image for larger version

Name:	Selection_712.png
Views:	51
Size:	13.4 KB
ID:	113928  

Last edited by twobob; 10-25-2013 at 12:59 AM.
twobob is offline   Reply With Quote
Old 10-24-2013, 11:00 AM   #12
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021142
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
ccache over sshfs.

This might be a stupid idea. but. meh.

figure out - on the kindle - where your ccache is stored.
for me it was /mnt/us/debian/mnt/us/home/root/.ccache

then on your PC create a folder to swap to:
mkdir -p /place/you/want/ccache (I used /home/me/ccache)

then on the kindle (not in debian)
sshfs me@dev:/home/me/ccache /mnt/us/debian/mnt/us/home/root/.ccache

and we are done

[root@kindle root]# df -h
Quote:
Filesystem Size Used Available Use% Mounted on
/dev/root 340.2M 210.3M 112.8M 65% /
...
fsp 3.2G 3.1G 26.9M 99% /mnt/us
/dev/loop/0 3.2G 3.1G 26.9M 99% /mnt/base-us
/dev/loop/debian 1.9G 1.1G 693.9M 63% /mnt/us/debian
tmpfs 124.8M 76.0K 124.8M 0% /mnt/us/debian/dev
me@dev:/home/me/ccache
233.2G 201.4G 20.0G 91% /mnt/us/debian/mnt/us/home/root/.ccache

EDIT: okay this wasn't a great idea. locked up the device.. ;P
just use sshfs for sensible things then. hehehehe

Last edited by twobob; 10-24-2013 at 12:29 PM.
twobob is offline   Reply With Quote
Old 10-24-2013, 09:57 PM   #13
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021142
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Lightbulb

building qemu-arm statically from GIT

Clone the latest qemu from git http://git.qemu.org/qemu.git, then configure and make it
cd ~/GIT/qemu/arm-linux-user

git clone http://git.qemu.org/qemu.git

cd qemu

./configure --target-list="arm-linux-user" --disable-kvm --disable-strip --disable-xen --disable-spice --disable-werror --prefix=/usr/local --disable-bsd-user --static

make; make install

Check if we NEED to register the type with binfmt_misc...
dev binfmt_misc # cat /proc/sys/fs/binfmt_misc/qemu-arm
Code:
enabled
interpreter /usr/bin/qemu-arm-static
flags: OC
offset 0
magic 7f454c4601010100000000000000000002002800
mask ffffffffffffff00fffffffffffffffffeffffff
If this WASN'T populated... echo to register
(Only if the above is NOT already registered)
Code:
echo ":qemu-arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-arm:" > /proc/sys/fs/binfmt_misc/register
(note that this stipulates /usr/local/bin/qemu-arm make that w/e you want)

since I already HAVE the debian version on my system move that binary it out the way and use that binfmt_misc registration for ourselves...

mv /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static-debian
cp /home/me/GIT/qemu/arm-linux-user/qemu-arm /usr/bin/qemu-arm-static

mount something we want to chroot into
sudo mount -t ext /home/me/IMAGES-FOR-DEBIAN/jessie.ext3 /mnt/jessie/

check what we built is kosher.
me@dev ~/GIT/qemu/arm-linux-user $ readelf -d ./qemu-arm
Quote:
There is no dynamic section in this file.
me@dev ~/GIT/qemu/arm-linux-user $ ./qemu-arm -version
Quote:
qemu-arm version 1.6.50, Copyright (c) 2003-2008 Fabrice Bellard
(as opposed to 1.0.50 in the repos)

me@dev ~/GIT/qemu/arm-linux-user $ ./qemu-arm --help
Spoiler:
Quote:
usage: qemu-arm [options] program [arguments...]
Linux CPU emulator (compiled for arm emulation)

Options and associated environment variables:

Argument Env-variable Description
-h print this help
-g port QEMU_GDB wait gdb connection to 'port'
-L path QEMU_LD_PREFIX set the elf interpreter prefix to 'path'
-s size QEMU_STACK_SIZE set the stack size to 'size' bytes
-cpu model QEMU_CPU select CPU (-cpu help for list)
-E var=value QEMU_SET_ENV sets targets environment variable (see below)
-U var QEMU_UNSET_ENV unsets targets environment variable (see below)
-0 argv0 QEMU_ARGV0 forces target process argv[0] to be 'argv0'
-r uname QEMU_UNAME set qemu uname release string to 'uname'
-B address QEMU_GUEST_BASE set guest_base address to 'address'
-R size QEMU_RESERVED_VA reserve 'size' bytes for guest virtual address space
-d item[,...] QEMU_LOG enable logging of specified items (use '-d help' for a list of items)
-D logfile QEMU_LOG_FILENAME write logs to 'logfile' (default stderr)
-p pagesize QEMU_PAGESIZE set the host page size to 'pagesize'
-singlestep QEMU_SINGLESTEP run in singlestep mode
-strace QEMU_STRACE log system calls
-version QEMU_VERSION display version information and exit

Defaults:
QEMU_LD_PREFIX = /usr/gnemul/qemu-arm
QEMU_STACK_SIZE = 8388608 byte

You can use -E and -U options or the QEMU_SET_ENV and
QEMU_UNSET_ENV environment variables to set and unset
environment variables for the target process.
It is possible to provide several variables by separating them
by commas in getsubopt(3) style. Additionally it is possible to
provide the -E and -U options multiple times.
The following lines are equivalent:
-E var1=val2 -E var2=val2 -U LD_PRELOAD -U LD_DEBUG
-E var1=val2,var2=val2 -U LD_PRELOAD,LD_DEBUG
QEMU_SET_ENV=var1=val2,var2=val2 QEMU_UNSET_ENV=LD_PRELOAD,LD_DEBUG
Note that if you provide several changes to a single variable
the last change will stay in effect.

copy it into our debian victim
cp /usr/bin/qemu-arm-static /home/me/IMAGES-FOR-DEBIAN/usr/bin/qemu-arm-static

chroot in

sudo chroot /mnt/debian /bin/bash

Quote:
root@dev:/#cat /etc/debian_version
jessie/sid
For reference...
Debian build log
https://buildd.debian.org/status/fet...amp=1322591568
What those build warnings mean to end users.
https://lists.gnu.org/archive/html/q.../msg04789.html

seems to work okay.

Last edited by twobob; 10-24-2013 at 10:03 PM.
twobob is offline   Reply With Quote
Old 10-25-2013, 06:04 AM   #14
brianinmaine
Addict
brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.
 
brianinmaine's Avatar
 
Posts: 377
Karma: 1277063
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
Quote:
Originally Posted by twobob View Post
Creating patches with diff

To create a patch for a single file:

diff -u original.c new.c > original.patch

To create a patch for an entire source tree:

diff -rupN original/ new/ > original.patch
Sorry to bump your thread - do I have to 'make clean' or something before I make a patch? the patch is huge after I just make something... also, for someone reading, a simple install of a patch file:
"patch -p1 -b < file.patch" works well for me...
brianinmaine is offline   Reply With Quote
Old 10-25-2013, 08:04 AM   #15
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021142
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
I guess you can either:

make clean Delete most generated files
make distclean Remove editor backup files, patch leftover files and whatnot
Or (if you have one like in a kernel build) make mrproper Delete the current configuration, and all generated files.

Check the makefile for the cleansing options available.
Generally, making a copy of finished project and the original source is never a terrible idea. and cleaning / diffing those.
twobob is offline   Reply With Quote
Reply

Tags
hello world, kindle, languages, titbits, twobob

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Free (K) World's Collider: A Shared-World Anthology [Science Fiction/Horror] kg3 Deals, Freebies, and Resources (No Self-Promotion) 0 09-14-2012 06:06 PM
Kindle free book: Hungarian Cookbook: Old World Recipes for New World Cooks, Expanded greencat Deals, Freebies, and Resources (No Self-Promotion) 0 06-15-2011 04:07 AM
UK/DE Kindle free book: World Kitchen: World Recipes greencat Deals, Freebies, and Resources (No Self-Promotion) 1 06-02-2011 10:53 AM
Old World and New World Computing kjk Apple Devices 0 01-31-2010 02:09 PM


All times are GMT -4. The time now is 09:43 PM.


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