Fork of the vendor (Boundary Devices) u-boot for Reform 2, with minor tweaks. The goal is to migrate to mainstream u-boot or barebox ASAP. The main impediment so far is the 4GB RAM config.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 
 

51 lines
926 B

  1. /*
  2. * (C) Copyright 2015 Google, Inc
  3. * Written by Simon Glass <sjg@chromium.org>
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. *
  7. * See README.rockchip for details of the rkimage format
  8. */
  9. #include "imagetool.h"
  10. #include <image.h>
  11. #include "rkcommon.h"
  12. static uint32_t header;
  13. static void rkimage_set_header(void *buf, struct stat *sbuf, int ifd,
  14. struct image_tool_params *params)
  15. {
  16. memcpy(buf + RK_SPL_HDR_START, rkcommon_get_spl_hdr(params),
  17. RK_SPL_HDR_SIZE);
  18. if (rkcommon_need_rc4_spl(params))
  19. rkcommon_rc4_encode_spl(buf, 4, params->file_size);
  20. }
  21. static int rkimage_check_image_type(uint8_t type)
  22. {
  23. if (type == IH_TYPE_RKIMAGE)
  24. return EXIT_SUCCESS;
  25. else
  26. return EXIT_FAILURE;
  27. }
  28. /*
  29. * rk_image parameters
  30. */
  31. U_BOOT_IMAGE_TYPE(
  32. rkimage,
  33. "Rockchip Boot Image support",
  34. 4,
  35. &header,
  36. rkcommon_check_params,
  37. NULL,
  38. NULL,
  39. rkimage_set_header,
  40. NULL,
  41. rkimage_check_image_type,
  42. NULL,
  43. NULL
  44. );