Booboo Linux Q&A update

More Booboo Q&A from the Spanish GP2x Forums (untranslated link) (all this, and he has time to code too … cheers Booboo!):

 

Originally Written by they chipan To see Message

Ah, then is that you had not read me XDDDDDD
As far as which you say of throwing the main surroundings/of applications; I believe that the Gmenu2x could be carried (I suppose that there will be source code available or if cannot be asked the author), is a pretty very configurable alternative and with a really small consumption of resources.

Booboo:

Indeed, the source code is available. It seems the best alternative.
I yesterday made a fast attempt with the sound was used that me for, of entrance, knowledge that support OSS of kernel of ingenic does not work (great petada when you accede to the device), so debate OSS (“legacy” but more compact, does not support audio simultaneous of several applications, something that in a320 is not problem) versus ALSA (default to day of today, heavier, audio simultaneous) is already trenched. Now I have to make work ALSA. I have already compiled libid3tag, libmad and madplay for a320, but I have some problem with the bookstore libasound that I suppose that I will solve quickly as soon as it has time to seat to me with a320. To see if soon I can hang a video of madplay reproducing mp3.

< - >

Originally Written by Uncanny To see Message

Thus it is pleasant (and envy, it heals, but envy xD), thanks booboo to make and instructive east so interesting thread a doubt with respect to this point del that you speak this would be thus even although you form kernel it compiles so that it like module and it loading under demand, that is to say, when the USB is connected to use it in way CDC Ethernet? I ask it because if outside thus, like module, I suppose that there would not be problem, although you say if it because there would be to work almost necessarily with kernel monolithic Linux (as I suppose that you are doing now) then if that would be problem the extra consumption of ram to compile the support of network of kernel.

Booboo:

In principle there is no problem in using modules in kernel. There are two options, or kernel is had minimum that takes initrd interlocked that loaded the modules necessary to accede to the support where he is rootfs mounts, it and does pivot_root, or monolithic has kernel minimum but with those compiled modules. Second he is simpler, and in addition first it does not have sense in surroundings where the starting options are practically invariant.
IT STICKS it is that to qualify the dynamic load of modules already kernel in 300K gets fat (of code, plus the necessary ram that I imagine that will not be much). To that súmale others 300K of code more enough ram for the minimum support of network.
To be loading modules in a system like a320, where hardware is invariant and “hotplug” are no events, does not have sense except for development. For that reason I am in favor to have kernel most compact and light possible. Nevertheless, that complica the development of drivers hardware and cuts the communication via Ethernet, reason why I believe that the best option is to have a starting system that allows to select to a) firmware original, b) kernel normal c) kernel development.
I am going to begin to work OR in firmware original modified so that instead of to load ccpmp directly it loaded u-boot and this one can as well send firmware original or kernel/rootfs in miniSD. I believe that ma has happened a form to make it quite simple and that would settle like anyone of firmwares “custom” which they have left already.

< - >

Originally Written by Nekete To see Message

A cochair, it has seen somebody if there is some reason of hardware by which the problem of bellboys B/Y exists?

Booboo:

Ah! … I verified the subject but one forgot to me to comment it this way.
It is not a hardware problem. Hardware can perfectly read and of totally independent form both bellboys. In fact there is a pin GPIO dedicated for each button of independent form.
Therefore bug is a puñetero. And in addition I dare to venture that it must be bug idiot and very easy to fix, but already you know how they are the Chinese for these things.

< - >

Originally Written by juanvvc To see Message

To only contribute my sand granite in this: in many consoles the keyboard (joypad, bellboys) is mapping not to a normal keyboard but to a device joystick permanently fitted to the console. If it beams thus it will be easier to carry the emulators of other portable consoles that already are preparations to read of joystick.
Of all ways, to change in the emulators “reading of joystick” to “keyboard reading” is not nothing difficult. If it is easier you to mapear the bellboys to a keyboard with less keys than to joystick, since those are the programmers of emulators that work

Booboo:

Interesting idea. It did not know it. Pelín than the one of the mapeo of keys would cost to me more because Ingenic already provides to driver for this, whereas I would have to do the one of joystick (that is simple in any case).
Nevertheless, unless there is something escapes to me, it gives me that the one of the keys is practitioner more, since absolutely All the emulators must have support for keyboard, whereas perhaps there is some does not have support of joystick. On the other hand it is happened to me that in the emulators always it will be necessary to be able to reshape the mapeos of keys to taste of the user… can be done this with the bellboys of joystick? (I have not used many emulators, and never any with joystick).

< - >

Originally Written by SinMan To see Message

Your that you know booboo, as he would be of heavy using sw_suspend and like of useful or useless?
Perhaps it is not possible, or even that it is only a fast pair of seconds but that a normal starting, I ask for that reason it.

Booboo:

IT MUST be possible, simply because firmware original does. Another thing is that he is complicated to explain how works the hardware or that the function of suspend well is not implemented in some of drivers of Ingenic (this is what more fear gives me). In any case all this is solventable in time and patience.
As far as its utility, firmware based on linux that REPLACES firmware original MUST implement the function suspend. Although only behind schedule 5 seconds in loading, it is an eternity compared with the instantaneous answer of suspend.

< - >

Originally Written by juanvvc To see Message

Good, in fact it thought about games and emus of the Gp2x, where as much the SDL as minilib anyone mapean the controls like joystick
In any case it is truth that from the point of view of the programmer practically gives equal a form or the other. But mapea like joystick, the programs of the Gp2x will be easier to carry

Booboo:

What so a simultaneous and/or configurable mapeo. It would not suggest it if the one of joystick did not seem to me, a priori, relatively simple to do.

Originally Written by SinMan To see Message

Male Joe if they touch euromillones to me, tomorrow I subsidize to you
Good, to the mess, the one of which did not have RTC I suppose that it misinterprets what I read, and they talked about to that it does not have HW to control the rest of the machine when is dull, that is to say, that you put an alarm and every day to the 8:00 A.M. the single console ignites and begins to reproduce a MP3 for example since they make many moving bodies.

Booboo:

Than I put in datasheet I interpret that the JZ4740 yes that has that function. The problem is auxiliary hardware. I explain myself:
I have not put to investigate thorough how module RTC of the JZ4740 works, and am not going to do it at the moment, so I will speak of the experience that I have about how they work this type of devices in many other microcontrollers:
- the RTC comprises of a separated dominion of feeding of the rest. If the turn engineer made all good, he continues working although the rest of the CPU is in halt (fed but consuming very little). In many micros it is even possible to clear the feeding to the rest of the CPU.
- the RTC has an alarm function, thanks to which it can be programmed so that it does one of these two things (or the two): to generate an interruption or to change the state of an exit pin (this I have seen last one it VERY little).
- If what can do is the interruption, then the form to resume the system to one hour given consists of putting the CPU “to sleep” and that wakes up it to the interruption. Following the “deep thing” of the dream way this desperar it can be reset or a renewal of the execution it left where it. “Evidently at the most deep” smaller consumption is the dream.
- If what can do is to change the state of a pin, then with the help of little more than external transistors can be caused that the CPU has capacity for “going out” to she herself the feeding and “to reconectar it” using this special pin to the programmed hour. Evidently “to wake up” he is always reset and the consumption while “to duer to me” he is ridiculous, in fact only what consumes own module RTC.
Since already there am saying, this I have seen last one it only in very recent micros, reason why more surely it is than he is the other. In addition it requires since already there am this external hardware and a very careful design (that, without spirit to argue, is not habitual in the Chinese). And in addition that inherent “ridiculous” consumption to have the CPU without feeding absolutely is only necessary literally in systems that they must work whole years with a battery.
So I believe that dingoo surely will work of the first form. Of ota part, I am in favor ALMOST safe that dingoo has capacity for “taking off” to itself the feeding by software (*), and that you really extinguish when it the CPU is not fed absolutely. Also I am almost safe that or the RTC does not have capacity to activate the feeding or they have not implemented it. Therefore for your application of alarm a320 would have to be ignited (although in way of low consumption).
(*) I deduce it because there is a pin GPIO that is connected to the button of on/off, and because when you leave hung the console (that has passed me much while it programmed the initialización of hardware) the sliding button of extinguished it does not work (soon the dull one it is by software).

 

On the one of the interface, because as I said to you I do not have nor idea of embedded devices and which is high-priority to use the minimum resources, so my question is the following one, not to put the leg again.
If cojiera I jz-crosstools and mipseltools-gcc412-glibc261 of Ingenic, it could put to me to the future compile the SDL for linux of dingoo?

Booboo:

Yes. “Curro” would be mainly in:
- To suitably form the SDL so that it has only supported to framebuffer and alsa/oss (not yet which of both I will use in kernel… I believe that already I spoke of the subject in another message).
- To make the compiled cruzado: normally if what you are going to compile well it is done (and the SDL it is it) already gives some option you to specify the cross compiler that there is to use (specific the area code, that in this case would be “mipsel-linux-”. If no, you must trastear with the system of build. As I say, I do not believe that it is the case of the SDL, but cannot assure it.

it could also compile any application that used to framebuffer? or is better to take one directly debian-mipsel and to throw with binary precompiled?

Booboo:

Then I cannot affirm it surely, because until now everything what I have run in a320 I have compiled it I myself (busybox), but am almost safe (reference: linux for the VXnosqeué wave) of which any binary debian-mipsel will work. Another thing is that reason why it is interests to compile with special options binary at issue one (I am thinking about mplayer, in which it would include solely the support of framebuffer to thin it much, since it supports burrada of types of exit of video).

Originally Written by SinMan To see Message

As Stallman goes this way cuts the Webs to you, kernel but all the set of applications is called GNU/Linux, pásate by barrapunto and looks for flames on the matter

Booboo:

I know it I know, it… I have not wanted to sharpen so much.

 

I am afraid that he does not have RTC, reason why law the SOC does not have it integrated and you abriendo have not seen it any auxiliary chip for it, furthermore would be rare that having they had not made it an miser-application of clock

Booboo:

In page 6 of datasheet of the JZ4740:
RTC (Real Time Clock)
32-bit second to counter
1Hz from 32768hz
Alarm interrupt
Independent to power
To 32-bits scratch to register used to indicate to whether to power down happens for RTC to power
In addition in the configuration to kernel of Ingenic it appears clearly option RTC for the plate TURKEY (design of reference for PMP).
On the other hand, you can here clearly see the main crystal of the system (12 MHz) that serves as entrance to the PLL that generates all the other clocks (CPU, peripheral, USB, etc) and to part typical “latita” round of the crystals of 32768Hz which usually they are used for the RTC (in the photo I have put by error 32768KHz, must put Hertz or have put one comma between the 2 and the 7).

 

I have already seen that in the FTP of Ingenic to part of the GTK for X with Tiny X, they have a GTK-framebuffer.

Booboo:

You do not forget that only there is 32MB of ram, and that kernel of linux occupies enough (already I will try to thin clearing it all the nonnecessary one, but at least they will be 3 or 4 MB). Any application that we put will occupy more memory, and there is no swap (it would be possible to be had, but it does not have sense). To put a manager of windows and all the set of widgets of GTK does not have sense because they are thought to be used in a system with screen leader (mouse) and in dingoo obvious it does not have.
I believe that what touches is, once kernel good starting and has supported all the hardware, to develop “a main” application similar to which shows firmware original, and for that with the SDL on framebuffer surplus. In addition to have loaded in memory the SDL consumes resources but they would be resources that in any case would consume in any case the applications that sent (emulators, players, etc).

 

Originally Written by A600 To see Message

[A dual boot option] that would be, simply, cojonudo

Booboo:

By all means. But it will be necessary to wait for because before it comes all the others.
It had thought to look for the form “to from within send” kernel like one more an application of firmware original, but that can give thousand problems, since although it is not a good practice, often drivers initialize the devices doing certain presumptions with respect to the initial state of the same (that is to say, assuming that are as they remain after reset). In addition, it is the problem of how “to sobrewrite” in form memory “ordinate” firmware old by the new one, the configuration of the MMU (mapeo of physical memory to virtual) that I do not control and that does not desire anything to me to have to learn, the cache, etc. a mess, we go.
On the other hand, to take bootloader of ingenic and “to patch it”, although would be necessary to do it in assembler, are very very simple because it is only necessary to read a registry to know how the state of a then button and to change the name of the file that it loads (ccpmp.bin) and possibly the load direction, although as ccpmp.bin load in 0x80004000 and vmlinux (“the flat” image of kernel) in 0x80010000 would be enough with adding padding of 0x80010000 - 0x80004000 nops at the beginning of the image of kernel.
Fíjate that we are speaking simply to read a memory position, to examine a bit, and if the bit has a certain value of changing “ccpmp.bin” by “vmlinux” or any other name.
By all means it would be necessary to add to the file vmlinux in firmware, but that already we know that it is easy with at the moment existing tools (and that have allowed to remove firmwares altered).
The unique thing that does not like me of this approach is to have to alter bootloader in the flash, more than nothing because I believe that he is “contracted” in ccpmp.bin and therefore when updating firmware would be sobrewritten and been necessary to repeat the modification. I explain myself: I believe that the process of update of firmware makes something VERY similar to which I do loading kernel of linux: first load one or several small binary ones that initializes hardware since it would do bootloader, and soon load directly in SDRAM ccpmp.bin passing a parameter to him that says to him instead of to be loaded directly of the NAND by bootloader it has been loaded via USB and that must realise an update of firmware. Then what does already is to erase the flash, to put bootloader, putting to itself, etc. Something thus must be.

Originally Written by they chipan To see Message

Molan these so curradas answers, therefore I am soaked of knowledge thank you very much to leave it everything so clearly.
According to I have been able to read, to avoid kernel panic of the photo is something trivial… nevertheless to make work absolutely all the hardware can be a mammoth task

Booboo:

Mammoth it would be if besides not having the manual of the micro ones (we have datasheet, that does not explain how the peripheral ones work) we did not have software examples either. But we have kernel linux theoretically functional that only there is to form or to patch with the particularitities of a320.
He is complicated but perfectly feasible. In addition, an incomplete support of hardware in linux can be acceptable if it is possible to be had along with firmware original (to see messages on dual boot): for example it imagines that the radio FM and the exit TV do not work, but you have the SNES9X that works in linux: you start in linux and you play with one the best emulators of SNES than it has (or that has said to me), with the unique limitation of which you cannot hear the radio at the same time (I do not believe that nobody wanted to do it) and of which you cannot do it in the TV (what one is going away to him to do).

Comments

  1. Very very promising news that the Y/B button issue isn't hardware related! Great work Booboo

    ReplyDelete
  2. I'd give up TV-Out to be able to play perfect emulation. It sucked anyway. If I can dualboot both gmenu and the original firmware, this would be awesome. Dingoo Ltd would shit their pants twice.

    ReplyDelete

Post a Comment

Popular posts from this blog

Dingoo A380 Review

Idiot’s Guide to installing Dingux using Windows released

Mancala for Dingux released (Mandingoo was released in 1975)

The Dingoo-Scene JXD S7800B (Rockchip 3188 SoC) Android Gaming Console Review

Tauon PC-1 review

Dingoo representative at a320.freeforums.org !

How to show all your 17,083 c64 games from the c64 romset (archive.org) on the C64 Mini or C64 Maxi loader

An interview with the creator of the Tauon PC-1, Volodymyr Mishin