mirror of https://github.com/armbian/build.git
bcm2711: restore lost `RPI_DEBUG_CONSOLE`
- if `RPI_DEBUG_CONSOLE=yes`:
- `config.txt`:
- `enable_uart=1`
- `dtoverlay=disable-bt`
- `cmdline.txt`:
- `console=tty1 console=ttyAMA0,115200 loglevel=7`
- this was lost in revision 1c3b7ec36c for some reason
This commit is contained in:
parent
6cdf1e86fd
commit
c419d2a884
|
|
@ -239,6 +239,17 @@ function pre_umount_final_image__remove_esp() {
|
|||
|
||||
# write the default config.txt config
|
||||
function pre_umount_final_image__write_raspi_config() {
|
||||
declare comment_if_debug=""
|
||||
declare not_comment_if_debug="#"
|
||||
if [[ "${RPI_DEBUG_CONSOLE}" != "yes" ]]; then
|
||||
comment_if_debug="#"
|
||||
not_comment_if_debug=""
|
||||
# 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'
|
||||
else
|
||||
display_alert "Enabling debug console" "config.txt - ${BOARD} - RPI_DEBUG_CONSOLE=yes" "warn"
|
||||
fi
|
||||
|
||||
cat <<- EOD > "${MOUNT}"/boot/firmware/config.txt
|
||||
# For more options and information see
|
||||
# http://rptl.io/configtxt
|
||||
|
|
@ -264,6 +275,11 @@ function pre_umount_final_image__write_raspi_config() {
|
|||
# Automatically load initramfs files, if found
|
||||
auto_initramfs=1
|
||||
|
||||
# bootloader logs to serial, second stage (Armbian: enable with RPI_DEBUG_CONSOLE=yes, currently: ${RPI_DEBUG_CONSOLE:-"no"})
|
||||
${not_comment_if_debug}enable_uart=1
|
||||
# if uart is enabled, disable Bluetooth which also uses UART
|
||||
${comment_if_debug}dtoverlay=disable-bt
|
||||
|
||||
# Enable DRM VC4 V3D driver
|
||||
dtoverlay=vc4-kms-v3d
|
||||
max_framebuffers=2
|
||||
|
|
@ -292,8 +308,14 @@ function pre_umount_final_image__write_raspi_config() {
|
|||
}
|
||||
|
||||
function pre_umount_final_image__write_raspi_cmdline() {
|
||||
declare cmdline_consoles="console=serial0,115200 console=tty1 loglevel=1" # default; no idea why Gunjan had serial0 in here, it wouldn't work, but I kept it
|
||||
if [[ "${RPI_DEBUG_CONSOLE}" == "yes" ]]; then
|
||||
display_alert "Enabling debug console" "cmdline.txt - ${BOARD} - RPI_DEBUG_CONSOLE=yes" "warn"
|
||||
cmdline_consoles="console=tty1 console=ttyAMA0,115200 loglevel=7"
|
||||
fi
|
||||
|
||||
cat <<- EOD > "${MOUNT}"/boot/firmware/cmdline.txt
|
||||
console=serial0,115200 console=tty1 loglevel=1 root=LABEL=${ROOT_FS_LABEL} rootfstype=${ROOTFS_TYPE} fsck.repair=yes rootwait logo.nologo cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory
|
||||
${cmdline_consoles} root=LABEL=${ROOT_FS_LABEL} rootfstype=${ROOTFS_TYPE} fsck.repair=yes rootwait logo.nologo cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory
|
||||
EOD
|
||||
|
||||
if [[ "${SHOW_DEBUG}" == "yes" ]]; then
|
||||
|
|
|
|||
Loading…
Reference in New Issue