forked from android-risc-v/device_arv_jh7100
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME
56 lines (40 loc) · 2 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Setup build envoronment
https://source.android.com/setup/build/initializing
# Download Android source
https://github.com/android-risc-v/local_manifests
# Patch framework source :
https://github.com/android-risc-v/device_arv_jh7110/wiki/arv-14-:-framework-patch
# Build Android
Refer to http://source.android.com/source/building.html
$ source build/envsetup.sh
$ lunch jh7110-eng
$ make ramdisk systemimage vendorimage
# Prepare sd card
Partitions of the card should be set-up like followings
p1: 128MB for /vendor : Do fdisk, new primary partition
p2: 1024MB for /system : Do fdisk, new primary partition
p3: 128MB for boot : Do fdisk, mkfs.vfat, set EFI type
p4: remainings for /data : Do fdisk, mkfs.ext4
Set volume label of /data partition as userdata : use -L option for mkfs.ext4
# Write system & vendor partition
$ cd out/target/product/jh7110
$ sudo dd if=vendor.img of=/dev/<p1> bs=1M
$ sudo dd if=system.img of=/dev/<p2> bs=1M
# Copy firmware & ramdisk to boot partition
device/arv/jh7110/boot/* to p3:/
out/target/product/jh7110/ramdisk.img to p3:/
# Download & Build kernel
Install cross-compiler
$ sudo apt install gcc-riscv64-linux-gnu
Git clone following kernel source under separate folder apart from Android
https://github.com/android-risc-v/kernel_arv
Build the kernel
$ ARCH=riscv scripts/kconfig/merge_config.sh arch/riscv/configs/defconfig kernel/configs/android-base.config kernel/configs/android-recommended.config
$ ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- make Image.gz starfive/jh7110-starfive-visionfive-2-v1.2a.dtb
# Copy kernel binaries to boot partition
<kernel directory>/arch/riscv/boot/Image.gz to p3:/
<kernel directory>/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-v1.2a.dtb to p3:/dtbs/starfive/
Use -j[n] option for make command, if build host has a good number of CPU cores.
Connect USB keyboard before power-up the board, at least one input device should exist.
# JH7110 hardware information:
https://rvspace.org