Advertisement
Guest User

Untitled

a guest
Aug 30th, 2016
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. --- u-boot/board/sunxi/board.c 2016-08-24 12:16:55.454029885 +0200
  2. +++ u-boot.patched/board/sunxi/board.c 2016-08-24 12:00:16.000000000 +0200
  3. @@ -618,9 +618,7 @@ static void setup_environment(const void
  4. {
  5. char serial_string[17] = { 0 };
  6. unsigned int sid[4];
  7. - uint8_t mac_addr[6];
  8. - char ethaddr[16];
  9. - int i, ret;
  10. + int ret;
  11.  
  12. ret = sunxi_get_sid(sid);
  13. if (ret == 0 && sid[0] != 0) {
  14. @@ -645,6 +643,10 @@ static void setup_environment(const void
  15. if ((sid[3] & 0xffffff) == 0)
  16. sid[3] |= 0x800000;
  17.  
  18. +#if defined(CONFIG_CMD_NET)
  19. + uint8_t mac_addr[6];
  20. + char ethaddr[16];
  21. + int i;
  22. for (i = 0; i < 4; i++) {
  23. sprintf(ethaddr, "ethernet%d", i);
  24. if (!fdt_get_alias(fdt, ethaddr))
  25. @@ -668,6 +670,7 @@ static void setup_environment(const void
  26.  
  27. eth_setenv_enetaddr(ethaddr, mac_addr);
  28. }
  29. +#endif
  30.  
  31. if (!getenv("serial#")) {
  32. snprintf(serial_string, sizeof(serial_string),
  33. --- u-boot/include/configs/sunxi-common.h 2016-08-24 12:16:55.774029888 +0200
  34. +++ u-boot.patched/include/configs/sunxi-common.h 2016-08-24 11:50:59.000000000 +0200
  35. @@ -497,7 +497,14 @@ extern int soft_i2c_gpio_scl;
  36. "ext2load mmc 0 0x48000000 uImage && " \
  37. "bootm 0x48000000\0"
  38. #else
  39. -#define BOOTCMD_SUNXI_COMPAT
  40. +#define BOOTCMD_SUNXI_COMPAT \
  41. + "bootcmd_sunxi=" \
  42. + "if load mmc 0 0x44000000 uEnv.txt; then " \
  43. + "echo Loaded environment from uEnv.txt; " \
  44. + "env import -t 0x44000000 ${filesize}; " \
  45. + "fi;" \
  46. + "run bootcmd;\0"
  47. +#define CONFIG_BOOTCOMMAND "run bootcmd_sunxi"
  48. #endif
  49.  
  50. #include <config_distro_bootcmd.h>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement