Genesi - EFIKA MX Smartbook
Pages: 1 2
Trevor Johnson (329) 1645 posts |
Is this on your upgraded RiscPC? Anyway, good you’ve got it built.
Funny – are you using this prog? AlignEx is probably the most convenient way. Also, if you’ve got a BeagleBoard running RISC OS, it may possibly be quicker to run the build on that. |
Michael Grunditz (467) 531 posts |
First signs of running HAL on EfikaMX : U-Boot# go 0×90100000
:D So s.Debug works :) |
Jeffrey Lee (213) 6048 posts |
Cool. Good to see that you’ve sorted out your toolchain problems. |
Michael Grunditz (467) 531 posts |
I forced a crash here to make the output stop otherwise it prints trashed memory and loops. |
Jeffrey Lee (213) 6048 posts |
From memory, the first couple of lines from a beagleboard should look like this: OMAP3 HAL init Board config=Beagleboard I think the next output after that would only happen once RISC OS calls HAL_Init. But if your HAL is crashing at the “Board config=” bit then it points to a problem with the way the board config structure is being handled. If you look at the foundconfig code in HAL.OMAP3.s.Top you’ll see that it expects v1 to contain a pointer to the board config struct, which it uses to get the board name (“Beagleboard”, etc.) And the value of v1 is calculated by the selectconfig code just above, which relies on the way the BL statements at HAL_Base have been set up – it uses the value of lr to work out which “BL selectconfig” line the ROM image was entered from, and from there uses that to select the right board config index. So if you’ve done anything to change the way that code works then that might explain why it’s going wrong. Although to be honest I’m not sure why I’ve got that ENTRY directive just before selectconfig – maybe you (or the assembler/linker) stripped out the preceeding code by accident? Also be wary of the fact that romlinker writes the size of the ROM image to offset 0×60 of the finished image. So make sure there isn’t any code or data at that address! I’m still not 100% sure why romlinker does this – the only piece of code I could find which relies on the ROM size being patched in that way was an old RiscPC-era test program. At some point I’ll try disabling that code in romlinker (or make it optional) and see if anything breaks. And finally, if you’re only targeting the EFIKA MX at the moment then you can probably ignore most of the boardconfig code in the OMAP HAL, as you won’t have the same problem I have of having to support a large number of different hardware configurations. Ignoring the boardconfig stuff would also mean you won’t have to find your own solution to how to preserve the boardconfig struct across the call to RISCOS_Start (for the beagleboard I just store it in the 64K of on-chip SRAM, since RISC OS currently doesn’t touch that memory) |
Michael Grunditz (467) 531 posts |
I have two targets now , and 3 more to come this summer , so the selection code fits well. Where are those set ? I am running the HAL as a pure binary image, so no uImage stuff around it. BBBBoooooaaaarrrrrdddd ccccooooonnnfffffiiiigggg===EEEEEEEfffffiiiiikkkaaaaaaMMMMXXXEEEEEEFFFFFIIIIIKKKKKAAAMMMMMMXXXX :) Right but wrong, the EfikaMX string is “correct” so I guess the selection worked. |
Jeffrey Lee (213) 6048 posts |
Those are what u-boot passes to any uImage it starts. The OMAP ROM supports two different boot methods – the ‘direct boot’ via the selectconfig jump table at HAL_Base, or the uImage boot via an entry point at 0×64 (which branches to the selectconfig_linux code). The selectconfig_linux code only pays attention to R1, so you needn’t worry about setting anything else. There’s a RISC OS port of mkimage on riscos.info. At some point I might have a go at integrating it into the build system, but for now it’s done as a seperate step by SDCreate, since it’s only the TouchBook that ‘needs’ things to be uImages. |
Michael Grunditz (467) 531 posts |
I have fixed the serial output and I now works on the other HAL:s. I want to try to start the kernel and therefore I have tried to set up a haltable with just one HALEntry. However the HALEntry macro bombs on assert. OMAP has SDRC which the i.mx doesn’t. But for now , I skip most checks and just assume that our computers aren’t modified. Latest serial output: EFIKAMX HAL init |
Jeffrey Lee (213) 6048 posts |
A few things to bear in mind:
|
Michael Grunditz (467) 531 posts |
I am inside RISCOS_Start now , thats what I wanted to check , if memory allocation worked , and it seems like it does. Now off to write HAL_IRQ* .. |
Michael Grunditz (467) 531 posts |
I get a crash in : Subtractv1v2fromRAMtable right in : Maybe I do something wrong before addram. Is there anything more than having , startaddress in a2 and endaddress in a3 before calling OS_AddRAM ? |
Michael Grunditz (467) 531 posts |
Any comments on this ? |
Jeffrey Lee (213) 6048 posts |
Whoops, must have missed that question the first time round. Remember that you can always check the wiki, or the kernel sources, when trying to work out how things should work. For OS_AddRAM, the parameters are as follows:
The final important thing to remember is the stack. Before the first call so OS_AddRAM you need to make sure you’ve got the stack pointer set up, either pointing to an area of RAM which RISC OS won’t be told about, or pointing to 4K within the first RAM block. |
Michael Grunditz (467) 531 posts |
Ok , I think I have OS_AddRAM right .. so it has to be something else that is causing the crash in OS_Start mentioned above. I will do som register dumps and see if I can find anything. The first thing I like to commit is some more debug functions , that saves and restores the registers etc .. :) |
Trevor Johnson (329) 1645 posts |
Michael, for anyone1 wanting to help with testing/debugging, would it be helpful if they were to purchase this debug board too? 1 Note that I’m not offering to do so myself just yet. |
David Boddie (1934) 222 posts |
If anyone was still interested in this hardware but didn’t want to spend too much just to experiment with it, you might be interested to know that NewIT has it on sale at the moment: EFIKA MX Smartbook 3G The Linux distro supplied with it is ancient. I tried running Timothy’s Linux port of RISC OS on a later distro but didn’t get very far. Anyway, perhaps someone will try to start a new native port, or even continue an existing one with a spare machine. :-) |
Michael Grunditz (467) 531 posts |
Hi I am considering restarting this with the i.MX6 port as a base. They are quite similar when it comes to IPU and how things are organised. But my top priority is RK3288 now. It can probably be used on RK3288 based chromebooks later on. |
David Boddie (1934) 222 posts |
I’m not familiar with kernel programming but it seems that the FreeBSD kernel shares a fair amount of code between i.MX5 and i.MX6. I was able to boot a recent FreeBSD system on the Smartbook with only minor changes, so it sounds like you have a good plan. :-) |
Pages: 1 2