Coder Social home page Coder Social logo

emu68's Introduction

Emu68

M68K emulation for ARM

Building instructions

In order to build Emu68 several tools are necessary. The first one is of course git, which will be used to clone the repository. Further, cmake will be used to configure the build. Firmware, if required, will be downloaded by cmake during project configure phase, here, either curl or wget will be used. Finally, aarch64 or aarch32 toolchain will be necessary.

Building on Ubuntu

Make sure your package repository is up to date

sudo apt-get update

Subsequently install the build-essential package as well as cross-compiler

sudo apt-get install build-essential gcc-aarch64-linux-gnu g++-aarch64-linux-gnu

After the compiler is fetched we are almost done. Almost. The AArch64 architecture allows bi-endian operation, but the majority of the world is focusing on little-endian format as the native one. The cross-compiler provided by Ubuntu is not an exception and it defaults to little-endian systems. Furthermore, it lacks one big-endian relevant header which will need to be fixed now

sudo cp /usr/aarch64-linux-gnu/include/gnu/stubs-lp64.h /usr/aarch64-linux-gnu/include/gnu/stubs-lp64_be.h

One might wonder how it could work if a little-endian header is taken for the big-endian target. Well, in this case it is fully possible - this file is almost empty. At this point everything is configured properly and building of Emu68 can start. First, clone the repository

git clone https://github.com/michalsc/Emu68.git

After entering the Emu68 directory created by git, one need to pull the submodules

git submodule update --init --recursive

Now, create build directory and install directory, enter the build directory

mkdir build install
cd build

Finally, configure the cmake project

cmake .. -DCMAKE_INSTALL_PREFIX=../install -DTARGET=raspi64 -DVARIANT=pistorm \
				 -DCMAKE_TOOLCHAIN_FILE=../toolchains/aarch64-linux-gnu.cmake

In this example a 64-bit RaspberryPi build is selected with a PiStorm variant. Should you prefer a version of Emu68 which works in bare metal on Raspberry, but does not require PiStorm board, remove the -DVARIANT=pistorm from this line. If you prefer to not use the toolchain file, you need to specify your preferred compiler by yourself, e.g.

CC=aarch64-linux-gcc-10 CXX=aarch64-linux-g++-10 cmake .. -DCMAKE_INSTALL_PREFIX=../install \
         -DTARGET=raspi64 -DVARIANT=pistorm

During configuration process cmake will fetch the most recent RaspberryPi firmware by itself. After the configuration is completed, start building process and finally install the compiled files to previously created install directory

make && make install

Now, build process is completed. Copy the contents of the install directory onto FAT32 or FAT16 formatted SD card. Your Emu68 build is completed.

emu68's People

Contributors

michalsc avatar crypticalcode0 avatar mbeijer avatar ronaegis avatar captain-amygdala avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.