Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => iMX233 => Topic started by: Lukas Mistr on October 09, 2014, 05:30:56 PM

Title: problem with starting ARCHLinux
Post by: Lukas Mistr on October 09, 2014, 05:30:56 PM
I have a board olinuxino maxi  and I have created SDcard with archlinux and everything works. Now I have created a custom board adapted as assorted specifications. When starting it gets stuck and do not know where to look for the error. Could you give me some advice?

PowerPrep start initialize power...
Battery Voltage = 2.17V
No battery or bad battery                                       detected!!!.Disabling battery                                   voltage measurements./r/nLLCSep 19 201201:24:06
EMI_CTRL 0x1C084040
FRAC 0x92926192
init_ddr_mt46v32m16_133Mhz
power 0x00820710
Frac 0x92926192
start change cpu freq
Title: Re: problem with starting ARCHLinux
Post by: mbergmann on October 10, 2014, 09:19:41 AM
Hard to help here, you are not very specific ....

You made a custom  board? Same components as the Olimex one? Same Layout?

Did you checked your RAM prior to running the OS?

Is 'start change cpu freq' the last line you can see?

Regards

Mike




Title: Re: problem with starting ARCHLinux
Post by: Lukas Mistr on October 10, 2014, 11:50:24 AM
Yes I made my own board which is very similar olinuxinu maxi. The main change is the addition GPS chip and chip FT2232D. Boot mode, I set as the maxi Olinuxino (D03-1, D02-0, D01-0, D00-1). I also remade the fuses according to instructions and was dropped. The terminal accrued me a few lines and the last thing was to see the 'start change cpu freq'.

How do I check RAM Prior?
Title: Re: problem with starting ARCHLinux
Post by: mbergmann on October 10, 2014, 12:10:41 PM
I assume you already got the imx-bootlet sourcecode of your image, the corresponding cross-compiler and a working build environment ;-)

Your board is booting in different steps described in the linux.bd file:

power_prep="./power_prep/power_prep";
sdram_prep="./boot_prep/boot_prep";
linux_prep="./linux_prep/output-target/linux_prep";
zImage = "../linux/arch/arm/boot/zImage";


It seems you are booting until the end of sdram_prep. Therefore I assume there is something wrong with your RAM.

If you open

.\imx-bootlets\boot_prep\init-mx23.c

you will find a simple mem test at the end of the file:


#if 0
/*Test Memory;*/
printf("start test memory accress");
for (i = 0; i < 100; i++)
*pTest++ = i;

pTest = (volatile int *)0x40000000;

for (i = 0; i < 100; i++) {
if (*pTest != (i)) {
printf("0x%x error value 0x%x\r\n", i, *pTest);
}
pTest++;
}
#endif


change the '#if 0' to '#if 1', recompile the bootlet and write it to your card.

Is this working? What happens at the RAM test?
You may adjust the test area a little bit.

Regards

Mike

Title: Re: problem with starting ARCHLinux
Post by: Lukas Mistr on October 10, 2014, 01:54:47 PM
These files can not be found. I use sdcard bought for olinuxinu with OS-archlinux 2.6.38-8 +. This card works for me without problems on Olinuxino board
Title: Re: problem with starting ARCHLinux
Post by: mbergmann on October 10, 2014, 02:25:55 PM
QuoteThese files can not be found.

The source is not on the boot card.

As I said before:

QuoteI assume you already got the imx-bootlet sourcecode of your image, the corresponding cross-compiler and a working build environment

You need imx-bootlets-src-10.05.02.tar.gz, which is the source for the bootlets of the Olimex card.

Check out Christians post about building this stuff:

http://www.jann.cc/2012/08/23/building_a_kernel_3_x_for_the_olinuxino_from_sources.html#bootlets

Regards

Mike
Title: Re: problem with starting ARCHLinux
Post by: Lukas Mistr on October 14, 2014, 03:44:42 PM
zkoušel jsem  to s linuxem který obsahuje u-boot viz:
http://archlinuxarm.org/platforms/armv5/olinuxino
i vypisuje to pouze HTLC a neustále je opakuje :

HTLC HTLC HTLC HTLC HTLC HTLC HTLC HTLC HTLC
Title: Re: problem with starting ARCHLinux
Post by: mbergmann on October 14, 2014, 04:04:42 PM
Sorry I do not speak Czech (is it Czech ?) so please keep at English.

HTLC is the printout of the iMX233 Boot-ROM code. 'HTLC' means:

HAB (High Assurance Boot)
IVT (Check the Image Vector Table)
Load (Load a bootlet)
Call (Call a bootlet)

so, you system is booting and restarts after calling the first bootlet. Most likely the image you are booting from is faulty or not exactly for your board.

Regards

Mike




Title: Re: problem with starting ARCHLinux
Post by: Lukas Mistr on October 14, 2014, 04:09:44 PM
Sorry
I tried it with Linux that contains u-boot, see:
http://archlinuxarm.org/platforms/armv5/olinuxino
It also lists only HTLC and constantly repeated:

ok i tried repeat u-boot
Title: Re: problem with starting ARCHLinux
Post by: Lukas Mistr on October 27, 2014, 11:12:08 AM
I have now solved the problems with the board and found problems with the power supply. I would ask that I use different SDRAM and it is IS43R16320D-6LTI if it is full compatible with the card at olinuxina HY5DU121622D (L) TP. Otherwise I have two different systems and they stuck me in the following steps.

1.
prefetch Abord
r14_HTLCLC
prefetch Abord
r14_HTLCLC
prefetch Abord
r14_HTLCLC
(repeat...)

2.

HTLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFC
PowerPrep start initialize power...
Battery Voltage = 2.17V
No battery or bad battery                                       detected!!!.Disabling battery                                   voltage measurements./r/nLLCSep 19 201201:24:06
EMI_CTRL 0x1C084040
FRAC 0x92926192
init_ddr_mt46v32m16_133Mhz
power 0x00820710
Frac 0x92926192
start change cpu freq
hbus 0x00000003
cpu 0x00010001
LLLLLLLFCLJ
prefetch Abord
r14_HTLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFC
PowerPrep start initialize power...
Battery Voltage = 2.17V
No battery or bad battery                                       detected!!!.Disabling battery                                   voltage measurements./r/nLLCSep 19 201201:24:06
EMI_CTRL 0x1C084040
FRAC 0x92926192
init_ddr_mt46v32m16_133Mhz
power 0x00820710
Frac 0x92926192
start change cpu freq
hbus 0x00000003
cpu 0x00010001
LLLLLLLFCLJ
prefetch Abord
r14_HTLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFC
(repeat...)
Title: Re: problem with starting ARCHLinux
Post by: mbergmann on October 27, 2014, 12:02:05 PM
Hi Lukas,

I'm not sure what you are asking, so I'm guessing.

If you want to check if your new RAM is 100% compatible to the Hynix on the Olimex board you have to check the datasheet of your RAM.

But the fact that you are having prefetch aborts indicates that your RAM needs adjustment of the RAM settings.

There are some examples for mt46h32m16lf in init-mx23.c

Did you checked the RAM as discussed before?
Did you tried some more conservative RAM settings (e.g. lowering the clock)?

IMHO trying different boot images will not solve your problems. Much more promising would be to start with a simple bare metal boot image, doing some of the init of the hardware and testing the results.

Regards

Mike
Title: Re: problem with starting ARCHLinux
Post by: Lukas Mistr on October 29, 2014, 10:42:09 AM
I now everything works. the problem was one way to memory. I would like to ask if there is any simple program to test the external RAM memory.
Title: Re: problem with starting ARCHLinux
Post by: mbergmann on October 29, 2014, 11:11:10 AM
Great you got your system up and running.

You may have a look into my blog post regarding simple RAM speed tests on Linux:

http://blog.bones-embedded.ch/simple-speed-tests-of-sd-card-and-ram-on-embedded-linux/

Based on this information you may do a simple RAM test, too, by writing meaningful data instead of zeros and testing the result.

Regrads

Mike