What is HasGeek
Category: Operating Systems
Soft core OS
After a soft core processor has been loaded into an FPGA, the OS is set up. At Altera this is Nios2, at Xilinx it is MicroBlaze.
Remote access to OS
The softcore is accessed via SSH (or Nios Shell).
Folders and programs
If you build in a soft processor, it creates a software subfolder in the synthesis folder
Necessary scripts and settings can be stored in this folder.
Generate board support packet
The script create forms the support packages (and folders for them)
Run the program on the FPGA
Protected: upgrade program before installationPosted in Categories Operating Systems, LinuxTags Microprocessor
debian on raspberry pi 2
Load Debian onto SD card
Steps of Juan:
- Download and extract the jessie-rpi2 - *. Img.gz to get an .img file
- On any debian-based linux type sudo apt-getinstall bmap-tools and install it.
- Then type sudo bmaptool copy - nobmap jessie-rpi2.img / dev / sdx (Change yourlocation to the location of the .img file and sdx for the letter where the SD is mounted, if you don't know it type sudo fdisk- l and look for it).
- Wait until it finishes and then put the SD on your rp2.
First SSH login for configuration
- Connect the RPi to the router via Ethernet and then connect it to the power to boot.
- Check on the router which IP address the RPi got (by name of the machine)
- $ ssh [email protected] with password debian
Configure the basic system
- Create accounts for ale and katrin. Login without password, only with key.
- adduser katrin (+ ale)
- on Linux, generate SSH-key: ssh-keygen (asks for a path)
- scp [email protected]: .ssh / (+ ale)
- on the rpi: catid_rsa.pub >>. ssh / authorized_keys
- Set access rights for ~ .ssh / * to r--
- no login for root and only key login for the user:
- edit / etc / ssh / ssh_config,
- Set PasswordAuthentication no and PermitRootLogin no.
- Set up port forwarding for https on the router
- add the external hard drive to / etc / fstab
- read out the uuid of the hard drive with blkid
- add the following line in / etc / fstab:
UUID = 375cae2c-e89e-45ef-80f3-ee65e54b27e2 / mnt / data ext4 defaults02
- ln-s / mnt / data / owncloud / var / www / owncloud / data (if data / already exists, first rename and then copy the content to the new data / directory; it does not seem to be possible to access other drives)
- add user owncloud in the database:
$ mysql - user = root - password mysql
create user'owncloud '@' localhost'identified by'owncloud'WITH GRANT OPTION; GRANTALLPRIVILEGESON *. * TO'owncloud '@' localhost ';
SELECT User FROM mysql.user;
create database owncloud;
- Add Community Debian repository from Owncloud and install the latest Owncloud
- Install php5-mysql for this
- Question: should we need nginx instead of apache? (http://etapien.com/guides/how-to-install-owncloud-on-debian-7-with-nginx/)
- Call up, create an admin account and be sure to click on |> to select mysql as the database.
- Set port to non-standard for SSH (22; https://www.adayinthelifeof.nl/2012/03/12/why-putting-ssh-on-another-port-than-22-is-bad-idea/)
Securing MySQL: MySQL ships with a few conveniences that are supposed to be removed when put on a real server, to do that type:
- You need to log into your Domain Registra’s account and set the A-record for your domain (mysite.com) to point to your router’s public IP address.
- You’ll need to forward port 1194 (UDP traffic) to your Raspberry Pi’s internal IP address.
- Install openvpn
Set up WIFI as a LAN connection to Raspery Pi
- Install wicd-curses (network manager)
- add the netdev group for both users
- the wifi should be recognized automatically, if not:
- sudo iwlist eth2 scan shows all access points
- In the preferences of wicd set wlan0 as device and restart wicd
How to get the wifi to work: http://sjoerd.luon.net/posts/2015/02/debian-jessie-on-rpi2/#comment-2210d3fbce30bfee22ad73d751a14d31$
- usbutils for lsusb
- sudo update-alternatives - config editor
- sudo nmap-sP192.168.1.0 / 24 to discover the ip addresses around you
File storage Linux
root / bin programs for OS, console e.g. bash, cat, rm
root / home / files from users
root /opt Programs self installed Ex: Nios, Questsim, altera
root /Etc/ Configuration files
root / sbin programs for communication Example: dhcpclient, wpa_cli
root / sys system utilities
root / usr programs installed via install Example: ADB, cpp, blabla
Set system path and environment variable
Programs are started from their folder.
If you want to be able to run programs from anywhere,
the path of the path variable must be passed.
Add the path to the path variable
PATH = $ PATH: / home / katrin / bin
- The path is always given from root
- Paths are separated from each other by:
- The old PATH variable ($ PATH) got to to be named.
The new path is appended after the colon
Set path in .bashrc
export PATH = $ PATH: /opt/altera/13.0sp1/quartus/bin
.bashrc is in the home as a hidden file
Set variable (in Windows) as system variable
System and security / System / Advanced system settings
In this popup there is a button: Environment variables
Click and give the variable a name: LM_LICENSE: blabla_5
Give the variable a value: [email protected]: 563
Execute (at storage location)
In the directory itself, the script is executed with ./.
Assign the script to the PATH variable
PATH = $ PATH: / home / katrin / bin
If the path variable is set, the script can be called from anywhere.
Run script anywhere
# add program to global path
Here, not the script path, but the program to be executed is assigned to the path.
Define the script as executable
Send parameters via console
echo $ 1 "number_measurements"
echo $ 2 "number_repetitions"
# packetlength is a local variable
forpacketlength in10040014001500 \
# Output console current packet length
echo $ l
foriin`seq1 $ 2`
iperf3-c10.4.30.50-l $ packetlength
- echo outputs string to console
- $ .. are variables
- echo $ .. requests input via console with whitespace (enter or space)
script.sh 5 2
If you forget the parameters, the program asks for them when it starts
Aliases in Linux
- Alias replace commands with a keyword
- Calling up the keyword starts the command. Aliases must be entered in home / .bashrc
- Aliases cannot only contain the arguments (without a program)
// keyword = endocsope, command = ssh
aliasendoscope = "ssh [email protected]"
gedithome / katrin / .bashrc
- What is your house made of?
- What do African animals normally eat?
- Are psychiatrists questioning psychiatry
- How fast can people swim
- Asians worship white people
- What percentage of people are happy?
- What makes a physical research topic original
- Which is better NITIE or IITB design
- Laughter Helps Lose Weight
- What is implicit multiplication
- Does the US have a skills shortage?
- How do you greet the new year
- Python is a cross-platform language
- What's the coolest type of pendulum
- How reliable is a Jericho 941 pistol
- What are one cent coins made of
- Type 2 diabetes 100 is genetic
- What are some reasons to go vegan
- Why is water hot or cold
- Is user experience a design
- Restaurants accept food brands EBT
- What is an Indian
- If not God who made the universe
- Why should there be anything
- Which is better SEO or PPC
- How often do lizards get split tails?
- Which is dangerous current or voltage 1
- What other payment systems are there besides SWIFT?
- Which chia seed is best
- Is Donald Trump really a nationalist?
- We can observe dark energy
- What is an RPG Maker used for?
- What are your success habits