Dear Michael, I am sorry to trouble you. Now I want to run MachineKit on the Zedboard. And the operation system running on the Zedboard is Linux patched the Xenomai2.6.3 or Xenomai3.x. And I have two questions. 1, The MachineKit is only an linux's application who will only to call the API from Linux. So why do I need to consider which FPGA or which hardware below the Linux operation system? I think that is because you want to compile a common SD kernel, which can run either on CycloneV or Zynq platforms. So you need to use the hostmot2 driver and need to care the hardware. But If I don't use the SD kernel image from you. And I only want to build the MachineKit witch need run on Zedboard with xenomai by myself. What should I do? Do I should to build the hostmot2 driver? Can you kindly share me some document about how to build the MachineKit in order to run on the Zedboard with xenomai?
2, As far as I know, you has build the MachineKit which can run on the Zedboard. But the operation system is Linux patch RT-Preemt. And you have packaged into a SD image. So I want to know, do you have the plans to build a SD image for MachineKit on the Linux patch xenomai? No matter xenomai2.6.3 or xenomai3.x. Because it is important for us, we only want to use the OS of Linux patch xenomai. We don't want to use the RT-Preemt. 在 2016年8月29日星期一 UTC+8下午3:44:51,Michael Haberler写道: > > > > Am 29.08.2016 um 09:19 schrieb lf <[email protected] <javascript:>>: > > > > Hello Michael: > > Recently,I am doing some summary and plan on how to start our project. > > > > There are some question,i want to ask you to figure out. > > > > 1.Three words:hostmot2 driver, FPGA manager, mksocfpga.As far as i > know,mksocfpga is a project about machinekit running on FPGA boards.This > project's main module is hostmot2 driver which based on FPGA manager code > makes machinekit running on different FPGA boards. It is means that we > should choose kernels which support FPGA manager first.That is my > understanging and that's correct? > > The https://github.com/machinekit/mksocfpga/ repository contains the > Mesanet hostmot2 VHDL code, and the supplementary IP and configurations to > build firmware bitfiles for the CycloneV and Zynq platforms - nothing else. > > The machinekit hm2_soc_ol HAL driver is the glue layer talking to the FPGA > manager to load a bitfile, and to map a portion of the FPGA region ( > http://freeby.mesanet.com/regmap) into memory so the hostmot2 driver can > talk to it. > > Since the hm2_soc_ol driver expects and FPGA manager API, the latter is a > prerequisite, yes. > > > > > 2.As you said "well the KPA website says it runs with RT-PREEMPT > kernels as well, and since Xenomai3 supports multiple flavors you might > just as well check if your kernel isnt RT-PREEMPT under the hood > anyway".Actually,I can't fully understand "since Xenomai3 supports multiple > flavors you might just as well check if your kernel isn't PT-PREEMPT under > the hood anyway".Could it be that Xenomai3 can be patch to RT-PREEMPT > kernels? > > The Xenomai3 website explains the options pretty well: > https://xenomai.org/introducing-xenomai-3/ > > Xenomai3 is mostly about a common API over two options - either RT-PREEMPT > or an ipipe-patched kernel in the style of Xenomai2. Since Machinekit has a > Xenomai2 as well as an RT-PREEMPT support layer there is no value a > Xenomai3 glue layer would add as there would be no added functionality. > > If you are not sure what your kernel is, consider looking at the boot log: > > Xenomai2 example: > > mah@cancan:~$ dmesg |grep Xenomai > [ 0.701245] I-pipe: head domain Xenomai registered. > [ 0.701280] Xenomai: hal/arm started. > [ 0.702721] Xenomai: scheduling class idle registered. > [ 0.702745] Xenomai: scheduling class rt registered. > [ 0.707480] Xenomai: real-time nucleus v2.6.3 (Lies and Truths) loaded. > [ 0.707491] Xenomai: debug mode enabled. > [ 0.707944] Xenomai: starting native API services. > [ 0.707957] Xenomai: starting POSIX services. > [ 0.708160] Xenomai: starting RTDM services. > > This is typical for a Xenomai-2 type kernel (I-pipe: line). > > For determining if a kernel is RT-PREEMPT, look at the config: > > root@mksocfpga:/boot# grep PREEMPT config-4.1.22-ltsi-rt23-ge3c1da3 > CONFIG_PREEMPT_RCU=y > CONFIG_PREEMPT=y > CONFIG_PREEMPT_RT_BASE=y > CONFIG_HAVE_PREEMPT_LAZY=y > CONFIG_PREEMPT_LAZY=y > # CONFIG_PREEMPT_NONE is not set > # CONFIG_PREEMPT_VOLUNTARY is not set > # CONFIG_PREEMPT__LL is not set > # CONFIG_PREEMPT_RTB is not set > CONFIG_PREEMPT_RT_FULL=y <-------- this must be > present > CONFIG_PREEMPT_COUNT=y > CONFIG_DEBUG_PREEMPT=y > # CONFIG_PREEMPT_TRACER is not set > > For a quick check, you can look at the contents of /sys/kernel/realtime - > if it exists and its content is '1', it is an RT-PREEMPT kernel. > > The way machinekit detects a kernel at runtime is implemented in > https://github.com/machinekit/machinekit/blob/master/src/rtapi/rtapi_kdetect.c > > . > > > - Michael > > > > > -Fei. > > > > > > > > 在 2016年8月25日星期四 UTC+8下午9:57:02,Michael Haberler写道: > > > > > Am 25.08.2016 um 13:36 schrieb lf <[email protected]>: > > > > > > Hello Michael: > > > Actually,the FPGA is Xillin FPGA. > > > > well yes, but the relevant code in the kernel is from Altera, is called > 'Altera FPGA Manager' and supports _both_ Xilinx and Altera platforms > transparently which is why we standardize on it. > > > > before FPGA Manager, there were significant variations as to how things > are done. > > > > > > > > Currently,our zedboard should be based on Xenomai kernels because of > needing to support third-party application,and it was. > > > > > > It seems that your image can't be used for our zedboard.So i think > may be i should build Xenomai kernels for zedboard running machinekit. > > > > well the KPA website says it runs with RT-PREEMPT kernels as well, and > since Xenomai3 supports multiple flavors you might just as well check if > your kernel isnt RT-PREEMPT under the hood anyway. > > > > > > > As for the KPA EtherCat Master,i think you may have heard.I can > explain to you carefully later what we are trying to do. > > > > > > describing your highlevel goals helps - easy to get lost in alphabet > soup. > > > > So: why hostmot2 AND EtherCAT? does not add up for me yet > > > > -m > > > > > > Currently,our zedboard should be based on Xenomai kernels because of > needing to support third-party application,and it was. > > > > > > It seems that your image can't be used for our zedboard.So i think > may be i should build Xenomai kernels for zedboard running machinekit. > > > > > > As for the KPA EtherCat Master,i think you may have heard.I can > explain to you carefully later what we are trying to do. > > > > > > Thanks,Michael. > > > > > > --Fei. > > > > > > 在 2016年8月25日星期四 UTC+8下午5:07:43,Michael Haberler写道: > > > > > > > Am 25.08.2016 um 10:21 schrieb lf <[email protected]>: > > > > > > > > Hello Michael: > > > > Now,I think i have figured out something.In fact,our zedboard > should be based on kernel-4.1.18 patched with Xenomai-3.0.2.Because our > zedboard should run third-party application----KPA EtherCat Master,that > third-party application is based on Xenomai Kernels.That is it. > > > > > > If that kernel version supports the Altera FPGA manager you might be > lucky, else not so much > > > > > > I do not think you will find much support from here for that setup > > > > > > but maybe you can explain a bit what you are actually trying to do: if > you use an EtherCAT master to talk to _remote_ EtherCAT devices, what is > the purpose of talking to _local_ devices connected to the FPGA? > > > > > > > > > -m > > > > > > ps: below it should say "The BB uses Xenomai2 on a 3.8 kernel base > ..." > > > > > > > > > > > > > > > > > > > > 在 2016年8月24日星期三 UTC+8下午8:22:11,Michael Haberler写道: > > > > > > > > > Am 24.08.2016 um 14:05 schrieb lf <[email protected]>: > > > > > > > > > > Hello Michael: > > > > > This is my mistake.Your image is ok,I have tried again.It can be > written to SD card. > > > > > There is a question I want to ask you.The kernels for all > platforms are based on RT-PREEMPT kernels and that is to say Xenomai > kernels are no longer supported? > > > > > > > > That is factually wrong. The BB uses Xenomai 3.8 and there are i386 > and amd64 Xenomai kernels available in the debian repo. We did cede support > for RTAI a while ago. > > > > > > > > Machinekit supports either flavor transparently, and builds happen > for all of non-realtime ('posix'), RT-PREEMPT or Xenomai. On startup, > Machinekit detects the kernel type and does the right thing. That opens the > option to use whatever kernel is available for a given platform, as you > cannot assume a certain RT kernel is available on all potential platforms. > > > > > > > > > I think may be I should build Xenomai kernels for zedboard > running machinekit,because in my side I have to choose Xenomai kernels. > > > > > > > > You are heading for a complete waste of time. Xenomai2 stopped at > linux 3.8, and all the FPGA manager support required for mksocfpga is from > 4.1/4.4 onwards in the respective manufacturer trees. > > > > > > > > can you explain a bit what "in my side I have to choose Xenomai > kernels" means? Being faced with the option of a super-intrusive kernel > patch which is de-facto extinct except for the installed base, and the > alternative heading for linux mainline, it looks like an easy choice to me. > > > > > > > > In terms of performance and maintainability there are not many good > reasons left to pursue Xenomai2. You might want to read up on > http://blog.machinekit.io/2015/11/and-winner-is-rt-preempt.html . > > > > > > > > - Michael > > > > > > > > > > > > > > > > > > 在 2016年8月23日星期二 UTC+8下午8:48:31,lf写道: > > > > > Hello Michael Haberler: > > > > > I have tried to write other image to the SD card's boot > partition with bmaptools.If I write other image,the SD card would be ok and > it can be found by system.So I think may be the image damaged while I > download,because the download speed was very slow that time.I download the > image through the url you given again,but it doesn't work again.I think may > be the image is wrong. > > > > > > > > > > 在 2016年8月23日星期二 UTC+8下午2:30:49,lf写道: > > > > > Hello Michael Haberler: > > > > > There is a problem that I can't figure out.When I write the > image to the SD card's boot partition with bmaptools successfully,then I > can't find the SD card's boot partition in my debian system.I have posted > the problem to machinekit groups in detail. > > > > > > > > > > 在 2016年8月22日星期一 UTC+8上午8:11:25,Michael Haberler写道: > > > > > Hello Liu Fei, > > > > > > > > > > > > > > > > Am 21.08.2016 um 14:59 schrieb lf <[email protected]>: > > > > > > > > > > > > Dear all: > > > > > > I'm from China.Recently,I was compiling machinekit running on > i386 computer and zedboard.When I followed machinekit official > Documentation in the official website—http://www.machinekit.io/,I compile > machinekit successfully running on the Debain.But when I tried to cross > compile machinekit to run on zedboard,I found there are not official > documentation to follow.So I turned to > https://github.com/machinekit/machinekit/issues and I saw several issues > about zedboard.I found there are someone has cross compiled machinekit > running on zedboard,and there are a video show— > https://youtu.be/_AcWxu475aY.I was encouraged. > > > > > > I found out there are a directory about cross compiling > machinekit running on zedboard,it is mksocfpga directory.But the README > file tell about QuartusProjects more and clearer,and I follow the README > file in the VivadoProjects directory when I executed ./make_bitfile.sh > microzed/microzed_jd2cb/config then I failed.I have looked back to the > make_bitfile.sh,I can't understand it embarrassedly.So I turn to there for > help.We also can discuss there. > > > > > > Thanks,guys. > > > > > > > > > > We do want machinekit and the hostmot2 FPGA running on both the > Altera CycloneV and Xilinx Zynq platforms as they have the greatest > potential in price/performance for machine control of any embedded platform > on the market. They blow away everything based on host-side-only signal > generation by at least two orders of magnitude short only of the > Beaglebone/Sitara platform - I have scoped stepgen at 3.6Mhz output and > reliable A/B decoding at 700kHz, which is plainly impossible with > non-hardware accelerated platforms. > > > > > > > > > > We are very close to reaching that goal, after over a year's work > - see the machinekit/machinekit and machinekit/mksocfpga issue tracker, > where all the related work is discussed. If you are interested I recommend > to 'watch' both repositories on github to stay up to date. In a sense, the > tracker issues are machinekit's developer exchange. > > > > > > > > > > to summarize where we are - > > > > > > > > > > - we currently focus on the Terasic DE0 Nano (cv) and MYIR Z-Turn > and Zedboard (zynq) as initial targets > > > > > - most of the software is generic - a new board might need an > adapted u-boot bootloader and matching devicetree but not much else in > specifics > > > > > > > > > > - machinekit - software: > > > > > - a machinekit hostmot2 driver which covers both platforms > exists and so far works reliably; except for that driver's command line all > the hostmot2 documentation applies > > > > > - example configs exist but again are essentially hostmot2-style > without much surprises > > > > > - FPGA firmware config: > > > > > - cv: firmware for 4xMesanet 7i76, 1x7i76+1x7i85s+2xGPIO exists > and works - known to move metal reproducibly > > > > > - zynq: firmware for Zedboard, Z-turn exists, GPIO (no Mesanet > support AFAICT yet), Devin has a machine running with that > > > > > - continuous integration (meaning debian packages exist and are > being produced automatically if a github PR is merged): > > > > > - machinekit: done - you do NOT have to build for 'zedboard' or > some other board as the hostmot2 driver support is completely generic and > even binary compatible, and covers both platforms > > > > > - u-boot boot loaders for all platforms: done > > > > > - RT-PREEMPT kernels for all platforms: done > > > > > - FPGA firmware for CycloneV: done > > > > > - FPGA firmware for Zynq platforms: in very late stages, Devin > is busy touching this up > > > > > - SD image assembly: > > > > > - we have had a preliminary SD image for the Terasic DE0 nano > board for a while: > https://gist.github.com/mhaberler/89a813dc70688e35d8848e8e467a1337, this > image has been used by a few people and so far no major damage reports have > come in - it is a 'developer preview' with machinekit as a 'run in place' > build compiled for easy updating and debugging (i.e does currently not use > the machinekit debian packages) > > > > > - I am currently working on an same-style SD image for the Zynq > platforms - the first booting CI build happened yesterday and does not yet > have all the latest fixes in but I do not expect showstoppers; this image > should support all Zynq platforms provided the device tree is adapted for > in the boot phase - everything else is generic, as is the linux kernel. > > > > > - these images are console images at this time - no display > support as of yet. You will have to work through remote X11. > > > > > > > > > > 'we' are Michael Brown, Charles Steinkuehler, Devin Hughes, Bas de > Brujin, and myself. > > > > > > > > > > > > > > > All this is currently not yet in shape as turn-key image for > beginners which is why we have not made a lot of noise about it, but the > dust is settling. > > > > > > > > > > > > > > > Since it seems you are an advanced user it'd be great to add you > to 'we', provided some patience as we will face some more iterations on the > Zynq side. > > > > > > > > > > My recommendation would be to read up in particular on: > > > > > > > > > > https://github.com/machinekit/machinekit/issues/915 > > > > > https://github.com/machinekit/machinekit/issues/687 > > > > > https://github.com/machinekit/mksocfpga/issues/20 > > > > > https://github.com/machinekit/machinekit/issues/903 and all other > issues in https://github.com/machinekit/mksocfpga/issues to get the idea > how things came about > > > > > > > > > > and then tune in on > https://github.com/machinekit/mksocfpga/issues/20 as the Zynq SD image > matures. > > > > > > > > > > if you are ready for some immediate pain ;) : > > > > > - download the image in > http://deb.mah.priv.at/uploads/zynq/debian-8.5-console-armhf-2016-08-21 > > > > > - write it to an SD card with bmaptools > > > > > - mount the linux partition of that card on some linux machine, > and inspect /boot/dtbs - I guess you will have to change /boot/uEnv.txt > dtb=zynq-zturn.dtb to dtb=zynq-zed.dtb > > > > > - hope it boots > > > > > - login as machinekit, sudo apt update/upgrade > > > > > - see the firmware files in /lib/firmware/zynq and the dtbo's in > /lib/firmware/zynq/dtbo and read up on github.com/machinekit/mksocfpga > what they provide > > > > > - study the configs in > /home/machinekit/machinekit/configs/hm2-soc-stepper > > > > > - the 5i25-zynq.ini is a starting point - no guarantees it works > out of the box > > > > > - the irqtest.hal test script contains the latest syntax and > options for the hostmot2 and hm2_soc_ol components, take clues and adapt > from there > > > > > > > > > > As soon as you get something working we'd be looking for your pull > requests! > > > > > > > > > > best regards, > > > > > - Michael > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > website: http://www.machinekit.io blog: > http://blog.machinekit.io github: https://github.com/machinekit > > > > > > --- > > > > > > You received this message because you are subscribed to the > Google Groups "Machinekit" group. > > > > > > To unsubscribe from this group and stop receiving emails from > it, send an email to [email protected]. > > > > > > Visit this group at https://groups.google.com/group/machinekit. > > > > > > For more options, visit https://groups.google.com/d/optout. > > > > > > > > > > > > > > > -- > > > > > website: http://www.machinekit.io blog: http://blog.machinekit.io > github: https://github.com/machinekit > > > > > --- > > > > > You received this message because you are subscribed to the Google > Groups "Machinekit" group. > > > > > To unsubscribe from this group and stop receiving emails from it, > send an email to [email protected]. > > > > > Visit this group at https://groups.google.com/group/machinekit. > > > > > For more options, visit https://groups.google.com/d/optout. > > > > > > > > > > > > -- > > > > website: http://www.machinekit.io blog: http://blog.machinekit.io > github: https://github.com/machinekit > > > > --- > > > > You received this message because you are subscribed to the Google > Groups "Machinekit" group. > > > > To unsubscribe from this group and stop receiving emails from it, > send an email to [email protected]. > > > > Visit this group at https://groups.google.com/group/machinekit. > > > > For more options, visit https://groups.google.com/d/optout. > > > > > > > > > -- > > > website: http://www.machinekit.io blog: http://blog.machinekit.io > github: https://github.com/machinekit > > > --- > > > You received this message because you are subscribed to the Google > Groups "Machinekit" group. > > > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > > > Visit this group at https://groups.google.com/group/machinekit. > > > For more options, visit https://groups.google.com/d/optout. > > > > > > -- > > website: http://www.machinekit.io blog: http://blog.machinekit.io > github: https://github.com/machinekit > > --- > > You received this message because you are subscribed to the Google > Groups "Machinekit" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected] <javascript:>. > > Visit this group at https://groups.google.com/group/machinekit. > > For more options, visit https://groups.google.com/d/optout. > > -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
