$ sudo apt install git
$ sudo mkdir -p /opt/tools
$ sudo chown -R user:user /opt/tools
$ cd /opt/tools
$ git clone https://cool-pi.cn/coolpi/git-repo.git -b stable
$ sudo cp git-repo/repo /usr/bin/repo
add file into /etc/profile.d/, set repo environment
$ echo export REPO_URL="file:///opt/tools/git-repo" | sudo tee /etc/profile.d/cool-repo
$ source /etc/profile
$ repo --version
repo version v2.32
id_ed25519.pdf
download private ssh key file, save to directory ~/.ssh/
$ cp id_ed25519.pdf ~/.ssh/id_ed25519
$ chmod 0600 ~/.ssh/id_ed25519
$ cat coolpi-android12-20230526.tar.gz_* > coolpi-android12-20230526.tar.gz
$ md5sum coolpi-android12-20230526.tar.gz
86aea6c0e9141fb0d6c4469cc1db356c coolpi-android12-20230526.tar.gz
$ tar -xf coolpi-android12-20230526.tar.gz
$ cd coolpi-android12
$ repo sync -l -c
$ mkdir coolpi-android12 && cd coolpi-android12
$ repo init -u https://cool-pi.cn/coolpi/manifests.git
$ repo sync
$ cd coolpi-android12
$ repo sync
$ cd coolpi-android12
$ source build/envsetup.sh
$ lunch rk3588s_s-userdebug
$ ./build.sh -CA
$ cd coolpi-android12
$ source build/envsetup.sh
$ lunch rk3588_s-userdebug
$ ./build.sh -CA
$ cd coolpi-android12/kernel-5.10
$ ./build-kernel.sh cp4b
$ sudo ./build-fatboot.sh
$ cp ../out/target/product/rk3588s_s/super.img .
$ sudo ./generate_android.sh coolpi-4b
...
Number Start (sector) End (sector) Size Code Name
1 2048 616447 300.0 MiB 0700 boot
2 616448 624639 4.0 MiB 8300 security
3 624640 632831 4.0 MiB A004 misc
4 632832 641023 4.0 MiB 8300 dtbo
5 641024 643071 1024.0 KiB A005 vbmeta
6 643072 1462271 400.0 MiB A007 cache
7 1462272 1495039 16.0 MiB A005 metadata
8 1495040 1497087 1024.0 KiB 8300 baseparameter
9 1497088 8869887 3.5 GiB 8300 super
10 8869888 9074687 100.0 MiB A007 userdata
add map loop27p1 (253:0): 0 614400 linear 7:27 2048
add map loop27p2 (253:1): 0 8192 linear 7:27 616448
add map loop27p3 (253:2): 0 8192 linear 7:27 624640
add map loop27p4 (253:3): 0 8192 linear 7:27 632832
add map loop27p5 (253:4): 0 2048 linear 7:27 641024
add map loop27p6 (253:5): 0 819200 linear 7:27 643072
add map loop27p7 (253:6): 0 32768 linear 7:27 1462272
add map loop27p8 (253:7): 0 2048 linear 7:27 1495040
add map loop27p9 (253:8): 0 7372800 linear 7:27 1497088
add map loop27p10 (253:9): 0 204800 linear 7:27 8869888
313524224 bytes (314 MB, 299 MiB) copied, 4 s, 75.1 MB/s
记录了300+0 的读入
记录了300+0 的写出
314572800 bytes (315 MB, 300 MiB) copied, 4.69774 s, 67.0 MB/s
3168796672 bytes (3.2 GB, 3.0 GiB) copied, 4 s, 792 MB/s
记录了3112+0 的读入
记录了3112+0 的写出
3263168512 bytes (3.3 GB, 3.0 GiB) copied, 6.75729 s, 483 MB/s
记录了1+0 的读入
记录了1+0 的写出
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.505965 s, 2.1 MB/s
del devmap : loop27p4
del devmap : loop27p3
del devmap : loop27p2
del devmap : loop27p1
del devmap : loop27p9
del devmap : loop27p8
del devmap : loop27p7
del devmap : loop27p10
del devmap : loop27p6
del devmap : loop27p5
Pack image ok!
$ ls -lh 20230516-coolpi-4b.img
-rw-r--r-- 1 root root 4.9G 5月 16 20:02 20230516-coolpi-4b.img
Plug in the power and press the power button at least three times, and the machine will enter UMS mode.
$ cd coolpi-android12/kernel-5.10
$ ./build-kernel.sh cm5-evb
$ sudo ./build-fatboot.sh
$ cp ../out/target/product/rk3588_s/super.img .
$ sudo ./generate_android.sh coolpi-cm5
...
Plug in the power and press the power button at least three times, and the machine will enter UMS mode.
If you do not have an existing SSH key pair, generate a new one:
Open a terminal.
Run ssh-keygen -t followed by the key type and an optional comment. This comment is included in the .pub file that's created. You may want to use an email address for the comment.
For example, for ED25519:
ssh-keygen -t ed25519 -C "<comment>"
For 2048-bit RSA:
ssh-keygen -t rsa -b 2048 -C "<comment>"
Generating public/private ed25519 key pair.
Enter file in which to save the key (/home/user/.ssh/id_ed25519):
...
error: Unable to fully sync the tree.
error: Checking out local projects failed.
Failing repos:
build/pesto
Try re-running with "-j1 --fail-fast" to exit at the first error.
coolpi-android12$ repo sync -l
Checking out: 100% (1082/1082), done in 8.431s
repo sync has finished successfully.
$ cd kernel-5.10
$ cp logo.bmp boot/
$ cp logo.bmp boot/logo_kernel.bmp
$ sudo ./build-fatboot.sh
...
LZ4C arch/arm64/boot/Image.lz4
Incorrect parameters
Usage :
lz4 [arg] [input] [output]
input : a filename
with no FILE, or when FILE is - or stdin, read standard input
Arguments :
-1 : Fast compression (default)
-9 : High compression
-d : decompression (default for .lz4 extension)
-z : force compression
-f : overwrite output without prompting
-h/-H : display help/long help and exit
arch/arm64/boot/Makefile:31: recipe for target 'arch/arm64/boot/Image.lz4' failed
make[2]: *** [arch/arm64/boot/Image.lz4] Error 1
make[2]: *** Deleting file 'arch/arm64/boot/Image.lz4'
arch/arm64/Makefile:170: recipe for target 'Image.lz4' failed
make[1]: *** [Image.lz4] Error 2
update lz4(liblz4-tool) or copy coolpi-android12/out/host/linux-x86/bin/lz4 to /usr/bin/lz4.