forked from niflostancu/rpi-debian-build-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.default.sh
80 lines (66 loc) · 3.15 KB
/
config.default.sh
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
# Default configuration file (included in both host & rootfs execution contexts!).
# Copy / create 'config.sh' to customize it!
# Note: $SRC_DIR is available for building abs paths!
# uncomment if you want a configuration overlay (e.g., custom boards)
#CUSTOM_CONFIG=${CUSTOM_CONFIG:-"vanilla-rpi4"}
# --------------------------------------------------
# Host build options
# -----------------------------
# cross compiler options
CROSS_COMPILER=${CROSS_COMPILER:-"aarch64-linux-gnu-"}
# sudo-like utility to use (when root privileges are required)
SUDO=${SUDO:-sudo}
# destination dirs (note: you need ~5GB of free disk space in here)
BUILD_DEST=${BUILD_DEST:-"/tmp/rpi-debian${CUSTOM_CONFIG:+-${CUSTOM_CONFIG}}"}
# Note: you can leave those as they are automatically derived from BUILD_DEST
ROOTFS_DEST=${ROOTFS_DEST:-"$BUILD_DEST/rootfs"}
KERNEL_DEST=${KERNEL_DEST-"$BUILD_DEST/kernel-build"}
UBOOT_DEST=${UBOOT_DEST:-"$BUILD_DEST/u-boot"}
IMAGE_DEST=${IMAGE_DEST:-"$BUILD_DEST/image.bin"}
# --------------------------------------------------
# U-Boot build options
# -----------------------------
UBOOT_GIT=${UBOOT_GIT:-"https://github.com/u-boot/u-boot.git"}
UBOOT_BRANCH=${UBOOT_BRANCH:-"v2023.07.02"}
UBOOT_DEFCONFIG=${UBOOT_DEFCONFIG:-"rpi_4_defconfig"}
UBOOT_MAKE_THREADS=${UBOOT_MAKE_THREADS:-4}
# --------------------------------------------------
# Kernel build options
# -----------------------------
KERNEL_MAKE_THREADS=${KERNEL_MAKE_THREADS:-4}
# Note: you can override any of the CUSTOM_CONFIG parameters
#KERNEL_BRANCH=${KERNEL_BRANCH:-"rpi-6.1.y"}
#KERNEL_ARCH=${KERNEL_ARCH:-"arm64"}
#KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:-bcm2711_defconfig}
#KERNEL_PATCHES_DIR="$CUSTOM_CONFIG_DIR/kernel-5.15"
#KERNEL_LOCALVERSION=${KERNEL_LOCALVERSION:-'-rpi'}
# --------------------------------------------------
# RootFS provisioning options
# (those are mostly used inside a chroot context)
# -----------------------------
# RPI Firmware files to copy to the boot ramdisk (note: bash array!)
[[ -v RPI_FIRMWARE_FILES[@] ]] || \
RPI_FIRMWARE_FILES=(start4.elf fixup4.dat bcm2711-rpi-cm4.dtb)
# Initial RPI config.txt and cmdline.txt to copy
# Afterwards, you can find / edit them inside /etc/initramfs/ on the rootfs ;)
RPI_CONFIG_FILE=${RPI_CONFIG_FILE:-"$INSTALL_SRC/files/boot/config.txt"}
RPI_CMDLINE_FILE=${RPI_CMDLINE_FILE:-"$INSTALL_SRC/files/boot/cmdline.txt"}
# e.g., if using LUKS:
#RPI_CMDLINE_FILE="$INSTALL_SRC/files/boot/cmdline-cryptroot.txt"
# use to append extra lines to config.txt:
#RPI_CONFIG_EXTRA="dtoverlay=vc4-kms-v3d"$'\n'
# Path to the mounted RPI firmware
RPI_FIRMWARE_DIR=${RPI_FIRMWARE_DIR:-"/boot/firmware"}
# main user to create (it will have an empty password initially!)
MAIN_USER=${MAIN_USER:-pi}
# initramfs dropbear settings
DROPBEAR_AUTHORIZED_KEYS=${DROPBEAR_AUTHORIZED_KEYS:-"$SRC_DIR/dist/authorized_keys"}
DROPBEAR_PORT=${DROPBEAR_PORT:-2002}
# --------------------------------------------------
# Image build options
# -----------------------------
IMAGE_SIZE_MB=${IMAGE_SIZE_MB:-"2048"}
IMAGE_BOOT_PART_MB=${BOOT_PART_MB:-"100"}
IMAGE_ROOTFS_PART_NAME=${IMAGE_ROOTFS_PART_NAME:-"RPI_ROOTFS"}
IMAGE_BOOT_PART_NAME=${IMAGE_BOOT_PART_NAME:-"RPI_BOOT"}