07-01-2012, 10:23 AM | #166 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
Posts: 6,586
Karma: 6299991
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
|
Ah many thanks
And here's a little history for the interested http://en.wikipedia.org/wiki/Blue_box_%28phreaking%29 Cap'n crunch ftw! |
07-01-2012, 10:52 AM | #167 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
Interesting to know that the first product that the "two Steves" (who founded apple computer) manufactured and sold was an illegal blue box. But then if you study history, you find that most obscene fortunes held by famous families were begun by trading in illegal goods or services (slavery, opium trade, etc.). |
|
Advert | |
|
08-09-2012, 09:14 AM | #168 | ||
Connoisseur
Posts: 58
Karma: 31942
Join Date: Feb 2012
Device: Kindle 3, Tolino Shine, Kobo Glo
|
I should apologize for a stupid question, but I'm totally confused. When I compile the simplest code with command line arguments, say
Quote:
Quote:
Thanks for any suggestions. PS. tcc => kindle-tcc-1.6a.tar.gz, kindle3 (fw 3.0.3) |
||
08-12-2012, 08:00 AM | #169 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
Posts: 6,586
Karma: 6299991
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
|
Itś been a while but IIRC the script that GM did to call TCC in fact deals with this issue. Indeed I think I remember this from a README, but it may have a been a thread on this thingy.
In essence I think they get ditched unless specifically splattered into bin, I recall something about a limit of args as well. Sigh. Iĺl go and have a look. EDIT: Nope, I searched every post on this thread and the info wasn´t specific to your problem, I was thinking of the args order passed for the libs. one thing did occur though, I thought the -run was broken in this version. is not the args thing linked to -run? [-run infile args...] anyways. perhaps GM will be able to shed light on this. apologies. Last edited by twobob; 08-12-2012 at 08:13 AM. Reason: added reading and single possible sensible thought. |
08-12-2012, 08:33 AM | #170 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
I just used the tcc executable that lrizzo had at his web site. I do not know how he built it.
I see by modifying your program to print argc that this build of tcc does not handle command-line parameters. When tested on my K5, it shows that argc has a large negative value that changes with each run, and argv[0] is a NULL pointer. I had not noticed that behavior before, but I had noticed that the tcc "-run" parameter did not run C programs as a script, so it has more than one bug. I suppose we need to rebuild tcc from source to see if that fixes it. It seems to work okay for things that do not need parameters. I do not recall what "splattered into bin" thing that twobob is talking about. Last edited by geekmaster; 08-12-2012 at 01:51 PM. |
Advert | |
|
08-12-2012, 08:56 AM | #171 | ||
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
Posts: 6,586
Karma: 6299991
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
|
Okay well I am not 100% if it was for the emulator or the kindle but there is a version out there IIRC correctly that does support the run argument. This difference, I suspect, would fix your problem.
Here is the preamble https://www.mobileread.com/forums/sho...1&postcount=73 and here is the final thing https://www.mobileread.com/forums/sho...7&postcount=76 As is mentioned in the post though: Quote:
Quote:
HTH. @GM like I said. I was wrong. Last edited by twobob; 08-12-2012 at 09:03 AM. Reason: added extra toughness |
||
08-12-2012, 08:58 AM | #172 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Hmm...
The static build dynamic link of tcc-next-unreleased posted in the DIT-KeK thread: Code:
(armv6l:1) /home # tcc -run un.c This program was called with "un.c". The command had no other arguments. (armv6l:1) /home # tcc -run un.c junk This program was called with "un.c". argv[-1094246539] = argv[%d] = %s Code:
(armv6l:1) /home # cat un.c /* #include "stdio.h" */ /* #include <stdlib.h> */ int main(int argc, char **argv) { int count; printf ("This program was called with \"%s\".\n", argv[0]); if (argc > 1) for (count = 1; count < argc; count++) printf("argv[%d] = %s\n", count, argv[count]); else printf("The command had no other arguments.\n"); return 0; } The second line change - That is part of the changes required for tcc-next-release. I haven't looked to see if it is an error in tcc or an intended feature to have (some) of the standard libraries built-in and blow up if the external libraries are used. Last edited by knc1; 08-12-2012 at 09:02 AM. |
08-12-2012, 09:01 AM | #173 | |
Connoisseur
Posts: 58
Karma: 31942
Join Date: Feb 2012
Device: Kindle 3, Tolino Shine, Kobo Glo
|
Quote:
Well, I'll try to use config-file to send some parameters for my program(s) and to hope that someone could recover argv-feature. Unfortunately, my skills are not enough to do it by myself. |
|
08-12-2012, 09:05 AM | #174 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
There are step-by-step directions in the DIY-KeK thread where tcc is posted.
All you have to do is follow the build instructions, only substitute cross-compile for glibc rather than do the native build under emulation for uClibc. You might want to follow the DIY-KeK thread, where work is currently underway to provide a glibc based emulator image for building dynamically linked Kindle stuff. The static build of tcc-next-unreleased does not implement the -run option due to the known problems of using libdl from a static build. Last edited by knc1; 08-12-2012 at 09:09 AM. |
08-12-2012, 09:07 AM | #175 | |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
Posts: 6,586
Karma: 6299991
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
|
^This
Quote:
Last edited by twobob; 08-12-2012 at 09:15 AM. Reason: relevant quote |
|
08-12-2012, 09:35 AM | #176 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Thanks. I tried building it from source a couple of times without success. Rob Landley (et al) were discussing building tcc to run on x86 with arm code generation, then building using that to build tcc again for arm executable tcc with arm code generation. They mentioned something about wrong floating-point endianness, requiring yet another build cycle to fix that. The threads at gnu.org leave a lot of unanswered questions, and any download links to compiled binaries are now dead.
I will check out the knc1 posts... Thanks. |
08-12-2012, 09:36 AM | #177 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
|
|
08-12-2012, 09:42 AM | #178 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
https://www.mobileread.com/forums/sho....php?p=2150107 If it builds programs that handle command line parms (better than the lrizzo build used now), I will repackage it into the first post in this thread. |
|
08-12-2012, 09:45 AM | #179 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Check your post history for posts in that thread. You replied to the suggestion about the next Kindle build including SYSROOT=/mnt/us in its configuration. Ah, there, that will trigger your memory on this subject. Too many subjects, too many posts, not enough time == "Life". I, like all the rest of the hobbyists here, only work on what interests us at the moment. All we need here is for someone (else) to get interested in doing it (a glibc build). |
|
08-12-2012, 09:57 AM | #180 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
I ran it on my K5, and the ELF binary it built references uclibc (and will not run on the kindle). It may run in the QEMU environment, but needs a rebuild to work in the kindle.
Regarding memory triggers, my mind is so full of so many WORK projects right now that I cannot remember which is part of what. I have not been thinking about kindle stuff much lately. I need more time. I have more than 3333 posts of my own here, and I cannot even remember half of those. My memory just is not what it used to be. I need a memory upgrade. This one is full. |
Tags |
tcc, tinycc |
|
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 |