On Jun 20 2017 1:26 PM, Bertho Stultiens wrote:
On 06/20/2017 07:38 PM, EBo wrote:
Well, SPI is now working and it seems to be satisfactory. I created
an
experimental EPP driver for the 7i90/7i43 (which is why I started
this
thread) but it needs to be tested and I am looking for volunteers.
What all would be evolved with testing? We found a use at work to
use
an RPi-3 for a proof of concept, so I will be jumping back into
RPi's
for the next while. It would be nice to make sure that the hard
real-time and other systems are running correctly, as well as LCNC.
I
also need to get back to some LCNC projects whenever I can break
away
the time... Anyway, I or my intern might take a poke at the testing
if
it does not envolve to much, or if we can find a way to make it work
related...
First thing you need is a quite a bit of patience. Creating bootable
images with all updates and extra packages RPi is a slow process on a
RPi. So you better have some other work too, or there cannot be
enough
coffee.
You need to build a converter from the 40-pin I/O header to a 26-pin
IDC
with flatcable (see http://media.vagrearg.org/rpi3-lcnc/pi-epp.pdf).
Now for the software.
The easy way gets you going, but there may be junk you do not
need/want
or care about or whatever brainfart I mistakenly left in that image.
The hard way will make you in full control of the image you create.
It
also ensures that you actually get an idea what you need to build and
run (I found that very helpful)
The "easy" way (couple of hours to start testing):
--------------------------------------------------
1 - Get my SD image.
It is a bit used, but it is fully functional.
This will take, no joke, about 3.14 hours <smile> to upload.
The image: picnc-rt_kernel-4.4.4-dev-lcnc-X-20170620210413.img.gz
will be available from http://media.vagrearg.org/rpi3-lcnc/
(once it is uploaded)
sha256sum:
46f4ea007241274f879eb09142bf126ea3c32f5dbdd8488f0c9b1b4f43db79d1
picnc-rt_kernel-4.4.4-dev-lcnc-X-20170620210413.img.gz
size:
1629293657
2 - dd image to 8+GB SD card
3 - Copy a set of ini/hal files to ~/linuxcnc/configs/...
and modify them to use the new hm2_rpepp driver
4 - test
The "hard" way (about a day before testing):
--------------------------------------------
1 - install base Raspbian image on 8+GB SD card
2 - update the image (atp-get update; apt-get dist-upgrade)
3 - install RT-PREEMPT kernel 4.4.4-rt9-v7+ from Machinekit
The procedure has been derived from
http://www.machinekit.io/docs/getting-started/install-rt-kernel-RPi2/
However, I did not want to upgrade the bootloader and that means
doing
more work. Please note that is will run properly on the Pi3. If you
upgrade the bootloader then disregard the following and keep to the
MK
described procedure.
Procedure without upgrading the bootloader:
$ sudo su -
# wget
http://deb.machinekit.io/debian/pool/main/l/linux-rt/linux-image-rpi2-rt_4.4.4-rt9-v7+-7_armhf.deb
# wget
http://deb.machinekit.io/debian/pool/main/l/linux-rt/linux-headers-rpi2-rt_4.4.4-rt9-v7+-7_armhf.deb
# dpkg -i linux-image-rpi2-rt_4.4.4-rt9-v7+-7_armhf.deb
linux-headers-rpi2-rt_4.4.4-rt9-v7+-7_armhf.deb
# cd /boot
# mkdir old
# mv bcm* overlays kernel7.img old/
# mv dtbs_rt/* .
# cp kernel_rt-4.4.4-rt9-v7+.img kernel7.img
# sync
Now you have to edit /boot/cmdline.txt to look something like this:
dwc_otg.fiq_enable=0 dwc_otg.fiq_fsm_enable=0 dwc_otg.nak_holdoff=0
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 root=PARTUUID=4fb6ef8f-02
rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
The first three parameters have been added. Your "root=..." and
"console=..." are probably different. I have a serial console
attached
for debug purpose.
4 - add to /etc/rc.local
echo -n 1200000 >
/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
echo -n performance >
/sys/devices/system/cpu/cpufreq/policy0/scaling_governor
Finally, reboot.
5 - install git
6 - clone LinuxCNC from github. My fork has the hm2_rpepp module in a
branch called hm2_rpepp; see https://github.com/BsAtHome/linuxcnc
7 - brace yourself, about to install build-dependencies
8 - read docs/src/code/building-linuxcnc.txt how to find the build
dependencies. Basically:
$ sudo apt-get install dpkg-dev
$ cd ~linuxcnc-git/debian
$ ./configure uspace
$ cd ..
$ dpkg-checkbuilddeps
Now install all that has been listed and get some more coffee and
probably return the next morning.
9 - Build LinuxCNC. Beware: do _not_ compile with parallel jobs. The
RPi
has not enough memory to compile multiple c++ files and starts
swapping,
killing the performance and going to practically zero progress.
$ cd ~/linuxcnc-git/src
$ ./configure --with-realtime=uspace
$ make
$ sudo make setuid
10 - Copy a set of ini/hal files to ~/linuxcnc/configs/... and modify
them to use the new hm2_rpepp driver
11 - test
Thanks for the step-by-step instructions. In the past I had set up a
cross compiler a the 24-core server -- that cut the compile time a bit
;-) I will see if I can set that back up again. Other than that, I do
not mind punching the button and going to bed, reading a book, making
some stuff, so thanks for the warning ;-)
EBo --
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers