cmd_esbc_validate.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright 2015 Freescale Semiconductor, Inc.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #include <common.h>
  7. #include <command.h>
  8. #include <fsl_validate.h>
  9. static int do_esbc_halt(cmd_tbl_t *cmdtp, int flag, int argc,
  10. char * const argv[])
  11. {
  12. printf("Core is entering spin loop.\n");
  13. loop:
  14. goto loop;
  15. return 0;
  16. }
  17. static int do_esbc_validate(cmd_tbl_t *cmdtp, int flag, int argc,
  18. char * const argv[])
  19. {
  20. if (argc < 2)
  21. return cmd_usage(cmdtp);
  22. return fsl_secboot_validate(cmdtp, flag, argc, argv);
  23. }
  24. /***************************************************/
  25. static char esbc_validate_help_text[] =
  26. "esbc_validate hdr_addr <hash_val> - Validates signature using\n"
  27. " RSA verification\n"
  28. " $hdr_addr Address of header of the image\n"
  29. " to be validated.\n"
  30. " $hash_val -Optional\n"
  31. " It provides Hash of public/srk key to be\n"
  32. " used to verify signature.\n";
  33. U_BOOT_CMD(
  34. esbc_validate, 3, 0, do_esbc_validate,
  35. "Validates signature on a given image using RSA verification",
  36. esbc_validate_help_text
  37. );
  38. U_BOOT_CMD(
  39. esbc_halt, 1, 0, do_esbc_halt,
  40. "Put the core in spin loop ",
  41. ""
  42. );