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 06-10-2012, 07:42 PM   #46
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,209
Karma: 5830430
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by elRicharD View Post
I will. Does that add any compatibility/performance improvement? Should I add those directives to the ./configure on mpg123?

Thanks!
The ones I wrote should work on both ARMv6 and ARMv7 (Kindle Touch).
Usually, hardware floating point is faster than doing it in software.

- - - -

No, not added to the ./configure step

Sorry, didn't notice that you where using an autotools package.

After the configure step, when you do the "make" you should be able to pass the extra compiler flags at the same time.
OR
Set them in the Makefile after it has been generated by ./configure.

On the command line (may not be honored by the Makefile):

If it is a C program:
CFLAGS='the extra options' make

If it is a C++ program:
CCFLAGS='the extra options' make

OR
Just set the extra options in the Makefile wherever CFLAGS and CCFLAGS is first defined.

Note: These are just general directions. A person would have to have the actual text of the Makefile in front of them to give specifics.

- - - -

If all of the above is a mystery - don't worry about it - someone else will check it out when they have time.
knc1 is offline   Reply With Quote
Old 06-10-2012, 08:37 PM   #47
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 4,617
Karma: 4440239
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2
@knc1: I think the 'l' refers to the endianness, LE, in our case, although it's a weird syntax, and I may be wrong, since the 'j' in armv6j was for the jazelle thingy... Where did you see that syntax?
NiLuJe is online now   Reply With Quote
 
Enthusiast
Old 06-10-2012, 08:41 PM   #48
geekmaster
Всё гениальное просто.
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: 5,066
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
The thread title is self-contradictory. There is not any Kindle 4 with a touchscreen, and there is not any Kindle 5 without a touchscreen, AFAIK.

The thread owner should request that it be renamed by a site moderator (click the button to the right of the KARMA button on the first post)...
geekmaster is offline   Reply With Quote
Old 06-10-2012, 09:35 PM   #49
elRicharD
Enthusiast
elRicharD began at the beginning.
 
Posts: 34
Karma: 10
Join Date: May 2012
Device: Kindle Touch
knc1, the executable works as a charm with the additional compiler flags.
elRicharD is offline   Reply With Quote
Old 06-10-2012, 10:06 PM   #50
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,209
Karma: 5830430
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by NiLuJe View Post
@knc1: I think the 'l' refers to the endianness, LE, in our case, although it's a weird syntax, and I may be wrong, since the 'j' in armv6j was for the jazelle thingy... Where did you see that syntax?
cat /proc/cpuinfo

When I get a chance, I'll browse the kernel sources and see what the comments have to say about what they think they are describing.
knc1 is offline   Reply With Quote
Old 06-10-2012, 10:10 PM   #51
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,209
Karma: 5830430
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by elRicharD View Post
knc1, the executable works as a charm with the additional compiler flags.
That's good.
It should have failed horribly if the hardware floating point and the fpu options did not match.

What are you running it on?

The Kindle Touch? (K5)
That one has even more hardware help that you could option in (but then it wouldn't run on the earlier Kindles - would have to build two flavors).

The Kindle Non-Touch? (K4)
Not sure of that one. @GM: is that one a i.MX3* or a i.MX5* SoC?

The Kindle Keyboard (K3)?

The options I gave should let your build run on all, all with at least some hardware help.

Edit: We should probably re-build Lua for the Kindles. Internally, the only number type it has is Double. Hardware floating point ("Double") makes a big difference to Lua.

Last edited by knc1; 06-10-2012 at 10:26 PM.
knc1 is offline   Reply With Quote
Old 06-10-2012, 10:15 PM   #52
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,209
Karma: 5830430
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by NiLuJe View Post
@knc1: I think the 'l' refers to the endianness, LE, in our case, although it's a weird syntax, and I may be wrong, since the 'j' in armv6j was for the jazelle thingy... Where did you see that syntax?
The ARMv6l in the K3 does have Jazelle (java vm in hardware).
Both have Thumb, the KT (ARMv7l) has VFPv3, Thumb-2 and NEON, but no java vm.

You may have noticed that the kernel for the KT has video drivers and V4L modules. Seems like lab126 is thinking of giving us video. Too bad members here beat them to it, without the hardware help of the more powerful core.

I am working on a "cheat sheet" of gcc-options vs Kindle model -
But the ARM naming scheme - - - well, I am not sure even the ARM engineers understand it.

Last edited by knc1; 06-10-2012 at 10:18 PM.
knc1 is offline   Reply With Quote
Old 06-10-2012, 10:52 PM   #53
geekmaster
Всё гениальное просто.
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: 5,066
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by knc1 View Post
The Kindle Non-Touch? (K4)
Not sure of that one. @GM: is that one a i.MX3* or a i.MX5* SoC?
K3 is i.Mx35. K4 and K5 are both i.Mx508.

The K4 mostly emulates the K3 when booted from main, but when booted from diags it is more like the K5 (different kernels and different drivers). But the K4 uses the same SoC as the K5.
geekmaster is offline   Reply With Quote
Old 06-10-2012, 11:03 PM   #54
elRicharD
Enthusiast
elRicharD began at the beginning.
 
Posts: 34
Karma: 10
Join Date: May 2012
Device: Kindle Touch
knc1, Kindle Touch, latest firmware.
elRicharD is offline   Reply With Quote
Old 06-11-2012, 05:57 AM   #55
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,209
Karma: 5830430
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by geekmaster View Post
K3 is i.Mx35. K4 and K5 are both i.Mx508.

The K4 mostly emulates the K3 when booted from main, but when booted from diags it is more like the K5 (different kernels and different drivers). But the K4 uses the same SoC as the K5.
That was the knowledge I was missing, when it comes to code generation options of gcc - K4 and K5 have the same (options and processor core).

if elRicharD wanted to maintain two flavors of mpeg123 (K4 & K5; Others)...
Then the K4&K5 build could use the gcc options to use VFPv3+Neon (which I would need to look up for gcc-4.6).
That would get his media stream mostly crunched in hardware.
Should make Lua move right along also (for our Kpdf application).

Since I am asking, and you have one of everything ever built....

When you get a chance, would you do a:
cat /proc/cpuinfo
on a K2 and a DX(G) please?
knc1 is offline   Reply With Quote
Old 06-11-2012, 08:28 AM   #56
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,209
Karma: 5830430
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by knc1 View Post
That was the knowledge I was missing, when it comes to code generation options of gcc - K4 and K5 have the same (options and processor core).

if elRicharD wanted to maintain two flavors of mpeg123 (K4 & K5; Others)...
Then the K4&K5 build could use the gcc options to use VFPv3+Neon (which I would need to look up for gcc-4.6).
That would get his media stream mostly crunched in hardware.
Should make Lua move right along also (for our Kpdf application).

Since I am asking, and you have one of everything ever built....

When you get a chance, would you do a:
cat /proc/cpuinfo
on a K2 and a DX(G) please?
Edit: They are both i.MX3* SoC but I would still like to see the cpuinfo from the kernel.
knc1 is offline   Reply With Quote
Old 06-11-2012, 08:38 AM   #57
geekmaster
Всё гениальное просто.
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: 5,066
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by knc1 View Post
That was the knowledge I was missing, when it comes to code generation options of gcc - K4 and K5 have the same (options and processor core).

if elRicharD wanted to maintain two flavors of mpeg123 (K4 & K5; Others)...
Then the K4&K5 build could use the gcc options to use VFPv3+Neon (which I would need to look up for gcc-4.6).
That would get his media stream mostly crunched in hardware.
Should make Lua move right along also (for our Kpdf application).

Since I am asking, and you have one of everything ever built....

When you get a chance, would you do a:
cat /proc/cpuinfo
on a K2 and a DX(G) please?
I have a DX and DXG, but no K2 (or K1)... I will do the DX later when I plug it in. I have work now...
geekmaster is offline   Reply With Quote
Old 06-11-2012, 02:01 PM   #58
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 4,617
Karma: 4440239
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2
The K2 and the DX use the same CPU as the K3 (arm1136jf-s / vfp), with a slightly older Kernel (~2.6.22) (and half the RAM, if I remember correctly?).

EDIT: AFAIR, the cpuinfo is indentical (DX/DXG/K2/K3), but I may be wrong .

Keep in mind that I had some weird surprises when building lua/kpdf with a hardfloat TC (namely, a completely messed up lua interpreter). I never investigated much further than that, so it may be a stupid mistake on my part .

EDIT: On the other hand, it works flawlessly with my latest softfp TC, so, there's that .

(Check the kindle-x-compile-tc.tar.gz tarball for more details on my K2/K3 TC).

Last edited by NiLuJe; 06-14-2012 at 10:28 PM.
NiLuJe is online now   Reply With Quote
Old 06-11-2012, 06:15 PM   #59
baf
Addict
baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.
 
Posts: 328
Karma: 1346560
Join Date: May 2012
Device: kt
Quote:
Originally Posted by knc1 View Post
Then the K4&K5 build could use the gcc options to use VFPv3+Neon (which I would need to look up for gcc-4.6).
Building crosstool chain I set "-mfpu=neon -mfloat-abi=softfp" options for gcc-linaro-4.7 compiler.

Cross-compiled binaries have VFPv3+Neon support.

Code:
[kindle]# readelf -A hello 
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "7-A"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Application
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-2
  Tag_VFP_arch: VFPv3
  Tag_NEON_arch: NEONv1
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align8_needed: Yes
  Tag_ABI_align8_preserved: Yes, except leaf SP
  Tag_ABI_enum_size: int
  Tag_ABI_HardFP_use: SP and DP
  Tag_unknown_34: 1 (0x1)
EDIT: full set of used CFLAGS is "-mlittle-endian -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
This is for K5. I don't know about the others. I use crosstool-ng/scratchbox chain.

Last edited by baf; 06-12-2012 at 04:41 AM.
baf is offline   Reply With Quote
Old 06-11-2012, 06:35 PM   #60
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,209
Karma: 5830430
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by baf View Post
Building crosstool chain I set "-mfpu=neon -mfloat-abi=softfp" options for gcc-linaro-4.7 compiler.

Cross-compiled binaries have VFPv3+Neon support.

Code:
[kindle]# readelf -A hello 
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "7-A"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Application
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-2
  Tag_VFP_arch: VFPv3
  Tag_NEON_arch: NEONv1
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align8_needed: Yes
  Tag_ABI_align8_preserved: Yes, except leaf SP
  Tag_ABI_enum_size: int
  Tag_ABI_HardFP_use: SP and DP
  Tag_unknown_34: 1 (0x1)
Try a Hello World with some 'Double' math.
If it doesn't fault on 'illegal instruction' (or some such obvious thing) - call it done.
If those options test out, I will make them the defaults for K4&K5 in DIY-KeK

That should do it for the K4 & K5 at least.

Just don't forget to over-ride those defaults built into the compiler when building for the K1, K2, K3 and DX

Last edited by knc1; 06-11-2012 at 06:39 PM.
knc1 is offline   Reply With Quote
Reply

Tags
launcher add-ons

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MPlayer for Kindle: AAC/FLAC/MP3/OGG/WAV/... support, local and streaming ! Smarter Kindle Developer's Corner 136 07-03-2013 01:17 PM
Problem with MPlayer volume on Kindle Touch thuongquoc Amazon Kindle 0 03-26-2012 08:43 PM
Troubleshooting Setting Radio Address in Mplayer for kindle3 yueyingqishi Amazon Kindle 1 02-06-2012 11:09 AM
Kindle MPlayer Control over SSH (WiFi) antario Amazon Kindle 5 09-22-2011 02:23 PM
Kindle 3, Nook Simple Touch, Kobo Touch and Libra Pro Touch jbcohen Which one should I buy? 4 06-18-2011 07:58 PM


All times are GMT -4. The time now is 03:30 PM.


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