Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bcm2711: Use FS UUID and write config.txt and cmdline.txt earlier #6503

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions config/sources/families/bcm2711.conf
Original file line number Diff line number Diff line change
@@ -237,8 +237,9 @@ function pre_umount_final_image__remove_esp() {
}

# write the default config.txt config
function pre_umount_final_image__write_raspi_config() {
cat <<- EOD > "${MOUNT}"/boot/firmware/config.txt
function pre_install_distribution_specific__write_raspi_config() {
mkdir -p "${SDCARD}"/boot/firmware
cat <<- EOD > "${SDCARD}"/boot/firmware/config.txt
# For more options and information see
# http://rptl.io/configtxt
# Some settings may impact device functionality. See link above for details
@@ -290,10 +291,18 @@ function pre_umount_final_image__write_raspi_config() {
EOD
}

function pre_umount_final_image__write_raspi_cmdline() {
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
function pre_install_distribution_specific__write_raspi_cmdline() {
# Write most of the commandline early, to allow customizing it
mkdir -p "${SDCARD}"/boot/firmware
cat <<- EOD > "${SDCARD}"/boot/firmware/cmdline.txt
console=serial0,115200 console=tty1 loglevel=1 rootfstype=${ROOTFS_TYPE} fsck.repair=yes rootwait logo.nologo cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory
EOD
}

function pre_umount_final_image__write_raspi_cmdline_root() {
# Write the root option late, since we only know the FS UUID
# when the image is being created
sed -i "s/$/ root=UUID=${ROOT_PART_UUID}/" "${MOUNT}"/boot/firmware/cmdline.txt

if [[ "${SHOW_DEBUG}" == "yes" ]]; then
display_alert "Showing /boot/firmware as mounted" "bcm2711" "debug"