Add burn_to_emmc

This commit is contained in:
orangepi-xunlong
2022-09-29 19:35:05 +08:00
parent dbc05c55fe
commit 564f03addc
2 changed files with 796 additions and 1 deletions

View File

@@ -623,6 +623,29 @@ FAMILY_TWEAKS
install_rclocal()
{
if [[ $BURN_IMAGE == yes ]]; then
cat <<-EOF > "${SDCARD}"/etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
burn_to_emmc
exit 0
EOF
else
cat <<-EOF > "${SDCARD}"/etc/rc.local
#!/bin/sh -e
#
@@ -639,7 +662,9 @@ install_rclocal()
exit 0
EOF
chmod +x "${SDCARD}"/etc/rc.local
fi
chmod +x "${SDCARD}"/etc/rc.local
}