Skip to content

Instantly share code, notes, and snippets.

@AlexxIT
Last active March 5, 2021 09:32
Show Gist options
  • Save AlexxIT/4cbc36ec6903b5061baf9b8aeacf7d08 to your computer and use it in GitHub Desktop.
Save AlexxIT/4cbc36ec6903b5061baf9b8aeacf7d08 to your computer and use it in GitHub Desktop.
Compile cpp for Xiaomi Gateway 3
#include <stdio.h>
int main()
{
int a = 1;
int b = 2;
printf("The answer is: %d\n", a + b);
return 0;
}
# https://hub.docker.com/r/dockcross/linux-mipsel
# https://hub.docker.com/r/asmimproved/qemu-mips
# TODO: change `~/projects/gw3` to your dir
docker run --rm -v ~/projects/gw3:/work dockcross/linux-mipsel mipsel-linux-gnu-gcc -static main.c -o main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment