You could use a more recent kernel, such as 3.10 and aply the RT patches on top of it:
https://www.kernel.org/pub/linux/kernel/projects/rt/
Regards,
Fabio Estevam
Hi! Has there been any development on RTLinux on the MX25 / MX28?
Has anyone been able to construct a robust RTLinux system on these Freescale chips? (I do not see any Freescale chips listed in the 'tested RTLinux' platforms at https://rt.wiki.kernel.org/index.php/CONFIG_PREEMPT_RT_Patch#Platforms_Tested_and_in_Use_with_CONFIG...)
Jean-Pierre
Currently, I have Linux 3.2.60 with RT patch applied running in my i.MX25 custom board. This is what I did (I assume LTIB and compiler gcc-4.4.4 are installed):
1. Download kernel from https://www.kernel.org/pub/linux/kernel/
2. Download RT patch for linux-3.2.60 from https://www.kernel.org/pub/linux/kernel/projects/rt/
3. Change compiler in PATH:
Replace: /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/
By: /opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/
4. Set initial configuration:
# make imx_v4_v5_defconfig
5. Go to kernel configuration:
# make menuconfig
6. In Freescale MXC Implentations, select i.MX25 (all the other implementations must be unselected):
System Type --->
Freescale MXC Implementations --->
Freescale CPU family --->
(X) i.MX1, i.MX21, i.MX25, i.MX27
( ) i.MX3, i.MX6
( ) i.MX50, i.MX51, i.MX53
[*] Support MX25PDK (3DS) Platform
<*> Enable PWM driver
[ ] Enable MXC debug board(for 3-stack)
7. If you boot from Flash NAND, you have to edit the configuration file (.../linux-3.2.60/arch/arm/mach-imx/mach-mx25_3ds.c)
Add:
static struct mtd_partition mxc_nand_partitions[] = {
{
.name = "nand.bootloader",
.offset = 0,
.size = 3 * 1024 * 1024},
{
.name = "nand.kernel",
.offset = MTDPART_OFS_APPEND,
.size = 5 * 1024 * 1024},
{
.name = "nand.rootfs",
.offset = MTDPART_OFS_APPEND,
.size = 496 * 1024 * 1024},
{
.name = "nand.configure",
.offset = MTDPART_OFS_APPEND,
.size = 8 * 1024 * 1024},
{
.name = "nand.userfs",
.offset = MTDPART_OFS_APPEND,
.size = MTDPART_SIZ_FULL},
};
This partition table have to be set according your NAND size (mine is 512MB). I my case, rootfs is flashed at offset 0x800000 (i have 3MB for bootloader space and 5MB for kernel). You need to adjust this to your case.
Modify the struct mxc_nand_platform_data to add the partition table:
static const struct mxc_nand_platform_data mx25pdk_nand_board_info __initconst = {
.width = 1,
.hw_ecc = 1,
.flash_bbt = 1,
.parts = mxc_nand_partitions,
.nr_parts = ARRAY_SIZE(mxc_nand_partitions),
};
8. Compile kernel:
# make uImage
9. Apply RT patch. From the folder where linux-3.2.60 is:
# patch -p1 <../patch-3.2.60-rt87.patch
10. Go to kernel configuration again. Now, this can be selected:
Kernel Features --->
Preemption Model (Fully Preemptible Kernel (RT))--->
( ) No Forced Preemption (Server)
( ) Voluntary Kernel Preemption (Desktop)
( ) Preemptible Kernel (Low-Latency Desktop)
( ) Preemptible Kernel (Basic RT)
(X) Fully Preemptible Kernel (RT)
11. Finally, compile again the kernel.
# make uImage
This is the minimum you need to do to boot kernel. Later, you will need to modify configuration file to support all devices in your board.
Regards,
Fernando.