Skip to content

Instantly share code, notes, and snippets.

@highway900
Last active December 23, 2015 21:48
Show Gist options
  • Save highway900/6698416 to your computer and use it in GitHub Desktop.
Save highway900/6698416 to your computer and use it in GitHub Desktop.

Revisions

  1. highway900 renamed this gist Sep 25, 2013. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. highway900 created this gist Sep 25, 2013.
    27 changes: 27 additions & 0 deletions cross_compiler
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    Setup Cross compiler
    --------------------
    Create an installation on an SDCARD or copy the contents of the raspian image
    to a new directory. Both will be referred to as 'raspbian' as a mount point

    #Mount img
    ```
    mkdir -p tmp raspbian
    sudo mount rasp.img tmp -o loop -o offset=$((122880*512))
    sudo cp -rpv tmp/. raspbian/.
    sudo umount tmp
    ```

    #Install to SD Card
    ```
    sudo dd if=rasp.img of=/dev/sdx bs=8M
    ```

    #Copy qemu to the raspbian system
    ```
    sudo cp /usr/bin/qemu-arm-static raspbian/usr/bin
    ```

    #Chroot and enjoy
    ```
    sudo LC_ALL=C chroot raspbian
    ```