Code Monkey home page Code Monkey logo

raspbian-multiarch's Introduction

raspbian-multiarch

On a fresh install of Raspbian desktop, run:

sudo rpi-update

Then edit your /boot/config.txt and add arm_64bit=1 under the [pi4] section, then reboot.

Next, clone this repo and run:

./raspbian-multiarch.sh

This script sets up a hybrid 32-bit / 64-bit user environment.

The process should complete in about 20 minutes on a Pi 4B, but will take longer if you have a slow internet connection and get bottlenecked on downloading packages.

This has been tested on a fresh install of the 2019-09-26 Buster image of Raspbian desktop with the 4.19.93+ aarch64 kernel. It was last validated on January 11, 2020 and is likely to break anytime thereafter due to changes in the Raspbian or Debian repositories.

The key idea here is to work around APT's Draconian multiarch restrictions by patching the +rpi packages. By tweaking version info and creating these "Stealth RPI" packages many conflicts are avoided. This is a big hack, but with benefits like retaining ARMv6 (Pi Zero) compatibility. In the worst case you can fall back with ./undo.sh to install the original +rpi packages.

When not broken, this script even runs on a standard 32-bit Raspbian system image. When necessary, it will install qemu-user so you can seamlessly run 64-bit commands. You can try out NetHack and other console commands. After that point you can consider whether it still makes sense to replace the kernel for true ARM64 execution. Furthermore, this means you can trial a system configuration on a Pi 2, Pi Zero, or other boards with 32-bit hardware.

If an error occurs partway through, the *.deb files remain saved for troubleshooting or manual installation.

raspbian-multiarch's People

Contributors

jdonald avatar tome25 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

tome25 qbers13

raspbian-multiarch's Issues

Raspbian 32/64-bit interworking (hat-tip)

Hi,

inspired by your suggestion of a 32-into-64 bit chroot I put together a 32-bit Raspbian / 64-bit Debian-in-a-container (systemd-nspawn) bootable image (forum post here) for the RPi3.

Thanks for making the lightbulb go on on this for me!

Best,

sakaki

PS apologies for posting this hat-tip as an issue; I tried sending to the email address in your profile but it bounced. S.

Not working with the newest full Raspbian image

I have recently tried to use this on a fresh copy of the official Raspbian image with the 64 bit kernel enabled(just an added arm_64bit=1 to the /boot/config.txt), but it didn't really work.

First it made some errors due to changed version numbers,
than it had problems because it wasn't changing all the needed version numbers in the mesa libs and a missing dependency.

However i was able to fix all that(i can make a PR with the changes i did if you want), after that it said it misses libllvm7:arm64 and libstdc++6:arm64, as i had problems earlier with adding them to the script i installed them and all their dependencies manually just for a test run and would have tried to integrate them into the script later.

Than i restarted the script and it first created all the stealthrpi packages as it for some reason thinks there is one too much stealthrpi file, but as it came to the point where it last time missed some dependencies this time it printed

dpkg: error processing archive /tmp/apt-dpkg-install-PjtObd/44-libgl1-mesa-dri_18.3.6-2_arm64.deb (--unpack):
 trying to overwrite shared '/usr/share/drirc.d/00-mesa-defaults.conf', which is different from other instances of package libgl1-mesa-dri:arm64

and than crashed with the message

Errors were encountered while processing:
 /tmp/apt-dpkg-install-PjtObd/44-libgl1-mesa-dri_18.3.6-2_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

and i am currently unable to fix that.

This is the almost full log of the second run: szZSQsN2, its not a full log because the console didn't save the start as it was too much text, before this the only things happening were downloading the stealthrpi packets and a list of the stealthrpi packages.

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.