Dear all,
I am trying to write a bash script to burn the OCOTP_OTPMK[0-7] registers.
However, i find out that I am only able to write one OTPMK at a time. Writing the 2nd OTPMK will result in endless loop in the ssh window. Machine is still operateable at this time. After i reboot, i can then write the 2nd OTPMK register.
I need to reboot everytime on writing one OTPMK register. Is it the norm behaviour? If not, may i know is there anything wrong with my procedure?
Below is my script on writing the SRK and OTPMK register
#!/bin/bash
echo "YOU ARE GOING TO BURN THE E-FUSE!"
echo -n "THIS ACTION IS NOT REVERSIBLE! PLEASE CONFIRM [y/n]:"
read confirm
if [ "$confirm" = "y" ]; then
echo Burning SRK...
cd /sys/fsl_otp
echo 0xxxxxxxxx > HW_OCOTP_SRK0
echo 0xxxxxxxxx > HW_OCOTP_SRK1
echo 0xxxxxxxxx > HW_OCOTP_SRK2
echo 0xxxxxxxxx > HW_OCOTP_SRK3
echo 0xxxxxxxxx > HW_OCOTP_SRK4
echo 0xxxxxxxxx > HW_OCOTP_SRK5
echo 0xxxxxxxxx > HW_OCOTP_SRK6
echo 0xxxxxxxxx > HW_OCOTP_SRK7
echo Burning OTP Fuse 1...
echo 0x975b69a7 > HW_OCOTP_OTPMK0
sleep 1
echo Burning OTP fuse 2...
echo 0xafae0b5d > HW_OCOTP_OTPMK1
sleep 1
echo Burning OTP fuse 3...
echo 0x6f780499 > HW_OCOTP_OTPMK2
sleep 1
echo Burning OTP fuse 4...
echo 0x3dda7a47 > HW_OCOTP_OTPMK3
sleep 1
echo Burning OTP fuse 5...
echo 0x76fcba3c > HW_OCOTP_OTPMK4
sleep 1
echo Burning OTP fuse 6
echo 0x6d5c9ef6 > HW_OCOTP_OTPMK5
sleep 1
echo Burning OTP fuse 7...
echo 0xb166b40a > HW_OCOTP_OTPMK6
sleep 1
echo Burning OTP fuse 8...
echo 0x8f449c5d > HW_OCOTP_OTPMK7
sleep 1
echo Enabling HAB...
echo 0x00040000 > HW_OCOTP_MEM0
echo 0x02 > HW_OCOTP_CFG5
echo -n "Done. Press [enter] to reboot"
read systemReboot
echo system reboot
reboot
else
echo Aborted.
fi
Thank you.
Regards,
Tee
Solved! Go to Solution.
Hardly usual customers can have preproduction i.MX6 parts without OTPMK burned.
I expect You do not need to burn it.
Regards,
Yuri
Hello,
Strictly speaking, the OTP may be burned once. As for the OTPMK burning :
"This step is only required for preproduction parts where the fuses that are
normally programmed by Freescale are not programmed. On production
parts, the OTPMK are burned by Freescale prior to shipping the device."
Have a great day,
Yuri
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Yuri,
Thanks for reply.
I am refering to the "i.MX6 Linux High Assurance Boot (HAB) User's Guide" (document number: IMX6HABUG) on this step of burning the OTPMK.
The information on burning this OTPMK is at page 9. Could you please advice whether i should burn the OTPMK?
Regards,
Tee
Hardly usual customers can have preproduction i.MX6 parts without OTPMK burned.
I expect You do not need to burn it.
Regards,
Yuri
Hi Yuri,
I tested and it can be done without burning the OTPMK. Thanks!
Hi Yuri,
Thanks. I will try it out.
Regards,Tee