0001-parabola-arm-modifications.patch 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. diff --git a/configs/udoo_defconfig b/configs/udoo_defconfig
  2. index a4a17c161..88a863337 100644
  3. --- a/configs/udoo_defconfig
  4. +++ b/configs/udoo_defconfig
  5. @@ -30,3 +30,4 @@ CONFIG_CMD_FS_GENERIC=y
  6. CONFIG_DM=y
  7. CONFIG_DM_THERMAL=y
  8. CONFIG_OF_LIBFDT=y
  9. +CONFIG_IDENT_STRING=" Parabola GNU/Linux-libre"
  10. diff --git a/include/configs/udoo.h b/include/configs/udoo.h
  11. index 0a7767c20..543993731 100644
  12. --- a/include/configs/udoo.h
  13. +++ b/include/configs/udoo.h
  14. @@ -51,6 +51,9 @@
  15. /* Command definition */
  16. #define CONFIG_CMD_BMODE
  17. +#define CONFIG_PARTITION_UUIDS
  18. +#define CONFIG_CMD_PART
  19. +#define CONFIG_SUPPORT_RAW_INITRD
  20. #define CONFIG_SYS_MEMTEST_START 0x10000000
  21. #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M)
  22. @@ -60,8 +63,13 @@
  23. #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
  24. +/* Enable Extlinux boot support */
  25. +#define CONFIG_CMD_PXE
  26. +#define CONFIG_MENU
  27. +#define BOOT_TARGET_DEVICES(func)
  28. +#include <config_distro_bootcmd.h>
  29. +
  30. #define CONFIG_EXTRA_ENV_SETTINGS \
  31. - "script=boot.scr\0" \
  32. "image=zImage\0" \
  33. "console=ttymxc1\0" \
  34. "splashpos=m,m\0" \
  35. @@ -69,47 +77,54 @@
  36. "initrd_high=0xffffffff\0" \
  37. "fdt_file=undefined\0" \
  38. "fdt_addr=0x18000000\0" \
  39. - "boot_fdt=try\0" \
  40. + "rdaddr=0x12A00000\0" \
  41. + "rdfile=initramfs-linux.img\0" \
  42. + "optargs=\0" \
  43. + "video=\0" \
  44. "ip_dyn=yes\0" \
  45. + "devtype=mmc\0" \
  46. + "devnum=0\0" \
  47. "mmcdev=0\0" \
  48. "mmcpart=1\0" \
  49. - "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
  50. - "update_sd_firmware_filename=u-boot.imx\0" \
  51. - "update_sd_firmware=" \
  52. - "if test ${ip_dyn} = yes; then " \
  53. - "setenv get_cmd dhcp; " \
  54. - "else " \
  55. - "setenv get_cmd tftp; " \
  56. - "fi; " \
  57. - "if mmc dev ${mmcdev}; then " \
  58. - "if ${get_cmd} ${update_sd_firmware_filename}; then " \
  59. - "setexpr fw_sz ${filesize} / 0x200; " \
  60. - "setexpr fw_sz ${fw_sz} + 1; " \
  61. - "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
  62. - "fi; " \
  63. - "fi\0" \
  64. "mmcargs=setenv bootargs console=${console},${baudrate} " \
  65. - "root=${mmcroot}\0" \
  66. - "loadbootscript=" \
  67. - "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
  68. - "bootscript=echo Running bootscript from mmc ...; " \
  69. - "source\0" \
  70. - "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
  71. - "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
  72. - "mmcboot=echo Booting from mmc ...; " \
  73. - "run mmcargs; " \
  74. - "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
  75. - "if run loadfdt; then " \
  76. - "bootz ${loadaddr} - ${fdt_addr}; " \
  77. - "else " \
  78. - "if test ${boot_fdt} = try; then " \
  79. - "bootz; " \
  80. - "else " \
  81. - "echo WARN: Cannot load the DT; " \
  82. - "fi; " \
  83. + "${optargs} " \
  84. + "root=${root} " \
  85. + "video=${video}\0" \
  86. + "loadimage=echo Loading /boot/${image}..; load mmc ${mmcdev}:${mmcpart} ${loadaddr} /boot/${image}\0" \
  87. + "loadfdt=echo Loading /boot/dtbs/${fdt_file}..; load mmc ${mmcdev}:${mmcpart} ${fdt_addr} /boot/dtbs/${fdt_file}\0" \
  88. + "loadrd=load mmc ${bootpart} ${rdaddr} /boot/${rdfile}\0" \
  89. + "mmcboot=mmc dev ${mmcdev}; " \
  90. + "if mmc rescan; then " \
  91. + "echo SD/MMC found on device ${mmcdev};" \
  92. + "setenv bootpart ${mmcdev}:1; " \
  93. + "part uuid mmc ${bootpart} uuid;" \
  94. + "setenv root PARTUUID=${uuid} rw rootwait;" \
  95. + "echo Checking for: ${bootdir}/uEnv.txt ...;" \
  96. + "if test -e mmc ${bootpart} ${bootdir}/uEnv.txt; then " \
  97. + "load mmc ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt;" \
  98. + "env import -t ${loadaddr} ${filesize};" \
  99. + "echo Loaded environment from ${bootdir}/uEnv.txt;" \
  100. + "echo Checking if uenvcmd is set ...;" \
  101. + "if test -n ${uenvcmd}; then " \
  102. + "echo Running uenvcmd ...;" \
  103. + "run uenvcmd;" \
  104. + "fi;" \
  105. "fi; " \
  106. - "else " \
  107. - "bootz; " \
  108. + "run scan_dev_for_boot;" \
  109. + "if run loadimage; then " \
  110. + "if run loadfdt; then " \
  111. + "run mmcargs;" \
  112. + "if run loadrd; then " \
  113. + "bootz ${loadaddr} ${rdaddr}:${filesize} ${fdt_addr};" \
  114. + "else " \
  115. + "bootz ${loadaddr} - ${fdt_addr};" \
  116. + "fi;" \
  117. + "else " \
  118. + "echo Kernel found, but no device tree found;" \
  119. + "fi;" \
  120. + "else " \
  121. + "echo No kernel found;" \
  122. + "fi;" \
  123. "fi;\0" \
  124. "netargs=setenv bootargs console=${console},${baudrate} " \
  125. "root=/dev/nfs " \
  126. @@ -135,26 +150,17 @@
  127. "else " \
  128. "bootz; " \
  129. "fi;\0" \
  130. - "findfdt=" \
  131. - "if test $board_rev = MX6Q ; then " \
  132. - "setenv fdt_file imx6q-udoo.dtb; fi; " \
  133. - "if test $board_rev = MX6DL ; then " \
  134. - "setenv fdt_file imx6dl-udoo.dtb; fi; " \
  135. - "if test $fdt_file = undefined; then " \
  136. - "echo WARNING: Could not determine dtb to use; fi; \0"
  137. + "findfdt=" \
  138. + "if test $board_rev = MX6Q ; then " \
  139. + "setenv fdt_file imx6q-udoo.dtb; fi; " \
  140. + "if test $board_rev = MX6DL ; then " \
  141. + "setenv fdt_file imx6dl-udoo.dtb; fi; " \
  142. + "if test $fdt_file = undefined; then " \
  143. + "echo WARNING: Could not determine dtb to use; fi; \0"
  144. #define CONFIG_BOOTCOMMAND \
  145. "run findfdt; " \
  146. - "mmc dev ${mmcdev}; if mmc rescan; then " \
  147. - "if run loadbootscript; then " \
  148. - "run bootscript; " \
  149. - "else " \
  150. - "if run loadimage; then " \
  151. - "run mmcboot; " \
  152. - "else run netboot; " \
  153. - "fi; " \
  154. - "fi; " \
  155. - "else run netboot; fi"
  156. + "run mmcboot; "
  157. /* Print Buffer Size */
  158. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)