Hello,
I'm trying to use mainline kernel on mx28evk.
The kernel boots by following this guide: http://www.imxdev.org/wiki/index.php?title=Running_a_mainline_kernel_on_a_MX28EVK_board
However there is no USB support and I can not enable USB support in the kernel menuconfig.
USB supported by fsl-ehci, which is CONFIG_USB_EHCI_FSL. The main problem is this option is not available in menuconfig for MXS platform. Even EHCI HCD (USB 2.0) support is not available at all. These options are hidden for mx28evk.
Has anyone got an idea how to make USB work in mainline kernel? Or maybe you already have compiled mainline kernel with all supported devices for mx28evk.
Kernel I'm trying to run: 3.3.4 , 3.4.0-rc6 (both with same results)
Solved! Go to Solution.
USB is supported in mainline for mx23 and mx28 now.
Regards,
Fabio Estevam
Hello Andreas,
I am trying to get 3.7-rc1 running on my mx28evk, can you tell me how you got it working ?
On my setup it runs to the point of uncompressing the kernel and then nothing.
I have set console=ttyAMA0 per other posts, but still no luck. I see no console output beyond this step.
Which uboot build are you using ?
Thanks for any help you can offer.
-Randy
Hello Randy,
we do not run the kernel on the MCIMX28EVK by Freescale, we use the M28 which is a SoM. You can find more info on M28 under http://www.denx-cs.de/?q=M28
M28 is currently supported by U-Boot 2012.07 and Linux 3.7rc1 which run out of the box.
Best regards
Andreas
Thanks Andreas.
Based on my googling, it seems that the linux kernel 3.7-rc1 should run out of the box on the freescale MX28EVK as well (I assume the M28 SoM is based on the same refence design).
I am using the same U-Boot I used to boot the 2.6.35 kernel so maybe that is my issue, and I need to update U-Boot ?
Yes, mx28evk is supported in the mainline kernel.
Please upgrade to the latest U-boot 12.10. The old U-boot does not support device tree kernel booting.
You need also to build the mx28 device tree file:
make imx28-evk.dtb
and the kernel as the usual way: make -j4 uImage
If you use TFTP for loading the kernel you can do:
tftp 0x42000000 uImage; tftp 0x41000000 imx28-evk.dtb; bootm 0x42000000 - 0x41000000
Regards,
Fabio Estevam
Is it possible to run 3.7-rc2 without U-boot?
I've done everything the same as for 3.6 but 3.7-rc2 does not boot.
Stuck on:
Uncompressing Linux... done, booting the kernel.
With 3.6 it boots just fine without any changes.
Commands I use to create SD-card after kernel is compiled through ltib:
./ltib -p boot_stream.spec -f
./mk_mx28_sd -b /dev/sdb
Andrey,
Yes, it is possible to boot 3.7-rc2 directly without a bootloader.
3.7-rc2 only boots from device tree (uImage + .dtb). Previous kernel versions still had the board file and only required uImage.
If you cannot use a bootloader, you should do the following:
make mxs_defconfig
make menuconfig, Boot options-->
and select the following options
[*] Use appended device tree blob to zImage (EXPERIMENTAL)
[*] Supplement the appended DTB with traditional ATAG information│
Pass your kernel command line via menuconfig:
Kernel command line type (Use bootloader kernel arguments if available)
Build the kernel:
make -j4 (no need to use uImage here)
cat arch/arm/boot/zImage arch/arm/boot/imx28-evk.dtb > arch/arm/boot/zImage_dtb
sudo cp arch/arm/boot/zImage_dtb ~/sdk1012/ltib/rootfs/boot/zImage
And then use this zImage the same way you used to do before (./ltib -p boot_stream.spec -f , etc). This zImage contains both uImage + dtb.
For development I think it is much easier to work with a bootloader though, so I can quickly deploy my new kernel via TFTP.
Regards,
Fabio Estevam
Hello Fabio,
If I would start now trying to build the mainline kernel for imx28, should I best pick v3.7 then (and no longer 3.7rc1 or rc2)?
Regards,
Ruud
Ruud,
You can use 3.8 now that was realeased on Monday.
Regards,
Fabio Estevam
Fabio,
I did build kernel 3.7.8 and use u-Boot 2013.01 to load this via TFTP. The u-boot part seems to be OK, but the booting of the kernel fails (stops after "Uncompressing Linux... done, booting the kernel."). I enabled Kernel low-level debugging and the Early printk and this is what I get:
Uncompressing Linux... done, booting the kernel.
Error: unrecognized/unsupported machine ID (r1 = 0x000009e3).
Available machine support:
ID (hex) NAME
ffffffff Freescale i.MX28 (Device Tree)
ffffffff Freescale i.MX23 (Device Tree)
Please check your kernel config and/or bootloader.
It seems to me that the u-Boot sets the machine ID correctly (0x9e3 = 2531 = MACH_TYPE_MX28EVK), but for some reason the available ID's in the kernel image are set to ffffffff. I did try a "make imx28-evk.dtb", but this reports the dtb being up-to-date. For both the u-Boot and the kernel I used the gcc-4.4.4 from the ltib toolchain to build. I earlier tried to build the kernel from the Buildroot environment (using CodeSourcery toolchain), but this gave me the same result.
Would you (or anyone else) have an idea what goes wrong here?
Thanks,
Ruud
====================================================================================
Update: just found out that the u-Boot should load the "imx28-evk.dtb". The boot_fdt was set to "try" and for a netboot it skips this step (with the default config). I just set it to "yes", copied the dtb to my tftpboot and now it boots... :smileyblush:
Until this week I was not aware of this "FDT" feature. I will try and find out if this is something we should use for our custom board in the future. Any advice is welcome...
Message was edited by: Ruud Commandeur
Mainline U-boot is able to load a uImage-only kernel, such as the 2.6.35 or a dtb + uImage from recent kernels.
You need to tell U-boot that you will load dtb + uImage, by doing "setenv boot_fdt yes"
Then you need to see U-boot retrieving uImage and dtb files. On the example below I am retrieving uImage and dtb via TFTP:
Fabio,
it works, thank you.
Best Regards,
Andrey
Fantastic, this is very helpful, thanks Fabio !
USB is supported in mainline for mx23 and mx28 now.
Regards,
Fabio Estevam
Hello Steve,
thank you for your reply. I guess for now I have to stick with old Freescale kernel.
It's good to know that mx28 might be supported in future kernel versions.
Andrey
Hello tcpjunky,
I am also trying to get 3.4-rc6 to run on the eval board. The issue with USB is that it isn't implemented yet in the mainline kernel. I digged around a bit on the internet and found a few patches that implement that feature but to me it looks like they are still in an early development.
I haven't tested them myself because USB is just a nice-to-have feature for my current work and I have loads of other things to do ;) . I don't have all the links I found at hands but a good starting point for reading could be http://www.spinics.net/lists/linux-usb/msg61485.html .
If I remember correctly the developers aim to get USB on mx28 in with kernel version 3.5 but I haven't followed the appropriate lists lately and don't know if this is still accurate.
-Steve