MX28 Custom Board: how start

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MX28 Custom Board: how start

Jump to solution
2,426 Views
andreaguglielm1
Contributor II

Hi everybody.

I'm developing software on a iMX28 custom board (it's not my project) with some differences from the mx28evk:

- Debug UART is on AUART0-CTS/RTS

- UART2 and UART0  connected to SIM900 (a GSM module)

- SSP2 connected to a RFM12B (a rf module).

- Some PIN used as GPIO to control LEDs and pins of the modules i talked

- board powered by a LiPo battery or by USB (USB needed to charge the battery)

- only one USB port used to program.

- we have no JTAG port

the LCD is a 480x272x16, the memory, and NAND are bigger.

Who design the board give me some software to start with: a uboot bootlet, an updater and a ready profile used with MFG-tool.

I'm able to modify kernel 2.6.35 (i start to studying how use kernel 3.6.8 ) to develop the RFM12B driver (i need to manage the interrupt signal and send correct commands by SPI) and make the needed changes and using ptxdist to prepare the root file system. To make a board fully operative i must use a long procedure:

-use MFG Tool to flash bootlet and linux kernel image

-connect debug UART to set U-Boot environment vars to instruct kernel to check rootfs in a external USB memory

-by linux shell (by Debug UART) send the command to copy the rootfs from USB memory into NAND

-restart the board to re-set U-Boot environment vars for NAND boot.

A so long procedure it's a waste of time and i need to speed this up (i know some change to procedure can help, but it's not this my question).

I start rebuild the updater from the kernel code i use, and it work...not well:

The uboot bootlet (with command kobs-in) and the kernel (in partition mtd2) are copied correctly in NAND.

I can erase all partitions (mtd3 and 4 respectively used for root fs and data), but i don't understand how flash the rootfs (i tried use dd command, mounting the mtdblock3 and attach with ubi to simpli copy or decompress files). I receive a strange error (65280) when i try to touch this partition.
I try to connect debug UART, but, surprise, i have no output. So i try to connect my UART to other debug pins, but i have no messages. I try the updater the board designer give me and i got same result. I read somewhere the updater is a modified version of kernel, in fact the NAND partitions are the same than mine (the updater the board designer give me have only 3 partition).


An other thing i try to do it's the customization of u-boot bootlet to change default u-boot environment variables, but a simply rebuild of source code for imx28evk doesn't work, i try to change the pin use, but my bootlet seems not work at all.

I check the power prep source code to see its debug messages, but i don't find where pin use is setted so i insert 2 row of code to set debug uart just before the first printf.

I'm writing from my private home tormented by this problem (this is only the last one of a long list of nasty problems in this damned board), tomorrow from work station, i'm able to give details. For now any advice is welcome (sorry for my poor english).

Labels (2)
1 Solution
1,124 Views
andreaguglielm1
Contributor II

I found the problem

was the wrong DDR2 configuration

The ivk use a 8 bank memory change the setting to 4 bank in boot_prep and set 64 MB in linux prep and in U-Boot goes all alright (updater and start from UBoot).

Remain two questions

1) in my board is mounted a micron FPGA chip marked D9MDK, searchin the web i found is a 1 GB, 8 bank memory, 16 bits. If i try to set 8 bank and/or set the RAM dimension in linux prep or in U-Boot the kernel boot doesn't start or stop his execution without messages.

So, what's wrong? I find the wrong datasheet or what?

The only think i can see in schematic the address pin A15 of DDR2 (pin V7) is unconnected (the imx28 EMI module have only 15 bit address bus).

Also the RDQS/NU (pin H2) is unconnected. Other pins are correctly connected to the micro, i think (never used this things, i only read the datasheet).

2) i change NAND file system from jffs2 to ubi.

The NAND is a 2 GB one (linux says so, the NAND is a Samsung K9WAG081D and datasheet say 4GB)

The early tests was on a NAND partitioned:

mtd0: 20 MB U-Boot

mtd1 20 MB u-boot environment

mtd2 20 MB kernel

mtd3 60 MB rootfs

mtd4 data (almost unused)

After ubiformat on mtd4 the board programmed by MFGTool doesn't start anymore. Always appear as HID device when connected to PC.

I don't remember what happen if i made a flash_eraseall to it. Some boards was unprogrammable or became unprogrammable after some time, but i think was a NAND failure and flash_eraseall to mtd4 was not more executed for time reasons (it takes a lot time, at the time we doesn't need this space and i had a lot of other problems) so i can't say anything about this.

I read in kernel source comments (gpmi-nfc-mil.c ) the presence of a reminder at start of every NAND block, so i make different partition table splitting mtd4 :

800 MB, 200 MB unused (literally skipped, not exist in kernel partition table), 800 MB, last unused.

It's a dirty thing, but it work. I have now a 60 MB rootfs ubi partition, 2 800MB ubi partitions and the system finish boot in only 1 minute, versus a 2 minute boot using jffs2.

My boss is happy for now, but i like someone say me if i move in the right direction and it'snt only a lucky shoot

View solution in original post

7 Replies
1,124 Views
artyeffem
Contributor II

I'm also trying to get the U-boot console redirected to AUART0.  I've updated the PINMUX and CONFIG_PL01x_PORTS, without success.  I can only get a console on DUART using the MXS_UARTDBG_BASE and default PINMUX per EVK.  Did you find a solution to this part of your initial posting?

0 Kudos
1,125 Views
andreaguglielm1
Contributor II

I found the problem

was the wrong DDR2 configuration

The ivk use a 8 bank memory change the setting to 4 bank in boot_prep and set 64 MB in linux prep and in U-Boot goes all alright (updater and start from UBoot).

Remain two questions

1) in my board is mounted a micron FPGA chip marked D9MDK, searchin the web i found is a 1 GB, 8 bank memory, 16 bits. If i try to set 8 bank and/or set the RAM dimension in linux prep or in U-Boot the kernel boot doesn't start or stop his execution without messages.

So, what's wrong? I find the wrong datasheet or what?

The only think i can see in schematic the address pin A15 of DDR2 (pin V7) is unconnected (the imx28 EMI module have only 15 bit address bus).

Also the RDQS/NU (pin H2) is unconnected. Other pins are correctly connected to the micro, i think (never used this things, i only read the datasheet).

2) i change NAND file system from jffs2 to ubi.

The NAND is a 2 GB one (linux says so, the NAND is a Samsung K9WAG081D and datasheet say 4GB)

The early tests was on a NAND partitioned:

mtd0: 20 MB U-Boot

mtd1 20 MB u-boot environment

mtd2 20 MB kernel

mtd3 60 MB rootfs

mtd4 data (almost unused)

After ubiformat on mtd4 the board programmed by MFGTool doesn't start anymore. Always appear as HID device when connected to PC.

I don't remember what happen if i made a flash_eraseall to it. Some boards was unprogrammable or became unprogrammable after some time, but i think was a NAND failure and flash_eraseall to mtd4 was not more executed for time reasons (it takes a lot time, at the time we doesn't need this space and i had a lot of other problems) so i can't say anything about this.

I read in kernel source comments (gpmi-nfc-mil.c ) the presence of a reminder at start of every NAND block, so i make different partition table splitting mtd4 :

800 MB, 200 MB unused (literally skipped, not exist in kernel partition table), 800 MB, last unused.

It's a dirty thing, but it work. I have now a 60 MB rootfs ubi partition, 2 800MB ubi partitions and the system finish boot in only 1 minute, versus a 2 minute boot using jffs2.

My boss is happy for now, but i like someone say me if i move in the right direction and it'snt only a lucky shoot

1,124 Views
YixingKong
Senior Contributor IV

It is good to hear that you got the issue fixed. I will close the DI.

0 Kudos
1,124 Views
YixingKong
Senior Contributor IV

Does Otavio Salvador's answer help you? If yes, please mark his answer with Correct Answer or Helpful Answer.

Thanks,

Yixing

0 Kudos
1,124 Views
andreaguglielm1
Contributor II

No.I have no source code of U-Boot and bootlets i use (if so i have no problems starting to modify this code and my problems should be different kind). I'm sure it is different from freescale's original one. There are some problems to get this source from board designers. Problems i don't want talk about.

For now i'm working on other problems.

So...

Nobody can help me to find a tutorial, a guide or something can help to develope for a custom board based on imx28?

I search web for days and i have no time to waste in experiments. i tried for few days to touch some parts, with some positive results, but not with a solution for all. I suppose the solution is hiding in some details.

0 Kudos
1,124 Views
OtavioSalvador
Senior Contributor II

It is not different, it is unlegal. This is GPLed code and your vendor needs to make them available or just make a complain in GPL Violations homepage - The gpl-violations.org project so people can go after them and enforce it is fixed.

0 Kudos
1,124 Views
OtavioSalvador
Senior Contributor II

I'd do a diff and check what the code different against original Freescale code and start from there; I'd also drop imx-bootlets and move to U-Boot mainline.

Good luck with your project.

Regards,    

0 Kudos