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 04-22-2012, 09:07 AM   #16
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: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by drauger View Post
Code:
# tccmake ./demo
tcc: undefined symbol '__libc_csu_fini'
tcc: undefined symbol '__libc_csu_init'
What have I missed?
After I debricked one of my K4s (which already had tcc installed), I got this same problem. I ran the uninstall script, then I ran the install script again, and the problem went away. It works for me now.

Try running /mnt/us/tcc/uninstall, then run /mnt/us/tcc/install. Does that work for you?
geekmaster is offline   Reply With Quote
Old 04-22-2012, 10:52 AM   #17
drauger
Enthusiast
drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.
 
drauger's Avatar
 
Posts: 32
Karma: 46558
Join Date: Feb 2012
Device: Kindle4NT
Quote:
Originally Posted by geekmaster View Post
Try running /mnt/us/tcc/uninstall, then run /mnt/us/tcc/install. Does that work for you?
Yes, it works now! Strange...
drauger is offline   Reply With Quote
Old 04-22-2012, 01:03 PM   #18
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: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
I discovered that the K4 main partition has a strange mix of old K3 eink driver and new K5 8-bit framebuffer. The K4 diags partition uses the same new eink driver as the K5.

The side effect is that when booted from main, the K4 displays NEGATIVE images (swapped black and white) for dithered images.

For now (until I finish my complete redesign to fix this), on a K4 you should use diags SSH to run the eink demos (including demo.c in my tcc package).

The old eink drivers do a full-flash clear for "eips -c", but this does a non-flash clear for new eink drivers (faster, but leaves ghosting). New eink drivers do a full-flash clear for "eips -c -f", but this also displays "-f" on the screen for old eink drivers. Here is a simple command for all eink kindles that does full-flash clear (or two) with no garbage left on the display: "eips -c -f;eips -c". To avoid the extra flash on old eink drivers, you would need a more complicated test for which version of device driver (and eips comman) is being used.

EDIT: Okay, here is the "smarter" full-flash clear for all eink kindles:

eips|grep "\-t"&&eips -c -f;eips -c

Hmm... The strange K4 main partition eink support has a new eips command but old drivers, so it does full-flash clears for both "eips -c" and for "eips -c -f". Oh, well... enough time burned on this. Just live with it (or use K4 diags for eink stuff).


Last edited by geekmaster; 04-22-2012 at 01:31 PM.
geekmaster is offline   Reply With Quote
Old 04-24-2012, 05:16 PM   #19
qlob
Official Lurker
qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.
 
qlob's Avatar
 
Posts: 1,050
Karma: 7096675
Join Date: Apr 2012
Device: Kindle 3.4
I placed everything in /mnt/us/opt/tcc/ and ran install but when i do
Code:
mntroot rw
cd /mnt/us/opt/tcc
./tccmake demo.c
I get ./tccmake: line 3: tcc: Permission denied

Last edited by qlob; 04-24-2012 at 05:16 PM. Reason: wrong directory
qlob is offline   Reply With Quote
Old 04-24-2012, 06:08 PM   #20
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: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by qlob View Post
I placed everything in /mnt/us/opt/tcc/ and ran install but when i do
Code:
mntroot rw
cd /mnt/us/opt/tcc
./tccmake demo.c
I get ./tccmake: line 3: tcc: Permission denied
When you moved the tcc folder, did you change all instances of the old location to the new location in the "install" and "tccmake" script files?

The path occurs two times in tccmake, and six times in install.

And of course if you ran the old install script, you need to run the uninstall script to remove the symlinks before running the new modified install script.

What model kindle are you using?

EDIT: And exactly WHY are you making the root partition writable? That is a bad thing, unless you REALLY need it, and make it read-only again as soon as possible. What are you doing that needs to modify the main root partition?



Last edited by geekmaster; 04-24-2012 at 06:15 PM.
geekmaster is offline   Reply With Quote
Old 04-24-2012, 07:54 PM   #21
qlob
Official Lurker
qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.
 
qlob's Avatar
 
Posts: 1,050
Karma: 7096675
Join Date: Apr 2012
Device: Kindle 3.4
Quote:
Originally Posted by geekmaster View Post
When you moved the tcc folder, did you change all instances of the old location to the new location in the "install" and "tccmake" script files?

The path occurs two times in tccmake, and six times in install.

And of course if you ran the old install script, you need to run the uninstall script to remove the symlinks before running the new modified install script.

What model kindle are you using?

EDIT: And exactly WHY are you making the root partition writable? That is a bad thing, unless you REALLY need it, and make it read-only again as soon as possible. What are you doing that needs to modify the main root partition?


1:No because i didn't know that tcc had to be in a certain directory
2: kindle 3 with 3g
3: Up until now, i had no idea that /mnt/us is a seperate partition. I thought that you aleays had to mount it read write regardless of where you want to modify files.
qlob is offline   Reply With Quote
Old 04-24-2012, 09:08 PM   #22
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: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by qlob View Post
1:No because i didn't know that tcc had to be in a certain directory
2: kindle 3 with 3g
3: Up until now, i had no idea that /mnt/us is a seperate partition. I thought that you aleays had to mount it read write regardless of where you want to modify files.
1: Step 1 in the first post of this thread says "extract kindle-tcc-1.3.tar.gz (below) to /mnt/us (USB drive)", which creates the tcc folder that it runs from. The scripts point there. The symlinks created by the installer point there. If you do not follow the directions posted in the first link (including step 1), it cannot work unless you modify the scripts like I said in my previous post.

2: TCC works great on a K3. The only complications were with the K5 and its "dirty" lib loader script, but even that was fixed in the newest version of the tcc package in the first post above.

3: EVERYTHING inside /mnt/ is a "separate partition" (or loop mount, or network share).


Last edited by geekmaster; 04-24-2012 at 09:11 PM.
geekmaster is offline   Reply With Quote
Old 04-24-2012, 10:09 PM   #23
qlob
Official Lurker
qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.
 
qlob's Avatar
 
Posts: 1,050
Karma: 7096675
Join Date: Apr 2012
Device: Kindle 3.4
Ok thanks.. I really need to get out of the habit of skimming throught instructions...... I wouldn't have moved it except for the fact that i have so many directories in /mnt/us that its driving me crazy. I'm a neat freak when it comes to computers.

ps Do you know if i could extract the archive from the kindle? i trien using gunzip via myts but i got wass the name of the archive with a .tar suffix. i am only asking because i dont have acess to my linux box or anyother computer for that matter...
EDIT: i found the tar command and an argument to filter it with gunzip

Last edited by qlob; 04-24-2012 at 10:18 PM.
qlob is offline   Reply With Quote
Old 04-24-2012, 10:46 PM   #24
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: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by qlob View Post
...
ps Do you know if i could extract the archive from the kindle? i trien using gunzip via myts but i got wass the name of the archive with a .tar suffix. i am only asking because i dont have acess to my linux box or anyother computer for that matter...
EDIT: i found the tar command and an argument to filter it with gunzip
tar zxvf myfile.tar.gz
geekmaster is offline   Reply With Quote
Old 04-26-2012, 02:35 AM   #25
drauger
Enthusiast
drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.
 
drauger's Avatar
 
Posts: 32
Karma: 46558
Join Date: Feb 2012
Device: Kindle4NT
Quote:
Originally Posted by geekmaster View Post
Regarding kite, I did not know that works on the K4 -- I thought it was for the K3.
Yes, it works, though a little bit strange: sometimes it launches a script or to after reboot or USB drop without any reason.

Quote:
Originally Posted by geekmaster View Post
You have optware, so why not just use gcc there -- that is what I did early on in K4 development.
It looks as gcc is too heavy for K4. At least I cannot even install it - my kindle hangs on downloading 3rd or 4th package required by gcc. Anyway, tcc now works on my K4, and I should say that its C script is the greatest feature!
drauger is offline   Reply With Quote
Old 04-26-2012, 08:20 AM   #26
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: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by drauger View Post
It looks as gcc is too heavy for K4. At least I cannot even install it - my kindle hangs on downloading 3rd or 4th package required by gcc.
I noticed the hanging (and even bricking) when booting from main (and even worse on the K5(touch)) and then doing wget or gcc. That is why I booted from diags to run optware (much more free memory).

On the K4, diags has another HUGE benefit over booting from main. Booting main uses the old "einkfb" eink device driver from the K3 and earlier, which lacks support for all the new features and graphics acceleration that the new eink controller built into the iMx50 SoC used in the K4 and newer.

But when booting diags on the K4, you get the new "mxcfb" eink device driver that supports most of the features of the new graphics controller. I have a new demo that exploits the new hardware -- low FPS (frames/second) on the DX,DGX,K3 and K4main, but very high FPS on K4diags and K5(touch). I need to fix a bug in my einkfb support after another major rewrite that gives another huge speed increase.

Again -- on K4, you have a lot more you can do (with better graphics too) when you boot diags instead of main.
geekmaster is offline   Reply With Quote
Old 04-27-2012, 04:05 AM   #27
drauger
Enthusiast
drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.drauger has every book they ever wanted in electronic form on their reader.
 
drauger's Avatar
 
Posts: 32
Karma: 46558
Join Date: Feb 2012
Device: Kindle4NT
Quote:
Originally Posted by geekmaster View Post
I noticed the hanging (and even bricking) when booting from main (and even worse on the K5(touch)) and then doing wget or gcc. That is why I booted from diags to run optware (much more free memory).
From optware I use only openssh, nano, rsync and sometimes mc, so, I don't really need a lot of free memory.

Quote:
Originally Posted by geekmaster View Post
Again -- on K4, you have a lot more you can do (with better graphics too) when you boot diags instead of main.
The problem is that along with "hacking" I stiil use my kindle for reading (surprize!). And, while there is still no any terminal working on K4, I don't like much all these rebooting procedures.

By the way, besides using better eink drivers, what else can I find in diags compared to main + optware?
drauger is offline   Reply With Quote
Old 05-10-2012, 04:32 AM   #28
xueyou2
Connoisseur
xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.
 
Posts: 58
Karma: 9096
Join Date: Apr 2012
Device: none
question about tcc header file.

I built a program which report "sqrt" is not defined.
I look up the math.h file,there is not sqrt function.
So is the tcc different from gcc in function?
Can i replace the header file in tcc with the same file in gcc?
What is difference between tcc and gcc in function?
xueyou2 is offline   Reply With Quote
Old 05-10-2012, 05:18 AM   #29
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: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by xueyou2 View Post
I built a program which report "sqrt" is not defined.
I look up the math.h file,there is not sqrt function.
So is the tcc different from gcc in function?
Can i replace the header file in tcc with the same file in gcc?
What is difference between tcc and gcc in function?
To link the math library, use:

tccmake myprog -lm

PHP Code:
]# cat hello.c
#include <stdio.h>
#include <math.h>
int main(void) {
    
float x=144;
    
printf("x=%f, sqrt(x)=%f\n",x,sqrt(x));
    return 
0;
}
]
# tccmake hello -lm
]# ./hello
x=144.000000sqrt(x)=12.000000
]
It worked for me. You just did not link in the math library with the "-lm" parameter like I showed above...


Last edited by geekmaster; 05-10-2012 at 05:43 AM.
geekmaster is offline   Reply With Quote
Old 05-10-2012, 08:43 PM   #30
xueyou2
Connoisseur
xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.
 
Posts: 58
Karma: 9096
Join Date: Apr 2012
Device: none
I get it.
If you use other functions,just link the XX library?
Just like
tccmake myprog -lX (with the first letter?)

In tcc forums it said:can be linked to your program with the -l switch and the name of the lib without the leading word "lib".


For example time.h
tccmake myprog -lt ?

Another question :Can i replace the header file in tcc with the same file in gcc?
xueyou2 is offline   Reply With Quote
Reply

Tags
tcc, tinycc

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
geekmaster simple touchscreen script support hack geekmaster Kindle Developer's Corner 12 04-21-2021 11:38 PM
Very simple guide to reading newspapers on the kindle, please? :) Pismire Amazon Kindle 7 06-01-2012 11:26 PM
Free (Kindle/Nook/ChristianBook) The Invitation: A Simple Guide to the Bible arcadata Deals and Resources (No Self-Promotion or Affiliate Links) 4 08-22-2011 01:05 PM
Simple guide to choosing a Creative Commons license for your work Bob Russell News 0 12-26-2006 11:10 AM


All times are GMT -4. The time now is 06:29 PM.


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