Hello Guys: I recently have compiled machinekit sucessfully on zedboard.Because i don't know Travis CI,so i compiled machinekit on zedboard directly.My zedboard's environment is runing linux kernel3.8 and xenomai patch2.6.3 and debian filesytem.Then following machinekit official website instructions.The key is when your follow the instructions you should improve your gcc version to 4.7,then every thing will be ok. Have fun.
--Fei. 在 2016年9月7日星期三 UTC+8上午10:56:31,lf写道: > > Hello Michael: > Ok, if i get cross-compilation to work,i will send a PR. > By the way, i have compiled machinekit successfully running on raspberry > pi 3 > > --Fei. > > 在 2016年9月6日星期二 UTC+8下午3:21:21,Michael Haberler写道: >> >> >> > Am 05.09.2016 um 05:57 schrieb lf <[email protected]>: >> > >> > Hello Michael: >> > Michael,if i just want to cross compile machinekit to run on zedboard >> and don't use the mksocfpga file.How should i do?I have tried several >> times.I just can't get through the configure process.By the way,i want to >> use Xenomai 3.8,so my operation is as follows. >> > 1. ./debian/configure -X 3.8 >> > 2. sudo mk-build-deps -ir >> > 3. cd src >> > 4. ./autogen.sh >> > 5. ./configure --host=arm-xilinx-linux-gnueabi --with-xenomai-kernel >> --with-platform-zedboard >> > Then configure reports,error:Request '--with-xenomai-kernel',but >> unable. >> >> >> Your options are: >> - build on target as per website >> - build as per scripts here: >> https://github.com/machinekit/machinekit/tree/master/.travis >> - If you get cross-compilation to work, please send a PR as this is not >> used and hence not documented. >> >> Until you answer my questions as well I will not respond any more. >> >> >> >> > >> > I think may be it lack the xenomai-kernel's source for zedboard and i >> have applied Xenomai 2.6.3 patches to a Xilinx Linux kernel.So i change the >> shell as below. >> > >> > ./configure --host=arm-xilinx-linux-gnueabi >> --with-xenomai-kernel-sources=/home/lf/Downloads/linux-xlnx-xilinx-v14.5.01 >> --with-platform-zedboard >> > Configure reports--error:Xinerama library or headers not found.I >> think that may be some library or headers about graphical interface,but i >> can't find option to disable it or how to disable it. >> > >> > I do also copy your binary's file about machinkit in the 8-25 image >> to my zedboard,but it can't work. >> > >> > How do i change the configure shell,Michael? >> > >> > Thanks >> > --Fei. >> > 在 2016年9月1日星期四 UTC+8上午5:39:33,Michael Haberler写道: >> > >> > > Am 31.08.2016 um 11:46 schrieb [email protected]: >> > > >> > > >> > > 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. >> > >> > please state which one as it matters. Please paste the output of dmesg >> to pastebin.com so we can end the guesswork. >> > >> > > 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? >> > >> > you do not have to. You can use the zed gpio driver for a (slow) >> stepper config. >> > >> > Again it would help if you explained what you are trying to achieve. If >> this Xenomai kernel thing comes from the EtherCAT master as a requirement: >> are you planning to have the EtherCAT master talk to machinekit? Why do you >> need any local I/O at all then? And how is that going to work? I have never >> seen any interworking with that product. >> > >> > If EtherCAT is separate from running machinekit, why bother about the >> kernel at all? >> > >> > > I think that is because you want to compile a common SD kernel, >> which can run either on CycloneV or Zynq platforms. >> > >> > no. These are separate kernels based on separate vendor trees as many >> of the required changes are not Linux mainline yet. Maybe downstream, but >> certainly not under a year from now. >> > >> > > So you need to use the hostmot2 driver and need to care the hardware. >> > >> > These kernels (+FPGA manager) enable hostmot2. However you can run >> machinekit like on other platforms with GPIO as well - slow but works. It >> is an option, not a requirement. >> > >> > > 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. >> > >> > Why? apt install machinekit and either machinekit-xenomai or >> machinekit-rtpreempt and be done. Likely the zedboard driver works ok for >> both Xenomai2 or RT-PREEMPT. >> > >> > > What should I do? Do I should to build the hostmot2 driver? >> > >> > I am out of my depth to answer that given what I know about your plans. >> > >> > > Can you kindly share me some document about how to build the >> MachineKit in order to run on the Zedboard with xenomai? >> > >> > it is all on http://www.machinekit.io . >> > >> > That said: as long as your plans are very unclear, I advise against >> "building" everything in sight in the hope this will yield great results. >> Everything you need to run Machinekit on a Xenomai2 or RT-PREEMPT kernel >> can be had by a package install. >> > >> > > >> > > 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, as I already explained this makes no sense and therefore will not >> happen. I see no hope for running the hostmot2 code with the on-chip FPGA >> on either the Zynq or Altera platforms with Xenomai2. >> > >> > > No matter xenomai2.6.3 or xenomai3.x. >> > >> > It DOES matter which is why I'm asking for the output of 'dmesg' . >> > >> > > 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. >> > >> > Well fine, and there are consequences. In this case this means: no >> hostmot2 with on-chip FPGA for Xenomai2. >> > >> > >> > - Michael >> > >> > > >> > > 在 2016年8月29日星期一 UTC+8下午3:44:51,Michael Haberler写道: >> > > >> > > > Am 29.08.2016 um 09:19 schrieb lf <[email protected]>: >> > > > >> > > > 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]. >> & > > -- 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.
