rksd.c 673 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * (C) Copyright 2015 Google, Inc
  4. * Written by Simon Glass <sjg@chromium.org>
  5. *
  6. * See README.rockchip for details of the rksd format
  7. */
  8. #include "imagetool.h"
  9. #include <image.h>
  10. #include <rc4.h>
  11. #include "mkimage.h"
  12. #include "rkcommon.h"
  13. static int rksd_check_image_type(uint8_t type)
  14. {
  15. if (type == IH_TYPE_RKSD)
  16. return EXIT_SUCCESS;
  17. else
  18. return EXIT_FAILURE;
  19. }
  20. /*
  21. * rk_sd parameters
  22. */
  23. U_BOOT_IMAGE_TYPE(
  24. rksd,
  25. "Rockchip SD Boot Image support",
  26. 0,
  27. NULL,
  28. rkcommon_check_params,
  29. rkcommon_verify_header,
  30. rkcommon_print_header,
  31. rkcommon_set_header,
  32. NULL,
  33. rksd_check_image_type,
  34. NULL,
  35. rkcommon_vrec_header
  36. );