Skip to content
Snippets Groups Projects
Commit 1aae0572 authored by Arnaud Ferraris's avatar Arnaud Ferraris
Browse files

devices: qcom: bootloader: set loglevel if a console is defined

Some devices have a `console=...` kernel param in order to work around a
race condition in the display's initialization. However, this problem's
discussion mentions[1] that `loglevel` should be high enough for this
workaround to be effective. We therefore set it to 7 (debug) whenever
the kernel cmdline contains a `console=...` argument.

[1] https://gitlab.freedesktop.org/drm/msm/-/issues/46#note_2213313
parent a548d1a4
No related branches found
No related tags found
No related merge requests found
Pipeline #738625 failed with stages
in 2 hours, 42 minutes, and 22 seconds
......@@ -41,9 +41,13 @@ for i in $(seq 0 $(tomlq -r '.device | length - 1' ${CONFIG})); do
fi
DTB_FILE="/usr/lib/linux-image-${KERNEL_VERSION}/qcom/${DEVICE_SOC}-${VENDOR}-${FULLMODEL}.dtb"
LOGLEVEL="quiet"
# Include additional cmdline args if specified
if [ "${APPEND}" ]; then
CMDLINE="${CMDLINE} ${APPEND}"
if echo "${APPEND}" | grep -q "console="; then
LOGLEVEL="loglevel=7"
fi
fi
# Append DTB to kernel
......@@ -54,6 +58,6 @@ for i in $(seq 0 $(tomlq -r '.device | length - 1' ${CONFIG})); do
abootimg --create /bootimg-${FULLMODEL} \
-c kerneladdr=${KERNEL_ADDR} -c ramdiskaddr=${RAMDISK_ADDR} \
-c secondaddr=${SECOND_ADDR} -c tagsaddr=${TAGS_ADDR} -c pagesize=${PAGE_SIZE} \
-c cmdline="mobile.root=${ROOTPART} ${CMDLINE} init=/sbin/init ro quiet splash" \
-c cmdline="mobile.root=${ROOTPART} ${CMDLINE} init=/sbin/init ro ${LOGLEVEL} splash" \
-k /tmp/kernel-dtb -r /boot/initrd.img-${KERNEL_VERSION}
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment