|
|
#76 | |
|
Embedded Cheerleader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,072
Karma: 3827911
Join Date: Feb 2012
Device: Intel 4004
|
Quote:
Continued from: http://www.mobileread.com/forums/sho...1&postcount=73 Now that you have a working, emulated native, arm build environment ... And you have just built a copy of tcc v-0.9.26 dynamically linked against uClibc ... How do you get a static linked tcc out of this when the ./configure and make sequence does not observe the standard --static --static-libgcc sequence? Thought no one would ask. Look at the gcc link commands output during the build, in this case there is only one of them of any significance, the final linking: Code:
gcc -o tcc tcc.o libtcc.a -lm -ldl Code:
(armv6l:1) /home/tinycc # gcc --static --static-libgcc -o tcc-static tcc.o libtcc.a -lm -ldl
(armv6l:1) /home/tinycc # ldd tcc-static
not a dynamic executable
(armv6l:1) /home/tinycc # strip --strip-unneeded tcc-static
(The -run option causes this tcc-static to hang, it would take a bit of further tweaking to make -run work while libdl was statically linked). Check it: Code:
(armv6l:1) /home # ./tcc-static -o hello hello.c (armv6l:1) /home # ./hello Hello World Edit: What some users probably need is a build of this with SYSROOT=/mnt/us included in the configure; maybe even add /mnt/us/lib and /mnt/us/include into the tcc-static search paths. But those are documented options in the ./configure --help file and now anyone can do it with these two posts.
__________________
"Hack is just a four letter word." - - With apologies to B. Dylan Last edited by knc1; 07-15-2012 at 05:04 AM. |
|
|
|
|
|
|
#77 |
|
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,121
Karma: 5288897
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW, K5 B011, K3 us, K4, DXG, XDA I&II, Omnia, Ematic E6 + E8 :) etc.
|
Excellent. The entire day I spent last week shuffling 80Gb of trash about all seems worth it now.
I shall fill this space with your wondrous toys. Much appreciated!
__________________
Audiophile and electron bully. My tunes (for free) soundcloud.com/twobob. DONATE TO KUAL BY CLICKING THIS SIMPLE LINK Kung-Fu. Hard work over time to accomplish skill. A painter can have kung-fu... The musician can have kung-fu, or the poet who paints pictures with words and makes emperors weep. This, too, is kung-fu. Formless, nameless, the true master dwells within. Only you can free him. The album I'm headlining on at the moment: s.beatport.com/OCp9dT - FREE: 2012 Award winning set Last edited by twobob; 07-14-2012 at 04:41 PM. |
|
|
|
|
Enthusiast
|
|
|
|
#78 | |
|
Всё гениальное просто.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,022
Karma: 6352591
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
|
Quote:
Regarding changing SYSROOT -- I built some programs (including SDL for eink) that look for libs in /mnt/us/lib. Nice to not have to futz with environment vars, and don't need symlinks on root. Instead of symlinks in /mnt/us/lib, I just have copies of a lib for each name needed (plenty of space there). This behavior would definately be a plus for tcc.
__________________
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
![]() Last edited by geekmaster; 07-14-2012 at 07:25 PM. |
|
|
|
|
|
|
#79 | |
|
Embedded Cheerleader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,072
Karma: 3827911
Join Date: Feb 2012
Device: Intel 4004
|
Quote:
My objective was just a "getting started" sort of procedure. Following the procedure with just changes to the ./configure command would be a good follow-up for someone (else). - - - - Myself, I prefer using /mnt/us as a substitute for /usr/local in the FHS plan. Hmm... I probably should have include an example usage of DESTDIR ... Ah, well, that can be a "student exercise" also. My build of qemu-1.1.1 has an example of using DESTDIR, see: http://www.mobileread.com/forums/sho...3&postcount=85
__________________
"Hack is just a four letter word." - - With apologies to B. Dylan Last edited by knc1; 07-15-2012 at 12:51 PM. |
|
|
|
|
|
|
#80 | |
|
Embedded Cheerleader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,072
Karma: 3827911
Join Date: Feb 2012
Device: Intel 4004
|
Quote:
The qemu emulator has a selection of (at least) three sound cards with alsa and oss interfaces. http://alien.slackbook.org/dokuwiki/...slackware:qemu I don't know how out-of-date that wiki page might be, but it is rare for hardware emulation to be removed from qemu once someone writes it. The main qemu web site would have the final word. http://wiki.qemu.org/Qemu-doc.html The start-up command is in: ./run-emulator.sh (and dev-environment.sh just sources it) That would be the place to tweak any qemu options needed to get sound out of your (emulated) build environment. Plus, only /home is writable in Rob Landley's setup, so using a --prefix=/home when building software will be required. The DESTDIR= variable is recognized by some makefiles and can be of use at times also. * * * * I have attached the dynamically linked tcc for your emulation environment to this post. Just in case you haven't built it yet from my earlier posts. Notes: This one is built against uClibc - it will not run on the kindles, they don't have uClibc system libraries installed. This one does have a usable -run option. Which shortens the turn-around time a lot for testing small code snippets. The obvious advantage here is, make a programming error and the worst you might have to do is cancel the terminal instance you are running the qemu instance from - then it all goes away. ![]() Don't scoff at this development environment - on your mutli-core studio machine it is probably as fast as the K3.
__________________
"Hack is just a four letter word." - - With apologies to B. Dylan Last edited by knc1; 07-15-2012 at 05:24 AM. |
|
|
|
|
|
|
#81 | |
|
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,121
Karma: 5288897
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW, K5 B011, K3 us, K4, DXG, XDA I&II, Omnia, Ematic E6 + E8 :) etc.
|
Quote:
Thanks for the permissions and flags tips!
__________________
Audiophile and electron bully. My tunes (for free) soundcloud.com/twobob. DONATE TO KUAL BY CLICKING THIS SIMPLE LINK Kung-Fu. Hard work over time to accomplish skill. A painter can have kung-fu... The musician can have kung-fu, or the poet who paints pictures with words and makes emperors weep. This, too, is kung-fu. Formless, nameless, the true master dwells within. Only you can free him. The album I'm headlining on at the moment: s.beatport.com/OCp9dT - FREE: 2012 Award winning set |
|
|
|
|
|
|
#82 |
|
Embedded Cheerleader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,072
Karma: 3827911
Join Date: Feb 2012
Device: Intel 4004
|
Thanks.
I added both of the recent "HowTo" posts to the tools_prefix index.
__________________
"Hack is just a four letter word." - - With apologies to B. Dylan |
|
|
|
|
|
#83 |
|
Embedded Cheerleader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,072
Karma: 3827911
Join Date: Feb 2012
Device: Intel 4004
|
And for those more interested in system's level programming ...
http://www.elinux.org/Virtual_Development_Board Adapt as required (Rob's emulation environment is already the ARM versatile-pb, and an eariler post in this thread installed the CS/MG tool-chain). RSN, someone is going to be booting the K3's Amazon kernel, and then build a good strace. Someday. Don't anyone wait for me to do it.
__________________
"Hack is just a four letter word." - - With apologies to B. Dylan |
|
|
|
|
|
#84 | |
|
Embedded Cheerleader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,072
Karma: 3827911
Join Date: Feb 2012
Device: Intel 4004
|
Quote:
qemu-system-arm -audio-help qemu-system-arm -help And the Landley emulator scripts recognize two environment variables: KERNEL_EXTRA QEMU_EXTRA The dev-environment.sh script trashes those values for its own use. So we may want to re-write that run-environment script to take additional options as variables. Which could include fixing up this hard coded cpu setting. The cpu type, -cpu arm1136-r2 is hard coded. And since cat /proc/cpuinfo shows too many features, probably one of these would be a closer match: qemu-system-arm -cpu ? Neither that, nor qemu-system-arm -M ? has anything at all to say about FreeScale boards/parts. We may have to futz with that script's start-up command line a bit before you start using the hardware DSP / vector instructions.
__________________
"Hack is just a four letter word." - - With apologies to B. Dylan Last edited by knc1; 07-15-2012 at 06:23 PM. |
|
|
|
|
|
|
#85 |
|
Embedded Cheerleader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,072
Karma: 3827911
Join Date: Feb 2012
Device: Intel 4004
|
QEMU-1.1.1
I foresee difficulties here, with each developer using what their Linux distribution **thinks** they should have (usually qemu-kvm, not qemu).
Let us see if we can out-smart the distribution planners ... How I built the current release: Spoiler:
Download the attached tar-ball. Installation: core2quad ~ $ sudo tar -C /opt --extract --file=qemu-1.1.1-arm.tar.gz core2quad ~ $ /opt/qemu111/bin/qemu-system-arm --version QEMU emulator version 1.1.1, Copyright (c) 2003-2008 Fabrice Bellard To activate: core2quad ~ $ export PATH=/opt/qemu111/bin:$PATH core2quad ~ $ qemu-system-arm --help - - - lots of output snipped away - - - Test run: Spoiler:
NOTE: If your host filesystem does not have a /dev/dsp device: sudo mknod /dev/dsp c 14 3 But since most /dev file trees are now on tmpfs, this will go away with the next reboot. It will probably vary from distribution to distribution how best to make this device always present. For now, left as a: "student exercise". I would like to hear some feedback from others on this build, but it ran well enough for me to create the following static linked applications. Only: IWFM isn't strong enough to be publicizing it yet.
__________________
"Hack is just a four letter word." - - With apologies to B. Dylan Last edited by knc1; 07-16-2012 at 07:04 AM. |
|
|
|
|
|
#86 |
|
Embedded Cheerleader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,072
Karma: 3827911
Join Date: Feb 2012
Device: Intel 4004
|
XZ Utils-5.0.4-static (and LZMA)
I started out to build a current version of strace, but that comes as an xz compressed archive.
Duh... http://tukaani.org/xz/ So build XZ Utils first: Spoiler:
As you can see in the build notes above, this is the entire distribution (including documentation). And the tar-ball has a leading directory path of mnt/us ... (as a reminder of where they should probably end up - but these are all static, so user's choice) You will probably want to open up the tar ball and select from: Code:
mnt/us/bin/ mnt/us/bin/xz mnt/us/bin/lzfgrep mnt/us/bin/xzdiff mnt/us/bin/lzmadec mnt/us/bin/lzcat mnt/us/bin/unxz mnt/us/bin/lzdiff mnt/us/bin/lzma mnt/us/bin/unlzma mnt/us/bin/xzcat mnt/us/bin/xzfgrep mnt/us/bin/lzcmp mnt/us/bin/xzgrep mnt/us/bin/lzless mnt/us/bin/xzegrep mnt/us/bin/xzcmp mnt/us/bin/lzmore mnt/us/bin/lzgrep mnt/us/bin/xzmore mnt/us/bin/xzless mnt/us/bin/lzegrep mnt/us/bin/xzdec mnt/us/bin/lzmainfo Note: Some of those are scripts, you'll see that when you get the tar-ball opened onto your filesystem. Edit: After a bit of study, you probably only need mnt/us/bin/xz because it evidently auto-detects lzma I have attached it (xz) gzip'd, just gunzip it. Edit: The applications inside of the complete tar-ball do not have their symbols stripped. The individual .gz'd file does have the excess symbols stripped. Four or five people got copies of the "too big" staticly linked executables.
__________________
"Hack is just a four letter word." - - With apologies to B. Dylan Last edited by knc1; 07-15-2012 at 08:54 PM. |
|
|
|
|
|
#87 |
|
Embedded Cheerleader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,072
Karma: 3827911
Join Date: Feb 2012
Device: Intel 4004
|
Strace 4.7 static
This one is the current release of strace.
I did not patch in the Amazon/lab126 syscalls. I did not build it to decode the new AIO calls. Other than that, it should "just work". ![]() First, install the just created xz in the emulator's /home/bin directory and put the new bin directory on the path: Spoiler:
The build notes: Spoiler:
The complete tar-ball contents: Code:
(armv6l:1) /home/strace47 # tar -tf strace-4.7-static-arm.tar.gz mnt/ mnt/us/ mnt/us/share/ mnt/us/share/man/ mnt/us/share/man/man1/ mnt/us/share/man/man1/strace.1 mnt/us/bin/ mnt/us/bin/strace-log-merge mnt/us/bin/strace mnt/us/bin/strace-graph Edit: The applications inside of the complete tar-ball do not have their symbols stripped. The individual .gz'd file does have the excess symbols stripped. Four or five people got copies of the "too big" staticly linked executables.
__________________
"Hack is just a four letter word." - - With apologies to B. Dylan Last edited by knc1; 07-15-2012 at 08:54 PM. |
|
|
|
|
|
#88 |
|
Embedded Cheerleader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,072
Karma: 3827911
Join Date: Feb 2012
Device: Intel 4004
|
Edit: For xz.gz and strace.gz
The applications inside of the complete tar-ball do not have their symbols stripped. The individual .gz'd file does have the excess symbols stripped. Four or five people got copies of the "too big" staticly linked executables. The stripped versions are about half the original posting's size if you wish to re-download them. Sorry about the posting error folks.
__________________
"Hack is just a four letter word." - - With apologies to B. Dylan |
|
|
|
|
|
#89 |
|
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,121
Karma: 5288897
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW, K5 B011, K3 us, K4, DXG, XDA I&II, Omnia, Ematic E6 + E8 :) etc.
|
I've got some serious homework now. Need to book a week off to get my system up to code.
Thanks for your tireless efforts on this forum. The stripped versions are about half the original posting's size if you wish to re-download them. Done, cheers
__________________
Audiophile and electron bully. My tunes (for free) soundcloud.com/twobob. DONATE TO KUAL BY CLICKING THIS SIMPLE LINK Kung-Fu. Hard work over time to accomplish skill. A painter can have kung-fu... The musician can have kung-fu, or the poet who paints pictures with words and makes emperors weep. This, too, is kung-fu. Formless, nameless, the true master dwells within. Only you can free him. The album I'm headlining on at the moment: s.beatport.com/OCp9dT - FREE: 2012 Award winning set Last edited by twobob; 07-15-2012 at 10:35 PM. Reason: added that I grabbed the goodies again |
|
|
|
|
|
#90 |
|
Embedded Cheerleader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,072
Karma: 3827911
Join Date: Feb 2012
Device: Intel 4004
|
I updated the lead post with some words about the post attachments.
__________________
"Hack is just a four letter word." - - With apologies to B. Dylan |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Accessories DIY KT Case | echo013 | Amazon Kindle | 2 | 01-27-2012 06:53 PM |
| DIY Stylus | scottjl | Apple Devices | 3 | 05-10-2010 01:52 AM |
| DIY Scanner | Eratosthenes | News | 14 | 04-16-2010 04:21 PM |
| DIY Idea | sřrensundsans | Sony Reader | 6 | 01-26-2010 01:25 AM |
| DIY stylus | -Thomas- | iRex | 5 | 02-12-2009 12:05 PM |