Strona 1 z 1

Instalacja środowiska AVR4L master w linux mint 64

: 29 sty 2019, 19:47
autor: Marek S
Witam
Znalazłem dość interesujący temat odnośnie mikrokontrolerów AVR i mam problem z instalacja na razie utknąłem w tym momencie ( po instalacji java 1.8.0._201.

Kod: Zaznacz cały

1. Make sure `Java JDK / JRE v1.8` is installed on your computer.
	1. How to install: [https://java.com/en/download/help/linux_x64_install.xml](https://java.com/en/download/help/linux_x64_install.xml)
	2. Set `JAVA_HOME` environment variable, by doing the following:
		1. Depending on where you installed your Java, you will need to provide the full path.
			For this example, I installed Oracle JDK 8 in the `/usr/lib/jvm/java-8-oracle` directory.
		2. Open the file `/etc/environment` and scroll to the end of the file and enter the following:
			
			`JAVA_HOME=/usr/lib/jvm/java-8-oracle`
		3. Save and source the file by doing:

			`. /etc/environment` or `source /etc/environment`
2. Clone/download this folder to your computer.
nie wiem o co tu chodzi, tzn. nie mogę znaleźć pliku gdzie należy wpisać JAVA HOME
tu jest ciąg dalszy instrukcji ale może dlatego ze nie jest z javą to nie chce odpalić insalacja

Kod: Zaznacz cały

3. cd into the `Binaries/Linux` directory.
4. run `sudo -E ./install.sh` within this folder.
5. you can now type `avr4l` in any terminal session or find it in the dash if you have `Ubuntu` installed. 

Re: Instalacja środowiska AVR4L master w linux mint 64

: 30 sty 2019, 04:43
autor: verdorben
JAVA_HOME=/usr/lib/jvm/java-8-oracle
musisz wpisać w /etc/environment, jeśli go brak to go stwórz.

pozdr.

Re: Instalacja środowiska AVR4L master w linux mint 64

: 30 sty 2019, 06:41
autor: Marek S
W lokalizacji /usr/lib/jvm/java-8-oracle nie ma folderu /etc/environment dlatego nie rozumiem

Re: Instalacja środowiska AVR4L master w linux mint 64

: 30 sty 2019, 08:42
autor: Tomfoc
verdorben pisze: 30 sty 2019, 04:43 JAVA_HOME=/usr/lib/jvm/java-8-oracle
musisz wpisać w /etc/environment, jeśli go brak to go stwórz.

pozdr.
W katalogu /etc znajduje się plik o nazwie environment. W tym pliku trzeba dopisać:

Kod: Zaznacz cały

JAVA_HOME=/usr/lib/jvm/java-8-oracle
Ten plik możesz edytować tylko po uzyskaniu praw administratora.

Re: Instalacja środowiska AVR4L master w linux mint 64

: 30 sty 2019, 15:21
autor: Marek S
OK zrobione a co potem bo autora nie rozumiem

Kod: Zaznacz cały

2. Clone/download this folder to your computer

Re: Instalacja środowiska AVR4L master w linux mint 64

: 30 sty 2019, 16:36
autor: Marek S
Próbowałem zainstalować program jako root i terminal mi podaje takie informacje

Kod: Zaznacz cały

sudo -E. / Install.sh
sudo: błędna opcja -- '.'
usage: sudo -h | -K | -k | -V
usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
            [command]
usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
            prompt] [-u user] [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
            prompt] [-u user] file ...

Plik instalacyjny wygląda tak

Kod: Zaznacz cały

#!/bin/bash

#################################################################
#	Filename: install.h														 #
#	Modification Date: Sun, Oct  9 2016 01:00:04						 #
#	Creator: hifnawy_moniem@hotmail.com									 #
#	Description: installs AVR4L for linux and all its		 #
#					 dependencies and creates an alias for it.		 #
#################################################################

# check if user is root
if [[ $(id -u) -ne 0 ]]
then
	echo "This script installs and modifies some system files, please run as root or sudo."
	exit 1
fi

if [ -z $JAVA_HOME ]
then
	echo "You called the script without passing the environment variables, please run as sudo with -E switch."
	exit 1
fi

echo "Starting AVR4L installation..."

# install avr toolchain
apt-get install gcc-avr binutils-avr avr-libc
apt-get install gdb-avr
apt-get install avrdude

# check if the system already contains
# the program folder and delete it to
# start a fresh installation
if [ -d "/usr/share/avr4l" ]
then
	rm -rf /usr/share/avr4l
fi

# copy AVR4L core files and folders
mkdir /usr/share/avr4l
cp -r ./AVR4L.jar /usr/share/avr4l
cp -r ./lib /usr/share/avr4l
cp -r ./dependencies/RXTXcomm.jar $JAVA_HOME/jre/lib/ext/RXTXcomm.jar
cp -r ./dependencies/librxtxSerial.so $JAVA_HOME/jre/lib/amd64/librxtxSerial.so
cp -r ./dependencies/librxtxParallel.so $JAVA_HOME/jre/lib/amd64/librxtxParallel.so

cp -r ./icon.png /usr/share/avr4l
cp -r ./avr4l-about.png /usr/share/avr4l
cp -r ./avr4l.desktop /usr/share/applications/avr4l.desktop
cp -r ./avr4l /usr/bin

chmod a+rw -R /usr/share/avr4l/*
chmod a+x -R /usr/share/avr4l/lib
chmod a+x /usr/share/applications/avr4l.desktop
chmod a+x /usr/bin/avr4l

# check if an alias already exists
# if not add it
# if [ -f "$HOME/.bash_aliases" ]
# then
# 	if ! grep -Fxq "alias avr4l=\"java -jar -splash:/usr/share/avr4l/avr4l-about.png /usr/share/avr4l/AVR4L.jar\"" $HOME/.bash_aliases
# 	then
# 		echo "alias avr4l=\"java -jar -splash:/usr/share/avr4l/avr4l-about.png /usr/share/avr4l/AVR4L.jar\"" >> $HOME/.bash_aliases
# 		printf "\nAdded alias to $HOME/.bash_aliases\n"
# 	else
# 		printf "\nAlias already in $HOME/.bash_aliases\n"
# 	fi
# else
# 	echo "alias avr4l=\"java -jar -splash:/usr/share/avr4l/avr4l-about.png /usr/share/avr4l/AVR4L.jar\"" >> $HOME/.bash_aliases
# fi

# update the system environment variables by
# sourcing the bash files
source $HOME/.bash_aliases
source $HOME/.bashrc

# check if installation has gone all the way down
if [ -f "/usr/share/avr4l/AVR4L.jar" ]
then
	if [ -d "/usr/share/avr4l/lib" ]
	then
		if [ -f "/usr/share/avr4l/icon.png" ]
		then
			if [ -f "/usr/share/applications/avr4l.desktop" ]
			then
				GREEN='\033[0;32m'
				NC='\033[0m'
				printf "${GREEN}\nAVR4L was installed successfully !!!${NC}\n\n"
				# printf "\nPLEASE RESTART TERMINAL !!!\n"
			fi
		fi
	fi
else
	RED='\033[0;31m'
	NC='\033[0m'
	printf "${RED}\nProblems occured during installation !!!${NC}\n"
	printf "${RED}Please consider running the script with sudo${NC}\n"
fi
Może ktoś bieglejszy niż ja pomoże