D1 SDK Howto
This page walks you through building Allwinners own SDK for the D1 SoC, using the mirror we have on our server, and an adjusted git-repo manifest.
The original SDK as created by Allwinner was behind a registration wall, which includes a click-through disclaimer that is at odds with the GPL. Since we have our own mirror, this is actually open, and this howto describes how to use it.
Arch Linux based distributions
pacman -S repo
Debian based distributions
apt-get install repo
Repo downloads a copy of itself to .repo, and that version will trip over on itself if it gets started with python-2 (which is the default still on debian stable/buster).
When you run repo in the next section, and you get:
File "/home/user/dir/.repo/repo/main.py", line 79 file=sys.stderr) ^ SyntaxError: invalid syntax
Then you might need to switch to python-3. Here it cryptically tripped over the print() command which does not exist in python-2.
To get around this, check what python versions are available:
# ls /usr/bin/python* /usr/bin/python /usr/bin/python2.7 /usr/bin/python3.7 /usr/bin/python3m /usr/bin/python2 /usr/bin/python3 /usr/bin/python3.7m
And then point alternatives to the python-3 bin:
update-alternatives --install /usr/bin/python python /usr/bin/python3.7 1
# python --version Python 3.7.3
You will need to restore python-2, if you want to run the repo utility that your debian system knows, as that hard depends on python 2.
update-alternatives --remove python /usr/bin/python3.7 update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
When you then run sync again, you will have to dance the same dance all over again. WTF? Git-repo developers, WTF?
Point repo at the manifest
repo init -u https://github.com/linux-sunxi/d1-sdk-manifest.git -b master -m tina-d1-open.xml
If all goes well, it will state:
repo has been initialized in /home/user/dir
Let repo get all the repositories