2023年10月27日 星期五

ASUS Tinker Board 2S - Build Android 11- 2

 ASUS Tinker Board 2S - 2


https://github.com/TinkerBoard/TinkerBoard/wiki

https://github.com/TinkerBoard

https://github.com/TinkerBoard2


1. Ubuntu 編譯環境

原廠建議使用Ubuntu16.04 64位元或Ubuntu18.04 64位元系統, 

或 windows subsystem for linux,

我個人是在 Ubuntu 18中測試,

建議先重新安裝一套系統,

如果和舊系統中試, 有些真的會心理崩潰

硬碟空間要大一些, 因為最後編譯出來的檔案都很大

如果幾個版本都試, 很快就出現空間不足

(一個版本約230-250GB 之間)


2. 

$ sudo apt-get install openjdk-8-jdk

$ sudo apt-get update

$ sudo apt-get upgrade

$ sudo apt-get install p7zip-full

$ sudo apt-get install gawk

$ sudo apt-get install liblz4-tool

$ sudo snap install curl

$ curl --version

 // Ubuntu 18

 $ sudo apt-get install git gnupg flex bison gperf libsdl1.2-dev \

libesd-java libwxgtk3.0-dev squashfs-tools build-essential zip curl \

libncurses5-dev zlib1g-dev pngcrush schedtool libxml2 libxml2-utils \

xsltproc lzop libc6-dev schedtool g++-multilib lib32z1-dev lib32ncurses5-dev \

lib32readline-dev gcc-multilib libswitch-perl libssl-dev unzip zip

 

 // Ubuntu 20

 $ sudo apt-get install git gnupg flex bison gperf libsdl1.2-dev \

libesd-java libwxgtk3.0-gtk3-dev squashfs-tools build-essential zip curl \

libncurses-dev zlib1g-dev pngcrush schedtool libxml2 libxml2-utils \

xsltproc lzop libc6-dev schedtool g++-multilib lib32z1-dev lib32ncurses-dev \

lib32readline-dev gcc-multilib libswitch-perl libssl-dev unzip zip



$ sudo apt-get install git

$ git version

$ sudo apt install software-properties-common

$ sudo add-apt-repository ppa:deadsnakes/ppa


3.

$ sudo apt-get install python (這會安裝2.7.17)

$ python --version

$ python

 => exit()

$ mkdir ~/bin

$ PATH=~/bin:$PATH

 

 下面是出問題時的參考

  $ sudo apt update

  python 3.8 的安裝方法

  $ sudo apt update

  $ sudo apt install python3.8

  $ python --version  

  (如果是2.x 後面的repo會有問題, python3.8指定為python)

   $ sudo rm -rf /usr/bin/python

   $ sudo ln -s /usr/bin/python3.8 /usr/bin/python

   $ python --version

4.

 git config --global user.name XXXX

 git config --global user.email XXXX@example.com


5. 安裝 Android 源代碼管理工具

// https://source.android.com/setup/develop?hl=zh-tw

// https://source.android.com/setup/develop?hl=zh-tw#installing-repo

$ sudo apt-get update

$ sudo apt-get install repo

$ cd Home/xxx user dir

$ mkdir bin

$ export REPO=$(mktemp /tmp/repo.XXXXXXXXX)

$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo

$ chmod a+x ~/bin/repo

$ gpg --keyserver keyserver.escomposlinux.org --recv-key 8BB9AD793E8E6153AF0F9A4416530D5E920F5C65

$ curl -s https://storage.googleapis.com/git-repo-downloads/repo.asc | gpg --verify - ${REPO} && install -m 755 ${REPO} ~/bin/repo

$ repo version


  > File "/home/jun/.repo/repo/main.py", line 94

  >   )

  >   ^

  > SyntaxError: invalid syntax

  $ python --version

    Python 2.7.17

  $ python3 --version

    Python 3.6.9

  $ cd /usr/bin

  $ sudo rm python

  $ sudo ln -s /usr/bin/python3 /usr/bin/python

  $ repo version

  

5. 安裝Docker

// https://github.com/TinkerBoard/TinkerBoard/wiki/Developer-Guide

 Kernel 4.19

  Install Docker environment

   Install Docker Engine – Community


$ sudo apt-get remove docker docker-engine docker.io containerd runc

$ sudo apt update

$ sudo apt install apt-transport-https ca-certificates curl software-properties-common


$ sudo apt-get update

$ sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

$ sudo apt-key fingerprint 0EBFCD88

$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

$ sudo apt-get update

$ sudo apt-get install docker-ce docker-ce-cli containerd.io

$ sudo docker run hello-world


沒有留言:

張貼留言