From 8cf684dad20b0f519ffda4c46996569e685b0ceb 2018-12-08 15:58:47 From: Unknown Date: 2018-12-08 15:58:47 Subject: [PATCH] added ENABLE_KEYGEN unlock all RPI codecs (tested on RPI3 armv8) --- diff --git a/bootstrap.d/15-rpi-config.sh b/bootstrap.d/15-rpi-config.sh index 5130927..c695418 100644 --- a/bootstrap.d/15-rpi-config.sh +++ b/bootstrap.d/15-rpi-config.sh @@ -38,6 +38,21 @@ else chmod -R 600 "${BOOT_DIR}" fi +if [ "$ENABLE_KEYGEN" = true] ; then + + # go to chroot/boot/ + cd "${BOOT_DIR}/" || exit + + # Make a copy of start.elf + cp start.elf start.elf_backup + + # Remove codec licence checks - thx go to https://github.com/nucular/raspi-keygen - if ENABLE_VIDEOCORE is true, you can check codec status https://elinux.org/RPI_vcgencmd_usage + perl -pne 's/\x47\xE9362H\x3C\x18/\x47\xE9362H\x3C\x1F/g' < start.elf_backup > start.elf + + # Back to base dir + cd "${WORKDIR}" || exit +fi + # Setup firmware boot cmdline if [ "$ENABLE_UBOOTUSB" = true ] ; then CMDLINE="dwc_otg.lpm_enable=0 root=/dev/sda2 rootfstype=ext4 rootflags=commit=100,data=writeback elevator=deadline rootwait init=/bin/systemd" diff --git a/rpi23-gen-image.sh b/rpi23-gen-image.sh index 5902085..6d16109 100755 --- a/rpi23-gen-image.sh +++ b/rpi23-gen-image.sh @@ -144,6 +144,7 @@ USER_NAME=${USER_NAME:="pi"} ENABLE_ROOT=${ENABLE_ROOT:=false} ENABLE_QEMU=${ENABLE_QEMU:=false} ENABLE_SYSVINIT=${ENABLE_SYSVINIT:=false} +ENABLE_KEYGEN=${ENABLE_KEYGEN:=true} # SSH settings SSH_ENABLE_ROOT=${SSH_ENABLE_ROOT:=false} @@ -383,6 +384,11 @@ fi set +x # Add cmake to compile videocore sources +if [ "$ENABLE_KEYGEN" = true ] ; then + REQUIRED_PACKAGES="${REQUIRED_PACKAGES} perl" +fi + +# Add cmake to compile videocore sources if [ "$ENABLE_VIDEOCORE" = true ] ; then REQUIRED_PACKAGES="${REQUIRED_PACKAGES} cmake" fi