0001-parabola-arm-modifications.patch 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. diff -Nur u-boot-2015.10.orig/include/configs/mx6_common.h u-boot-2015.10/include/configs/mx6_common.h
  2. --- u-boot-2015.10.orig/include/configs/mx6_common.h 2015-10-19 20:59:38.000000000 -0300
  3. +++ u-boot-2015.10/include/configs/mx6_common.h 2016-02-26 20:52:16.196805960 -0300
  4. @@ -68,7 +68,7 @@
  5. #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
  6. #ifndef CONFIG_BOOTDELAY
  7. -#define CONFIG_BOOTDELAY 3
  8. +#define CONFIG_BOOTDELAY 1
  9. #endif
  10. /* allow to overwrite serial and ethaddr */
  11. @@ -82,6 +82,8 @@
  12. #define CONFIG_SUPPORT_RAW_INITRD
  13. #define CONFIG_CMD_FS_GENERIC
  14. #define CONFIG_DOS_PARTITION
  15. +#define CONFIG_CMD_PART
  16. +#define CONFIG_PARTITION_UUIDS
  17. #define CONFIG_CMD_EXT2
  18. #define CONFIG_CMD_EXT4
  19. #define CONFIG_CMD_EXT4_WRITE
  20. diff -Nur u-boot-2015.10.orig/include/configs/wandboard.h u-boot-2015.10/include/configs/wandboard.h
  21. --- u-boot-2015.10.orig/include/configs/wandboard.h 2015-10-19 20:59:38.000000000 -0300
  22. +++ u-boot-2015.10/include/configs/wandboard.h 2016-02-26 20:55:20.041265918 -0300
  23. @@ -86,19 +86,33 @@
  24. #define CONFIG_IMX_HDMI
  25. #define CONFIG_IMX_VIDEO_SKIP
  26. +#define CONFIG_IDENT_STRING " Parabola GNU/Linux-libre"
  27. +
  28. +/* Enable Extlinux boot support */
  29. +#define CONFIG_CMD_PXE
  30. +#define CONFIG_MENU
  31. +#define BOOT_TARGET_DEVICES(func)
  32. +#include <config_distro_bootcmd.h>
  33. +
  34. #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
  35. #define CONFIG_EXTRA_ENV_SETTINGS \
  36. + BOOTENV \
  37. "script=boot.scr\0" \
  38. "image=zImage\0" \
  39. + "bootdir=/boot\0" \
  40. "console=ttymxc0\0" \
  41. "splashpos=m,m\0" \
  42. "fdtfile=undefined\0" \
  43. + "fdtdir=/boot/dtbs\0" \
  44. "fdt_high=0xffffffff\0" \
  45. "initrd_high=0xffffffff\0" \
  46. "fdt_addr=0x18000000\0" \
  47. + "rdaddr=0x12A00000\0" \
  48. + "rdfile=initramfs-linux.img\0" \
  49. "boot_fdt=try\0" \
  50. + "optargs=\0" \
  51. "ip_dyn=yes\0" \
  52. - "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
  53. + "mmcdev=0\0" \
  54. "mmcpart=1\0" \
  55. "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
  56. "update_sd_firmware_filename=u-boot.imx\0" \
  57. @@ -116,7 +130,9 @@
  58. "fi; " \
  59. "fi\0" \
  60. "mmcargs=setenv bootargs console=${console},${baudrate} " \
  61. - "root=${mmcroot}; run videoargs\0" \
  62. + "${optargs} " \
  63. + "root=${root} " \
  64. + "video=${video}\0" \
  65. "videoargs=" \
  66. "setenv nextcon 0; " \
  67. "if hdmidet; then " \
  68. @@ -143,27 +159,44 @@
  69. "echo '- no FWBADAPT-7WVGA-LCD-F07A-0102 display';" \
  70. "fi; " \
  71. "setenv bootargs ${bootargs} ${fbmem}\0" \
  72. - "loadbootscript=" \
  73. - "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
  74. - "bootscript=echo Running bootscript from mmc ...; " \
  75. - "source\0" \
  76. - "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
  77. - "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdtfile}\0" \
  78. - "mmcboot=echo Booting from mmc ...; " \
  79. - "run mmcargs; " \
  80. - "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
  81. - "if run loadfdt; then " \
  82. - "bootz ${loadaddr} - ${fdt_addr}; " \
  83. - "else " \
  84. - "if test ${boot_fdt} = try; then " \
  85. - "bootz; " \
  86. + "loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${image}\0" \
  87. + "loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}\0" \
  88. + "loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdt_addr} ${fdtdir}/${fdtfile}\0" \
  89. + "mmcboot=usb start;" \
  90. + "for devtype in mmc usb; do " \
  91. + "setenv devnum 0;" \
  92. + "while ${devtype} dev ${devnum}; do " \
  93. + "echo ${devtype} found on device ${devnum};" \
  94. + "setenv bootpart ${devnum}:1;" \
  95. + "part uuid ${devtype} ${bootpart} uuid;" \
  96. + "setenv root PARTUUID=${uuid} rw rootwait;" \
  97. + "echo Checking for: ${bootdir}/uEnv.txt ...;" \
  98. + "if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then " \
  99. + "load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt;" \
  100. + "env import -t ${loadaddr} ${filesize};" \
  101. + "echo Loaded environment from ${bootdir}/uEnv.txt;" \
  102. + "echo Checking if uenvcmd is set ...;" \
  103. + "if test -n ${uenvcmd}; then " \
  104. + "echo Running uenvcmd ...;" \
  105. + "run uenvcmd;" \
  106. + "fi;" \
  107. + "fi;" \
  108. + "run scan_dev_for_boot;" \
  109. + "if run loadimage; then " \
  110. + "run mmcargs;" \
  111. + "if run loadfdt; then " \
  112. + "if run loadrd; then " \
  113. + "bootz ${loadaddr} ${rdaddr}:${filesize} ${fdt_addr};" \
  114. + "else " \
  115. + "bootz ${loadaddr} - ${fdt_addr};" \
  116. + "fi;" \
  117. + "fi;" \
  118. "else " \
  119. - "echo WARN: Cannot load the DT; " \
  120. - "fi; " \
  121. - "fi; " \
  122. - "else " \
  123. - "bootz; " \
  124. - "fi;\0" \
  125. + "echo No kernel found;" \
  126. + "fi;" \
  127. + "setexpr devnum ${devnum} + 1;" \
  128. + "done;" \
  129. + "done;\0" \
  130. "netargs=setenv bootargs console=${console},${baudrate} " \
  131. "root=/dev/nfs " \
  132. "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
  133. @@ -202,16 +235,7 @@
  134. #define CONFIG_BOOTCOMMAND \
  135. "run findfdt; " \
  136. - "mmc dev ${mmcdev}; if mmc rescan; then " \
  137. - "if run loadbootscript; then " \
  138. - "run bootscript; " \
  139. - "else " \
  140. - "if run loadimage; then " \
  141. - "run mmcboot; " \
  142. - "else run netboot; " \
  143. - "fi; " \
  144. - "fi; " \
  145. - "else run netboot; fi"
  146. + "run mmcboot;"
  147. /* Physical Memory Map */
  148. #define CONFIG_NR_DRAM_BANKS 1