-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
43 lines (35 loc) · 1.92 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
[Modified from the android-rpi original to use the automotive specific config]
Read it first : https://github.com/snappautomotive/firmware_rpi-local_manifests
# Build Kernel
$ sudo apt install gcc-aarch64-linux-gnu libssl-dev bc
$ cd kernel/arpi
$ ARCH=arm64 scripts/kconfig/merge_config.sh arch/arm64/configs/bcm2711_defconfig kernel/configs/android-base.config kernel/configs/android-recommended.config
$ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make Image.gz
$ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- DTC_FLAGS="-@" make broadcom/bcm2711-rpi-4-b.dtb
$ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- DTC_FLAGS="-@" make overlays/vc4-kms-v3d-pi4.dtbo
# Patch framework source
https://github.com/android-rpi/device_arpi_rpi4/wiki/arpi-11-:-framework-patch
# Build Android source
Continue build referring to http://source.android.com/source/building.html
$ source build/envsetup.sh
$ lunch snapp_car_rpi4-eng
$ make ramdisk systemimage vendorimage
Use -j[n] option with make, if build host has a good number of CPU cores.
# Prepare sd card
Partitions of the card should be set-up like followings.
p1 128MB for boot : Do fdisk, set W95 FAT32(LBA) & Bootable type, mkfs.vfat
p2 2048MB for /system : Do fdisk, new primary partition
p3 128MB for /vendor : Do fdisk, new primary partition
p4 remainings for /data : Do fdisk, mkfs.ext4
Set volume label of /data partition as userdata
: use -L option for mkfs.ext4, and -n option for mkfs.vfat
# Write system & vendor partition
$ cd out/target/product/rpi
$ sudo dd if=system.img of=/dev/<p2> bs=1M
$ sudo dd if=vendor.img of=/dev/<p3> bs=1M
# Copy kernel & ramdisk to BOOT partition
device/snappautomotive/rpi/boot/* to p1:/
kernel/arpi/arch/arm64/boot/Image.gz to p1:/
kernel/arpi/arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b.dtb to p1:/
kernel/arpi/arch/arm64/boot/dts/overlays/vc4-kms-v3d-pi4.dtbo to p1:/overlays/
out/target/product/rpi/ramdisk.img to p1:/