<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Pato en Los Angeles</title>
    <description>P&amp;aacute;gina personal de Patricio Carr - Pat Carr&apos;s Personal HomePage
</description>
    <link>http://localhost:4001/</link>
    <atom:link href="http://localhost:4001/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Tue, 03 Feb 2026 16:00:58 -0800</pubDate>
    <lastBuildDate>Tue, 03 Feb 2026 16:00:58 -0800</lastBuildDate>
    <generator>Jekyll v4.3.4</generator>
    
      <item>
        <title>Adding retracement tool to trades in ThinkorSwim or TradingView</title>
        <description>&lt;p&gt;I recently found the Fibonacci retracement tool and I tweaked it to show the 5% levels under the strike price, to very quickly visualize if the particular option is in the money, whether it needs to be rolled and how much.&lt;/p&gt;

&lt;h2 id=&quot;tradingview&quot;&gt;TradingView&lt;/h2&gt;

&lt;p&gt;In TradingView, this tool can be activated from the left menu, as shown in the screenshot, knows as Fib Retracement:&lt;/p&gt;

&lt;p&gt;&lt;img width=&quot;400px&quot; src=&quot;/images/2026-02-03-Add-retracement-tool-to-trades/Screenshot from 2026-01-05 18-44-35.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once active, you’d click on the strike price at the beginning date of the contract (ie. top left side) and click again on the end of the contract and as low as possible in the price range. It’s not very important where, as these values can be easily changed in the next dialog.&lt;/p&gt;

&lt;p&gt;&lt;img width=&quot;600px&quot; src=&quot;/images/2026-02-03-Add-retracement-tool-to-trades/Screenshot from 2026-01-05 18-59-56.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once the drawing is placed, we will change its settings by clicking on the upper hexagon icon, to modify the coordinates and styles. The coordinates should be #1 the strike price, and #2 always zero.&lt;/p&gt;

&lt;p&gt;&lt;img width=&quot;600px&quot; src=&quot;/images/2026-02-03-Add-retracement-tool-to-trades/Screenshot from 2026-01-05 19-01-42.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The styles need to be changed to reflect the 5% increments, so these would be 0.95, 0.90, 0.85, 0.80, 0.75, etc.
I changed the colors to use only one color and modified the background fill to be almost transparent; also removed the trend line and levels using their checkboxes.&lt;/p&gt;

&lt;p&gt;&lt;img width=&quot;400px&quot; src=&quot;/images/2026-02-03-Add-retracement-tool-to-trades/Screenshot from 2026-02-03 15-21-28.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once it is all looking good, we can save this template for future use, by using the Template pull-down, hitting “Save as” and naming it.
Below is how it looks once it’s placed on the plot. Obviously, every horizontal line is a 5% increment from the strike price.&lt;/p&gt;

&lt;p&gt;&lt;img width=&quot;800px&quot; src=&quot;/images/2026-02-03-Add-retracement-tool-to-trades/Screenshot from 2026-02-03 15-22-14.png&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;thinkorswim&quot;&gt;ThinkorSwim&lt;/h2&gt;

&lt;p&gt;In ThinkOrSwim, the process is similar, though the tool has to be configured differently. You will find the Fibonacci retracement tool, while looking at a chart on the top bar, under Drawings. It’s a big percent sign on the Drawings menu.&lt;/p&gt;

&lt;p&gt;&lt;img width=&quot;600px&quot; src=&quot;/images/2026-02-03-Add-retracement-tool-to-trades/Screenshot from 2026-01-05 19-20-25.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once the tool is active, you would click on the top left of the region where you want it (typically the strike price at the beginning of the contract) and then click again on the bottom right.&lt;/p&gt;

&lt;p&gt;&lt;img width=&quot;400px&quot; src=&quot;/images/2026-02-03-Add-retracement-tool-to-trades/Screenshot from 2026-02-03 15-46-54.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now the drawing has been placed but its parameters need to be modified. We right-click on any of the lines, and select Edit properties.&lt;/p&gt;

&lt;p&gt;&lt;img width=&quot;600px&quot; src=&quot;/images/2026-02-03-Add-retracement-tool-to-trades/Screenshot from 2026-02-03 15-28-32.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;There’s a few settings in this window that we change, namely the begin point (set value to strike and date), and the end point (set value to zero, and end date).
Next, the coefficients must be changed to reflect the 5% increments as done in the previous section and also shown in the screenshot. I also changed the colors to something darker and unobstrusive.
Once we are happy with the settings, we hit “Set as default”, to reuse them next time. The percentages shown in the drawing are reversed, but I found no way of hiding them as in TradingView.&lt;/p&gt;

&lt;p&gt;&lt;img width=&quot;1100px&quot; src=&quot;/images/2026-02-03-Add-retracement-tool-to-trades/Screenshot from 2026-02-03 15-30-53.png&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;This method of using the Fibonacci retracement tool is a great way to eliminate doing mental calculations every time a position needs to be assessed how much it’s in-the-money, and facilitates seeing this visually.&lt;/p&gt;
</description>
        <pubDate>Tue, 03 Feb 2026 14:36:00 -0800</pubDate>
        <link>http://localhost:4001/blog/2026/02/03/Add-retracement-tool-to-trades.html</link>
        <guid isPermaLink="true">http://localhost:4001/blog/2026/02/03/Add-retracement-tool-to-trades.html</guid>
        
        <category>trade</category>
        
        <category>ThinkorSwim</category>
        
        <category>trading</category>
        
        <category>fibonacci</category>
        
        <category>tool</category>
        
        
        <category>blog</category>
        
      </item>
    
      <item>
        <title>Using Docker with Petalinux</title>
        <description>&lt;p&gt;How to run Petalinux on a non-supported Linux distro without a VM.
Docker is similar to a virtual machine in many respects, but much lighter
and faster, and having a reproducible environment to run Petalinux may
be of useful when switching versions.&lt;/p&gt;

&lt;h3 id=&quot;overview&quot;&gt;Overview&lt;/h3&gt;

&lt;p&gt;Docker can be used, among other things, to create a cross-compile environment
to build hardware on a platform where the Petalinux tools may not be compatible
or supported by Xilinx. In my case, Fedora 28 has some issues with Petalinux
that made me look for a supported alternative.&lt;/p&gt;

&lt;p&gt;Docker is built from a base file called Dockerfile, that has instructions
what OS to build and post-configuration steps such as dependency packages,
user permissions, etc.&lt;/p&gt;

&lt;p&gt;This build that I’m working with is based on CentOS 7.4, the latest version
supported by Petalinux. Starting with the stock CentOS, there’s a few
packages that were added, like VNC server (tigervnc-server) and Xfce
desktop for Vivado tools.&lt;/p&gt;

&lt;h3 id=&quot;volumes&quot;&gt;Volumes&lt;/h3&gt;

&lt;p&gt;Being a pseudo-virtual machine means storage is used by Docker, and these
software packages are very big, making the resulting image potentially huge.
A strategy I’m using is to use bind volumes to separate the OS from the
tools installation and the workspace. In other words, the container has
access to a few designated directories on the host from inside the container.&lt;/p&gt;

&lt;p&gt;In this case, I designated three directories to use as bind volumes.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Tools volume: where Petalinux and Vivado SDK will be installed&lt;/li&gt;
  &lt;li&gt;Workspace volume: from where to run all projects&lt;/li&gt;
  &lt;li&gt;Installers volume: where to get the installer binaries&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These volumes will be accessible from the container and from the host, and
can be changed by using the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;docker run&lt;/code&gt; command.&lt;/p&gt;

&lt;h3 id=&quot;building&quot;&gt;Building&lt;/h3&gt;

&lt;p&gt;Docker is built from the Dockerfile, downloading the Linux distro and all
dependencies and updates. The result is an image that is ready to work
on installing the tools without issues.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo docker build . -t petalinux-centos
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;A couple of tweaks were needed to have VNC access and start the Xfce
desktop on boot; copying created &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;passwd&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;xstartup&lt;/code&gt; files to
the container.&lt;/p&gt;

&lt;p&gt;xstartup:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
exec /usr/bin/xfce4-session
exec /etc/X11/xinit/xinitrc
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;passwd&lt;/code&gt; file can be created by using the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vncpasswd&lt;/code&gt; command:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ vncpasswd passwd
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;running&quot;&gt;Running&lt;/h3&gt;

&lt;p&gt;The docker run command creates a fresh instance of the image, called a
container.
This container “boots” in under a second and it’s ready to go. A simple
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;exit&lt;/code&gt; command stops the container.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo docker run --rm --entrypoint=/bin/bash \
      --user=plnx --name=petalinux-centos7 -ti \
      -v /home/user/Downloads:/home/plnx/resources:Z \
      -v /opt/docker-volumes/petalinux-2018.2-centos7.4:/opt:Z \
      -v /home/user/Workspace:/home/plnx/workspace:Z \
      petalinux-centos
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I added a VNC server to have a GUI, necessary to run Vivado and SDK from 
the host (or any host on the network potentially). To start it:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[plnx@e94aab57a34e]$ vncserver -geometry 1500x1000 :1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Notice above, the prompt inside the container changes to the containers’ Id.&lt;/p&gt;

&lt;h3 id=&quot;installing-tools&quot;&gt;Installing tools&lt;/h3&gt;

&lt;p&gt;From the host we can open a VNC viewer such as Remmina or TigerVNC to see 
the container’s GUI at address &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;172.17.0.2:1&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Inside the container we can run the Petalinux installer, as usual.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[plnx@e94aab57a34e]$ ./resources/petalinux-v2018.2-final-installer.run /opt/petalinux
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then, similarly with Vivado installer&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[plnx@e94aab57a34e]$ ./resources/Xilinx_Vivado_SDK_Web_2018.2_0614_1954_Lin64.bin
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;All files will be installed in the Tools volume under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/opt&lt;/code&gt;, but in reality
the files reside (in this example) in the host at
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/opt/docker-volumes/petalinux-2018.2-centos7.4/&lt;/code&gt;&lt;/p&gt;

&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;After the tools are installed, running a container is very fast and efficient
and always starts at the same exact point based on the image. The volumes
are persistent as they are located in the host’s drive, which can be
helpful when switching tools versions or testing differences between builds.
For my own usage, running a supported OS on my unsupported distro of choice
was the main driver.&lt;/p&gt;

&lt;h2 id=&quot;dockerfile&quot;&gt;Dockerfile&lt;/h2&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;FROM docker.io/centos:7.4.1708
MAINTAINER patocarr
LABEL Version 0.1

ENV container docker

# NOTE: Systemd needs /sys/fs/cgroup directoriy to be mounted from host in
# read-only mode. (Required).
# VOLUME [ &quot;/sys/fs/cgroup&quot; ]

# Systemd needs /run directory to be a mountpoint, otherwise it will try
# to mount tmpfs here (and will fail).  (Required).
VOLUME [ &quot;/run&quot; ]

RUN yum -y update                      &amp;amp;&amp;amp; \
    yum -y install openssh xterm rsync &amp;amp;&amp;amp; \
    yum clean all

RUN yum -y install xinetd gcc git zlib-devel ncurses-devel openssl-devel \
      libselinux1 bc unzip minicom screen net-tools gnupg diffstat \
      xorg-x11-server-Xvfb chrpath socat autoconf file \
      libtool bzip2 patch gcc-c++ texinfo automake glib2-devel \
      dos2unix iproute gawk gnutls-devel net-tools tftp-server flex bison \
      libstdc++.i686 glibc.i686 libgcc.i686 libgomp.i686 ncurses-libs.i686 \
      zlib.i686 fontconfig.i686 libXext.i686 libXrender.i686 glib2.i686 \
      libpng12.i686 libSM.i686 usbutils expect wget sudo which ; \
      yum clean all

RUN yum install -y epel-release tigervnc-server firefox
RUN yum --enablerepo=epel -y groups install Xfce
RUN yum clean all
RUN wget http://mirror.centos.org/centos/7/os/x86_64/Packages/libpng12-1.2.50-10.el7.x86_64.rpm
RUN rpm -ivh libpng12-1.2.50-10.el7.x86_64.rpm

RUN sed -ie &apos;s/disable.*= yes/disable = no/&apos; /etc/xinetd.d/tftp

RUN echo &quot;%sudo ALL=(ALL:ALL) ALL&quot; &amp;gt;&amp;gt; /etc/sudoers
RUN echo &quot;%sudo ALL=(ALL) NOPASSWD:ALL&quot; &amp;gt;&amp;gt; /etc/sudoers

# Set locale
#RUN localectl set-locale en_US.UTF-8
ENV LANG en_US.UTF-8  
ENV LANGUAGE en_US:en  
ENV LC_ALL en_US.UTF-8 

# Set up a user
RUN useradd --uid 1000 --groups wheel --system --create-home plnx
RUN echo &quot;plnx:plnx&quot; | chpasswd
WORKDIR /home/plnx

RUN chmod +w /opt &amp;amp;&amp;amp; chown -R plnx:plnx /opt

USER plnx
RUN mkdir -p /home/plnx/workspace
RUN mkdir -p /home/plnx/.vnc

ADD xstartup /home/plnx/.vnc/xstartup
ADD passwd /home/plnx/.vnc/passwd

USER root
RUN chmod 600 /home/plnx/.vnc/passwd
RUN chown plnx /home/plnx/.vnc/passwd
RUN rm /tmp/.X1-lock || :

USER plnx
CMD /usr/bin/vncserver :1 -geometry 1280x800 -depth 24 &amp;amp;&amp;amp; tail -f /home/plnx/.vnc/*:1.log


EXPOSE 22
EXPOSE 5901
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Mon, 01 Oct 2018 22:36:00 -0700</pubDate>
        <link>http://localhost:4001/blog/2018/10/01/Using-Docker-with-Petalinux.html</link>
        <guid isPermaLink="true">http://localhost:4001/blog/2018/10/01/Using-Docker-with-Petalinux.html</guid>
        
        <category>Fedora</category>
        
        <category>Petalinux</category>
        
        <category>Docker</category>
        
        <category>CentOS</category>
        
        
        <category>blog</category>
        
      </item>
    
      <item>
        <title>Installing vncserver with systemd unit on Fedora 28</title>
        <description>&lt;p&gt;Installing a VNC server should be a simple task but it comes with a few curveballs.&lt;/p&gt;

&lt;h3 id=&quot;setup&quot;&gt;Setup&lt;/h3&gt;

&lt;p&gt;Install TigerVNC server&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo dnf install tigervnc-server
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Log in to VNC manually such that it creates password and .vnc files&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ vncserver :1

You will require a password to access your desktops.

Password:
Verify:
Would you like to enter a view-only password (y/n)? n

New &apos;storm:1 (&amp;lt;USER&amp;gt;)&apos; desktop is storm:1

Creating default startup script /home/&amp;lt;USER&amp;gt;/.vnc/xstartup
Creating default config /home/&amp;lt;USER&amp;gt;/.vnc/config
Starting applications specified in /home/&amp;lt;USER&amp;gt;/.vnc/xstartup
Log file is /home/&amp;lt;USER&amp;gt;/.vnc/storm:1.log
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now use a VNC viewer to access desktop, ie. Remmina on display :1&lt;/p&gt;

&lt;p&gt;and finally kill the temporary VNC server&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ vncserver -kill :1
Killing Xvnc process ID 20915
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;systemd-unit&quot;&gt;Systemd Unit&lt;/h3&gt;

&lt;p&gt;Copy from systemd unit template&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo /lib/systemd/system/vncserver@.service /etc/systemd/system/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Edit unit to customize for user. Replace ‘&amp;lt;USER&amp;gt;’ by the user logging into VNC&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo vi /etc/systemd/system/vncserver@.service
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I had an issue where the VNC server would die after about a minute of running, apparently due to some SELinux permissions on .vnc directory. The message was:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Sep 26 21:40:39 storm systemd[1]: vncserver@:1.service: Failed with result &apos;timeout&apos;.
Sep 26 21:40:39 storm systemd[1]: Failed to start Remote desktop service (VNC).
-- Subject: Unit vncserver@:1.service has failed
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;These SELinux related commands helped the situation:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ chcon -t xserver_exec_t /home/&amp;lt;USER&amp;gt;/.vnc
$ sudo semanage fcontext -a -t xserver_exec_t &quot;/home/&amp;lt;USER&amp;gt;/.vnc(/.*)?&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now we can start the systemd unit&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo systemctl start vncserver@:1.service
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And to make it start on each subsequent system boot&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo systemctl enable vncserver@:1.service
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;reference&quot;&gt;Reference:&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://docs.fedoraproject.org/en-US/Fedora/26/html/System_Administrators_Guide/ch-TigerVNC.html#s1-vnc-server&quot;&gt;Fedora System Administrator Guide&lt;/a&gt;&lt;/p&gt;

</description>
        <pubDate>Wed, 26 Sep 2018 15:01:41 -0700</pubDate>
        <link>http://localhost:4001/blog/fedora/linux/2018/09/26/vncserver-unit-on-Fedora-28.html</link>
        <guid isPermaLink="true">http://localhost:4001/blog/fedora/linux/2018/09/26/vncserver-unit-on-Fedora-28.html</guid>
        
        
        <category>blog</category>
        
        <category>fedora</category>
        
        <category>linux</category>
        
      </item>
    
      <item>
        <title>Installing Petalinux 2018.2 on Fedora 28</title>
        <description>&lt;p&gt;Fedora 28 is not a supported platform for Petalinux 2018.2, but with a little effort, it can be installed with a workaround. We will install bash-4.3 from source rpm and use it to install Petalinux.&lt;/p&gt;

&lt;h3 id=&quot;dependencies&quot;&gt;Dependencies&lt;/h3&gt;

&lt;p&gt;As described in the &lt;a href=&quot;https://www.xilinx.com/support/documentation/sw_manuals/xilinx2018_2/ug1144-petalinux-tools-reference-guide.pdf&quot;&gt;Petalinux installation manual&lt;/a&gt; there’s a few dependencies that must be installed before attempting to install Petalinux.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo dnf install diffstat gcc-c++ chrpath socat autoconf libtool
$ sudo dnf install zlib-devel ncurses-devel openssl-devel rpcgen
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The &lt;em&gt;ncurses&lt;/em&gt; library component is too “new” for Petalinux, so we symlink’d hoping the previous version is backwards compatible. This allows the compiler to complete, but there’s some graphical issues with the ncurses GUI interfaces.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo ln -s /lib64/libncursesw.so.6.1 /lib64/libncursesw.so.5
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;installing-bash&quot;&gt;Installing bash&lt;/h3&gt;

&lt;p&gt;Attempting the Petalinux install at this stage will complete, but it would leave the yocto/source directory malformed, apparently due to this error thrown during install “environment: line 277: locked_signs: bad array subscript”. This causes the mentioned directory to failed to be populated. This &lt;a href=&quot;https://forums.xilinx.com/t5/Embedded-Linux/Peta-Linux-2018-1-install-failure/td-p/853223&quot;&gt;forum post&lt;/a&gt; describes the issue in more detail.&lt;/p&gt;

&lt;p&gt;The issue is related to bash-4.4 on Fedora 28 and Debian, which is newer than the version expected by the supported platforms, bash-4.3.&lt;/p&gt;

&lt;p&gt;So, let’s install bash-4.3 on Fedora 28 to work around this limitation. First we get the source package for the last known bash-4.3 version, from &lt;a href=&quot;https://koji.fedoraproject.org/koji/buildinfo?buildID=805704&quot;&gt;Fedora Buildsystem&lt;/a&gt;, specifically from the &lt;a href=&quot;https://kojipkgs.fedoraproject.org//packages/bash/4.3.43/4.fc26/src/bash-4.3.43-4.fc26.src.rpm&quot;&gt;bash-4.3 source link&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In order to compile bash using this rpm source, we need a few tools, namely rpmbuild, bison and texinfo.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo dnf install rpmbuild bison texinfo
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We install the rpm source which will create a directory by default under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/rpmbuild&lt;/code&gt; and populate it.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ rpm -i bash-4.3.43-4.fc26.src.rpm
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The compiled binaries will end up in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/rpmbuild/BUILD/bash-4.3/&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;So far, so good, bash is installed but the system won’t find it automatically, so we’ll change the location temporarily just to install Petalinux.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo mv /bin/bash /bin/bash-4.4
$ sudo ln -s ~/rpmbuild/BUILD/bash-4.3/bash /bin/bash
$ bash --version
GNU bash, version 4.3.43(1)-release (x86_64-redhat-linux-gnu)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;installing-petalinux&quot;&gt;Installing Petalinux&lt;/h3&gt;

&lt;p&gt;With bash out of the way, let’s install Petalinux 2018.2&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ ./petalinux-v2018.2-final-installer.run /opt/pkg/petalinux
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;After the installer completes, all directories under yocto/source are populated correctly!&lt;/p&gt;

&lt;p&gt;After the install, we revert the change to bash to the default version, deleting the symlink and reinstating the original bash version.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo rm /bin/bash
$ sudo mv /bin/bash-4.4 /bin/bash
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Sun, 09 Sep 2018 05:08:00 -0700</pubDate>
        <link>http://localhost:4001/blog/2018/09/09/Petalinux-on-Fedora-28.html</link>
        <guid isPermaLink="true">http://localhost:4001/blog/2018/09/09/Petalinux-on-Fedora-28.html</guid>
        
        <category>Fedora</category>
        
        <category>Petalinux</category>
        
        <category>install</category>
        
        
        <category>blog</category>
        
      </item>
    
      <item>
        <title>Adding ethtool to Petalinux</title>
        <description>&lt;p&gt;This post documents the steps required to add ethtool to an existing Petalinux project.&lt;/p&gt;

&lt;h3 id=&quot;sourcing-petalinux-tools&quot;&gt;Sourcing Petalinux tools&lt;/h3&gt;

&lt;p&gt;Before running any Petalinux command, you need to source their tools.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Navigate to the Petalinux project directory&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; $ cd /home/user/myproject/qBoot
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Source the Petalinux tools&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; $ source /opt/pkg/petalinux-v2018.2/settings.sh
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;checking-the-flash-page-partition-allocation&quot;&gt;Checking the flash page (partition) allocation&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Navigate to the Petalinux project directory&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; $ cd /home/user/myproject/qBoot
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Run the following command to open misc/config System Configuration&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; $ petalinux-config
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img width=&quot;800px&quot; src=&quot;/images/2018-08-30-Petalinux-ethtool/sshot1.png&quot; /&gt;
&lt;!--    ![System Configuration](/images/2018-08-30-Petalinux-ethtool/sshot1.png) --&gt;&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Select “Subsystem AUTO Hardware Settings”&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img width=&quot;800px&quot; src=&quot;/images/2018-08-30-Petalinux-ethtool/sshot2.png&quot; /&gt;
&lt;!--    ![Subsystem AUTO Hardware Settings](/images/2018-08-30-Petalinux-ethtool/sshot2.png)--&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Select “Flash Settings”&lt;/p&gt;

    &lt;p&gt;As shown, the first (boot) partition starts at address 0x0 and has a size of 0x600000 which makes the second (bootenv) partition start at address 0x600000. The second (bootenv) partition has a size of 0x80000 which makes the third (kernel) partition start at address 0x680000. Therefore, when the BOOT.BIN is programmed into the flash its offset should be 0x0, whereas the offset for the image.bin should be 0x680000.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;!--   ![Flash settings](/images/2018-08-30-Petalinux-ethtool/sshot3.png) --&gt;
&lt;p&gt;&lt;img width=&quot;800px&quot; src=&quot;/images/2018-08-30-Petalinux-ethtool/sshot3.png&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;customizing-and-building-the-kernel&quot;&gt;Customizing and building the kernel&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Navigate to the Petalinux project directory&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; $ cd /home/user/myproject/qBoot
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Run the following command to open the Configuration GUI&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; $ petalinux-config -c rootfs
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;!--    ![Configuration GUI](/images/2018-08-30-Petalinux-ethtool/sshot4.png)--&gt;
&lt;p&gt;&lt;img width=&quot;800px&quot; src=&quot;/images/2018-08-30-Petalinux-ethtool/sshot4.png&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;To enable the ethtool, navigate to: Filesystem Packages -&amp;gt; console -&amp;gt; network -&amp;gt; ethtool &amp;gt; [*] ethtool3&lt;/p&gt;

    &lt;p&gt;Enable the ethtool option&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;!--    ![Enabling ethtool](/images/2018-08-30-Petalinux-ethtool/sshot5.png)--&gt;
&lt;p&gt;&lt;img width=&quot;800px&quot; src=&quot;/images/2018-08-30-Petalinux-ethtool/sshot5.png&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;After configuring all the parameters, Save &amp;amp; Exit&lt;/p&gt;

    &lt;p&gt;Note: The phytool can be added to the build according to the following step:&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; $ vim project-spec/meta-user/conf/petalinuxbsp.conf

 IMAGE_INSTALL_append += &quot;\
 phytool \
 &quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Clean up the build by running the following command&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; $ petalinux-build -x mrproper
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Build Petalinux. This will take a while.&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; $ petalinux-build
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;When completed successfully, navigate to the following directory to locate the &lt;em&gt;image.ub&lt;/em&gt; kernel file and zynqmp_fsbl FSBL file:&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; $ cd images/linux
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Load the kernel image (updated or a brand new board) once into the QSPI flash using the SDK or Vivado tool. In case of using the SDK tool:&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
  &lt;li&gt;Select Xilinx/Program Flash menu option&lt;/li&gt;
  &lt;li&gt;Select image.bin as the Image File&lt;/li&gt;
  &lt;li&gt;Set Offset to 0x680000&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Set FSBL file to zynqmp_fsbl.elf.&lt;/p&gt;

    &lt;p&gt;Note: the kernel can only be programmed once a BOOT.BIN has already been programmed into the Zynq.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;building-the-boot-image&quot;&gt;Building the boot image&lt;/h3&gt;

&lt;p&gt;The boot image may need to be re-built due to an updated kernel or bitfile.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Navigate to the generated linux directory under the Petalinux project directory&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; $ cd /home/user/myproject/qBoot/images/linux
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;If you have an updated logic bitfile, delete system.bit and copy the new bitfile into this directory and rename it to system.bit, then generate BOOT.BIN as follows:&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; $ petalinux-package --boot --u-boot --fsbl zynqmp_fsbl.elf --fpga system.bit  pmufw pmufw.elf --force
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Load the boot image into the QSPI flash using the SDK or Vivado tool. In case of using the SDK tool:&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
  &lt;li&gt;Select Xilinx/Program Flash menu item&lt;/li&gt;
  &lt;li&gt;Select BOOT.BIN as the Image File&lt;/li&gt;
  &lt;li&gt;Set offset to 0x0&lt;/li&gt;
  &lt;li&gt;Set FSBL File to zynqmp_fsbl.elf&lt;/li&gt;
&lt;/ul&gt;

</description>
        <pubDate>Thu, 30 Aug 2018 21:15:00 -0700</pubDate>
        <link>http://localhost:4001/blog/2018/08/30/Adding-ethtool-to-Petalinux.html</link>
        <guid isPermaLink="true">http://localhost:4001/blog/2018/08/30/Adding-ethtool-to-Petalinux.html</guid>
        
        <category>Xilinx</category>
        
        <category>Petalinux</category>
        
        <category>ethtool</category>
        
        
        <category>blog</category>
        
      </item>
    
      <item>
        <title>AXI Traffic Generator Tool</title>
        <description>&lt;p&gt;File editor for the Xilinx AXI Traffic Generator IP&lt;/p&gt;

&lt;p&gt;This Python/Tk script helps manage .coe files inputs to the ATG. It’s limited to AXI-Lite transactions.
The AXI Traffic Generator reads 2 or 4 files with instructions how to issue AXI transactions, and usually these files are edited manually, which makes it cumbersome to keep aligned and synchronized but for the smallest of projects.&lt;/p&gt;

&lt;h3 id=&quot;getting-it&quot;&gt;Getting it&lt;/h3&gt;
&lt;p&gt;This script is hosted on Github and licensed with GPLv3. You may download the &lt;a href=&quot;https://github.com/patocarr/axi-traffic-gen&quot;&gt;AXI Traffic Generator tool&lt;/a&gt; from Github.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2018-08-29-AXI-traffic-generator/atg.png&quot; alt=&quot;Traffic Generator Tool Screenshot&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;running&quot;&gt;Running&lt;/h3&gt;

&lt;p&gt;The script requires Python3 with Tkinter module, which should come with all Python3 installations by default.
On Fedora 28, I had to install the Tkinter module with the following:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo dnf install python3-tkinter
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;To run the script:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ python3 atg.py
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;modes&quot;&gt;Modes:&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;System Init: only produces AXI Lite write commands, so only the Address and Data fields are required; other fields are ignored. Exporting won’t save these ignored fields into files.&lt;/li&gt;
  &lt;li&gt;Test Mode: this mode allows read and writes commands to be produced on the AXI-Lite interface. All fields are used and exported to files in this mode.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;input&quot;&gt;Input:&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;The Address, Data &amp;amp; Mask fields are interpreted as hexadecimal values. There’s no need to prepend “0x” to the values.&lt;/li&gt;
  &lt;li&gt;The Write/Read checkboxes select the type of transaction to be produced on the AXI interface. This field is ignored in System Init mode.&lt;/li&gt;
  &lt;li&gt;The Count field refers to the “Count as Error” field in the Control COE file. Read transactions are compared against the Data+Mask field and if the Count? field is set, will increment the error count if a mismatch occurred. Write transactions monitor BRESP to be OKAY, and if not, the error counter is incremented. This error counter is present in the ATG instance as an output port.&lt;/li&gt;
  &lt;li&gt;Goto Ok refers to the next entry to be executed if the current entry executes successfully. The entry is interpreted as a decimal value.&lt;/li&gt;
  &lt;li&gt;Goto Err in turn, refers to the next entry to be executed if the current transaction failed. The entry is interpreted as a decimal value.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;buttons&quot;&gt;Buttons:&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Quit: Exits the application, abandoning any edits.&lt;/li&gt;
  &lt;li&gt;Load: Loads a data.atg file previously generated by this script, containing all fields as it was saved. Useful to restore all changes from one file.&lt;/li&gt;
  &lt;li&gt;Save: Saves a data.atg file with the entire session presumably to resume at a later date. Note: It will overwrite a previously saved data.atg!&lt;/li&gt;
  &lt;li&gt;Export: Saves two .coe files (addr.coe, data.coe) if in System Init mode, or all four .coe files (addr.coe, data.coe, mask.coe &amp;amp; ctrl.coe) if in Test Mode. Note: It will overwrite previously saved .coe files without warning.&lt;/li&gt;
  &lt;li&gt;Import: Opens an import dialog that allows loading a .coe file to a selected column, ie. address, data, mask or control and populates the respective fields.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/images/2018-08-29-AXI-traffic-generator/import-coe.png&quot; alt=&quot;File Import screenshot&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Help: Basic information regarding modes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;limitations&quot;&gt;Limitations:&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Up to 25 transactions are possible, but this can easily be modified by setting the MAX_ROWS constant in the code. The ATG is limited to 256. I still haven’t figured out exactly how to add scrollbars to show more transactions, and this is the reason behind the limitation, besides never needing more. Ping me if you know how.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;to-do&quot;&gt;To-do:&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;Add buttons to allow insertion and deletion of an entire row.&lt;/li&gt;
  &lt;li&gt;Add scrollbars to allow more rows.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For information on the AXI Traffic Generator, please refer to Xilinx PG125 document.&lt;/p&gt;

</description>
        <pubDate>Wed, 29 Aug 2018 22:15:00 -0700</pubDate>
        <link>http://localhost:4001/blog/2018/08/29/AXI-Traffic-Generator-Tool.html</link>
        <guid isPermaLink="true">http://localhost:4001/blog/2018/08/29/AXI-Traffic-Generator-Tool.html</guid>
        
        <category>Xilinx</category>
        
        <category>tool</category>
        
        <category>AXI</category>
        
        <category>traffic</category>
        
        <category>generator</category>
        
        
        <category>blog</category>
        
      </item>
    
      <item>
        <title>Git patch flow</title>
        <description>&lt;p&gt;Git is a very flexible distributed source control system, so flexible in fact, that can be used in a variety of ways or flows. In this post, I describe a flow that I’ve been doing while working remotely and not having access to the central code repository.&lt;/p&gt;

&lt;h3 id=&quot;getting-the-repo&quot;&gt;Getting the repo&lt;/h3&gt;
&lt;p&gt;As said, while not having [network] access to the repo implies getting it through other means, such as sneakernet, in my case, a shared flash drive.
The files in the flash drive are in a bare repo format, without a working copy.
I copy the entire repo to a special folder on my system called ‘Upstream’, where I keep all the bare repos’ copies. I use rsync to copy the folders from the flash drive to my hard drive copying only the deltas:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ rsync -avz /path/to/flash_drive/WorkFiles ~/Work/Upstream
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;cloning&quot;&gt;Cloning&lt;/h3&gt;
&lt;p&gt;Once the bare repo is on my system, cloning it is trivial:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ cd ~/Work/
$ git clone ~/Work/Upstream/repo.git
Cloning into &apos;repo&apos;...
done.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;committing&quot;&gt;Committing&lt;/h3&gt;
&lt;p&gt;Before I start making any changes, I create a new branch and name it according to the feature being worked on. This will prove useful later on.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ git branch new-feature
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now this is where all the changes are done to the files and committed, in one or more commits. The local repo gets all the commits; the &lt;em&gt;Upstream&lt;/em&gt; repo is not touched.
For the purposes of this example, let’s say there’s 3 new commits done that we will need to send back to our remote repo.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ git log --oneline
b67943b (HEAD -&amp;gt; new-feature) Add Fedora 28 tweaks post
b275b34 Set tags to be listed horizontally in index.html
13fc44d Fix open tag error in footer.html
1689d56 (origin/master, origin/HEAD) Fix a few CSS validation errors
...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;making-a-patch-set&quot;&gt;Making a patch set&lt;/h3&gt;
&lt;p&gt;Now our feature is ready to be sent to the central repo, in the form of a patch set. We’ll create these patches using the following command and using the last commit that came with the repo, ie. usually the ‘master’ branch.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ git format-patch 1689d56
0001-Fix-open-tag-error-in-footer.html.patch
0002-Set-tags-to-be-listed-horizontally-in-index.html.patch
0003-Add-Fedora-28-tweaks-post.patch
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Note the patches are made in the opposite order as listed by git-log: they are in chronological order, from older to newer. This is the order in which they will be applied.&lt;/p&gt;

&lt;h3 id=&quot;sending-the-patch-set&quot;&gt;Sending the patch set&lt;/h3&gt;
&lt;p&gt;At this point we just need to send the patches in whichever way we can, sneakernet, email, etc. I normally use email, with the caveat that sometimes email servers change the file format of the patches, changing their line ending from Unix to DOS. To avoid this, I simply &lt;em&gt;zip&lt;/em&gt; the patches into one container zipfile.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ zip patches.zip *.patch
adding: 0001-Fix-open-tag-error-in-footer.html.patch (deflated 40%)
adding: 0002-Set-tags-to-be-listed-horizontally-in-index.html.patch (deflated 19%)
adding: 0003-Add-Fedora-28-tweaks-post.patch (deflated 32%)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Once the zipped file is ready, it’s simply sent over email to the repo maintainer.&lt;/p&gt;

&lt;h3 id=&quot;applying-the-changes&quot;&gt;Applying the changes&lt;/h3&gt;
&lt;p&gt;Well, this isn’t part of my flow because applying the patches is not under my control: the Git repo maintainer receives my patches, reviews them and applies them if all works out. If something needs to be changed, it’s sent back for more modifications, usually requiring an amended set of patches.
After &lt;em&gt;unzip&lt;/em&gt;ing the patches, the maintainer applies them:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ git apply *.patch
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;getting-a-new-update&quot;&gt;Getting a new update&lt;/h3&gt;
&lt;p&gt;Now all the changes are in the repo, including other changes done by the remote party. An update brings those updates (ie. commits) plus my commits as applied by the maintainer.
This requires updating my local bare repos as usually done and shown above using &lt;em&gt;rsync&lt;/em&gt;. After the update, there is new commits in my &lt;em&gt;Upstream&lt;/em&gt; repo that are not in my local repo. We need to synchronize them, and for that we use the &lt;em&gt;git-fetch&lt;/em&gt; command. Git fetch updates the remote branches (ie. origin/master) but doesn’t &lt;em&gt;merge&lt;/em&gt; them.
This is when having a branch before starting a change comes in handy. Now we switch or &lt;em&gt;checkout&lt;/em&gt; branch so we incorporate the changes from Upstream into our local repo’s &lt;em&gt;master&lt;/em&gt; branch.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ git branch -a
* new-feature
master
remotes/origin/HEAD
remotes/origin/master
$ git checkout master
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And we &lt;em&gt;merge&lt;/em&gt; the changes from the Upstream branch, but doing a &lt;em&gt;fast-forward&lt;/em&gt; merge:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ git pull --ff-only origin master
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This updated &lt;em&gt;master&lt;/em&gt; branch is the remote repo including the patches sent previously and applied by the maintainer. The old &lt;em&gt;new-feature&lt;/em&gt; branch is now stale and eventually Git will &lt;em&gt;garbage-collect&lt;/em&gt; it, or we can delete it manually with:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ git branch -d new-feature
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;The Git patch flow works when network access to the remote repo is not available. It’s pretty simple to work with and requires minimal changes to a regular flow.&lt;/p&gt;

</description>
        <pubDate>Thu, 31 May 2018 19:15:00 -0700</pubDate>
        <link>http://localhost:4001/blog/2018/05/31/Git-patch-flow.html</link>
        <guid isPermaLink="true">http://localhost:4001/blog/2018/05/31/Git-patch-flow.html</guid>
        
        <category>Git</category>
        
        <category>patch</category>
        
        <category>flow</category>
        
        
        <category>blog</category>
        
      </item>
    
      <item>
        <title>Tweaks to Fedora 28</title>
        <description>&lt;p&gt;Upgrading to Fedora 28 was quite a smooth experience, on all 3 of my computers, two upgraded from Fedora 27 and one installed from scratch. Here’s a few tweaks I did afterwards to make it better suited for my use case.&lt;/p&gt;

&lt;h5 id=&quot;nautilus&quot;&gt;Nautilus&lt;/h5&gt;

&lt;p&gt;As you may know, Nautilus is the default “Files” application in Fedora or rather, in Gnome 3.x. There is a Python interface to add extensions and include useful custom functionality. One of these extensions is &lt;a href=&quot;https://github.com/lamsh/nautilus-git-gui&quot;&gt;nautilus-git-gui&lt;/a&gt; that provides access to Git-Gui and Gitk from the context menu in Nautilus.
To install the extension, we first need to install the python2-nautilus package using dnf, as follows:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo dnf install python2-nautilus
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then we clone the above Git repo and copy (or link) it so Nautilus can find it.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ git clone https://github.com/lamsh/nautilus-git-gui
$ ln -s nautilus-git-gui ~/.local/share/nautilus-python/extensions
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And we kill the running instance of nautilus, so it restarts and takes the extension:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ nautilus -q
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;After this, right-clicking on a free area in the Nautilus windows, brings up the context menu with two new items: “Git GUI Here” and “Gitk Here”.&lt;/p&gt;

&lt;p&gt;Another quick addition and really useful, is adding the “Open Terminal Here” in the same context menu. The package is “gnome-terminal-nautilus”:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo dnf install gnome-terminal-nautilus
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;and restarting nautilus as above to take effect immediately.&lt;/p&gt;

&lt;p&gt;A last tweak to nautilus, is to open Preferences and check the “Sort folders before files”, so it groups all folders before any files are listed.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2018-05-31-Tweaks-to-Fedora-28/nautilus-context-menu.png&quot; alt=&quot;Screenshot showing the nautilus context menu&quot; /&gt;&lt;/p&gt;

&lt;h5 id=&quot;gnome&quot;&gt;Gnome&lt;/h5&gt;
&lt;h3 id=&quot;dash-to-panel&quot;&gt;Dash-to-panel&lt;/h3&gt;
&lt;p&gt;This extension to gnome-shell is growing on me since I installed it a week ago. From its github page: “&lt;em&gt;An icon taskbar for the Gnome Shell. This extension moves the dash into the gnome main panel so that the application launchers and system tray are combined into a single panel, similar to that found in KDE Plasma and Windows 7+. A separate dock is no longer needed for easy access to running and favorited applications.&lt;/em&gt;”&lt;/p&gt;

&lt;p&gt;Github’s site of &lt;a href=&quot;https://github.com/home-sweet-gnome/dash-to-panel&quot;&gt;dash-to-panel&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To install, we’ll clone it somewhere and then link (or copy) it from where gnome-shell expects it:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ git clone https://github.com/home-sweet-gnome/dash-to-panel
$ ln -s dash-to-panel ~/.local/share/gnome-shell/extensions/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It’s certainly worth trying. The workspace looks cleaner with all icons, menus, etc. grouped at the bottom of the screen. There’s too many configuration options to describe. A really nice addition to the Gnome desktop.&lt;/p&gt;

&lt;h3 id=&quot;gnome-tweaks&quot;&gt;Gnome-tweaks&lt;/h3&gt;
&lt;p&gt;This application is a must-have and should be installed by default along Gnome 3. You can use it to &lt;em&gt;tweak&lt;/em&gt; several options regarding the desktop behavior, appearance, extensions, fonts, etc. To install:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo dnf install gnome-tweaks
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h5 id=&quot;java&quot;&gt;Java&lt;/h5&gt;
&lt;p&gt;Fedora comes with Java installed but without the GUI packages, and trying to run a program that uses them would throw a “Java headless exception”. To install the full Java package:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo dnf install java-1.8.0-openjdk
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Thu, 31 May 2018 14:25:00 -0700</pubDate>
        <link>http://localhost:4001/blog/2018/05/31/Tweaks-to-Fedora-28.html</link>
        <guid isPermaLink="true">http://localhost:4001/blog/2018/05/31/Tweaks-to-Fedora-28.html</guid>
        
        <category>Fedora</category>
        
        <category>tweaks</category>
        
        
        <category>blog</category>
        
      </item>
    
      <item>
        <title>Vivado simulator fix on Fedora 28</title>
        <description>&lt;p&gt;Xilinx Vivado HLx is not currently supported on the latest version of Fedora (28) but since living on the edge entails some suffering, I decided to stick with 28 and plough my way through the challenge. I installed Vivado 2018.1 on Fedora 28, and found some issues during installation, detailed on this post of mine in Xilinx’ forums: &lt;a href=&quot;https://forums.xilinx.com/t5/Installation-and-Licensing/Installing-Vivado-2018-1-on-Fedora-28/m-p/855996#M21928&quot;&gt;Installing Vivado 2018.1 on Fedora 28&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After the installation went through with the above fixes, the RTL simulation still crashed when launched. The error shown was not very revealing…&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ERROR: [XSIM 43-3409] Failed to compile generated C file xsim.dir/system_tb_behav/obj/xsim_3.c.
ERROR: [XSIM 43-3915] Encountered a fatal error. Cannot continue. Exiting... 
run_program: Time (s): cpu = 00:00:08 ; elapsed = 00:00:08 . Memory (MB): peak = 7517.402 ; gain = 0.000 ; free physical = 42243 ; free virtual = 79865
INFO: [USF-XSim-69] &apos;elaborate&apos; step finished in &apos;8&apos; seconds
INFO: [USF-XSim-99] Step results log file:&apos;/home/pcarr/Work/tux/vivado-test1/project_2/project_2.sim/sim_1/behav/xsim/elaborate.log&apos;
ERROR: [USF-XSim-62] &apos;elaborate&apos; step failed with error(s). Please check the Tcl console output or &apos;/home/pcarr/Work/tux/vivado-test1/project_2/project_2.sim/sim_1/behav/xsim/elaborate.log&apos; file for more information.
ERROR: [Vivado 12-4473] Detected error while running simulation. Please correct the issue and retry this operation.
launch_simulation: Time (s): cpu = 00:00:11 ; elapsed = 00:00:10 . Memory (MB): peak = 7517.402 ; gain = 4.008 ; free physical = 42222 ; free virtual = 79844
ERROR: [Common 17-39] &apos;launch_simulation&apos; failed due to earlier errors.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The file &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;elaborate.log&lt;/code&gt; doesn’t show much information, saying that there was a problem compiling a file, though the compiler seems to be clang and using gcc as linker.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/opt/Xilinx/Vivado/2018.1/data/../tps/llvm/3.1/lnx64.o/bin/clang  -fPIC -c -std=gnu89 -nobuiltininc -nostdinc++ -w  -Wl,--unresolved-symbols=ignore-in-object-files -fbracket-depth=1048576 -I/opt/Xilinx/Vivado/2018.1/data/../tps/llvm/3.1/lnx64.o/bin/../lib/clang/3.1/include -fPIC -m64  -I&quot;/opt/Xilinx/Vivado/2018.1/data/xsim/include&quot; &quot;xsim.dir/system_tb_behav/obj/xsim_3.c&quot; -O0 -sim -o &quot;xsim.dir/system_tb_behav/obj/xsim_3.lnx64.o&quot; -DXILINX_SIMULATOR
Linking with command:
/usr/bin/gcc -Wa,-W  -O -fPIC  -m64  -Wl,--unresolved-symbols=ignore-all  -o &quot;xsim.dir/system_tb_behav/xsimk&quot;   &quot;xsim.dir/system_tb_behav/obj/xsim_0.lnx64.o&quot; &quot;xsim.dir/system_tb_behav/obj/xsim_1.lnx64.o&quot; &quot;xsim.dir/system_tb_behav/obj/xsim_2.lnx64.o&quot; &quot;xsim.dir/system_tb_behav/obj/xsim_3.lnx64.o&quot; &quot;/opt/Xilinx/Vivado/2018.1/lib/lnx64.o/librdi_simulator_kernel.so&quot;  &quot;/opt/Xilinx/Vivado/2018.1/lib/lnx64.o/librdi_simbridge_kernel.so&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Let’s try to get more verbosity to find out what’s happening, using the Settings/Simulation dialog, or optionally, these Tcl commands:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;set_property -name {xsim.elaborate.mt_level} -value {off} -objects [get_filesets sim_1]
set_property -name {xsim.elaborate.xelab.more_options} -value {-v 1} -objects [get_filesets sim_1]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;/images/2018-05-26-Vivado-simulator-fix-on-Fedora-28/Screenshot from 2018-05-27 01-08-51.png&quot; alt=&quot;Screenshot to show simulation verbosity (-v 1) and turn off multithreading (-mt off)&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Then re-launching the simulation, we get more insight into the problem:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/opt/Xilinx/Vivado/2018.1/data/../tps/llvm/3.1/lnx64.o/bin/clang  -fPIC -c -std=gnu89 -nobuiltininc -nostdinc++ -w  -Wl,--unresolved-symbols=ignore-in-object-files -fbracket-depth=1048576 -I/opt/Xilinx/Vivado/2018.1/data/../tps/llvm/3.1/lnx64.o/bin/../lib/clang/3.1/include -fPIC -m64  -I&quot;/opt/Xilinx/Vivado/2018.1/data/xsim/include&quot; &quot;xsim.dir/system_tb_behav/obj/xsim_3.c&quot; -O0 -sim -o &quot;xsim.dir/system_tb_behav/obj/xsim_3.lnx64.o&quot; -DXILINX_SIMULATOR
/opt/Xilinx/Vivado/2018.1/data/../tps/llvm/3.1/lnx64.o/bin/clang: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
ERROR: [XSIM 43-3409] Failed to compile generated C file xsim.dir/system_tb_behav/obj/xsim_3.c.
ERROR: [XSIM 43-3915] Encountered a fatal error. Cannot continue. Exiting... 
run_program: Time (s): cpu = 00:00:09 ; elapsed = 00:00:09 . Memory (MB): peak = 6832.422 ; gain = 0.000 ; free physical = 43364 ; free virtual = 80995
INFO: [USF-XSim-69] &apos;elaborate&apos; step finished in &apos;9&apos; seconds
INFO: [USF-XSim-99] Step results log file:&apos;/home/pcarr/Work/tux/vivado-test1/project_2/project_2.sim/sim_1/behav/xsim/elaborate.log&apos;
ERROR: [USF-XSim-62] &apos;elaborate&apos; step failed with error(s). Please check the Tcl console output or &apos;/home/pcarr/Work/tux/vivado-test1/project_2/project_2.sim/sim_1/behav/xsim/elaborate.log&apos; file for more information.
ERROR: [Vivado 12-4473] Detected error while running simulation. Please correct the issue and retry this operation.
launch_simulation: Time (s): cpu = 00:00:13 ; elapsed = 00:00:11 . Memory (MB): peak = 6832.422 ; gain = 0.000 ; free physical = 43343 ; free virtual = 80974
ERROR: [Common 17-39] &apos;launch_simulation&apos; failed due to earlier errors.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Aha, there’s a missing library &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;libncurses.so.5&lt;/code&gt; as seen in the error message above. Let’s find out where this library is on the filesystem:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ locate libncurses.so.5
/opt/Xilinx/Vivado/2018.1/lib/lnx64.o/SuSE/libncurses.so.5
/opt/Xilinx/Vivado/2018.1/lnx64/tools/gdb_v7_2/libncurses.so.5
/usr/lib64/libncurses.so.6
/usr/lib64/libncurses.so.6.1
/usr/lib64/libncursesw.so.6
/usr/lib64/libncursesw.so.6.1
/usr/lib64/vlc/plugins/gui/libncurses_plugin.so
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;With some luck, this soft link would help trick the compiler:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo ln -s /usr/lib64/libncurses.so.6 /usr/lib64/libncurses.so.5
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And it did! Now Vivado simulator works normally :)&lt;/p&gt;

</description>
        <pubDate>Sat, 26 May 2018 12:35:00 -0700</pubDate>
        <link>http://localhost:4001/blog/2018/05/26/Vivado-simulator-fix-on-Fedora-28.html</link>
        <guid isPermaLink="true">http://localhost:4001/blog/2018/05/26/Vivado-simulator-fix-on-Fedora-28.html</guid>
        
        <category>Fedora</category>
        
        <category>Xilinx</category>
        
        <category>Vivado</category>
        
        <category>blog</category>
        
        
        <category>blog</category>
        
      </item>
    
      <item>
        <title>Installing MCUxpresso Config Tools on Fedora</title>
        <description>&lt;p&gt;MCUxpresso Config Tools package comes with its installer for Ubuntu (14,16) in .deb.bin format, a self-extracting command-line installer. In order to install it in Fedora (or CentOS or RHEL), we’ll extract it and then copy its files to the filesystem.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ cd ~/Download (or download location)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This command extracts the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.deb&lt;/code&gt; to the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mcux-tools&lt;/code&gt; directory:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ dpkg-deb -x MCUXPRESSO-CT-LIN64-DEB-PACKAGE.deb mcux-tools/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then we copy (or move) the extracted files under the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/opt&lt;/code&gt; directory:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo cp -r mcux-tools/opt/nxp /opt
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The path to the application in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;com.nxp.mcuxpresso-config-tools-v4.desktop&lt;/code&gt; file may need to be fixed to point to the actual install location, in italics below:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[Desktop Entry]
Type=Application
Version=4.0
Name=MCUXpresso Config Tools v4.0
Comment=MCUXpresso Config Tools v4.0
Icon=/opt/nxp/MCUX_CFG_v4/bin/icon.xpm
Exec=env UBUNTU_MENUPROXY=0 /opt/nxp/MCUX_CFG_v4/bin/tools
Path=/opt/nxp/MCUX_CFG_v4/bin
Categories=Development;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The last step would be to copy the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.desktop&lt;/code&gt; file, so it shows in the Applications menu.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ cp mcux-tools/share/applications/com.nxp.mcuxpresso-config-tools-v4.desktop ~/.local/share/applications
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;or system-wide for all users to:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo cp mcux-tools/share/applications/com.nxp.mcuxpresso-config-tools-v4.desktop /usr/share/applications
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Sat, 20 Jan 2018 18:25:00 -0800</pubDate>
        <link>http://localhost:4001/blog/2018/01/20/MCUxpresso-Tools-on-Fedora.html</link>
        <guid isPermaLink="true">http://localhost:4001/blog/2018/01/20/MCUxpresso-Tools-on-Fedora.html</guid>
        
        <category>Fedora</category>
        
        <category>NXP</category>
        
        <category>MCUxpresso</category>
        
        <category>install</category>
        
        
        <category>blog</category>
        
      </item>
    
  </channel>
</rss>
