README.marvell 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. Marvell U-Boot Build Instructions
  2. =================================
  3. This document describes how to compile the U-Boot and how to change U-Boot configuration
  4. Build Procedure
  5. ----------------
  6. 1. Install required packages:
  7. # sudo apt-get install libssl-dev
  8. # sudo apt-get install device-tree-compiler
  9. # sudo apt-get install swig libpython-dev
  10. 2. Set the cross compiler:
  11. # sudo apt-get install gcc-aarch64-linux-gnu
  12. # export CROSS_COMPILE=aarch64-linux-gnu-
  13. 3. Clean-up old residuals:
  14. # make mrproper
  15. 4. Configure the U-Boot:
  16. # make <defconfig_file>
  17. - For the Armada-70x0/80x0 DB board use "mvebu_db_armada8k_defconfig"
  18. - For the Armada-80x0 MacchiatoBin use "make mvebu_mcbin-88f8040_defconfig"
  19. - For the Armada-3700 DB board use "make mvebu_db-88f3720_defconfig"
  20. - For the Armada-3700 EspressoBin use "make mvebu_espressobin-88f3720_defconfig"
  21. 5. Configure the device-tree and build the U-Boot image:
  22. For the Armada-70x0/80x0 DB board compile u-boot and set the required device-tree using:
  23. # make DEVICE_TREE=<name>
  24. NOTE:
  25. Compilation with "mvebu_db_armada8k_defconfig" requires explicitly exporting DEVICE_TREE
  26. for the requested board.
  27. By default, u-boot is compiled with armada-8040-db device-tree.
  28. Using A80x0 device-tree on A70x0 might break the device.
  29. In order to prevent this, the required device-tree MUST be set during compilation.
  30. All device-tree files are located in ./arch/arm/dts/ folder.
  31. For other DB boards (MacchiatoBin, EspressoBin and 3700 DB board) compile u-boot with
  32. just default device-tree from defconfig using:
  33. # make
  34. NOTE:
  35. The u-boot.bin should not be used as a stand-alone image.
  36. The ARM Trusted Firmware (ATF) build process uses this image to generate the
  37. flash image. See TF-A Build Instructions for Marvell Platforms for more details at:
  38. https://trustedfirmware-a.readthedocs.io/en/latest/plat/marvell/armada/build.html
  39. Configuration update
  40. ---------------------
  41. To update the U-Boot configuration, please refer to doc/README.kconfig
  42. Permanent ethernet MAC address
  43. -------------------------------
  44. Prior flashing new U-Boot version (as part of ATF image) it is suggested to backup
  45. permanent ethernet MAC addresses as they are stored only in U-Boot env storage (SPI or eMMC).
  46. Some boards like EspressoBin have MAC addresses printed on sticker. Some boards got assigned
  47. only one address other may also more than one. To print current MAC addresses run:
  48. # echo $ethaddr
  49. # echo $eth1addr
  50. # echo $eth2addr
  51. # echo $eth3addr
  52. # ...
  53. MAC addresses 00:51:82:11:22:00, 00:51:82:11:22:01, 00:51:82:11:22:02, 00:51:82:11:22:03
  54. and F0:AD:4E:03:64:7F are default hardcoded values found in Marvell's and Armbian U-Boot
  55. forks and therefore *not* unique. Usage of static hardcoded MAC addresses should be avoided.
  56. When original address is lost (e.g. erased by Armbian boot scripts for EspressoBin) it is
  57. suggested to generate new random one.
  58. After flashing new U-Boot version it is suggested to reset U-Boot env variables to default
  59. and then set correct permanent ethernet MAC addresses.
  60. # env default -a
  61. # setenv ethaddr XX:XX:XX:XX:XX:XX
  62. # setenv eth1addr XX:XX:XX:XX:XX:XX
  63. # setenv eth2addr YY:YY:YY:YY:YY:YY
  64. # setenv eth3addr ZZ:ZZ:ZZ:ZZ:ZZ:ZZ
  65. # ...
  66. # saveenv
  67. Where value for ethaddr is required permanent ethernet MAC address and values for ethNaddr
  68. are optional per-port MAC addresses. When optional ethNaddr variables are not defined then
  69. they are inherited from required ethaddr variable. eth1addr contains MAC address for the
  70. wan port, other for particular lan ports.
  71. Recent Linux kernel versions use correct permanent ethernet MAC address from U-Boot env as
  72. U-Boot will inject it into kernel's device-tree.