Skip to content

Latest commit

 

History

History
94 lines (55 loc) · 2.84 KB

prex-install.md

File metadata and controls

94 lines (55 loc) · 2.84 KB

#Prex Installation

The following tutorials are based on 32-bit Linux Debian Architecture that can be found here.

  1. Open a terminal and write: su

  2. Enter the root password and type: apt install sudo

  3. Enter: visudo

  4. Find:

//User priviledge specification root ALL=(ALL:ALL) ALL

...and add below the following:

username ALL=(ALL:ALL) ALL

where username is your system username. Save the script by hitting Ctrl+O and Ctrl+X.

Then enter exit.

  1. Because prex is using an older version of gcc, it is required that we download the necessary files.

-cpp-4.1_4.1.1-21_i386.deb
-gcc-4.1_4.1.1-21_i386.deb
-gcc-4.1-base_4.1.1-21_i386.deb
-libgcc1_4.1.1-21_i386.deb
-libssp0_4.1.1-21_i386.deb

They can be found here.

  1. Go to the folder that they downloaded, and execute the following by strict order:

sudo dpkg -i gcc-4.1-base_4.1.1-21_i386.deb
sudo dpkg -i cpp-4.1_4.1.1-21_i386.deb
sudo dpkg -i libgcc1_4.1.1-21_i386.deb
sudo dpkg -i libssp0_4.1.1-21_i386.deb
sudo apt install binutils
sudo apt -f install
sudo dpkg -i gcc-4.1_4.1.1-21_i386.deb

DON'T FORGET THAT ON COMPILATION, THE COMMAND IS gcc-4.1 AND NOT gcc.

  1. Now download the files from this -embedded-systems-programming- repository.

  2. In the console, move to the prex-0.9.0 folder. Run:

sudo apt install make
./configure --cc=gcc-4.1 --target=x86

  1. Run:

make and then make clean .

Note that the compilation and the Makefiles are already uploaded, and the C program is at /usr/sample/sportwatch.c. If for any reasons someone wants to build another project, then they must follow prex's website instructions or contact me.

RUNNING ON QEMU

For QEMU:

  1. Run:

sudo apt install mtools
sudo apt install qemu-system-i386

Then,

sudo nano /etc/mtools.conf

Replace drive a: file=”/dev/fd0” exclusive with drive a: file=”/home/{user}/Downloads/prex-0.8.0.i386-pc.img” , where user is system's username.

QEMU is ready.

From now on, everytime someone tries to change sportwatch.c, must do the steps below:

-At prex-0.9.0 directory, enter: make clean; make

-When compilation is complete, enter: mcopy -o prexos a:

-Now change directory, to the directory where the .img file is and type:

qemu-system-i386 -localtime -fda ./prex-0.8.0.i386-pc.img

That opens the QEMU Console and runs the project.