mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
53 lines
1.6 KiB
Plaintext
53 lines
1.6 KiB
Plaintext
# Broadcom BCM2711 quad core 1-8Gb RAM SoC USB3 GBE USB-C WiFi/BT
|
|
declare -g BOARD_NAME="Raspberry Pi 4"
|
|
declare -g BOARDFAMILY="bcm2711"
|
|
declare -g KERNEL_TARGET="legacy,current,edge"
|
|
declare -g FK__MACHINE_MODEL="Raspberry Pi 4 Model B" # flash kernel (FK) configuration
|
|
declare -g ASOUND_STATE="asound.state.rpi"
|
|
|
|
# Our default paritioning system is leaving esp on. Rpi3 is the only board that have issues with this.
|
|
# Removing the ESP flag from the boot partition should allow the image to boot on both the RPi3 and RPi4.
|
|
pre_umount_final_image__remove_esp() {
|
|
display_alert "Removing ESP flag from FAT partition" "rpi4 / rpi3" "info"
|
|
run_host_command_logged parted -s "${LOOP}" set 1 esp off
|
|
}
|
|
|
|
# configure stuff at the appropriate time in flash-kernel
|
|
pre_initramfs_flash_kernel__write_raspi_config() {
|
|
# for serial console, there is also 'BOOT_UART=1' in 'rpi-eeprom-config' but that is for an earlier stage.
|
|
# look at with it rpi-eeprom-config, change with 'EDITOR=nano rpi-eeprom-config --edit'
|
|
cat <<-EOD >"${FIRMWARE_DIR}/config.txt"
|
|
[pi4]
|
|
max_framebuffers=2
|
|
over_voltage=2
|
|
arm_freq=1800
|
|
|
|
[all]
|
|
kernel=vmlinuz
|
|
cmdline=cmdline.txt
|
|
initramfs initrd.img followkernel
|
|
disable_overscan=1
|
|
hdmi_drive=2
|
|
arm_64bit=1
|
|
disable_splash=1
|
|
|
|
# enable audio (loads snd_bcm2835)
|
|
dtparam=audio=on
|
|
|
|
# bootloader logs to serial, second stage
|
|
# enable_uart=1
|
|
|
|
# overclock. requires decent thermals. COMMENT OUT IF DON'T USE A GREAT COOLER OR HEATSINK.
|
|
# over_voltage=6
|
|
# arm_freq=2000
|
|
|
|
# uncomment to disable wifi or bt.
|
|
#dtoverlay=disable-wifi
|
|
#dtoverlay=disable-bt
|
|
|
|
# gpu and 3d stuff.
|
|
gpu_mem=256
|
|
dtoverlay=vc4-fkms-v3d
|
|
EOD
|
|
}
|