Bootloader Tool

0 views
Skip to first unread message

Kahlil Algya

unread,
Aug 3, 2024, 4:18:49 PM8/3/24
to pronthurssuraft

I have a board compatible with SparkFun's Pro Micro and am trying to burn the bootloader to it. I'm using an USBasp programmer, have the latest version of the IDE, and put SparkFun's addon fies in the Arduino sketchbook location.

Thank you! That fixed the problem, although now there seems to be another issue. I've decided to give up on the USBasp and just bought an Atmel ICE programmer/debugger, so hopefully that will work without any issues..

For EFI Systems installed with ZFS as the root filesystem systemd-boot isused, unless Secure Boot is enabled. All other deployments use the standardGRUB bootloader (this usually also applies to systems which are installed ontop of Debian).

Systems using ZFS as root filesystem are booted with a kernel and initrd imagestored on the 512 MB EFI System Partition. For legacy BIOS systems, and EFIsystems with Secure Boot enabled, GRUB is used, for EFI systems withoutSecure Boot, systemd-boot is used. Both are installed and configured to pointto the ESPs.

GRUB in BIOS mode (--target i386-pc) is installed onto the BIOS BootPartition of all selected disks on all systems booted with GRUB
[These are all installs with root on ext4 or xfs and installswith root on ZFS on non-EFI systems]
.

proxmox-boot-tool is a utility used to keep the contents of the EFI SystemPartitions properly configured and synchronized. It copies certain kernelversions to all ESPs and configures the respective bootloader to boot fromthe vfat formatted ESPs. In the context of ZFS as root filesystem this meansthat you can use all optional features on your root pool instead of the subsetwhich is also present in the ZFS implementation in GRUB or having to create aseparate small boot-pool
[Booting ZFS on root with GRUB -Stretch-Root-on-ZFS]
.

The ESPs are not kept mounted during regular operation. This helps to preventfilesystem corruption to the vfat formatted ESPs in case of a system crash,and removes the need to manually adapt /etc/fstab in case the primary bootdevice fails.

To format and initialize a partition as synced ESP, e.g., after replacing afailed vdev in an rpool, or when converting an existing system that pre-datesthe sync mechanism, proxmox-boot-tool from proxmox-kernel-helper can be used.

Changes to the GRUB configuration are done via the defaults file/etc/default/grub or config snippets in /etc/default/grub.d. To regeneratethe configuration file after a change to the configuration run:
[Systems using proxmox-boot-tool will call proxmox-boot-toolrefresh upon update-grub.]

systemd-boot is a lightweight EFI bootloader. It reads the kernel and initrdimages directly from the EFI Service Partition (ESP) where it is installed.The main advantage of directly loading the kernel from the ESP is that it doesnot need to reimplement the drivers for accessing the storage. In Proxmox VEproxmox-boot-tool is used to keep theconfiguration on the ESPs synchronized.

The kernel commandline needs to be placed as one line in /etc/kernel/cmdline.To apply your changes, run proxmox-boot-tool refresh, which sets it as theoption line for all config files in loader/entries/proxmox-*.conf.

A complete list of kernel parameters can be found at -guide/kernel-parameters.html.replace with the major.minor version, for example, forkernels based on version 6.5 the URL would be: -guide/kernel-parameters.html

You can also set a kernel version to be booted on the next system boot only.This is for example useful to test if an updated kernel has resolved an issue,which caused you to pin a version in the first place:

If, for any reason, no proxmox entry can be found in the UEFI boot menu, youcan try adding it manually (if supported by the firmware), by adding the file\EFI\proxmox\shimx64.efi as a custom boot entry.

On systems with Secure Boot enabled, the kernel will refuse to load moduleswhich are not signed by a trusted key. The default set of modules shipped withthe kernel packages is signed with an ephemeral key embedded in the kernelimage which is trusted by that specific version of the kernel image.

In order to load other modules, such as those built with DKMS or manually, theyneed to be signed with a key trusted by the Secure Boot stack. The easiest wayto achieve this is to enroll them as Machine Owner Key (MOK) with mokutil.

The mokutil command will ask for a (temporary) password twice, this passwordneeds to be entered one more time in the next step of the process! Rebootingthe system should automatically boot into the MOKManager EFI binary, whichallows you to verify the key/certificate and confirm the enrollment using thepassword selected when starting the enrollment using mokutil. Afterwards, thekernel should allow loading modules built with DKMS (which are signed with theenrolled MOK). The MOK can also be used to sign custom EFI binaries andkernel images if desired.

P.S.: the MPC5775B is connected to a 40 MHz crystal, MCU_EVTO pin is pulled low via resistor, BOOTCFG[1] is HIGH. The target board and microcontroller are able to run an application software properly if it is directly flashed via JTAG.

I think I am a step further! The RAppID BL Tool GUI comes with a file named "RAppidBL_MCU.rbm". In this file, I copied the line for MPC5777C and re-named it to MPC5775B. Then, I changed the parameter "BAM Type (Type of BAM implementation designated by a number)" from "0" to "1".

So it does correctly begin with the AutoBaud-Rate negotiation and then following the "default password" and everything gets acknowledged by the MCU.
Just: after some time, it prompts an error that the communication was lost...

I am not quite sure if I understand you properly. Let me answer like this: I am sure that the bootloader is flashed onto the MCU (in the flash ROM). It must be there because it does reply to CAN frames which I manually send. There are only two devices connected to the CAN bus: my PC and the target board with the MPC5775B.

What is not working is: use of the GUI (NXP RAppID BL Tool). I have the impression that it does not work, since the RAppID BL Tool does not: 1) send the "autobaud" frame and 2) does not send the appropriate password.

I tried to attach some screenshots showing the progress. (my RAppID BL Tool GUI setting, the error which is shown, the CAN frame which I trace and which comes from the RAppID BL Tool GUI and which "probably contains the wrong password" and the CAN trace which I receive from the MCU when I manually (!) send the autobaud frame and the password frame with the password I belive is correct)

If my target pcb is not powered and no other nodes are connected to the CAN, I can click the "start boot loader" button in the GUI. Then an error prompt shows up "CAN error frame received" (which is correct, since the CAN frame is not acknowledged). When I then power up my target pcb, then the boot loader receives the CAN frame and waits for further data transfer. I can now close the previous error prompt which came from the GUI and click again the "start boot loader" button (while the boot loader is already waiting).

Nevertheless, perhaps I can take the chance and ask another related question: once the software is flashed, how can we "re-enter" the bootloader? In our old design which used the MPC5643L this was easy: we applied power to the MCU while the BAM pins were set to "wait for CAN serial bootloader". Now with the MPC57xx bootloader we cannot use the BAM pins of the MCU, therefore, when releasing it from reset, it "immediately" boots our application software and we see no way currently how we can enter the bootloader and make it work with the RAppID BL Tool GUI... would you happen to know a workaround for that?

On my master vesc, everything worked out fine it is now running 3.29. My slave foc seems to show signs of a missing bootloader. I go to update the firmware it shows complete, the vesc shuts off but does not restart.

The MCU bootloader is a configurable flash programming utility that operates over a serial connection on supported NXP MCUs. It enables quick and easy programming through the entire product lifecycle -- from application development to final product manufacturing and beyond -- for updating applications in the field with confidence.

The bootloader is delivered in two ways: as full source code that is highly configurable; or pre-programmed by NXP into ROM or flash on select NXP MCUs. Host-side command line and GUI tools are available to communicate with the bootloader. The MCU bootloader uses startup, header files, and peripheral drivers from MCUXpresso SDK.

If you are an Android lover who likes to customize your device, you might have listened of the term "bootloader". A bootloader is a program that executes before the operating system initiates, and it decides which kernel and system files to load. By default, most Android devices have a closed bootloader, which indicates you cannot install custom ROMs, root your device, or perform other modifications.

A bootloader unlock tool is software that can bypass the manufacturer's security restrictions and allow you to unlock the bootloader of your Android device. Unlocking the bootloader will give you more control over your device and enable you to flash custom ROMs, kernels, mods, and root your device.

However, unlocking the bootloader also comes with some risks, such as cancelling the warranty, losing the official updates, and bricking the device. Therefore, you should only use a bootloader unlock tool if you know what you are doing and follow the instructions carefully.

Mi Unlock Tool is a software developed by Xiaomi to unlock the bootloader of Xiaomi devices. Xiaomi unlock bootloader is an official and safe way to unlock the bootloader without any risk of bricking your device. Mi Unlock Tool supports all Xiaomi devices running MIUI 8 or above. You need to have a Mi account and bind it to your device before using this tool.

MTKClient Tool is software that can unlock the bootloader of MediaTek devices. MediaTek is a chipset manufacturer that powers many Android devices from different brands. MTKClient Tool can bypass the authentication and unlock the bootloader of any MediaTek device without any data loss. It also supports flashing, rooting, and repairing MediaTek devices.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages