Project

General

Profile

Using PREEMPT_RT on MitySOM 5CSX Dev Board

Added by Jared Kirschner over 8 years ago

Context: My company recently purchased some MitySOM 5CSX Development Boards and would like to use them on a current project. This project likely has the need for a real-time operating system. I want to start by using Linux with the PREEMPT_RT patch.

It looks like Altera has some SoC FPGA LTSI branches available with the PREEMPT_RT patch: https://github.com/altera-opensource/linux-socfpga/tree/socfpga-4.1.22-ltsi-rt
- 4.1.22
- 4.1
- 3.10

If possible, I'd like to use at least Kernel version 3.14 to use the SCHED_DEADLINE scheduler. (Though, this isn't critical.)

It looks like Critical Link provides kernel implementations for the MitySOM-5CSX (http://support.criticallink.com/gitweb/?p=linux-socfpga.git;a=summary) for several kernel versions, the latest of which is 3.16. Unfortunately, none of those have the PREEMPT_RT patch, and none of those kernel versions has an actively maintained PREEMPT_RT patch (https://rt.wiki.kernel.org/index.php/Main_Page).

How difficult would it be to modify the Altera Linux SoC FPGA LTSI branches (4.1.22, 4.1, or 3.10) with the PREEMPT_RT patch to work on the MitySOM-5CSX development board? What files would I need to change?

This page (https://support.criticallink.com/redmine/projects/mityarm-5cs/wiki/Linux_Kernel) makes it sound like only a "new kernel configuration file and device tree settings file" are needed... but that isn't immediately obvious to me looking at the commits to the Critical Link MitySOM 5CSX Dev Board 3.16 branch (http://support.criticallink.com/gitweb/?p=linux-socfpga.git;a=log;h=refs/heads/socfpga-3.16), which seems to have been based off the Altera 3.16 branch in Oct 2014 and then includes changes specific to said dev board as well as some changes incorporated in the Altera 3.17 branch.

I appreciate any assistance or guidance you can provide.


Replies (34)

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by Daniel Vincelette over 8 years ago

Hello Jared,

I did a quick test here and was able to boot altera's 4.1.22 ltsi rt kernel using the MitySOM-5CSX dev kit. I used the socfpga_defconfig and socfpga_cyclone5_sockit.dts. I didn't do an extensive test but was able to boot and get an IP.

The large changes to the 3.16 Altera kernel that we've added, other than back porting fixes from Altera's newer kernels, are as follows:
- Enabled external VBUS for usb (http://support.criticallink.com/gitweb/?p=linux-socfpga.git;a=commit;h=43f8d3873bc015b0531d054c73a8a08e4184ed99)
- Separated the MDIO interface from the EMAC (http://support.criticallink.com/gitweb/?p=linux-socfpga.git;a=commit;h=2d463f6a51c84cb696c0f92ee953527307ea85af)
- Created defconfig/dts for our SOMs and dev kits

If you're planning on using USB in host mode you'll need to port the external VBUS change to 4.1.22, the MDIO change isn't needed unless you have multiple ethernet phys on the same MDIO interface.

You'll also want to look at our dtsi to get the i2c nodes for the on SOM i2c devices (rtc, eeprom, led controller): http://support.criticallink.com/gitweb/?p=linux-socfpga.git;a=blob;f=arch/arm/boot/dts/socfpga_mitysom5cs.dtsi;h=a02a7c18f5496ba0b916e26dc5278404b62a3881;hb=refs/heads/socfpga-3.16

Dan

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by Jared Kirschner over 8 years ago

Hello Dan,

I've been going through the instructions on the Wiki to get an SD card image of my creation working. I'm starting with the 3.16 kernel version provided by Critical Link to get a handle on the process of building an SD card image. I will then proceed to using the Altera 4.1.22 LTSI RT kernel using socfpga_defconfig and socfpga_cyclone5_sockit.dts. Then, once that is working, I will proceed with making the changes above.

In anticipation of using different kernels, I've been trying to build an SD card image without Yocto.

I succeeded in building the preloader and u-boot, and in building the Linux kernel (without Yocto) based on the instructions here: https://support.criticallink.com/redmine/projects/mityarm-5cs/wiki/Linux_Kernel. But to create the SD card image, I still need a root file system with the compiled dtb and kernel, and I see no documentation on the Wiki for doing this.

Did you build these components outside of Yocto? In which case, how did you build the root file system?
And, if instead you built the root file system + kernel via Yocto, how did you achieve that? I realize I could modify the MACHINE_DEFCONFIG and KERNEL_DEVICETREE fields in http://support.criticallink.com/gitweb/?p=meta-mitysom-5csx.git;a=blob_plain;f=conf/machine/mitysom-5csx-h6-4ya.conf;hb=refs/heads/dora, but I'm not sure how to get that configuration to be associated with Altera's repository for the linux kernel (so I can use 4.1.22 LTSI RT kernel next) rather than Critical Link's.

Thanks,
Jared

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by Daniel Vincelette over 8 years ago

Hello Jared,

That sounds like a perfect approach. For building the file system we do use yocto, which as you saw is pointed to use the 3.16 kernel. Now depending on how manual you want to do this I can suggest a few options.

Probably the most manual but probably quickest route:
Follow our instruction for building the file system with yocto (https://support.criticallink.com/redmine/projects/mityarm-5cs/wiki/Yocto_for_MitySOM-5CSX#Hob-Building-Yocto-from-a-GUI). Once you have the tarball of the file system created, replace the dtb and uImage with the 4.1.22 build you made out of yocto. And add any kernel modules to /lib/modules. This is the route I took when I did my quick testing earlier with the altera 4.1.22 branch.

Another route is alter our meta layer, so yocto will build altera's 4.1.22 kernel:
You'll need to make a new conf/machin/mitysom-h6-4ya.conf, this one will point to the socfpga_defconfig and the socfpga-4.1.22-ltsi-rt branch.
It should look something like:


#@TYPE: Machine
#@NAME: mitysom-5csx
#@DESCRIPTION: Machine configuration for Altera socfpga based systems

MACHINE_FEATURES = "serial rtc" 
DISTRO_FEATURES = " ${DISTRO_FEATURES_LIBC}" 
MACHINE_DEFCONFIG = "socfpga_defconfig" 
DEFAULTTUNE = "cortexa9hf-neon" 

require conf/machine/include/tune-cortexa9.inc

UBOOT_MACHINE = "mitysom-5csx_config" 
UBOOT_ENTRYPOINT = "0x00008000" 

KMACHINE = "socfpga_cyclone5" 
KERNEL_IMAGETYPE ?= "uImage" 
SERIAL_CONSOLE = "115200 ttyS0" 
UBOOT_LOADADDRESS = "0x00008000" 
KERNEL_DEVICETREE = "socfpga_cyclone5_sockit" 

IMAGE_FSTYPES ?= "tar.gz " 

EXTRA_IMAGECMD_jffs2 ?= "--pad --little-endian --eraseblock=0x10000 --pagesize=0x100" 
ROOT_FLASH_SIZE = "16" 

PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-altera" 
PREFERRED_PROVIDER_u-boot ?= "u-boot-altera" 
PREFERRED_PROVIDER_u-boot-mkimage ?= "u-boot-mkimage-altera" 
PREFERRED_VERSION_u-boot-altera ?= "2013.01.01" 
PREFERRED_VERSION_u-boot-mkimage-altera ?= "2013.01.01" 

PREFERRED_PROVIDER_virtual/kernel = "linux-mitysom-5csx" 
PREFERRED_PROVIDER_linux = "linux-mitysom-5csx" 
PREFERRED_PROVIDER_linux-libc-headers = "linux-libc-headers-mitysom-5csx" 
PREFERRED_PROVIDER_linux-libc-headers-dev = "linux-libc-headers-mitysom-5csx" 

PREFERRED_VERSION_linux-mitysom-5csx = "4.1.22-ltsi-rt" 
PREFERRED_VERSION_linux-libc-headers-mitysom-5csx = "4.1.22-ltsi-rt" 
PREFERRED_VERSION_linux-libc-headers-dev-mitysom-5csx = "4.1.22-ltsi-rt" 

Next you'll need to make 4.1.22-ltsi-rt version of the recipes-kernel/linux/linux-mitysom-5csx_3.16.bb and recipes-kernel/linux/linux-libc-headers-mitysom-5csx_3.16.bb.
So make a copy of them and call them linux-mitysom-5csx_4.1.22-ltsi-rt.bb and linux-libc-headers-mitysom-5csx_4.1.22-ltsi-rt.bb
linux-mitysom-5csx_4.1.22-ltsi-rt.bb:

DTB_SUBDIR="dts/" 
require recipes-kernel/linux/linux-mitysom-5csx.inc
SRC_URI = "git://github.com/altera-opensource/linux-socfpga.git;protocol=git;branch=socfpga-${PV}" 

linux-libc-headers-mitysom-5csx_4.1.22-ltsi-rt.bb:
require linux-libc-headers-mitysom-5csx.inc
SRC_URI = "git://github.com/altera-opensource/linux-socfpga.git;protocol=git;branch=socfpga-${PV} \
       file://0001-ptrace.h-remove-ptrace_peeksiginfo_args.patch \
       " 

What I'm pretty much doing here is changing the SRC_URI to use the altera repo and telling it to use the 4.1.22-ltsi-rt branch. Note, I haven't tested these changes but I'm pretty sure they should do what you're looking for.

Hope this is handy,

Dan

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by Jared Kirschner over 8 years ago

Hello Dan,

I proceeded to try to use Yocto to build the Altera 4.1.22 LTSI RT kernel based on your suggestions above.

Unfortunately, the compilation of the kernel is erroring out because of an incompatible GCC version. The following line is throwing the error: https://github.com/altera-opensource/linux-socfpga/blob/socfpga-4.1.22-ltsi-rt/arch/arm/kernel/asm-offsets.c#L53. The Dora release of Yocto (the release used in the Wiki examples) appears to be using GCC 4.8.1 by default (e.g., this was the output of /opt/poky/1.5.4/sysroots/x86_64=pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc --version), and the Altera 4.1.22 LTSI RT kernel (see previous Github link) requires that the GCC version not be within the range of 4.8.0 - 4.8.3.

At first, I tried modifying the GCC version to 4.9 (from 4.8) by modifying the "GCCVERSION" line in /home/user/poky/meta/conf/distro/include/tcmode-default.inc. I then attempted to re-run the build, and received warnings in the Hob build log that version 4.9 is unavailable, and that only versions 4.7.2 - 4.8.1 of GCC are available.

I then tried modifying the GCC version to 4.7 (in the same way), as the Hob build log indicated version 4.7.2 - 4.8.1 are available. (Hob chose to use 4.7.2.) The Altera Linux 4.1.22 LTSI RT kernel then builds fine, but the build process ends up erroring out on logrotate (Hob says with the package logrotate-3.8.1-r0 do_compile step), with the message:

make: *** No rule to make target '/home/user/poky/build/tmp/sysroots/x86_64-linux/usr/lib/cortexa9hf-vfp-neon-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.8.1/include/stddef.h', needed by 'logrotate.o', Stop.

If I follow that filepath as far as I can, I get into the arm-poky-linux-gnueabi folder, and only see a 4.7.2 folder, not an 4.8.1 folder (which makes sense, given I set GCCVERSION to 4.7). And yet, it seems that part of the compilation is requiring 4.8.1 (error above).

Are there other places I need to modify the configured GCC version than in /home/user/poky/meta/conf/distro/include/tcmode-default.inc?

And is it possible to use a more up-to-date version of GCC with the Dora release (e.g., >4.8.1)? If so, how?

I very much appreciate your continued assistance!

Thanks,
Jared

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by Daniel Vincelette over 8 years ago

Hi Jared,

Sorry for the delay.

I just pushed a dizzy(1.7) branch to our git repo: http://support.criticallink.com/gitweb/?p=meta-mitysom-5csx.git;a=shortlog;h=refs/heads/dizzy
This will use gcc 4.9.1 for the toolchain, which should get you around the issue of building the 4.1.22 branch with dora.

The only real change from the dora branch was that I had to clean up the mitysom-5csx-dev-kit image recipe. This means that I could of missed a package that the dora branch has. But I was able to boot with a yocto 1.7 build filesystem (building our 3.16 kernel) and it looked like the packages I wanted were all there.

So in order to build a dizzy build, you can follow our hob/yocto instructions: https://support.criticallink.com/redmine/projects/mityarm-5cs/wiki/Yocto_for_MitySOM-5CSX#Hob-Building-Yocto-from-a-GUI but checkout the dizzy branch for all the repos instead of the dora.

Dan

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by Jared Kirschner over 8 years ago

Hello Dan,

Thanks for pushing the dizzy (1.7) branch. I've successfully gotten to the same point you did in your first reply via a Yocto build (Altera Linux 4.1.22 LTSI RT is booting and receiving an IP address, but still need to modify defconfig/dts).

I'll let you know if I run into any further problems / have additional questions. Thanks for all your help.

Best,
Jared

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by Daniel Vincelette over 8 years ago

Hi Jared,

Glad to hear that worked for you! If you run into trouble getting your defconfig/dts setup how you want just let me know.

Dan

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by Jared Kirschner over 8 years ago

Hello Dan,

I've been performing more testing on the Altera 4.1.22 LTSI RT branch.

Physical setup: MitySOM 5CSX H6 HYA dev kit connected to network via Ethernet (J500).

Altera 4.1.22 LTSI RT does indeed get an IP address, but the network connection is not stable. I'm unable to use scp to transfer any files to/from it, which I had been able to do with Critical Link 3.16 (built via Yocto). With a ping-test, about half of the requests time out.

The non-RT version (Altera 4.1.22 LTSI) has the same problem.

I wanted to see if this problem existed in Altera 3.16 (so I'd know whether it had something to do with the differences between Critical Link and Altera 3.16), but that didn't even fully boot (it stopped after printing "Waiting for root device /dev/mmcblk0p2...").

I'm continuing to investigate this problem, but do you have any thoughts as to whether the cause of the spotty network connection has anything to do with a difference in defconfig or the kernel (modifications made to the Altera version to form the Critical Link version)?

Thanks,
Jared

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by Daniel Vincelette over 8 years ago

Hi Jared,

Looking at the sockit dts(https://github.com/altera-opensource/linux-socfpga/blob/socfpga-4.1.22-ltsi-rt/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts) I see they are setting skews for the data clocks for the RGMII phy. We don't in our dts.

This is the node where the skews are set:

&gmac1 {
    status = "okay";
    phy-mode = "rgmii";

    rxd0-skew-ps = <0>;
    rxd1-skew-ps = <0>;
    rxd2-skew-ps = <0>;
    rxd3-skew-ps = <0>;
    txen-skew-ps = <0>;
    txc-skew-ps = <2600>;
    rxdv-skew-ps = <0>;
    rxc-skew-ps = <2000>;
};

Try removing them:
&gmac1 {
    status = "okay";
    phy-mode = "rgmii";

};

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by Jared Kirschner over 8 years ago

Hi Dan,

The network stability problem has disappeared after removing the skews. Thanks for the suggestion!

I'll soon proceed with additional defconfig/dts modifications, starting with the suggestions above.

Thanks,
Jared

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by Jared Kirschner about 8 years ago

Hello Dan,

I'm now working to create a custom DTS, using socfpga_cyclone5_sockit.dts as a starting point, which incorporates elements of the MitySOM 5CSX DTS. When using the 4.1.22 LTSI RT kernel with socfpga_defconfig and socfpga_cyclone5_sockit.dts, the system boots (as previously discussed). I can add some nodes (from the MitySOM 5CSX DTS) to said DTS without issue, but when I try to add the "hps_lw_bus" node to the DTS and set its "status" to "okay" (from "disabled"), the system no longer boots (it hangs with the message "Starting kernel ..."). Do you have any ideas as to what might be the cause? (e.g., is there some defconfig setting that I need to change for hps_lw_bus to not cause problems?)

Additional information:
- When I try using the Critical Link 3.16 kernel with socfpga_defconfig and the cyclone 5 DTS with the addition of the "hps_lw_bus" node (from the MitySOM DTS's), the system partially boots, but gets stuck at "Waiting for root device /dev/mmcblk0p2..."

I'm aware that there are a number of changes between the different versions of the defconfigs that may be contributing. I've looked through these differences, but have yet to spot any that are obvious causes of the observed behavior (i.e., boot hangs when I enable the "hps_lw_bus" node).

I'll post with additional details as I have them.

Thanks,
Jared

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by Daniel Vincelette about 8 years ago

Hi Jared,

The hps_lw_bus node and all sub nodes are for any FPGA related logic that is attached to the HPS Light weight bridge. For the dev kit there are 3 PIO cores and a System ID core attached to this bus. If the FPGA image that is being loaded doesn't have these cores it will result in the hang you are seeing. The hps_lw_bridge is pretty much design specific, if you have cores in the FPGA that attached to the light weight bus and need to connect them to a kernel drivers, this is where they will be added.

Dan

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by Jared Kirschner about 8 years ago

Hi Dan,

I did a bit more experimenting with including a subset of the hps_lw_bus sub-nodes. I confirmed with the Verilog developer on our team that the FPGA image file I'm using has the PIO cores and System ID core present in the stock Critical Link MitySOM 5CSX dev kit FPGA image, at the same addresses. Using the 4.1.22 LTSI RT kernel with socfpga_defconfig, if I enable the hps_lw_bus with no sub-nodes, the system boots. If I enable said bus with just the pio_0 sub-node, the system boots, and I can see a gpiochip entry in /sys/class/gpio (which is not present when pio_0 is excluded from the device tree). But, the inclusion of any other sub-node (i.e., the sysid_qsys node or PIO1/2/3) causes the boot process to hang at "Starting kernel ...". (Side note: I tried enabling low-level debugging and early printk via the kernel config, but that didn't yield any additional information.)

Any thoughts? I will post any additional progress I make.

Thanks,
Jared

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by Jared Kirschner about 8 years ago

Addendum: any single PIO (0 through 3) can be enabled in the DTS and the system will boot, but including more than one causes the boot process to hang.

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by Daniel Vincelette about 8 years ago

Hi Jared,

Would you mind posting your .qsys file and .dts?

I'll take a quick sanity check,

Thanks

Dan

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by Jared Kirschner about 8 years ago

Hi Dan,

Requested files attached; let me know if I'm missing anything (e.g., FPGA source code).

Also, not sure if this is related to the problem... whenever I have one PIO in the DTS, it shows up as /sys/class/gpio/gpiochip480. That seems inconsistent with what I see here: https://support.criticallink.com/redmine/projects/mityarm-5cs/wiki/Linux_GPIO_Chip_Mapping

Thanks,
Jared

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by Jared Kirschner about 8 years ago

Hi Dan,

Our hardware engineer just noted a significant difference between two versions of uBootMMCEnv.txt listed on Critical Link's website regarding the MitySOM 5CSX.

One is in the git repository for the development board, and it's the one I've been using (modifying the *.dtb file path as needed): http://support.criticallink.com/gitweb/?p=mitysom-5cs/mitysom_5csx_dev_board.git;a=blob;f=dev_5csx_h6_42a/software/spl_bsp/uBootMMCEnv.txt;h=d08d9381b193bacc799e4a305b3ec5bdc5702796;hb=HEAD

Another is attached at the bottom of this page, and has many differences (e.g., the boot command includes steps such as run fpgacmd; run bridge_enable_handoff): https://support.criticallink.com/redmine/projects/mityarm-5cs/wiki/Building_u-Boot_and_Preloader

I tried booting an image with the latter uBootMMCEnv.txt, but the resulting image is missing some files referenced in uBootMMCEnv.txt (e.g., /etc/uBootStatic.env, /etc/uBoot.env).

Which one of these should I be using / might this be related?

Thanks,
Jared

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by Jared Kirschner about 8 years ago

Additional information:

I've stepped through the u-boot process manually (after parsing the differences between the two uBootMMCEnv.txt files mentioned above) to make sure the FPGA is actually being programmed and verified that it contains at least some of the expected content (i.e., the SYS ID peripheral). In both the shipped example image (CL Linux 3.16) and the image I'm working on (Altera Linux 4.1.22 LTSI RT), after executing the following...

fpga load 0 0x2000000 0x700000;
run bridge_enable_handoff;

... I'm able to read the register values near 0xFF200000 (lightweight FPGA slaves base address), and the contents of the first 4 bytes are what I'd expect. Offset 0 contains a value of 1 (the expected ID), and offset 4 contains a Unix timestamp with a value in the expected range (e.g., for the Altera Linux 4.1.22 LTSI RT image, it reads from Oct 3, 2016). Prior to executing the commands above, attempting to read this location in memory causes the processor to reset with a "MAYBE you should read doc/README.arm-unaligned-accesses" message. So, as far as I can tell, the FPGA image is being written, and said image at least contains the SYS ID registers in the expected spot (meaning, how the device tree entry is configured).

Upon running the 'bootm 0x7fc0 - 0x00000100' command, the last console message I see (what I mean by "hang" in the above messages) is:

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Enabling early printk and low-level debugging via kernel configuration hasn't yielded any additional console messages.

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by Daniel Vincelette about 8 years ago

Hi Jared,

From what you've seen it looks to me to be an issue with the 4.1.22 kernel. I've looked at qsys/dts and they look fine. Tonight I will build the 4.1.22 RT kernel and try that on our dev kit (using everything from our dev kit SD card with the exception of the 4.1.22 kernel), hopefully this will let me recreate the issue you are seeing.

I'll update you tonight once I get my environment setup and try this out.

Sorry for the delay,

Dan

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by Daniel Vincelette about 8 years ago

Jared,

I was able to reproduce your problem and I've found the issue. Between our 3.16 kernel and the 4.1.22 kernel it looks like some of the device tree attributes for the altera pio core were changed. Also the updated device tree documentation for pio core in 4.1.22 had a typo.

Changes:
altr,gpio-bank-width => altr,ngpio
altr,interrupt_type => altr,interrupt-type
#gpio-cells = <1>; => #gpio-cells = <2>;

4.1.22:

            pio_0: gpio@0020 {
                compatible = "altr,pio-1.0";
                reg = <0x0020 0x20>;
                interrupts = <0 40 4>;
                altr,ngpio = <32>;
                altr,interrupt-type = <IRQ_TYPE_EDGE_RISING>;
                #gpio-cells = <2>;
                gpio-controller;
                #interrupt-cells = <1>;
                interrupt-controller;
            };

3.16

            pio_0: gpio@0020 {
                compatible = "altr,pio-1.0";
                reg = <0x0020 0x20>;
                interrupts = <0 40 4>;
                altr,gpio-bank-width = <32>;
                altr,interrupt_type = <IRQ_TYPE_EDGE_RISING>;
                #gpio-cells = <1>;
                gpio-controller;
                #interrupt-cells = <1>;
                interrupt-controller;
            };

I've updated the dts you posted and after making these changes were able to boot to linux and linux was able to see the extra GPIO cores

root@mitysom-5csx:/# cat /sys/kernel/debug/gpio 
GPIOs 384-415, platform/ff200080.gpio, /soc/bus@0ff200000/gpio@0080:

GPIOs 416-447, platform/ff200060.gpio, /soc/bus@0ff200000/gpio@0060:

GPIOs 448-479, platform/ff200040.gpio, /soc/bus@0ff200000/gpio@0040:

GPIOs 480-511, platform/ff200020.gpio, /soc/bus@0ff200000/gpio@0020:

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by Daniel Vincelette about 8 years ago

You are also correct in using the uBootMMCEnv.txt from our git repo. The other one is a much older version, which should actually do the same thing but the one from the git repo is the latest and greatest.

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by Jared Kirschner about 8 years ago

Problem solved! Thank you so much.

I'm now carefully stepping through adding additional relevant nodes from the MitySOM 5CSX device tree.

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by Daniel Vincelette about 8 years ago

Glad to hear that was the solution!

Dan

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by V J almost 7 years ago

Hi
The company I work for has just started working on the MitySOM 5CSX Development board, and in our system we need to use the preempt-RT version of the kernel.

Currently we have a working project using the Terasic DE0-Nano-SoC eval board where we have modified the GSRD 16.1 project from Rocketboard to use the 4.1.22-ltsi-rt version of the kernel. There were a couple of issues doing this so I want to try out the approached listed in this tread.
However, I am not able to build the dizzy branch:

1. I started out building the doro branch : OK.

2. Checked out the dizzy branch, but after approximately 60% I got an error:
NOTE: Running task 1013 of 2170 (ID: 304, /home/user_name/projects/MitySOM-5CSx/yocto/poky/meta/recipes-support/lzo/lzo_2.08.bb, do_compile)
ERROR: System.map-3.16.0-g0c8e2e6-dirty does not exist in '/home/user_name/projects/MitySOM-5CSx/yocto/poky/build/tmp/work/mitysom_5cse-poky-linux-gnueabi/linux-mitysom-5csx/3.16-r1/package/boot' nor STAGING_KERNEL_DIR '/home/user_name/projects/MitySOM-5CSx/yocto/poky/build/tmp/sysroots/mitysom-5cse/usr/src/kernel'
ERROR: Function failed: split_kernel_module_packages
NOTE: recipe linux-mitysom-5csx-3.16-r1: task do_package: Failed
ERROR: Task 610 (/home/user_name/projects/MitySOM-5CSx/yocto/poky/meta-mitysom-5csx/recipes-kernel/linux/linux-mitysom-5csx_3.16.bb, do_package) failed with exit code '1'

3.
Modified
- mitysom-5csx.conf
and created
- linux-mitysom-5csx_4.1.22-ltsi-rt.bb
- linux-libc-headers-mitysom-5csx_4.1.22-ltsi-rt.bb
But same result.
ERROR: System.map-4.1.22-ltsi-rt23-03363-gfa465b2-dirty does not exist in '/home/user_name/projects/MitySOM-5CSx/yocto/poky/build/tmp/work/mitysom_5csx-poky-linux-gnueabi/linux-mitysom-5csx/4.1.22-ltsi-rt-r1/package/boot' nor STAGING_KERNEL_DIR '/home/user_name/projects/MitySOM-5CSx/yocto/poky/build/tmp/sysroots/mitysom-5csx/usr/src/kernel'
ERROR: Function failed: split_kernel_module_packages
NOTE: recipe linux-mitysom-5csx-4.1.22-ltsi-rt-r1: task do_package: Failed
ERROR: Task 613 (/home/user_name/projects/MitySOM-5CSx/yocto/poky/meta-mitysom-5csx/recipes-kernel/linux/linux-mitysom-5csx_4.1.22-ltsi-rt.bb, do_package) failed with exit code '1'
NOTE: Running task 1229 of 2170 (ID: 1201, /home/user_name/projects/MitySOM-5CSx/yocto/poky/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb, do_packagedata)

In folder
.\yocto\poky\build\tmp\work\mitysom_5csx-poky-linux-gnueabi\linux-mitysom-5csx\4.1.22-ltsi-rt-r1\package\boot
I do have a file called
System.map-4.1.22-ltsi-rt23-03363-gfa465b2 (without the “dirty” extension)
I am using Centos 7.

Any help would be greatly appreciated.

RE: Using PREEMPT_RT on MitySOM 5CSX Dev Board - Added by Daniel Vincelette almost 7 years ago

Hello,

I would recommend using our newer krogoth branch in order to build the the 4.1.22-ltsi-rt kernel. I've been able to use it in conjunction with altera's meta layer to build the the rt kernel.

I have attached a few files that will be needed in order to do the build.

Here the steps I followed to build the 4.1.22-ltsi-rt kernel with yocto:
1. run poky_checkout.sh to checkout all needed meta layers

./poky_checkout.sh
cd poky

2. source the enviroment
. ./oe-init-build-env

3. Copy over the local.conf and bblayers.conf to conf/
4. Copy over the mitysom-5csx.conf to ../meta-mitysom-5csx/conf/machine/mitysom-5csx.conf
5. Build filesystem
bitbake bitbake mitysom-image-base

Once you have the filesystem I would recommend using the socfpga_cyclone5_sockit.dtb as a starting place. With the sockit DTS I was able to boot our dev kit.

Please let me know if you have any more questions,
Dan

(1-25/34) Go to top
Add picture from clipboard (Maximum size: 1 GB)