Hi Tim, Regards this -> git clone --depth=1 https://github.com/raspberrypi/linux -b rpi-4.14.y-rt Did you able to compile a stable version of image?
I was able to build it but the out come no so stable. The RT-test not stable, the result beyond expectation, at one point the latency become minus value. Suddenly somehow after running few time of LinuxCNC the system not able to shutdown and finally the whole SD image cannot boot-up and had to rebuild. Regards, KL Chin On Sunday, 29 July 2018 08:25:13 UTC+8, Timothy March wrote: > > > Mung Kie said, "They messaged me back saying that your config does not > work, so I am not sure what to think" > Well if he took the first post in this thread and tried it , it will not > work that is why I posted here in the first place. If he read the whole > thread he would have found the second work sheet I posted and at the bottom > of work sheet had the answer > The following is that post > > Thank you again Bas for the tip on DEBUG was able to figure it out > 0 = output > 1 = input > you must directly write binary numbers in loading hal_gpio comp > > So a new worksheet that works is as follows > > https://pastebin.com/Mym56jAK > > BOB SIGNAL GIPO IN or OUT RPI PIN BINARY > > P2 = XPUL = GIPO2 = OUT = 3 = 0 > P3 = XDIR = GIPO3 = OUT = 5 = 0 > P4 = YPUL = GIPO4 = OUT = 7 = 0 > P5 = YDIR = GIPO5 = OUT = 29 = 0 > P6 = UPUL = GIPO6 = OUT = 31 = 0 > P7 = UDIR = GIPO7 = OUT = 26 = 0 > P8 = VPUL = GIP08 = OUT = 24 = 0 > P9 = VDIR = GIPO9 = OUT = 21 = 0 > P10= ESTOP = GIPO10 = IN = 19 = 1 > P11=X AXIS LIMIT= GIPO11 = IN = 23 = 1 > P12=Y AXIS LIMIT= GIPO12 = IN = 32 = 1 > P13=U AXIS LIMIT= GIPO13 = IN = 33 = 1 > P14= ENABLE = GIPO14 = OUT = 8 = 0 > P15=V AXIS LIMIT= GIPO15 = IN = 10 = 1 > P16= BPUL = GIPO16 = OUT = 36 = 0 > P17= BDIR/RELAY= GIPO17 = OUT = 11 = 0 > P1 = PWM = GIPO18 = OUT = 12 = 0 > > GND= PC GROUND= ~ = ~ = 9 = ~ > PCGND= PC GROUND= ~ = ~ = 14 = ~ > PC5V= PC 5 VOLT= ~ = ~ = 2 = ~ > PC5V= PC 5 VOLT= ~ = ~ = 4 = ~ > -------------------------------------------------------------- > loadrt hal_gpio dir=?????????????? > 0 means output > 1 means input > > you must directly write binary numbers in loading hal_gpio comp > > ------------------------------------------------------------------------ > #rpi2_gpios[] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, > 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 }; > #rpi2_pins[] = {3, 5, 7, 29, 31, 26, 24, 21, 19, 23, 32, 33, 8, 10, 36, > 11, 12, 35, 38, 40, 15, 16, 18, 22, 37, 13 }; > > 0 0 0 0 0 0 0 0 1 1 1 1 0 1 0 > 0 0 1 1 1 1 1 1 1 1 1 > ---------------------------------------------------------------- > #commandline > echo 'ibase=2;A;00000000111101000111111111' | bc > 10 > 250367 > ------------------------------------------------------------------ > #For my BOB > loadrt hal_gpio dir=250367 > > > Use the above in HAL file and it works the whole idea was to figure out > how it all works and the work sheet shows you how to calculate it > > Now for setting up the PI to start with is as follows > > #I do not use Debian Stretch, Axis GUI has a memory leak when run on > Stretch > #Download Debian Jessie image from here > > http://downloads.raspberrypi.org/raspbian/images/ > > #Use Etcher to flash SD-card > > # Install Sdcard into PI and boot up > > user = pi > password = raspberry > > # Connect to wired network > # Or shh from another computers ethernet connection > > --------------------------------------------------------------------- > > sudo apt-get -y update > > # Update to correct keyboard layout > > sudo dpkg-reconfigure keyboard-configuration > > --------------------------------------------------------------------- > > # Generate locales > > sudo dpkg-reconfigure locales > #add correct language mine for US > en_US.UTF-8 > > ----------------------------------------------------------------------- > > #Update Time Zone > > sudo dpkg-reconfigure tzdata > > sudo reboot -n > > ---------------------------------------------------------------------- > > # Install kernel Raspberry Pi 2, Pi 3 default build configuration on PI > Note: this kernel has no bad habits > > sudo apt-get install git bc > git clone --depth=1 https://github.com/raspberrypi/linux -b rpi-4.14.y-rt > cd linux > KERNEL=kernel7 > make bcm2709_defconfig > make menuconfig > > #CONFIG_PREEMPT_RT_FULL-Kernel Feature --> Preeemption Model (full > #Preemptble Kernel(RT) --> Fully Preemptble Kernel(RT) > > make -j4 zImage modules dtbs > sudo make modules_install > sudo cp arch/arm/boot/dts/*.dtb /boot/ > sudo cp arch/arm/boot/dts/overlays/*.dtb* /boot/overlays/ > sudo cp arch/arm/boot/dts/overlays/README /boot/overlays/ > sudo cp arch/arm/boot/zImage /boot/$KERNEL.img > sudo reboot -n > > ---------------------------------------------------------------------- > > # RPI 2 or 3 for XFCE Desktop > > sudo apt-get install -y xfce4 xorg lightdm wpagui htop synaptic > chromium-browser xfce4-terminal mousepad xfce4-power-manager > thunar-archive-plugin convertall galculator mesa-utils > > ----------------------------------------------------------------------- > > # To improve latency > > cd /boot > sudo mousepad cmdline.txt > > #Add at the end > > quiet splash lapic noxsave acpi_osi= isolcpus=2,3 acpi_irq_nobalance > noirqbalance vmalloc=32MB clocksource=acpi_pm > > sudo reboot -n > ------------------------------------------------------------------------ > > #Install Machinekit > > sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 43DDF224 > > sudo sh -c \ > "echo 'deb http://deb.machinekit.io/debian jessie main' > \ > /etc/apt/sources.list.d/machinekit.list" > > sudo apt-get update > > sudo apt-get install machinekit-rt-preempt > > > ------------------------------------------------------------------------------------------ > > If you want to use this image on a RPI3+ do the following > You'll need to do this first step on a pi3 (not plus): > > Update the bootloader: > > sudo SKIP_KERNEL=1 rpi-update ef7621d91cb58ccc856c3c17ddda28685edd23f3 > > New WiFi driver > > Download and install the new WiFi drivers: > > wget > https://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/firmware-brcm80211_20161130-3+rpt3_all.deb > sudo dpkg -i firmware-brcm80211_20161130-3+rpt3_all.deb > > Now you should have a Jessie install that works on 3B+ including WiFi > support. > > ------------------------------------------------------------------------- > > #To make image backup of sdcard on a linux computer I think this works on > MAC also > > # First use Gparted to shrink second partition > > sudo fdisk -u -l <----use to find where sdcard is mounted run without > card, then with card > sudo fdisk -u -l /dev/mmcblk0 <----run with name of sdcard in my computer > this is /dev/mmcblk0 your card may be named different > ----------------------------------------------------- > ----------------Screen Shot-------------------------- > Disk /dev/mmcblk0: 30 GiB, 32191283200 bytes, 62873600 sectors > Units: sectors of 1 * 512 = 512 bytes > Sector size (logical/physical): 512 bytes / 512 bytes > I/O size (minimum/optimal): 512 bytes / 512 bytes > Disklabel type: dos > Disk identifier: 0x46f1a0e2 > > Device Boot Start End Sectors Size Id Type > /dev/mmcblk0p1 8192 93813 85622 41.8M c W95 FAT32 (LBA) > /dev/mmcblk0p2 94208 5869567 5775360 2.8G 83 Linux > ----------------------------------------------------- > ----------------------------------------------------- > sudo dd if=/dev/mmcblk0 of=~/rpi_xfce.img count=5869567 <---- # = END of > sectors on second partition, yours will be different > > # Remember to exspand file system with raspi-config when rewiting to a new > sdcard > > Mug Kie when you have people come look have the read the whole thread > > Tim > -- 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.
