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.
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

37 wiersze
743 B

  1. /*
  2. * Unloved program to convert a binary on stdin to a C include on stdout
  3. *
  4. * Jan 1999 Matt Mackall <mpm@selenic.com>
  5. *
  6. * This software may be used and distributed according to the terms
  7. * of the GNU General Public License, incorporated herein by reference.
  8. */
  9. #include <stdio.h>
  10. int main(int argc, char *argv[])
  11. {
  12. int ch, total = 0;
  13. if (argc > 1)
  14. printf("const char %s[] %s=\n",
  15. argv[1], argc > 2 ? argv[2] : "");
  16. do {
  17. printf("\t\"");
  18. while ((ch = getchar()) != EOF) {
  19. total++;
  20. printf("\\x%02x", ch);
  21. if (total % 16 == 0)
  22. break;
  23. }
  24. printf("\"\n");
  25. } while (ch != EOF);
  26. if (argc > 1)
  27. printf("\t;\n\n#include <linux/types.h>\n\nconst size_t %s_size = %d;\n",
  28. argv[1], total);
  29. return 0;
  30. }