Hello,
I am currently designing a board based on a i.MX28 and I have some questions:
1) As I am working under Linux and MfgTools (Mfgtools-Rel-1.6.2.032) only provides Windows binary, is the usb_loader tool (git repo git://github.com/boundarydevices/imx_usb_loader) works with i.MX28 to program SPI memory ?
1a) If yes, does it works with SPI NAND (Winbond W25X series) or does usb recovery mode only support SPI-NOR ?
1b) Do you have any config file for usb_loader to program SPI flash?
2) For the PSWITCH pin, can this pin directly linked to VDDXTAL at power-up in running mode.
To first-time program SPI flash memory, I will force PSWITCH pin to VDDIO_3V3 at power-up and then apply VDDXTAL (using jumper) before resetting board to access newly programmed bootloader
3) Does any Winbond W25X SPI flash memories work or only W25X10/W25X80 work ?
Thank you for your help.
Best regards,
Gaëtan.
Solved! Go to Solution.
By reading MXSSB, a simple replacement for elftosb2 | DENX Computer Systems , I convert bin to sb with -v argument
$ ./mxssb/mxssb -c ./mxssb/mxsimage.mx28.cfg -o ./u-boot/spl/u-boot-spl.sb -v
$ ./mxsldr/mxsldr u-boot/spl/u-boot-spl.sb
and now I have this on Debug UART from BootROM
HTLLC
Which means that u-boot is executed but I have nothing more from u-boot on Debug UART
Fabio,
I have build u-boot using these steps (both toolchains do not work):
#generic Tool chain from Linaro
#PATH=/opt/cross/arm/gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux/bin:$PATH
#PREFIX=arm-linux-gnueabihf-
#Toolchain for i.MX27
PATH=/opt/cross/arm/imx27-ctng-gcc_4.5.3-libc_2.11.2/arm-unknown-linux-gnueabi/bin:$PATH
PREFIX=arm-unknown-linux-gnueabi-
make -j8 ARCH=arm CROSS_COMPILE=$PREFIX HOSTCC=gcc mrproper
make -j8 ARCH=arm CROSS_COMPILE=$PREFIX HOSTCC=gcc mx28evk_defconfig
make -j8 ARCH=arm CROSS_COMPILE=$PREFIX HOSTCC=gcc
Then I upload image to i.MX28 but it does not work
$ ./mxsldr/mxsldr u-boot/spl/u-boot-spl.bin
When the image is loaded, H is display on
If I convert bin image to sb using mxssb (git://git.denx.de/mxssb.git)
$ ./mxssb/mxssb -c ./mxssb/mxsimage.mx28.cfg -o ./u-boot/spl/u-boot-spl.sb
$ ./mxsldr/mxsldr u-boot/spl/u-boot-spl.sb
Nothing is displayed.
Regards,
Gaëtan.
ps:I can not generate the specific toolchain using fsl-community-bsp (from http://freescale.github.io) because I do not have enough space on computer to build all the stuff. But normally, Toolchain for i.MX27 is valid for i.MX28. This is the same core, isn't it ?
You should load u-boot.sb, not u-boot-spl.sb.
No need to do any conversion, just build it like 'make u-boot.sb' like in the sequence I sent you.
Also, are you able to get mainline U-boot booting from a SD card? You could try that as first step to make sure you have the correct toolchain.
Hi Gaetan
1. afaik usb_loader was developed by boundarydevices and supports only i.MX6
2. yes
3. support for new flash can be added to BSP, also suggest to look at below links
https://community.freescale.com/docs/DOC-93632
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Igor,
1. So which tool under Linux can I use to flash Winbond W25X10 SPI flash
through i.MX28 in USB recovery mode under ?
Thank you,
Gaëtan.
Hi Gaetan
please follow procedure below
https://community.freescale.com/docs/DOC-93632
Best regards
igor
Igor,
My problem is not how to compile i.MX28 target binaries (u-boot, kernel,
rootfs) nor how to tell u-boot how to boot itself or kernel on SPI but
how to flash u-boot image into SPI NOR Flash using USB recovery mode of
i.MX28 under Linux. May be I miss something in your link, but I do not
see anything about this.
MFGTool only works under Windows.
Using SD card (or any other boot mode to indirectly flash SPI NOR) is
not possible as there is only a SPI NOR and a eMMC.
The only solution will be the through JTAG but I will have to write the
OpenOCD script to initialize SPI controller (and I do not event know if
I will be able to read u-boot binary and send data bytes per bytes).
Best regards,
Gaëtan.
Hello,
I am back few months later
The board boot with provided SD card but when I try to boot from USB with SD card removed it fails. The goal is to have a console by loading a u-boot image from USB OTG in recovery mode and program SPI NOR and eMMC.
When I load a u-boot.sb image with mxsldr, nothing appears on debug uart when upload is done.
Is that normal ? I have i.mx28evk board and here what i have tried with Boot Mode set to USB0 ("0000")
$ mxsldr ./L2.6.35_1.1.0_130130_images_MX28/imx28_ivt_linux.sb
I do the same with :
./L2.6.35_1.1.0_130130_images_MX28/imx28_ivt_uboot.sb
./L2.6.35_1.1.0_130130_images_MX28/imx28_uboot.sb
./L2.6.35_1.1.0_130130_images_MX28/imx28_linux.sb
If it is not the correct sequence, what is the right way to proceed, is there a special u-boot configuration to build ?
Which is the correct u-boot configuration and the repo/branch to use ?
Thank you for your help.
Best regards,
Gaëtan.
Please check the mxsldr README:
git.denx.de Git - mxsldr.git/blob - README
And please try it with a mainline U-boot.
If you still see issues, then please report them to the U-boot list.
Regards,
Fabio Estevam
Dear Fabio,
I have read the README of-course. My host Linux kernel is 3.12.1-smp. HID are correctly detected and node is created and I checked Linux kernel sources and patches are already aplied.
$ taill /var/log/messages
Sep 10 08:33:14 localhost kernel: usb 2-1.1: new high-speed USB device number 5 using ehci-pci
Sep 10 08:33:14 localhost kernel: usb 2-1.1: New USB device found, idVendor=15a2, idProduct=004f
Sep 10 08:33:14 localhost kernel: usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Sep 10 08:33:14 localhost kernel: usb 2-1.1: Product: ROM Recovery
Sep 10 08:33:14 localhost kernel: usb 2-1.1: Manufacturer: Freescale,Inc.
Sep 10 08:33:14 localhost mtp-probe: checking bus 2, device 5: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1"
Sep 10 08:33:14 localhost mtp-probe: bus: 2, device: 5 was not an MTP device
Sep 10 08:33:14 localhost mtp-probe: checking bus 2, device 5: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1"
Sep 10 08:33:14 localhost mtp-probe: bus: 2, device: 5 was not an MTP device
Sep 10 08:33:14 localhost kernel: hidraw: raw HID events driver (C) Jiri Kosina
Sep 10 08:33:14 localhost kernel: usbcore: registered new interface driver usbhid
Sep 10 08:33:14 localhost kernel: usbhid: USB HID core driver
Sep 10 08:33:14 localhost kernel: hid-generic 0003:15A2:004F.0001: hiddev0,hidraw0: USB HID v1.10 Device [Freescale,Inc. ROM Recovery] on usb-0000:00:1d.0-1.1/input0
I have also tried with Debian 8 Kernel 3.16.0 but same behaviour.
Here is what mxsldr returns :
$ ./mxsldr/mxsldr ./L2.6.35_1.1.0_130130_images_MX28/imx28_uboot.sb
Detected: i.MX28
Chip ID: 0x2800
Chip Revision: 0x0001
ROM Version: 0x0101
Protocol Version: 0x0100
$ echo $?
0
If I run mxsldr again nothing appends. No new message appears on Debug UART or in /var/log/messages. I have to press reset to be able to run mxsldr "correctly".
(All tests done with official i.MX28evk board)
Thank you
Best regards,
Gaëtan.
Please try mainline U-boot.
Regards,
Fabio Estevam
Fabio,
I just compile u-boot from mainline repository (git.denx.de Git - u-boot.git/summary ) using imx28evk_defconfig and send it with mxsldr with Boot Mode switches set to 0000 and when mxsldr returns, u-boot must display text on Debug UART, that's it ?
Best regards,
Gaëtan.
Yes, just tested and it is working fine.
Build U-boot:
make mrproper
make mx28evk_defconfig
make u-boot.sb
Copy u-boot.sb to the mxsldr dir.
Set the jumpers to 0 0 0 0.
Connect USB cable from mx28evk to the host PC.
Power up the board.
sudo ./mxsldr u-boot.sb
Detected: i.MX28
Chip ID: 0x2800
Chip Revision: 0x0001
ROM Version: 0x0101
Protocol Version: 0x0100
and then U-boot messages come up:
=> HTLLCLLC | ||
U-Boot 2015.10-rc3-dirty (Sep 10 2015 - 12:30:16 -0300) | ||
CPU: Freescale i.MX28 rev1.2 at 454 MHz | ||
BOOT: USB #0 | ||
SPI: ready | ||
DRAM: 128 MiB | ||
NAND: 0 MiB | ||
MMC: MXS MMC: 0 | ||
Video: MXSFB: 'videomode' variable not set! | ||
In: | serial | |
Out: serial | ||
Err: serial | ||
Net: FEC0 [PRIME], FEC1 | ||
Hit any key to stop autoboot: 0 |
=>
Thank you Fabio, it works.
make u-boot.sb was missing.
I used mxssb to generate sb file but it didn't worked.
And for sb images provided in Linux Binary Demo Files I have to used ivt files to have some text on Debug UART (L2.6.35_1.1.0_130130_images_MX28/imx28_ivt_uboot.sb or L2.6.35_1.1.0_130130_images_MX28/imx28_ivt_uboot.sb) ?
My mistake sorry.
Best regards,
Gaëtan.
Hi Fabio,
Thank a lot for your answer.
Best regards,
Gaëtan.