-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.json
1 lines (1 loc) · 79.9 KB
/
index.json
1
[{"categories":["tech-embedded"],"content":" The idea behind this tutorial is to show how to install SimulIDE to run codes for an Arduino Uno board. Screenshots below were taken from a Windows machine. It will be the same thing for Unix-based systems (tested on Ubuntu). Some comments for the Mac port at the end (but it works!) ","date":"2023-01-22","objectID":"/simulide/:0:0","tags":["simulide","arduino","simulation"],"title":"Quick start guide for SimulIDE as an Arduino simulator","uri":"/simulide/"},{"categories":["tech-embedded"],"content":"Downloading tools SimulIDE : Last Stable Version (0.4.15). For Linux, please prefer the Linux64 archive. Arduino. Legacy IDE (1.8.X). Download the Windows ZIP file or the Linux 64 bits archive. Note : for Ubuntu/Debian derivatives, you should install a few libraries to make SimulIDE working: sudo apt-get install libqt5core5a libqt5gui5 libqt5xml5 libqt5svg5 libqt5widgets5 libqt5concurrent5 libqt5multimedia5 libqt5multimedia5-plugins libqt5serialport5 libqt5script5 libelf1 Extract softwares in a directory. You should get something similar to this: ","date":"2023-01-22","objectID":"/simulide/:1:0","tags":["simulide","arduino","simulation"],"title":"Quick start guide for SimulIDE as an Arduino simulator","uri":"/simulide/"},{"categories":["tech-embedded"],"content":"Example: blinking LEDs on an Arduino Uno In order to execute SimulIDE, run the executable at: \u003csimulide_dir\u003e/bin (on Windows) Here is the main interface : ","date":"2023-01-22","objectID":"/simulide/:2:0","tags":["simulide","arduino","simulation"],"title":"Quick start guide for SimulIDE as an Arduino simulator","uri":"/simulide/"},{"categories":["tech-embedded"],"content":"Schematic settings (red rectangle) 1 2 3 4 5 6 7 8 SimulIDE settings Switch between already opened files New file Open Save Save as Run simulation Pause ","date":"2023-01-22","objectID":"/simulide/:2:1","tags":["simulide","arduino","simulation"],"title":"Quick start guide for SimulIDE as an Arduino simulator","uri":"/simulide/"},{"categories":["tech-embedded"],"content":"Code editor settings (blue rectangle) 1 2 3 4 5 6 7 8 Code settings Switch between already opened files New file Open Save Save as Compile Download on the Arduino Open the LED fadding example (\u003csimulide_dir\u003e/share/simulide/examples/Arduino/ledFadding) .simu file for the schematic. .ino file for the code. ","date":"2023-01-22","objectID":"/simulide/:2:2","tags":["simulide","arduino","simulation"],"title":"Quick start guide for SimulIDE as an Arduino simulator","uri":"/simulide/"},{"categories":["tech-embedded"],"content":"Compiler configuration Right click on the ledFadding.ino and click Set Compiler Path. Select the directory where you have the Arduino executable (./simul_ide/arduino-1.8.12 in the screenshot below). Now you should be able to compile and upload your code! Now, just click on the red button in the upper left toolbar: Hint: if you need a serial monitor, right click on the Arduino and select Open Serial Monitor. Hint: if you need something like a real-time monitor, right click on the Arduino and select Open MCU Monitor. You’ll be able to check register contents in real-time when the simulation is running ! ","date":"2023-01-22","objectID":"/simulide/:2:3","tags":["simulide","arduino","simulation"],"title":"Quick start guide for SimulIDE as an Arduino simulator","uri":"/simulide/"},{"categories":["tech-embedded"],"content":"Alternative compiler configuration Sometimes, compiler settings are a bit painful. It may be easier to compile the binary in the default Arduino IDE and export the HEX file to be loaded in the simulator. Compile the binary in the Arduino editor. Then click on Sketch =\u003e Export compiled binary. Then, right click on the Arduino in SimulIDE and select Load firmware and look for the *.hex file just compiled close to the Arduino project file. ","date":"2023-01-22","objectID":"/simulide/:3:0","tags":["simulide","arduino","simulation"],"title":"Quick start guide for SimulIDE as an Arduino simulator","uri":"/simulide/"},{"categories":["articles"],"content":" Just copying instructions from https://debian-facile.org/viewtopic.php?id=29025 in case this case falls down Prerequisites : Wine staging: https://wiki.winehq.org/Download Winetricks: https://wiki.winehq.org/Winetricks Openambit: https://github.com/openambitproject/openambit Watch with R/W for everyone: sudo wget https://raw.githubusercontent.com/openambitproject/openambit/master/src/libambit/libambit.rules -O /etc/udev/rules.d/libambit.rules sudo udevadm control --reload-rules \u0026\u0026 udevadm trigger 32-bit Wine prefix: export WINEARCH=\"win32\" Install .NET 4.5.2: winetricks dotnet452 Windows 7 mode: winetricks win7 Disable SDL detection in Wine (otherwise, watch isn’t detected): wine reg add 'HKLM\\System\\CurrentControlSet\\Services\\WineBus' /v 'Enable SDL' /t REG_DWORD /d 0 /f Download and install Suuntolink: wget -P ~/.wine/drive_c/ https://suuntolink.static.movescount.com/Suuntolink_installer.exe wine ~/.wine/drive_c/Suuntolink_installer.exe In case of a bug, just restart Wine: wineserver -k ","date":"2022-12-26","objectID":"/suunto_ambit3/:0:0","tags":["suunto","gps"],"title":"Suunto Ambit and Linux","uri":"/suunto_ambit3/"},{"categories":["tech-security"],"content":"The idea is to get a PDF of M82 bibliography instead of the Framapad. https://github.com/pcotret/pad-biblio-cyber-pdf/releases/tag/2022-11-06 ","date":"2022-11-06","objectID":"/biblio-cyber/:0:0","tags":["bibliography","security"],"title":"M82 bibliography PDF","uri":"/biblio-cyber/"},{"categories":["tech-misc"],"content":"Recently added a webpage to view conference deadlines: https://pcotret.github.io/deadlines-confs/ Based on sec-deadlines.github.io which is based on https://aideadlin.es/ ","date":"2022-10-13","objectID":"/confs_static/:0:0","tags":["website"],"title":"Static page for conference deadlines","uri":"/confs_static/"},{"categories":["tech-security"],"content":" https://github.com/hhyyrylainen/GodotPckTool. GUI to play with Godot files. https://github.com/tehskai/godot-unpacker. Really useful as it’s able to unpack a Godot binary. https://github.com/bruvzg/gdsdecomp ","date":"2022-06-12","objectID":"/godot-tools/:0:0","tags":["ctf","security"],"title":"Godot reverse tools","uri":"/godot-tools/"},{"categories":["articles"],"content":" Mostly based on this great tutorial : https://bobbl.github.io/fpga/microsemi/2021/04/30/install-libero-update.html ","date":"2022-03-18","objectID":"/microsemi_ubuntu/:0:0","tags":["fpga","microsemi"],"title":"Installing Microsemi Libero 2021.3 on Ubuntu 20 LTS","uri":"/microsemi_ubuntu/"},{"categories":["articles"],"content":"Prerequisites sudo apt install libxtst6:i386 libxrender1:i386 apt-file lsb xfonts-intl-asian xfonts-intl-chinese xfonts-intl-chinese-big xfonts-intl-japanese xfonts-intl-japanese-big ksh libxft2:i386 libgtk2.0-0:i386 libcanberra-gtk-module:i386 libqt5xdg-dev:i386 You may need other QT related packages in their i386 flavour. ","date":"2022-03-18","objectID":"/microsemi_ubuntu/:1:0","tags":["fpga","microsemi"],"title":"Installing Microsemi Libero 2021.3 on Ubuntu 20 LTS","uri":"/microsemi_ubuntu/"},{"categories":["articles"],"content":"Get License Create a directory for the license server (here I use ~/.local/share/microsemi/license) mkdir --p /home/USERNAME/.local/share/microsemi/license Download the “Linux Daemon” from https://www.microsemi.com/product-directory/design-resources/1711-licensing#downloads to the license directory and extract it with: tar xf Linux_Licensing_Daemon.tar.Z Create an account on https://www.microsemi.com and request a “Libero Silver 1Yr Floating License for Windows/Linux Server”. You have to enter your MAC address (12 hexadecimal digits without colons), which you can get by typing ip link | grep ether The license file is sent via email. Store the license file License.dat in the license directory. Now the first four lines of the license file must be edited, but not the rest of the file. In the first line, replace \u003cput.hostname.here\u003e by localhost. In lines 2 to 4 replace PATH by the absolute path to the license daemon directory. The first 4 lines schould then look like that: SERVER localhost 112233445566 1702 DAEMON actlmgrd /home/USERNAME/.local/share/microsemi/license/Linux_Licensing_Daemon/actlmgrd DAEMON mgcld /home/USERNAME/.local/share/microsemi/license/Linux_Licensing_Daemon/mgcld VENDOR snpslmd /home/USERNAME/.local/share/microsemi/license/Linux_Licensing_Daemon/snpslmd The license manager requires that /usr/tmp exists (otherwise you get “FlexNet Licensing error:-25,234”) sudo ln -s /tmp /usr/tmp Install the depedencies sudo apt install lsb And start the license server with Linux_Licensing_Daemon/lmgrd -c License.dat -log /tmp/lmgrd.log If you get a “file not found” error, install lsb. On my system I have the problem that the license works only for a few minutes. I don’t know why, but when I start Libero a second time after a few minutes, it doesn’t recognise the license. Stopping and restarting the license server helps: Linux_Licensing_Daemon/lmdown -c License.dat -q Linux_Licensing_Daemon/lmgrd -c License.dat -log /tmp/lmgrd.log ","date":"2022-03-18","objectID":"/microsemi_ubuntu/:2:0","tags":["fpga","microsemi"],"title":"Installing Microsemi Libero 2021.3 on Ubuntu 20 LTS","uri":"/microsemi_ubuntu/"},{"categories":["articles"],"content":"Known issues Let’s have a look at the first lines of the license file again: SERVER localhost 112233445566 1702 DAEMON actlmgrd /home/USERNAME/.local/share/microsemi/license/Linux_Licensing_Daemon/actlmgrd DAEMON mgcld /home/USERNAME/.local/share/microsemi/license/Linux_Licensing_Daemon/mgcld VENDOR snpslmd /home/USERNAME/.local/share/microsemi/license/Linux_Licensing_Daemon/snpslmd actlmgrdmust be a 32-bit daemon. mgcld and snpslmd must be 64-bits daemons. Don’t ask me why, we went through several problems until finding this solution. ","date":"2022-03-18","objectID":"/microsemi_ubuntu/:3:0","tags":["fpga","microsemi"],"title":"Installing Microsemi Libero 2021.3 on Ubuntu 20 LTS","uri":"/microsemi_ubuntu/"},{"categories":["articles"],"content":"Install Libero Download “Libero SoC v2021.3 for Linux” from https://www.microsemi.com/product-directory/design-resources/1750-libero-soc#downloads. The downloaded binary is a self-extracting archive built with InstallAnywhere. Before executing it, set its execute bit must be set and some dependencies have to be installed: chmod +x Libero_SoC_v2021.3_lin.bin ./Libero_SoC_v2021.3_lin.bin Before actually starting Libero, some environment variables have to be set: export LM_LICENSE_FILE=1702@localhost export SNPSLMD_LICENSE_FILE=1702@localhost export LD_LIBRARY_PATH=/usr/lib/i386-linux-gnu/:/usr/lib/x86_64-linux-gnu/:/usr/lib Now, you can launch Libero SoC: /opt/microsemi/Libero_SoC_v2021.3/Libero/bin ","date":"2022-03-18","objectID":"/microsemi_ubuntu/:4:0","tags":["fpga","microsemi"],"title":"Installing Microsemi Libero 2021.3 on Ubuntu 20 LTS","uri":"/microsemi_ubuntu/"},{"categories":["tech-misc"],"content":"OSINT 101 Some ressources to get into OSINT: https://osintfr.com/en/how-to-begin-faq/ https://www.youtube.com/playlist?list=PLrFPX1Vfqk3ehZKSFeb9pVIHqxqrNW8Sy CTFs: https://sourcing.games/ (several challenges, maybe the easiest to start with) https://investigator.cybersoc.wales/challenges https://ctf.cybersoc.wales/challenges ","date":"2022-01-11","objectID":"/osint101/:0:0","tags":["osint,ctf"],"title":"OSINT 101","uri":"/osint101/"},{"categories":["ctf"],"content":"https://hexactf.ctfd.io/ An OSINT-based CTF done by Sopra and “La Fabrique Défense” (French DoD entity) Some writeups are here: https://github.com/pcotret/ctf-writeups/tree/master/hexa-2021 ","date":"2021-12-05","objectID":"/haxe_osint_2021/:0:0","tags":["osint"],"title":"HEXA OSINT CTF 2021","uri":"/haxe_osint_2021/"},{"categories":["ctf"],"content":"Unlock Your Brain OSINT CTF https://github.com/pcotret/ctf-writeups/tree/master/uybhys-2021 This year, it was again an OSINT related CTF made by the OSINT-FR community ","date":"2021-11-14","objectID":"/unlock2021/:0:0","tags":["osint"],"title":"Unlock your Brain OSINT CTF 2021","uri":"/unlock2021/"},{"categories":["ctf"],"content":"RCTS CERT CTF writeups: https://github.com/pcotret/ctf-writeups/tree/master/rcts-cert-2021 https://defendingthesoc.ctf.cert.rcts.pt/ ","date":"2021-08-11","objectID":"/rcts-cert/:0:0","tags":["ctf","cert","rcts"],"title":"RCTS CERT CTF","uri":"/rcts-cert/"},{"categories":["ctf"],"content":" Based on https://skerritt.blog/free-rooms/. Some rooms became private in the meantime… ","date":"2021-08-10","objectID":"/tryhackme/:0:0","tags":["free","crypto","hack","tryhackme"],"title":"TryHackMe free rooms","uri":"/tryhackme/"},{"categories":["ctf"],"content":"Level 1 - Intro OpenVPN https://tryhackme.com/room/openvpn Welcome https://tryhackme.com/jr/welcome Intro to Researching https://tryhackme.com/room/introtoresearch Crash Course Pentesting https://tryhackme.com/room/ccpentesting ","date":"2021-08-10","objectID":"/tryhackme/:1:0","tags":["free","crypto","hack","tryhackme"],"title":"TryHackMe free rooms","uri":"/tryhackme/"},{"categories":["ctf"],"content":"Introductory CTFs to get your feet wet Google Dorking https://tryhackme.com/room/googledorking OHsint https://tryhackme.com/room/ohsint Shodan.io https://tryhackme.com/room/shodan ","date":"2021-08-10","objectID":"/tryhackme/:1:1","tags":["free","crypto","hack","tryhackme"],"title":"TryHackMe free rooms","uri":"/tryhackme/"},{"categories":["ctf"],"content":"Level 2 - Tooling Tmux https://tryhackme.com/room/rptmux Web Scanning https://tryhackme.com/room/rpwebscanning Sublist3r https://tryhackme.com/room/rpsublist3r Metasploit https://tryhackme.com/room/rpmetasploit Hydra https://tryhackme.com/room/hydra Linux Privesc https://tryhackme.com/room/linuxprivesc Web Scanning https://tryhackme.com/room/rpwebscanning ","date":"2021-08-10","objectID":"/tryhackme/:2:0","tags":["free","crypto","hack","tryhackme"],"title":"TryHackMe free rooms","uri":"/tryhackme/"},{"categories":["ctf"],"content":"More introductory CTFs Vulnversity - https://tryhackme.com/room/vulnversity Blue - https://tryhackme.com/room/blue Simple CTF https://tryhackme.com/room/easyctf Bounty Hacker https://tryhackme.com/room/cowboyhacker ","date":"2021-08-10","objectID":"/tryhackme/:2:1","tags":["free","crypto","hack","tryhackme"],"title":"TryHackMe free rooms","uri":"/tryhackme/"},{"categories":["ctf"],"content":"Level 3 - Crypto \u0026 Hashes with CTF practice Crack the hash https://tryhackme.com/room/crackthehash Agent Sudo https://tryhackme.com/room/agentsudoctf The Cod Caper https://tryhackme.com/room/thecodcaper Ice https://tryhackme.com/room/ice Lazy Admin https://tryhackme.com/room/lazyadmin Basic Pentesting https://tryhackme.com/room/basicpentestingjt ","date":"2021-08-10","objectID":"/tryhackme/:3:0","tags":["free","crypto","hack","tryhackme"],"title":"TryHackMe free rooms","uri":"/tryhackme/"},{"categories":["ctf"],"content":"Level 4 - Web OWASP top 10 https://tryhackme.com/room/owasptop10 Inclusion https://tryhackme.com/room/inclusion Injection https://tryhackme.com/room/injection Vulnversity https://tryhackme.com/room/vulnversity Basic Pentesting https://tryhackme.com/room/basicpentestingjt Juiceshop https://tryhackme.com/room/owaspjuiceshop Ignite https://tryhackme.com/room/ignite Overpass https://tryhackme.com/room/overpass Year of the Rabbit https://tryhackme.com/room/yearoftherabbit DevelPy https://tryhackme.com/room/bsidesgtdevelpy Jack of all trades https://tryhackme.com/room/jackofalltrades Bolt https://tryhackme.com/room/bolt ","date":"2021-08-10","objectID":"/tryhackme/:4:0","tags":["free","crypto","hack","tryhackme"],"title":"TryHackMe free rooms","uri":"/tryhackme/"},{"categories":["ctf"],"content":"Level 5 - Reverse Engineering Intro to x86 64 https://tryhackme.com/room/introtox8664 CC Ghidra https://tryhackme.com/room/ccghidra CC Radare2 https://tryhackme.com/room/ccradare2 CC Steganography https://tryhackme.com/room/ccstego Reverse Engineering https://tryhackme.com/room/reverseengineering Reversing ELF https://tryhackme.com/room/reverselfiles Dumping Router Firmware https://tryhackme.com/room/rfirmware ","date":"2021-08-10","objectID":"/tryhackme/:5:0","tags":["free","crypto","hack","tryhackme"],"title":"TryHackMe free rooms","uri":"/tryhackme/"},{"categories":["ctf"],"content":"Level 6 - PrivEsc Sudo Security Bypass https://tryhackme.com/room/sudovulnsbypass Sudo Buffer Overflow https://tryhackme.com/room/sudovulnsbof Windows Privesc Arena https://tryhackme.com/room/windowsprivescarena Linux Privesc Arena https://tryhackme.com/room/linuxprivescarena Windows Privesc https://tryhackme.com/room/windows10privesc Blaster https://tryhackme.com/room/blaster Ignite https://tryhackme.com/room/ignite Kenobi https://tryhackme.com/room/kenobi Capture the flag https://tryhackme.com/room/c4ptur3th3fl4g Pickle Rick https://tryhackme.com/room/picklerick ","date":"2021-08-10","objectID":"/tryhackme/:6:0","tags":["free","crypto","hack","tryhackme"],"title":"TryHackMe free rooms","uri":"/tryhackme/"},{"categories":["ctf"],"content":"Level 7 - CTF practice Post Exploitation Basics https://tryhackme.com/room/postexploit Smag Grotto https://tryhackme.com/room/smaggrotto Inclusion https://tryhackme.com/room/inclusion Dogcat https://tryhackme.com/room/dogcat LFI basics https://tryhackme.com/room/lfibasics Buffer Overflow Prep https://tryhackme.com/room/bufferoverflowprep Overpass https://tryhackme.com/room/overpass Break out the cage https://tryhackme.com/room/breakoutthecage1 Lian Yu https://tryhackme.com/room/lianyu ","date":"2021-08-10","objectID":"/tryhackme/:7:0","tags":["free","crypto","hack","tryhackme"],"title":"TryHackMe free rooms","uri":"/tryhackme/"},{"categories":["ctf"],"content":"Level 8 - Windows Attacktive Directory https://tryhackme.com/room/attacktivedirectory Retro https://tryhackme.com/room/retro Blue Print https://tryhackme.com/room/blueprint Anthem https://tryhackme.com/room/anthem Relevant https://tryhackme.com/room/relevant ","date":"2021-08-10","objectID":"/tryhackme/:8:0","tags":["free","crypto","hack","tryhackme"],"title":"TryHackMe free rooms","uri":"/tryhackme/"},{"categories":["tech-security"],"content":"Download the OWASP BWA VM: https://www.vulnhub.com/entry/owasp-broken-web-applications-project-12,46/ ","date":"2021-01-17","objectID":"/owasp-bwa/:0:0","tags":["owasp","security"],"title":"OWASP BWA VM settings","uri":"/owasp-bwa/"},{"categories":["tech-security"],"content":"Network settings ","date":"2021-01-17","objectID":"/owasp-bwa/:1:0","tags":["owasp","security"],"title":"OWASP BWA VM settings","uri":"/owasp-bwa/"},{"categories":["tech-security"],"content":"VM startup Just start the VM. After a few seconds, it will display its IP address. No need to login for the moment. Just access the IP address in your browser and you’re ready to go! ","date":"2021-01-17","objectID":"/owasp-bwa/:2:0","tags":["owasp","security"],"title":"OWASP BWA VM settings","uri":"/owasp-bwa/"},{"categories":["ctf"],"content":"Brixel CTF writeups: https://github.com/pcotret/ctf-writeups/tree/master/brixelctf-2020 It was quite nice with challenge in several categories. https://ctf.brixel.space/ ","date":"2021-01-03","objectID":"/brixel-ctf/:0:0","tags":["web","crypto","stegano"],"title":"Brixel CTF","uri":"/brixel-ctf/"},{"categories":["ctf"],"content":"IceCTF writeups: https://github.com/pcotret/ctf-writeups/tree/master/icectf-2020 https://icec.tf/ ","date":"2021-01-01","objectID":"/ice-ctf/:0:0","tags":["web","crypto","stegano"],"title":"Ice CTF","uri":"/ice-ctf/"},{"categories":["tech-misc"],"content":"As most of us, we’re working from home for some time. Here is a quick start guide for the IPEVO V4K document camera. ","date":"2020-11-02","objectID":"/document-camera/:0:0","tags":["lockdown"],"title":"Lockdown setup - Working with an IPEVO document camera","uri":"/document-camera/"},{"categories":["tech-misc"],"content":"Installation ","date":"2020-11-02","objectID":"/document-camera/:1:0","tags":["lockdown"],"title":"Lockdown setup - Working with an IPEVO document camera","uri":"/document-camera/"},{"categories":["tech-misc"],"content":"Hardware The camera itself is a plug-and-play device: it’s recognized as a camera. Two buttons on it to enable/disable the autofocus and adjust the exposure. ","date":"2020-11-02","objectID":"/document-camera/:1:1","tags":["lockdown"],"title":"Lockdown setup - Working with an IPEVO document camera","uri":"/document-camera/"},{"categories":["tech-misc"],"content":"Software Go to https://www.ipevo.com/software/visualizer#download As you can see, the IPEVO visualizer is supported by several platforms: In the following parts, we’ll try to work with the Linux binary and the Chrome plugin ","date":"2020-11-02","objectID":"/document-camera/:1:2","tags":["lockdown"],"title":"Lockdown setup - Working with an IPEVO document camera","uri":"/document-camera/"},{"categories":["tech-misc"],"content":"Working with the Chrome plugin Maybe the easiest solution: there’s a plugin for Google Chrome at https://chrome.google.com/webstore/detail/ipevo-visualizer/knibbpmgfkaginjkddpmmpcnknegecok You can explore the toolbar on the left side to get options on the resolution, camera rotation and so on. You can even draw with basics color on it. ","date":"2020-11-02","objectID":"/document-camera/:2:0","tags":["lockdown"],"title":"Lockdown setup - Working with an IPEVO document camera","uri":"/document-camera/"},{"categories":["tech-misc"],"content":"Working with the Linux binary There’s a DEB package for Debian-based distros. It’s a bit “ugly” as it copies a JAR file in /usr/bin/. In other words, to run the Linux binary: java -jar /usr/bin/visualizer-1.1.3.37.jar The interface is similar to the Google Chrome plugin. Some additional options for contrast, while balance, etc. ","date":"2020-11-02","objectID":"/document-camera/:3:0","tags":["lockdown"],"title":"Lockdown setup - Working with an IPEVO document camera","uri":"/document-camera/"},{"categories":["tech-misc"],"content":"Including the camera stream in a Microsoft Teams meeting https://s3-us-west-1.amazonaws.com/files.ipevo.com/download/doc/step_by_step_guide-microsoft_teams.pdf By default, the camera stream is horizontally flipped. Even if there’s an official guide from Ipevo, the only solution is to share the camera software as there’s no option to flip the camera in Microsoft Teams… ","date":"2020-11-02","objectID":"/document-camera/:4:0","tags":["lockdown"],"title":"Lockdown setup - Working with an IPEVO document camera","uri":"/document-camera/"},{"categories":["tech-misc"],"content":"Including the camera stream in a Discord meeting Solution is similar to Microsoft Teams. However, Discord is a less buggy software on Linux for group meetings compared to Microsoft Teams. With OBS studio, we can easily get a cool setup with slides, document camera and even the presenter face if needed 😊 Lockdown setup with the document camera on the right side over a book and a cutting mat: ","date":"2020-11-02","objectID":"/document-camera/:5:0","tags":["lockdown"],"title":"Lockdown setup - Working with an IPEVO document camera","uri":"/document-camera/"},{"categories":["tech-misc"],"content":"References IPEVO guides IPEVO V4K product page ","date":"2020-11-02","objectID":"/document-camera/:6:0","tags":["lockdown"],"title":"Lockdown setup - Working with an IPEVO document camera","uri":"/document-camera/"},{"categories":["tech-networks"],"content":"Download and build git clone https://gitlab.com/wireshark/wireshark sudo wireshark/tools/./debian-setup.sh --install-qt5-deps (--install-optional) cd wireshark mkdir build cd build cmake .. -DUSE_qt6=OFF make -j$(nproc) sudo make install ","date":"2020-09-20","objectID":"/wireshark_build/:1:0","tags":["wireshark","networks"],"title":"Building Wireshark from source","uri":"/wireshark_build/"},{"categories":["tech-embedded"],"content":"Activate Coresight components - Software side - Method #1 ","date":"2020-06-29","objectID":"/coresight-zedboard/:1:0","tags":["yocto","zedboard","coresight"],"title":"Activate Coresight components in a Yocto environment for the Zedboard","uri":"/coresight-zedboard/"},{"categories":["tech-embedded"],"content":"Generate a core-image-minimal Just follow https://pcotret.github.io/yocto-zedboard-101/. When booting this image: Poky (Yocto Project Reference Distro) 3.0.3 zedboard-zynq7 /dev/ttyPS0 zedboard-zynq7 login: root root@zedboard-zynq7:~# ls /sys/bus/ amba container event_source i2c media nvmem scsi soc usb clockevents cpu gpio iio mmc pci sdio spi virtio clocksource edac hid mdio_bus mmc_rpmb platform serio ulpi workqueue No Coresight components 😢 ","date":"2020-06-29","objectID":"/coresight-zedboard/:1:1","tags":["yocto","zedboard","coresight"],"title":"Activate Coresight components in a Yocto environment for the Zedboard","uri":"/coresight-zedboard/"},{"categories":["tech-embedded"],"content":"Customize a linux-xlnx-dev kernel uImage The idea is to create a custom kernel where the support of Coresight components is enabled. Unfortunately, we cannot customize the usual core-image-minimal image with Yocto tools. Fortunately, we can do it on a linux-xlnx-dev image! bitbake linux-xlnx-dev -c menuconfig Go to Kernel hacking =\u003e CoreSight Tracing Support and enable the components you need (everything is enabled here). Then, save and exit. bitbake linux-xlnx-dev -c compile -f bitbake linux-xlnx-dev -c deploy Now, you should have a new uImage file in build/tmp/deploy/images/zedboard-zynq7. Just replace it in the first partititon of the SD card and boot the board. Poky (Yocto Project Reference Distro) 3.0.3 zedboard-zynq7 /dev/ttyPS0 zedboard-zynq7 login: root root@zedboard-zynq7:/sys/bus/coresight# ll drwxr-xr-x 2 root root 0 Jan 1 1970 devices drwxr-xr-x 2 root root 0 Jun 29 21:56 drivers -rw-r--r-- 1 root root 4.0K Jun 29 21:56 drivers_autoprobe --w------- 1 root root 4.0K Jun 29 21:56 drivers_probe --w------- 1 root root 4.0K Jun 29 21:56 uevent root@zedboard-zynq7:/sys/bus/coresight# ll devices/ We can see some Coresight support in the kernel but no devices detected… And, well, there are several reasons for that 😨 ","date":"2020-06-29","objectID":"/coresight-zedboard/:1:2","tags":["yocto","zedboard","coresight"],"title":"Activate Coresight components in a Yocto environment for the Zedboard","uri":"/coresight-zedboard/"},{"categories":["tech-embedded"],"content":"Activate Coresight components - Hardware side ","date":"2020-06-29","objectID":"/coresight-zedboard/:2:0","tags":["yocto","zedboard","coresight"],"title":"Activate Coresight components in a Yocto environment for the Zedboard","uri":"/coresight-zedboard/"},{"categories":["tech-embedded"],"content":"Yocto meta-xilinx layer and Xilinx Linux kernel During the compilation process, the meta-xilinx was cloned (zeus branch). https://github.com/Xilinx/meta-xilinx/tree/zeus/meta-xilinx-bsp/conf/machine/zedboard-zynq7.conf: require conf/machine/include/machine-xilinx-default.inc # Skipping a few lines KERNEL_DEVICETREE = \"zynq-zed.dtb\" https://github.com/Xilinx/meta-xilinx/tree/zeus/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc: # Kernel Configuration XILINX_DEFAULT_KERNEL := \"linux-xlnx\" XILINX_DEFAULT_KERNEL_microblaze := \"linux-yocto\" XILINX_DEFAULT_KERNEL_zynqmp := \"linux-yocto\" PREFERRED_PROVIDER_virtual/kernel ??= \"${XILINX_DEFAULT_KERNEL}\" According to the BitBake files, it will clone the xlnx_rebase_v4.19 branch of the Linux kernel provided by Xilinx (https://github.com/Xilinx/linux-xlnx/tree/xlnx_rebase_v4.19). https://github.com/Xilinx/meta-xilinx/tree/zeus/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2019.2.bb: LINUX_VERSION = \"4.19\" KBRANCH ?= \"xlnx_rebase_v4.19\" Then, if we look at the device tree file common to all Zynq 7000-based boards (https://github.com/Xilinx/linux-xlnx/blob/xlnx_rebase_v4.19/arch/arm/boot/dts/zynq-7000.dtsi): No mention of Coresight components at all 😨 Which in not the case in the master branch (https://github.com/Xilinx/linux-xlnx/blob/master/arch/arm/boot/dts/zynq-7000.dtsi): # [...] etb@f8801000 { compatible = \"arm,coresight-etb10\", \"arm,primecell\"; reg = \u003c0xf8801000 0x1000\u003e; clocks = \u003c\u0026clkc 27\u003e, \u003c\u0026clkc 46\u003e, \u003c\u0026clkc 47\u003e; clock-names = \"apb_pclk\", \"dbg_trc\", \"dbg_apb\"; in-ports { port { etb_in_port: endpoint { remote-endpoint = \u003c\u0026replicator_out_port1\u003e; }; }; }; }; tpiu@f8803000 { compatible = \"arm,coresight-tpiu\", \"arm,primecell\"; reg = \u003c0xf8803000 0x1000\u003e; clocks = \u003c\u0026clkc 27\u003e, \u003c\u0026clkc 46\u003e, \u003c\u0026clkc 47\u003e; clock-names = \"apb_pclk\", \"dbg_trc\", \"dbg_apb\"; in-ports { port { tpiu_in_port: endpoint { remote-endpoint = \u003c\u0026replicator_out_port0\u003e; }; }; }; }; funnel@f8804000 { compatible = \"arm,coresight-static-funnel\", \"arm,primecell\"; reg = \u003c0xf8804000 0x1000\u003e; clocks = \u003c\u0026clkc 27\u003e, \u003c\u0026clkc 46\u003e, \u003c\u0026clkc 47\u003e; clock-names = \"apb_pclk\", \"dbg_trc\", \"dbg_apb\"; /* funnel output ports */ out-ports { port { funnel_out_port: endpoint { remote-endpoint = \u003c\u0026replicator_in_port0\u003e; }; }; }; # [...] This is mainly due to the fact that the kernel version in the meta-xilinx layer has been updated later in the master branch: commit 48998ea5b79af13fb1b181037cd3a12990463e8a Author: Sai Hari Chandana Kalluri \[email protected]\u003e Date: Fri Feb 21 11:20:37 2020 -0800 Update KERNEL_VERSION to 5.4 Update KERNEL_VERSION to 5.4 Signed-off-by: Sai Hari Chandana Kalluri \[email protected]\u003e diff --git a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2020.1.bb b/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2020.1.bb index 58f163c..2b8763a 100644 --- a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2020.1.bb +++ b/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2020.1.bb @@ -1,4 +1,4 @@ -LINUX_VERSION = \"4.19\" +LINUX_VERSION = \"5.4\" KBRANCH ?= \"xlnx_rebase_v4.19\" SRCREV ?= \"b983d5fd71d4feaf494cdbe0593ecc29ed471cb8\" Furthermore, this has been updated only in the 5.6 release of the Linux kernel: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9b0b308a1586f620a49c50605ae8abf509190661\u0026h=master --- a/arch/arm/boot/dts/zynq-7000.dtsi +++ b/arch/arm/boot/dts/zynq-7000.dtsi @@ -59,6 +59,39 @@ regulator-always-on; }; + replicator { + compatible = \"arm,coresight-static-replicator\"; + clocks = \u003c\u0026clkc 27\u003e, \u003c\u0026clkc 46\u003e, \u003c\u0026clkc 47\u003e; + clock-names = \"apb_pclk\", \"dbg_trc\", \"dbg_apb\"; + + out-ports { + #address-cells = \u003c1\u003e; + #size-cells = \u003c0\u003e; + + /* replicator output ports */ + port@0 { + reg = \u003c0\u003e; + replicator_out_port0: endpoint { + remote-endpoint = \u003c\u0026tpiu_in_port\u003e; + }; + }; + port@1 { + reg = \u003c1\u003e; + replicator_out_port1: endpoint { + remote-endpoint = \u003c\u0026etb_in_port\u003e; + }; + }; + }; + in-ports { + /* replicator input port */ + port { + replicator_in_port0: endpoint { + remote-end","date":"2020-06-29","objectID":"/coresight-zedboard/:2:1","tags":["yocto","zedboard","coresight"],"title":"Activate Coresight components in a Yocto environment for the Zedboard","uri":"/coresight-zedboard/"},{"categories":["tech-embedded"],"content":"Recompiling everything… Now that we’ve found when and where the device tree has been updated with Coresight components, we have two tasks to do: Recompile a default core-image-minimal with linux-xlnx-dev kernel. Customize linux-xlnx-dev in order to include Coresight drivers. Then, once everything is copied on the SD card: Starting kernel ... Booting Linux on physical CPU 0x0 Linux version 5.4.0-xilinx-dev (oe-user@oe-host) (gcc version 9.2.0 (GCC)) #1 SMP PREEMPT Mon Jul 6 16:40:45 UTC 2020 [...] coresight etm0: PTM 1.0 initialized coresight etm1: PTM 1.0 initialized fpga_manager fpga0: Xilinx Zynq FPGA Manager registered [...] Starting syslogd/klogd: done Poky (Yocto Project Reference Distro) 3.0.3 zedboard-zynq7 /dev/ttyPS0 zedboard-zynq7 login: root root@zedboard-zynq7:~# ls /sys/bus/coresight/devices/ etb0 etm0 etm1 funnel0 replicator0 tpiu0 Yay, we can see Coresight components on the Zedboard! 🕶️ ","date":"2020-06-29","objectID":"/coresight-zedboard/:2:2","tags":["yocto","zedboard","coresight"],"title":"Activate Coresight components in a Yocto environment for the Zedboard","uri":"/coresight-zedboard/"},{"categories":["tech-security"],"content":"Prerequisites sudo apt install aircrack-ng Some wordlists/dictionaries. Kali Linux has already some of them. ","date":"2020-01-01","objectID":"/aircrack-101/:1:0","tags":["aircrack","security"],"title":"Aircrack 101 - How to get the password of a WEP/WPA2 session captured in Wireshark","uri":"/aircrack-101/"},{"categories":["tech-security"],"content":"WiFi handshakes 101 Introduction from @evilsocket’s Pwnagotchi: https://pwnagotchi.ai/intro/#wifi-handshakes-101 ","date":"2020-01-01","objectID":"/aircrack-101/:2:0","tags":["aircrack","security"],"title":"Aircrack 101 - How to get the password of a WEP/WPA2 session captured in Wireshark","uri":"/aircrack-101/"},{"categories":["tech-security"],"content":"Dictionary-based attack In order to test a PCAP with a given dictionary: aircrack-ng -w \u003cwordlist\u003e \u003cwireshark_file\u003e You have several dictionaries and sample PCAPs extracted from a Kali distro here: https://github.com/pcotret/aircrack-101-material One of them should work with a short dictionary. Find it 😉 ","date":"2020-01-01","objectID":"/aircrack-101/:3:0","tags":["aircrack","security"],"title":"Aircrack 101 - How to get the password of a WEP/WPA2 session captured in Wireshark","uri":"/aircrack-101/"},{"categories":["tech-security"],"content":"Wireshark captures Lots of sample captures are available of Wireshark Gitlab: https://gitlab.com/wireshark/wireshark/-/wikis/SampleCaptures ","date":"2020-01-01","objectID":"/aircrack-101/:3:1","tags":["aircrack","security"],"title":"Aircrack 101 - How to get the password of a WEP/WPA2 session captured in Wireshark","uri":"/aircrack-101/"},{"categories":["tech-embedded"],"content":"Prerequisites A RaspberryPi and a distro. For this tutorial, I had an up-to-date Raspbian Stretch Lite with LXDE. GCC and GDB. ","date":"2020-01-01","objectID":"/buffer-overflow-raspberrypi/:1:0","tags":["buffer","raspberry","overflow"],"title":"Buffer overflow on ARM architecture","uri":"/buffer-overflow-raspberrypi/"},{"categories":["tech-embedded"],"content":"ARM registers and stack TODO ","date":"2020-01-01","objectID":"/buffer-overflow-raspberrypi/:2:0","tags":["buffer","raspberry","overflow"],"title":"Buffer overflow on ARM architecture","uri":"/buffer-overflow-raspberrypi/"},{"categories":["tech-embedded"],"content":"An example of buffer overflow ","date":"2020-01-01","objectID":"/buffer-overflow-raspberrypi/:3:0","tags":["buffer","raspberry","overflow"],"title":"Buffer overflow on ARM architecture","uri":"/buffer-overflow-raspberrypi/"},{"categories":["tech-embedded"],"content":"Initial state We have a binary without its source code but compiled with debug information. We know how to use it: ./prog2 PASS where PASS is a 4-character string. We would like to know if there’s interesting stuff or even dead code in it. ","date":"2020-01-01","objectID":"/buffer-overflow-raspberrypi/:3:1","tags":["buffer","raspberry","overflow"],"title":"Buffer overflow on ARM architecture","uri":"/buffer-overflow-raspberrypi/"},{"categories":["tech-embedded"],"content":"Playground Run GDB: gdb prog2 What we can disassemble with GDB: (gdb) disassemble /usr/include/arm-linux-gnueabihf/bits/sys_errlist.h __gmon_start__ frame_dummy /usr/include/arm-linux-gnueabihf/bits/types.h __gmon_start__@plt int /usr/include/libio.h __init_array_end long int /usr/include/stdio.h __init_array_start long long int /usr/lib/gcc/arm-linux-gnueabihf/6/include/stddef.h __libc_csu_fini long long unsigned int _DYNAMIC __libc_csu_init long unsigned int _GLOBAL_OFFSET_TABLE_ __libc_start_main main _IO_2_1_stderr_ __libc_start_main@plt prog2.c _IO_2_1_stdin_ __off64_t puts _IO_2_1_stdout_ __off_t puts@plt _IO_FILE __quad_t register_tm_clones _IO_lock_t _bss_end__ short int _IO_marker _edata short unsigned int _IO_stdin_used _end signed char __FRAME_END__ _fini size_t __JCR_END__ _init sizetype __JCR_LIST__ _start stderr __TMC_END__ abort stdin __bss_end__ abort@plt stdout __bss_start call_weak_fn strcpy __bss_start__ char strcpy@plt __data_start completed sys_errlist __do_global_dtors_aux data_start sys_nerr __do_global_dtors_aux_fini_array_entry deregister_tm_clones unsigned char __dso_handle dont_touch_this unsigned int __end__ exit __frame_dummy_init_array_entry exit@plt Lots of stuff there… We can find at least two interesting: main dont_touch_this. Yes, I compiled the code myself for this tutorial. Of course, you should not name critical code like this! Let’s disassemble the main function (gdb) disassemble main Dump of assembler code for function main: 0x000104b8 \u003c+0\u003e: push {r11, lr} 0x000104bc \u003c+4\u003e: add r11, sp, #4 0x000104c0 \u003c+8\u003e: sub sp, sp, #16 0x000104c4 \u003c+12\u003e: str r0, [r11, #-16] 0x000104c8 \u003c+16\u003e: str r1, [r11, #-20] ; 0xffffffec 0x000104cc \u003c+20\u003e: ldr r3, [r11, #-20] ; 0xffffffec 0x000104d0 \u003c+24\u003e: add r3, r3, #4 0x000104d4 \u003c+28\u003e: ldr r2, [r3] 0x000104d8 \u003c+32\u003e: sub r3, r11, #8 0x000104dc \u003c+36\u003e: mov r1, r2 0x000104e0 \u003c+40\u003e: mov r0, r3 0x000104e4 \u003c+44\u003e: bl 0x1032c \u003cstrcpy@plt\u003e 0x000104e8 \u003c+48\u003e: mov r3, #0 0x000104ec \u003c+52\u003e: mov r0, r3 0x000104f0 \u003c+56\u003e: sub sp, r11, #4 0x000104f4 \u003c+60\u003e: pop {r11, pc} End of assembler dump. No call to dont_touch_this. It means this is a dead code section. Why? Oh, strcpy! We found a breach! This functions must not be used nowadays as it doesn’t check buffer length (https://security.web.cern.ch/security/recommendations/en/codetools/c.shtml). We should try a buffer overflow at this line. If we disassemble dont_touch_this, we can get the entry point of this function (address 0x0001049c): (gdb) disassemble dont_touch_this Dump of assembler code for function dont_touch_this: 0x0001049c \u003c+0\u003e: push {r11, lr} 0x000104a0 \u003c+4\u003e: add r11, sp, #4 0x000104a4 \u003c+8\u003e: ldr r0, [pc, #8] ; 0x104b4 \u003cdont_touch_this+24\u003e 0x000104a8 \u003c+12\u003e: bl 0x10338 \u003cputs@plt\u003e 0x000104ac \u003c+16\u003e: mov r0, #0 0x000104b0 \u003c+20\u003e: bl 0x1035c \u003cexit@plt\u003e 0x000104b4 \u003c+24\u003e: andeq r0, r1, r8, ror #10 End of assembler dump. Putting a breakpoint right after the strcpy: (gdb) break *0x000104e8 Breakpoint 1 at 0x104e8: file prog2.c, line 14. Running the program with valid input and checking registers and stack values: (gdb) run AAAA Starting program: /home/pi/Documents/tutorial/prog2 AAAA Breakpoint 1, main (argc=2, argv=0x7efff684) at prog2.c:14 14 return 0; (gdb) info registers r0 0x7efff524 2130703652 r1 0x7efff7d7 2130704343 r2 0x0 0 r3 0x9 9 r4 0x104f8 66808 r5 0x0 0 r6 0x10374 66420 r7 0x0 0 r8 0x0 0 r9 0x0 0 r10 0x76fff000 1996484608 r11 0x7efff52c 2130703660 r12 0x7efff524 2130703652 sp 0x7efff518 0x7efff518 lr 0x104e8 66792 pc 0x104e8 0x104e8 \u003cmain+48\u003e cpsr 0x20000010 536870928 (gdb) x/16x $sp 0x7efff518: 0x7efff684 0x00000002 0x00000000 0x41414141 0x7efff528: 0x00000000 0x76e80678 0x76fa5000 0x7efff684 0x7efff538: 0x00000002 0x000104b8 0x76ffecf0 0x7efff5d0 0x7efff548: 0xf35a2f10 0xfb4ddc14 0x000104f8 0x00000000 In the stack, we can see our AAAA as 0x41414141 (ASCII codes, little-endian). 0x76e80678 is the return address. Same thing with longer input: (gdb) run ABCDABCD Starting program: /home/pi/Documents/tutorial/prog2 ABCDABCD","date":"2020-01-01","objectID":"/buffer-overflow-raspberrypi/:3:2","tags":["buffer","raspberry","overflow"],"title":"Buffer overflow on ARM architecture","uri":"/buffer-overflow-raspberrypi/"},{"categories":["tech-embedded"],"content":"References https://www.merckedsecurity.com/blog/smashing-the-arm-stack-part-1 http://billyellis.net/ ","date":"2020-01-01","objectID":"/buffer-overflow-raspberrypi/:4:0","tags":["buffer","raspberry","overflow"],"title":"Buffer overflow on ARM architecture","uri":"/buffer-overflow-raspberrypi/"},{"categories":["tech-misc"],"content":"Update 03/2018 : autre technique dans le labo d’Heliox (propre aussi !) https://www.youtube.com/watch?v=8joLK039fjk De bas en haut : méthode de l’imprimante laser mais trop chauffé méthode de l’imprimante laser mais mal décollé méthode de l’imprimante laser repassé au marqueur indélébile (meilleur résultat pour application “industrielle”) masque réalisé au typex, pas terrible car le blanco se décolle pendant le bain d’acide. Je testerai avec du verni à ongle pour voir… masque réalisé au marqueur indélébile Méthode de l’imprimante laser : on imprime sur du papier le typon qu’on souhaite réaliser. Ensuite on met le papier contre le PCB (duquel on a ôté la couche de verni protecteur à l’acétone) et on chauffe. J’ai fait ça sur mes plaques de cuisson (une feuille d’alu sur le vitrocéramique presque au minimum, sinon ça crame la plaque cf le test du bas, et quelque chose pour faire du poids qui ne craint pas la chaleur au dessus), mais on peut aussi utiliser un fer à repasser. Après 1/2 heure (les deux tests du bas étaient resté qu'1/4 d’heure et c’était pas assez) on retire ça du feu et on le plonge dans l’eau chaude. Laissez tremper facilement 10-15 min et retirer PRÉCAUTIONNEUSEMENT (c’est l’étape la plus délicate) le papier en LAISSANT l’encre sur le PCB. C’est pour cette raison qu’il faut une imprimante laser : l’encre n’est qu’un film à la surface du papier, tandis qu’avec une jet d’encre, l’encre est liquide et pénètre en profondeur (hum \u003c3 ) le papier, rendant la manip impossible. Ensuite il suffit de placer tout ça dans le bain. Le bain en question se fait avec 2/3 de vinaigre blanc (acide acétique) et 1/3 d’eau oxygénée (peroxyde d’hydrogène), si les concentrations sont les mêmes (les miens étaient à 10° tous les deux par exemple, si vous trouvez des trucs plus concentrés bien sûr ça fonctionne mieux mais il faut adapter les proportions pour que ça reste stœchiométrique : 1 mol d’acide pour 1 mol de peroxyde, vous avez les masses molaires et masses volumique sur Wikipédia). Il faut ensuite juste mettre du sel de cuisine (une bonne cuiller à soupe pour 200mL environ, y’en aura jamais trop de toute façon) ou de l’acide sulfurique (c’est de l’acide à batterie, par contre aucune idée des quantités à mettre, au pire c’est qu’un catalyseur). Laisser les PCBs dedans pendant 20-30 min (il faut rester à côté sur la fin pour pas qu’ils soient trop attaqués) en touillant de temps en temps (avec un bulleur d’aquarium ça doit être le mieux) Enfin il ne vous reste plus qu’à nettoyer les traces de masque (que ce soit du verni à ongle, du blanco, ou l’encre d’imprimante, de l’acétone fait très bien l’affaire), et vous avez vos PCBs ","date":"2020-01-01","objectID":"/pcb-maison/:1:0","tags":["pcb"],"title":"Comment faire des PCB avec des produits basiques","uri":"/pcb-maison/"},{"categories":["tech-misc"],"content":"Convert an SVG to PNG in commande line using Inkscape (on Windows) Change export-height if you want a bigger image: @echo off for %%f in (%*) do ( echo %%~f \"C:\\Program Files\\Inkscape\\inkscape.exe\" ^ -z ^ --export-background-opacity=0 ^ --export-height=48 ^ --export-png=\"%%~dpnf.png\" ^ --file=\"%%~f\" ) ","date":"2020-01-01","objectID":"/image_scripts/:1:0","tags":["scripts"],"title":"Image processing","uri":"/image_scripts/"},{"categories":["tech-misc"],"content":"Resize an image with Inkscape for %%f in (*.png) do convert.exe %%f -resize 384x384 -background black -gravity center -extent 384x384 %%f ","date":"2020-01-01","objectID":"/image_scripts/:2:0","tags":["scripts"],"title":"Image processing","uri":"/image_scripts/"},{"categories":["tech-misc"],"content":"Convert a Dia diagram in EPS then PDF #!/bin/bash filename=$(basename -- $1) extension=\"${filename##*.}\" filename=\"${filename%.*}\" echo $filename dia -e $filename.eps -t eps $1 epstopdf --outfile=$filename.pdf $filename.eps ","date":"2020-01-01","objectID":"/image_scripts/:3:0","tags":["scripts"],"title":"Image processing","uri":"/image_scripts/"},{"categories":["tech-hardware"],"content":"https://support.xilinx.com/s/article/58992?language=en_US [Place 30-415] IO Placement failed due to over utilization Project Manager =\u003e Settings =\u003e Synthesis =\u003e More options. Add this flag: -mode out_of_context ","date":"2020-01-01","objectID":"/implementation_test/:0:0","tags":["xilinx","settings"],"title":"Implementation settings for (very) simple Vivado projects","uri":"/implementation_test/"},{"categories":["tech-hardware"],"content":"Installing Vivado Vivado Design Suite - HLx Editions - 2019.2 for the latest version: https://www.xilinx.com/support/download.html Tutorial available here: : https://www.dropbox.com/s/sgxhb08tcwuj9ko/Download_%26_Install_VIVADO_On_Ubuntu_July_3.pdf?dl=0 On recent Ubuntu versions, please install libtinfo and libncurses or you may get stuck in the final setup step: https://support.xilinx.com/s/question/0D52E00006iHjbcSAC/vivado-20211-installation-hangs-at-generating-installed-device-list?language=en_US ","date":"2020-01-01","objectID":"/fpga-env-101/:1:0","tags":["fpga","xilinx"],"title":"Installing a Xilinx FPGA environment for an Ubuntu-based machine","uri":"/fpga-env-101/"},{"categories":["tech-hardware"],"content":"License Infos available in another note. However, some families don’t need a license file 😉 ","date":"2020-01-01","objectID":"/fpga-env-101/:1:1","tags":["fpga","xilinx"],"title":"Installing a Xilinx FPGA environment for an Ubuntu-based machine","uri":"/fpga-env-101/"},{"categories":["tech-hardware"],"content":"Pre-configuration Before executing Vivado, a few things to be aware of: Add this line in your $HOME/.bashrc (amongst other things, this script add binaries to PATH) : source /opt/Xilinx/Vivado/2018.2/settings64.sh # Modify the path to Vivado if needed Now, Vivado could be executed with the command: vivado It may be easier to have write rights on the Vivado install directory: chown -R $USER /opt/Xilinx Board drivers may be installed with scripts at /opt/Xilinx/Vivado/2018.3/data/xicom/cable_drivers/lin64/install_script ","date":"2020-01-01","objectID":"/fpga-env-101/:1:2","tags":["fpga","xilinx"],"title":"Installing a Xilinx FPGA environment for an Ubuntu-based machine","uri":"/fpga-env-101/"},{"categories":["tech-hardware"],"content":"“Hello World” tutorial for Zedboard and Nexys4 For the Zedboard: https://gitlab.com/pcotret/hello-zedboard Without going into details, it allows the user to compile a first design and verifies that the user can talk with the board. For the Nexys4: https://reference.digilentinc.com/learn/programmable-logic/tutorials/nexys-4-ddr-programming-guide/start#tutorial ","date":"2020-01-01","objectID":"/fpga-env-101/:1:3","tags":["fpga","xilinx"],"title":"Installing a Xilinx FPGA environment for an Ubuntu-based machine","uri":"/fpga-env-101/"},{"categories":["tech-hardware"],"content":"VHDL simulation Vivado includes a VHDL simulator which seems not optimal to me. Furthermore, for a quick simulation of a tiny component, it may be interesting to get a simulator without all the FPGA vendor layer. Modelsim is a well-known solution: Problem #1 : Modelsim is usually included in a bundle with other tools. Problem #2 : Modelsim isn’t very 64-bits friendly Here is a note to set up Modelsim on a 64-bit Ubuntu machine. ","date":"2020-01-01","objectID":"/fpga-env-101/:2:0","tags":["fpga","xilinx"],"title":"Installing a Xilinx FPGA environment for an Ubuntu-based machine","uri":"/fpga-env-101/"},{"categories":["tech-hardware"],"content":"Lattice iCEcube2 has not been updated for a while… ","date":"2020-01-01","objectID":"/lattice-ubuntu/:0:0","tags":["lattice","ubuntu"],"title":"Installing Lattice iCEcube2 FPGA tools on Ubuntu","uri":"/lattice-ubuntu/"},{"categories":["tech-hardware"],"content":"Installing an old libpng package wget http://security.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1.1_i386.deb sudo dpkg -i libpng12-0_1.2.54-1ubuntu1.1_i386.deb ","date":"2020-01-01","objectID":"/lattice-ubuntu/:1:0","tags":["lattice","ubuntu"],"title":"Installing Lattice iCEcube2 FPGA tools on Ubuntu","uri":"/lattice-ubuntu/"},{"categories":["tech-hardware"],"content":"Going through the interface issue Lattice iCEcube2 license takes into account the MAC address of the computer. In order to work, the interface must be labeled as eth0 as stated on the TinyFPGA forum (don’t ask me why…) $ sudo ip link add eth0 type dummy $ sudo ip link set eth0 address 10:65:30:ee:48:9a Now, iCEcube2 should work! ","date":"2020-01-01","objectID":"/lattice-ubuntu/:2:0","tags":["lattice","ubuntu"],"title":"Installing Lattice iCEcube2 FPGA tools on Ubuntu","uri":"/lattice-ubuntu/"},{"categories":["tech-hardware"],"content":"Shebang You may need to modify the shebang of binary scripts installed in $INSTALL_DIR/synpbase/bin (for instance, #!/bin/sh to #!/bin/bash). ","date":"2020-01-01","objectID":"/lattice-ubuntu/:3:0","tags":["lattice","ubuntu"],"title":"Installing Lattice iCEcube2 FPGA tools on Ubuntu","uri":"/lattice-ubuntu/"},{"categories":["tech-misc"],"content":"Generating random numbers in LateX The following code will generate a random number within a range for each compilation \\pgfmathsetseed{\\number\\pdfrandomseed} \\newcommand{\\thecmd}[2]{ \\pgfmathsetmacro{\\thenum}{int(random(#1,#2))} \\thenum } ","date":"2020-01-01","objectID":"/latex_tips/:1:0","tags":["latex"],"title":"LateX tips","uri":"/latex_tips/"},{"categories":["tech-misc"],"content":"Using ttfamily with bfseries in a listing Default font doesn’t implement bold style: \\renewcommand{\\ttdefault}{pcr} \\begin{lstlisting}[basicstyle=\\ttfamily\\bfseries] y:=2 \\end{lstlisting} ","date":"2020-01-01","objectID":"/latex_tips/:2:0","tags":["latex"],"title":"LateX tips","uri":"/latex_tips/"},{"categories":["tech-misc"],"content":"Makefile to compile a LateX project ## Here is a simple Makefile for a basic LaTeX flow with a bibliography ## make help: ## print this menu ## make all: ## compile the stuff ## make clean: ## remove temporary files ## make clean_pdf: ## remove the output PDF file ## make clean_all: ## remove EVERYTHING # Variables FILENAME=mainfile BIBNAME=mainfile help: @grep -e \"^##\" Makefile; all: pdflatex ${FILENAME}.tex bibtex ${FILENAME} pdflatex ${FILENAME}.tex pdflatex ${FILENAME}.tex clean: rm *.aux *.bbl *.blg *.log *.out *.snm *.toc *.vrb *.xml main-blx.bib *.nav clean_pdf: rm ${FILENAME}.pdf clean_all: clean clean_pdf ","date":"2020-01-01","objectID":"/latex_tips/:3:0","tags":["latex"],"title":"LateX tips","uri":"/latex_tips/"},{"categories":["tech-misc"],"content":"Batch file to compile on Windows set FILENAME=filename set BIBNAME=filename @echo off cls :question echo. echo 1. Compile the document echo 2. Clean everything but keep the PDF echo 3. Really clean EVERYTHING set /p choix=What do you want to do (1/2/3)? : if /I \"%choix%\"==\"1\" (goto :compile) if /I \"%choix%\"==\"2\" (goto :clean) if /I \"%choix%\"==\"3\" (goto :clean_all) goto question :compile pdflatex %FILENAME%.tex bibtex %BIBNAME% pdflatex %FILENAME%.tex pdflatex %FILENAME%.tex goto end :clean del %FILENAME%.aux del %BIBNAME%.bbl del %BIBNAME%.blg del %FILENAME%.log goto end :clean_all del %FILENAME%.aux del %BIBNAME%.bbl del %BIBNAME%.blg del %FILENAME%.log del %FILENAME%.pdf goto end :end echo Thanks for using this tool :) ","date":"2020-01-01","objectID":"/latex_tips/:4:0","tags":["latex"],"title":"LateX tips","uri":"/latex_tips/"},{"categories":["tech-misc"],"content":"Here is a way to convert Marp slides in PDF with emojis: npx @marp-team/marp-cli main.md -o output.pdf --allow-local-files https://github.com/marp-team/marp-cli nodejs must be installed ","date":"2020-01-01","objectID":"/marp-to-pdf/:0:0","tags":["marp"],"title":"Marp to PDF","uri":"/marp-to-pdf/"},{"categories":["tech-embedded"],"content":"This note was inspired by a work of Samuele Giraudo (LIGM, Université Paris-Est Marne-la-Vallée) http://igm.univ-mlv.fr/~giraudo/Enseignements/ ","date":"2020-01-01","objectID":"/memory-alignment/:0:0","tags":["memory"],"title":"Memory alignment","uri":"/memory-alignment/"},{"categories":["tech-embedded"],"content":"Memory alignment https://en.wikipedia.org/wiki/Data_structure_alignment Memory alignment of a given data is the way this data is organized in the memory. For instance, an array of n elements of type T is organized as a continuous array of sizeof(T) * n bytes. How does memory alignment work for variables of a structured type? Let’s find out 😊 ","date":"2020-01-01","objectID":"/memory-alignment/:1:0","tags":["memory"],"title":"Memory alignment","uri":"/memory-alignment/"},{"categories":["tech-embedded"],"content":"Memory alignment within a structured type Let’s consider the following declarations: typedef struct { uint8_t x; uint8_t y; uint16_t z; }A; typedef struct { uint8_t x; uint16_t z; uint8_t y; }B; A and B are two structured types based on the same fields. Only fields order matters. However, printf(\"%lu %lu\\n\", sizeof(A), sizeof(B)); displays 4 6. A and B have diferrent size due to memory alignment… ","date":"2020-01-01","objectID":"/memory-alignment/:2:0","tags":["memory"],"title":"Memory alignment","uri":"/memory-alignment/"},{"categories":["tech-embedded"],"content":"Completion bytes Completion bytes are inserted in order to make each field of a structured type beginning at an address multiple of its type. In our example, we know that each field of uint8_t (resp. uint16_t) must begin at an address multiple of 1 (resp. 2). ","date":"2020-01-01","objectID":"/memory-alignment/:3:0","tags":["memory"],"title":"Memory alignment","uri":"/memory-alignment/"},{"categories":["tech-embedded"],"content":"Manual access Let a a variable of type A initialized by: A a = {0x10, 0x20, 0x30}; We can access fields of this structure as follows: uint8_t x, y; uint16_t z; void *p; p = \u0026a; x = *((uint8_t *) p); /* Equivalent a x = a.x; */ p += 1; y = *((uint8_t *) p); /* Equivalent a y = a.y; */ p += 1; z = *((uint16_t *) p); /* Equivalent a z = a.z; */ Let b a variable of type B initialized by: B b = {0x10, 0x20, 0x30}; We can access fields of this structure as follows: uint8_t x, y; uint16_t z; void *p; p = \u0026a; x = *((uint8_t *) p); /* Equivalent a x = a.x; */ p += 2; y = *((uint8_t *) p); /* Equivalent a y = a.y; */ p += 2; z = *((uint16_t *) p); /* Equivalent a z = a.z; */ ","date":"2020-01-01","objectID":"/memory-alignment/:4:0","tags":["memory"],"title":"Memory alignment","uri":"/memory-alignment/"},{"categories":["tech-embedded"],"content":"-Wpadded option The compiler flag -Wpadded gives a warning when a type needs completion bytes. For instance, with the structured type B defined by: typedef struct { uint8_t x; uint16_t z; uint8_t y; } B; The follwing warning appears in the terminal: main.c:7:1: warning: padding struct size to alignment boundary [-Wpadded] } B; ","date":"2020-01-01","objectID":"/memory-alignment/:5:0","tags":["memory"],"title":"Memory alignment","uri":"/memory-alignment/"},{"categories":["tech-embedded"],"content":"Memory alignment — A summary Memory alignment for variables of a structured type relies on several parameters such as: Processor architecture on which the code has been compiled. Compiler itself. Therefore, it is recommended to be aware that size of a structured type is not a trivial issue and depends of the context. ","date":"2020-01-01","objectID":"/memory-alignment/:6:0","tags":["memory"],"title":"Memory alignment","uri":"/memory-alignment/"},{"categories":["tech-networks"],"content":" Mainly based on an official tutorial (link). A Google Drive with several Cisco IOS: https://drive.google.com/drive/folders/102jxZ9ECpe6ZFtXYdK_81iEVuuFoGOGR. In this tutorial, the c7200 is used. You may not have the same interfaces in another case. ","date":"2020-01-01","objectID":"/first_topology/:0:0","tags":["gns3","simulation"],"title":"My first topology","uri":"/first_topology/"},{"categories":["tech-networks"],"content":"Topology creation Take two c7200 routers and add them to the schematic by a “drag and drop”. We can see our two routers: Use the link icon in order to… …link them. In this case, we connect the FastEthernet0/0 interfaces of the routers. Below, the green Start button (marked #1) and the Console button (marked #2) have been selected. Now, let’s configure the routers. Reminder: GNS3 runs IOS images, it’s like playing with a real router (commands are the same). ","date":"2020-01-01","objectID":"/first_topology/:1:0","tags":["gns3","simulation"],"title":"My first topology","uri":"/first_topology/"},{"categories":["tech-networks"],"content":"Routers configuration R1# sh ip int br Interface IP-Address OK? Method Status Protocol FastEthernet0/0 unassigned YES unset administratively down down FastEthernet1/0 unassigned YES unset administratively down down FastEthernet2/0 unassigned YES unset administratively down down FastEthernet3/0 unassigned YES unset administratively down down FastEthernet4/0 unassigned YES unset administratively down down As you can see, all interfaces are administratively down. Same thing for R2: R2# sh ip int br Interface IP-Address OK? Method Status Protocol FastEthernet0/0 unassigned YES unset administratively down down FastEthernet1/0 unassigned YES unset administratively down down FastEthernet2/0 unassigned YES unset administratively down down FastEthernet3/0 unassigned YES unset administratively down down FastEthernet4/0 unassigned YES unset administratively down down Let’s configure fa0/0 and loopback0 interfaces: R1# conf t R1(config)# int fa0/0 R1(config-if)#ip add 10.1.1.1 255.255.255.0 R1(config-if)#int loop 0 R1(config-if)#ip add 1.1.1.1 255.255.255.255 R1(config-if)# end R1#sh ip int br Interface IP-Address OK? Method Status Protocol FastEthernet0/0 10.1.1.1 YES manual administratively down down FastEthernet1/0 unassigned YES unset administratively down down FastEthernet2/0 unassigned YES unset administratively down down FastEthernet3/0 unassigned YES unset administratively down down FastEthernet4/0 unassigned YES unset administratively down down Loopback0 1.1.1.1 YES manual up up Interfaces are correctly configured. There’s only one difference: loopback virtual interfaces are automatically enabled (up state). In order to enable fa0/0: R1# conf t R1(config)#int fa0/0 R1(config-if)#no shut R1(config-if)#end R1#sh ip int br Interface IP-Address OK? Method Status Protocol FastEthernet0/0 10.1.1.1 YES manual up up FastEthernet1/0 unassigned YES unset administratively down down FastEthernet2/0 unassigned YES unset administratively down down FastEthernet3/0 unassigned YES unset administratively down down FastEthernet4/0 unassigned YES unset administratively down down Loopback0 1.1.1.1 YES manual up up Let’s configure R2: R2#conf t R2(config)#int fa0/0 R2(config-if)#no shut R2(config-if)#ip add 10.1.1.2 255.255.255.0 R2(config-if)#int loop 0 R2(config-if)#ip add 2.2.2.2 255.255.255.255 R2(config-if)# end R2#sh ip int br Interface IP-Address OK? Method Status Protocol FastEthernet0/0 10.1.1.2 YES manual up up FastEthernet1/0 unassigned YES unset administratively down down FastEthernet2/0 unassigned YES unset administratively down down FastEthernet3/0 unassigned YES unset administratively down down FastEthernet4/0 unassigned YES unset administratively down down Loopback0 2.2.2.2 YES manual up up We can have some information about the IOS with the following command: R2#sh ver Cisco IOS Software, 7200 Software (C7200-JK9S-M), Version 12.4(13b), RELEASE SOFTWARE (fc3) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2007 by Cisco Systems, Inc. Compiled Wed 25-Apr-07 03:18 by prod_rel_team [...] By now, R1 and R2 can talk to each other: R2#ping 10.1.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds: .!!!! Success rate is 80 percent (4/5), round-trip min/avg/max = 44/57/64 ms Only 80% of packets are received, don’t worry! The first packet is lost due to the ARP address resolution (reminder: ARP is mainly responsible for translating IP to MAC addresses). Here is a ping in the other direction: R1#ping 10.1.1.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 60/62/68 ms 100% of packets are received as the ARP exchange is already done! ","date":"2020-01-01","objectID":"/first_topology/:2:0","tags":["gns3","simulation"],"title":"My first topology","uri":"/first_topology/"},{"categories":["tech-networks"],"content":"OSPF routing R1#conf t R1(config)#router ospf 1 R1(config-router)#router-id 1.1.1.1 R1(config-router)#network 0.0.0.0 255.255.255.255 area 0 R1(config-router)#end R2#conf t R2(config)#router ospf 1 R2(config-router)#router-id 2.2.2.2 R2(config-router)#network 0.0.0.0 255.255.255.255 area 0 R2(config-router)#end List of R2 neighbors: R2#sh ip ospf neigh Neighbor ID Pri State Dead Time Address Interface 1.1.1.1 1 FULL/DR 00:00:32 10.1.1.1 FastEthernet0/0 1.1.1.1 is the address of R1. R1 routing table: R1#sh ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort is not set 1.0.0.0/32 is subnetted, 1 subnets C 1.1.1.1 is directly connected, Loopback0 2.0.0.0/32 is subnetted, 1 subnets O 2.2.2.2 [110/2] via 10.1.1.2, 00:08:21, FastEthernet0/0 10.0.0.0/24 is subnetted, 1 subnets C 10.1.1.0 is directly connected, FastEthernet0/0 R1#ping 2.2.2.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 8/24/72 ms There’s the OSPF route towards 2.2.2.2. On the R2 side: R2#ping 1.1.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 12/28/40 ms ","date":"2020-01-01","objectID":"/first_topology/:3:0","tags":["gns3","simulation"],"title":"My first topology","uri":"/first_topology/"},{"categories":["tech-networks"],"content":"Router configuration backup By default, GNS3 won’t save routers configuration. It can be done manually: R1#copy running-config startup-config Next time GNS3 is launched, routers will still be configured! ","date":"2020-01-01","objectID":"/first_topology/:4:0","tags":["gns3","simulation"],"title":"My first topology","uri":"/first_topology/"},{"categories":["tech-embedded"],"content":"The goal was to get a single-board computer able to execute Gnuradio tools quite smoothly with various SDR devices (USB dongles, HackRF, USRP development boards). Unfortunately, the RaspberryPi family (both PiB+ and Pi2) did not met such requirements due to a lack of throughput in the USB controller. This tutorial introduces another solution based on a Chinese alternative called OrangePi [1]. For the operating system, Debian Jessie (8.2 version) is used: https://www.debian.org/releases/stable/ ","date":"2020-01-01","objectID":"/orangepi4sdr/:0:0","tags":["sdr","orangepi"],"title":"OrangePi4SDR","uri":"/orangepi4sdr/"},{"categories":["tech-embedded"],"content":"Requirements ","date":"2020-01-01","objectID":"/orangepi4sdr/:1:0","tags":["sdr","orangepi"],"title":"OrangePi4SDR","uri":"/orangepi4sdr/"},{"categories":["tech-embedded"],"content":"Hardware An OrangePiMini2 (bought from Aliexpress [2]). Main features : Allwinner H3 CPU (quad-core Cortex-A7 @ 1.6GHz) 1GB RAM memory A 5V/2A power supply such as [3]. Otherwise, the OrangePi kit comes with an USB cable that works fine (an external computer is required) A µSD card: class 10 is the best (of course, video and Ethernet cables) ","date":"2020-01-01","objectID":"/orangepi4sdr/:1:1","tags":["sdr","orangepi"],"title":"OrangePi4SDR","uri":"/orangepi4sdr/"},{"categories":["tech-embedded"],"content":"Software All OrangePi software parts are available from a Google Drive directory (click here). You need to get: Debian_wheezy_mini.img.xz: the minimal Debian Jessie image (without graphical user interface) scriptbin_kernel.tar.gz: the kernel image and boot-related stuff Win32DiskImager from http://sourceforge.net/projects/win32diskimager SDFormatter from https://www.sdcard.org/downloads/formatter_4 It is assumed that you decompress .xz files somewhere on your computer. Other OS images can be downloaded from this Google Drive or directly from OrangePi website: http://www.orangepi.org/downloadresources/ ","date":"2020-01-01","objectID":"/orangepi4sdr/:1:2","tags":["sdr","orangepi"],"title":"OrangePi4SDR","uri":"/orangepi4sdr/"},{"categories":["tech-embedded"],"content":"Creating µSD image This step was tested on Windows. Similar results are expected on Linux using fdisk and dd commands. ","date":"2020-01-01","objectID":"/orangepi4sdr/:2:0","tags":["sdr","orangepi"],"title":"OrangePi4SDR","uri":"/orangepi4sdr/"},{"categories":["tech-embedded"],"content":"OS image First of all, format your SD card: Connect your µSD card and open SDFormatter Take care of the drive letter (it will erase everything in the device) Open Option menu and select Yes for Format size adjustment Click on Format and answer Yes in the next popups =\u003e Your card is ready ! Then, you can copy the Debian minimal image using Win32DiskImager: check the device letter and look for the Debian_jessie_mini.img OS image on your computer. Confirm and wait a few minutes… ","date":"2020-01-01","objectID":"/orangepi4sdr/:2:1","tags":["sdr","orangepi"],"title":"OrangePi4SDR","uri":"/orangepi4sdr/"},{"categories":["tech-embedded"],"content":"Kernel and boot stuff Once this step is done, disconnect and reconnect your µSD card. You should see a device called BOOT coming up: it contains the kernel image and boot-related stuff. These files are replaced with the latest ones available from OrangePi. Open the BOOT device in your explorer and erase everything inside. Then, from your scriptbin_kernel decompressed folder: Copy script.bin.OPI-2_1080p60 and rename it as script.bin Copy uImage_OPI-2 and rename it as uImage Your µSD card is ready to boot on the OrangePiMini2 ! ","date":"2020-01-01","objectID":"/orangepi4sdr/:2:2","tags":["sdr","orangepi"],"title":"OrangePi4SDR","uri":"/orangepi4sdr/"},{"categories":["tech-embedded"],"content":"First boot At first power-up, when asked for login/password, just use orangepi/orangepi (be careful, it is configured with a QWERTY keyboard layout by default). You should see a terminal like this: ","date":"2020-01-01","objectID":"/orangepi4sdr/:3:0","tags":["sdr","orangepi"],"title":"OrangePi4SDR","uri":"/orangepi4sdr/"},{"categories":["tech-embedded"],"content":"Disk resize The first step is to resize partitions to fit the maximum capacity of your µSD card. OrangePi already prepared a tool. Type sudo fs_resize: Then, reboot using sudo reboot. ","date":"2020-01-01","objectID":"/orangepi4sdr/:3:1","tags":["sdr","orangepi"],"title":"OrangePi4SDR","uri":"/orangepi4sdr/"},{"categories":["tech-embedded"],"content":"Desktop install As this is a minimal Debian image, it does not come with a GUI but you can install whatever you want. In this tutorial, LXDE has been chosen for installation. Thanks to OrangePi, there are already some scripts to install some GUIs such as LXDE, XFCE or Mate (a Gnome2 fork). Type cd /usr/local/bin. Type sudo install_lxde_desktop and wait a few minutes… Reboot one last time… ","date":"2020-01-01","objectID":"/orangepi4sdr/:4:0","tags":["sdr","orangepi"],"title":"OrangePi4SDR","uri":"/orangepi4sdr/"},{"categories":["tech-embedded"],"content":"Result Tada ! After the login screen (still orangepi/orangepi), you get a fully functional desktop: you can install whatever you want. In the above figure, the goal was to install GQRX, Gnuradio and some other tools: it run quite smoothly ! (especially compared to RaspberryPis). In this configuration, following binaries were installed: sudo apt-get install gnuradio gnuradio-dev rtl-sdr librtlsdr* hackrf gpredict gqrx-sdr libhackrf* References Orangepi website. http://www.orangepi.org/. Orangepimini2. 5v/2a power supply. ","date":"2020-01-01","objectID":"/orangepi4sdr/:5:0","tags":["sdr","orangepi"],"title":"OrangePi4SDR","uri":"/orangepi4sdr/"},{"categories":["tech-embedded"],"content":" 128 registers available in SPARC. Each window is divided in 3 areas: 8 input registers (i0-i7) 8 local registers (l0-l7) 8 output registers (o0-07) input // Function F1 local output input // Save instruction (F2 called in F1) local output input // Save instruction (F3 called in F2) local output As you can see, each time a function is called in another, the registers window “slides”: by the way, output registers of $F_n$ are equal to input registers of $F_{n+1}$. Consequence #1 : 24 registers are consumed for F_1, 40 for F_2… Reg_total = 24 + (n-1) x 16, 1 \u003c= n \u003c= 6 Consequence #2 : we cannot have more than 6 function calls at a given time (i.e. F_1 calling F_2 calling F_3 […] calling F_6). In this case, 120 registers are used. Consequence #3 : if a seventh function call happens, a window overflow trap will happen (exception 0x05, see Table 7-1 in the SPARC v8 ISA). This seventh function would need 16 more registers while only 8 registers only are available… ","date":"2020-01-01","objectID":"/sparc_window_registers/:0:0","tags":["sparc","registers"],"title":"Register windows in SPARC","uri":"/sparc_window_registers/"},{"categories":["tech-hardware"],"content":"Install Modelsim on a 64-bit (x)Ubuntu wget http://download.altera.com/akdlm/software/acdsinst/13.1/162/ib_installers/ModelSimSetup-13.1.0.162.run chmod +x ModelSimSetup-13.1.0.162.run However, the free version of Modelsim Altera Edition is 32-bit only. We need to install some dependencies: sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install build-essential sudo apt-get install gcc-multilib g++-multilib lib32z1 lib32stdc++6 lib32gcc1 expat:i386 fontconfig:i386 libfreetype6:i386 libexpat1:i386 libc6:i386 libgtk-3-0:i386 libcanberra0:i386 libpng16-16:i386 libice6:i386 libsm6:i386 libncurses5:i386 zlib1g:i386 libx11-6:i386 libxau6:i386 libxdmcp6:i386 libxext6:i386 libxft2:i386 libxrender1:i386 libxt6:i386 libxtst6:i386 Next, we need to build a free version of FreeType: wget http://download.savannah.gnu.org/releases/freetype/freetype-2.4.12.tar.bz2 tar -xjvf freetype-2.4.12.tar.bz2 cd freetype-2.4.12 ./configure --build=i686-pc-linux-gnu \"CFLAGS=-m32\" \"CXXFLAGS=-m32\" \"LDFLAGS=-m32\" make -j$(nproc) Then, install Modelsim: sudo ./ModelSimSetup-13.1.0.162.run Note: I’ll assume that Modelsim is installed in opt/modelsim for the next steps. Copy the FreeType libraries in Modelsim folder: cd /opt/modelsim/modelsim_ase sudo mkdir lib32 sudo cp ~/freetype-2.4.12/objs/.libs/libfreetype.so* ./lib32 ","date":"2020-01-01","objectID":"/modelsim-ubuntu/:1:0","tags":["modelsim","ubuntu"],"title":"Running Modelsim on a 64-bit Ubuntu","uri":"/modelsim-ubuntu/"},{"categories":["tech-hardware"],"content":"Modify the bin/vsim script ","date":"2020-01-01","objectID":"/modelsim-ubuntu/:2:0","tags":["modelsim","ubuntu"],"title":"Running Modelsim on a 64-bit Ubuntu","uri":"/modelsim-ubuntu/"},{"categories":["tech-hardware"],"content":"Step 1 - Path to the FreeType folder Search for the following line: dir=`dirname $arg0` and underneath add the following new line: export LD_LIBRARY_PATH=${dir}/lib32 ","date":"2020-01-01","objectID":"/modelsim-ubuntu/:2:1","tags":["modelsim","ubuntu"],"title":"Running Modelsim on a 64-bit Ubuntu","uri":"/modelsim-ubuntu/"},{"categories":["tech-hardware"],"content":"Step2 - Modify the RedHat only support Search for the following string: vco=\"linux_rh60\" and replace by: vco=\"linux\" ","date":"2020-01-01","objectID":"/modelsim-ubuntu/:2:2","tags":["modelsim","ubuntu"],"title":"Running Modelsim on a 64-bit Ubuntu","uri":"/modelsim-ubuntu/"},{"categories":["tech-hardware"],"content":"Step 3 - Change VCO mode Search for the following line: mode=${MTI_VCO_MODE:-\" \"} and replace by: mode=${MTI_VCO_MODE:-\"32\"} ","date":"2020-01-01","objectID":"/modelsim-ubuntu/:2:3","tags":["modelsim","ubuntu"],"title":"Running Modelsim on a 64-bit Ubuntu","uri":"/modelsim-ubuntu/"},{"categories":["tech-hardware"],"content":"Running Modelsim Now, you should be able to run Modelsim with: ./bin/vsim ","date":"2020-01-01","objectID":"/modelsim-ubuntu/:3:0","tags":["modelsim","ubuntu"],"title":"Running Modelsim on a 64-bit Ubuntu","uri":"/modelsim-ubuntu/"},{"categories":["tech-hardware"],"content":"References https://mil.ufl.edu/3701/docs/quartus/linux/ModelSim_linux.pdf http://mattaw.blogspot.com/2014/05/making-modelsim-altera-starter-edition.html ","date":"2020-01-01","objectID":"/modelsim-ubuntu/:4:0","tags":["modelsim","ubuntu"],"title":"Running Modelsim on a 64-bit Ubuntu","uri":"/modelsim-ubuntu/"},{"categories":["talks"],"content":"DevFest Bout du Monde - 28/02/2020 How to describe hardware code in Python down to the processor. Quick note about the license mess in the embedded world (in 🇫🇷). Con website and slides. ","date":"2020-01-01","objectID":"/talks/:1:0","tags":["installation"],"title":"Talks","uri":"/talks/"},{"categories":["talks"],"content":"Toulouse Hacking Convention - 09/03/2018 Results of a research project (link). Con website and slides. ","date":"2020-01-01","objectID":"/talks/:2:0","tags":["installation"],"title":"Talks","uri":"/talks/"},{"categories":["tech-hardware"],"content":"Just because I’m too lazy to rewrite the few lines needed to get Vivado running. ","date":"2020-01-01","objectID":"/xilinx_bashrc/:0:0","tags":["xilinx","settings"],"title":"Xilinx settings in `~/.bashrc`","uri":"/xilinx_bashrc/"},{"categories":["tech-hardware"],"content":"Requirements Xilinx tools are installed in /opt/Xilinx You have write rights in this repository. Otherwise, just run a chown -R on /opt/Xilinx For this note, I assume you have the 2018.2 version installed on a 64-bit OS. Your license file is /opt/Xilinx/Xilinx.lic These lines have to be added at the end of your ~/.bashrc file source /opt/Xilinx/Vivado/2018.2/settings64.sh # To be completed ","date":"2020-01-01","objectID":"/xilinx_bashrc/:1:0","tags":["xilinx","settings"],"title":"Xilinx settings in `~/.bashrc`","uri":"/xilinx_bashrc/"},{"categories":["tech-embedded"],"content":"1. Introduction Yocto provides tools and metadata for creating custom embedded systems with following main features : Images are tailored to specific hardware and use cases But metadata is generally arch-independent Unlike a distro, kitchen sink is not included (we know what we need in advance) Other keywords and their meanings are explained here: An image is a collection of baked recipes (packages) A ‘recipe’ is a set of instructions for building packages Where to get the source and which patches to apply Dependencies (on libraries or other recipes, for example) Config/compile options, install customization A layer is a logical collection of recipes representing the core, a board support package (BSP), or an application stack ","date":"2020-01-01","objectID":"/yocto-zedboard-101/:1:0","tags":["yocto","zedboard"],"title":"Yocto on the Zedboard 101","uri":"/yocto-zedboard-101/"},{"categories":["tech-embedded"],"content":"1.1. Packages to be installed sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \\ build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \\ xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \\ pylint3 xterm ","date":"2020-01-01","objectID":"/yocto-zedboard-101/:1:1","tags":["yocto","zedboard"],"title":"Yocto on the Zedboard 101","uri":"/yocto-zedboard-101/"},{"categories":["tech-embedded"],"content":"1.2. Clone Yocto and recipes (zeus branch) git clone -b zeus https://git.yoctoproject.org/git/poky cd poky # Next clones must be done in the poky folder git clone -b zeus https://github.com/Xilinx/meta-xilinx git clone -b zeus https://github.com/openembedded/meta-openembedded.git ","date":"2020-01-01","objectID":"/yocto-zedboard-101/:1:2","tags":["yocto","zedboard"],"title":"Yocto on the Zedboard 101","uri":"/yocto-zedboard-101/"},{"categories":["tech-embedded"],"content":"1.3. Build configuration source oe-init-build-env Modifications in conf/local.conf: # Change the default target $ echo \"MACHINE??=\\\"zedboard-zynq7\\\"\" \u003e\u003e conf/local.conf # Add a few lines $ echo \"IMAGE_FEATURES += \\\"package-management\\\"\" \u003e\u003e conf/local.conf $ echo \"DISTRO_HOSTNAME = \\\"zynq\\\"\" \u003e\u003e conf/local.conf You may also like to change the package type from rpm to deb: modify PACKAGE_CLASSES '= \"package_rpm\" by PACKAGE_CLASSES '= \"package_deb\" Modifications in conf/bblayers.conf in order to add the cloned layers: $ bitbake-layers add-layer ../meta-xilinx/meta-xilinx-bsp/ $ bitbake-layers add-layer ../meta-openembedded/meta-oe/ ","date":"2020-01-01","objectID":"/yocto-zedboard-101/:1:3","tags":["yocto","zedboard"],"title":"Yocto on the Zedboard 101","uri":"/yocto-zedboard-101/"},{"categories":["tech-embedded"],"content":"1.4. Generate image (and take a coffee…) bitbake core-image-minimal Once complete the images for the target machine will be available in the output directory poky/build/tmp/deploy/images/zedboard-zynq7. ","date":"2020-01-01","objectID":"/yocto-zedboard-101/:1:4","tags":["yocto","zedboard"],"title":"Yocto on the Zedboard 101","uri":"/yocto-zedboard-101/"},{"categories":["tech-embedded"],"content":"1.5 Modify the uEnv.txt file We need to modify uEnv.txt a little bit according to a Xilinx layer README-booting.md echo \"ramdisk_image=core-image-minimal-zedboard-zynq7.cpio.gz.u-boot\" \u003e\u003e tmp/deploy/images/zedboard-zynq7/uEnv.txt ","date":"2020-01-01","objectID":"/yocto-zedboard-101/:2:0","tags":["yocto","zedboard"],"title":"Yocto on the Zedboard 101","uri":"/yocto-zedboard-101/"},{"categories":["tech-embedded"],"content":"2. Creating the SD card ","date":"2020-01-01","objectID":"/yocto-zedboard-101/:3:0","tags":["yocto","zedboard"],"title":"Yocto on the Zedboard 101","uri":"/yocto-zedboard-101/"},{"categories":["tech-embedded"],"content":"Partitions Create two partitions on the SD card: Partition #1 : 100 MB, fat16. Partition #2 : remaining space, ext3. Copy the following files in partition #1: sudo cp boot.bin boot.scr core-image-minimal-zedboard-zynq7.cpio.gz.u-boot u-boot.img uEnv.txt uImage zynq-zed.dtb /mnt/partition1 Extract the core-image-minimal archive in partition #2: sudo cp core-image-minimal-zedboard-zynq7.tar.gz /mnt/partition2 cd /mnt/partition2 sudo tar xvzf core-image-minimal-zedboard-zynq7.tar.gz Now, everything should be OK! Poky (Yocto Project Reference Distro) 3.0.3 zedboard-zynq7 /dev/ttyPS0 zedboard-zynq7 login: root root@zedboard-zynq7:~# cat /proc/cpuinfo processor : 0 model name : ARMv7 Processor rev 0 (v7l) BogoMIPS : 666.66 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x3 CPU part : 0xc09 CPU revision : 0 processor : 1 model name : ARMv7 Processor rev 0 (v7l) BogoMIPS : 666.66 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x3 CPU part : 0xc09 CPU revision : 0 Hardware : Xilinx Zynq Platform Revision : 0003 ","date":"2020-01-01","objectID":"/yocto-zedboard-101/:4:0","tags":["yocto","zedboard"],"title":"Yocto on the Zedboard 101","uri":"/yocto-zedboard-101/"},{"categories":["tech-embedded"],"content":"References https://www.youtube.com/watch?v=XPnmB-THjiY ","date":"2020-01-01","objectID":"/yocto-zedboard-101/:5:0","tags":["yocto","zedboard"],"title":"Yocto on the Zedboard 101","uri":"/yocto-zedboard-101/"},{"categories":["tech-embedded"],"content":"Other sources (to check later) https://blog.mbedded.ninja/programming/embedded-linux/zynq/building-linux-for-the-zynq-zc702-eval-kit-using-yocto/ https://dwjbosman.github.io/yocto-linux-on-the-xilinx-zynq-zed-board ","date":"2020-01-01","objectID":"/yocto-zedboard-101/:6:0","tags":["yocto","zedboard"],"title":"Yocto on the Zedboard 101","uri":"/yocto-zedboard-101/"},{"categories":null,"content":" Hi, I’m Pascal! I’m working at ENSTA Bretagne in the embedded systems security field. This Github website is mainly a collection of articles and tech notes. Things around security but also others things! Hope you’ll find something of interest 😉 For research purposes, please visit my academic webpage: https://pcotret.gitlab.io ","date":"2019-08-02","objectID":"/about/:0:0","tags":null,"title":"About me","uri":"/about/"}]