readme.txt 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #
  2. # (C) Copyright 2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
  3. #
  4. # SPDX-License-Identifier: GPL-2.0+
  5. #
  6. Build & Run instructions:
  7. 1) Install mkbootimg and dtbTool from
  8. git://codeaurora.org/quic/kernel/skales (15ece94f09 worked for me)
  9. 2) Setup CROSS_COMPILE to aarch64 compiler
  10. 3) make dragonboard410c_config
  11. 4) make
  12. 5) generate fake, empty ramdisk (can have 0 bytes)
  13. $ touch rd
  14. 6) Generate qualcomm device tree table with dtbTool [1]
  15. $ dtbTool -o dt.img arch/arm/dts
  16. 7) Generate Android boot image with mkbootimg [2]:
  17. $ mkbootimg --kernel=u-boot-dtb.bin --output=u-boot.img --dt=dt.img \
  18. --pagesize 2048 --base 0x80000000 --ramdisk=rd --cmdline=""
  19. 8) Enter fastboot (reboot board with vol- button pressed)
  20. 9) Boot it:
  21. $ fastboot boot u-boot.img
  22. or flash as kernel:
  23. $ fastboot flash boot u-boot.img
  24. $ fastboot reboot
  25. What is working:
  26. - UART
  27. - GPIO (SoC)
  28. - SD
  29. - eMMC
  30. - Reset
  31. - USB in EHCI mode (usb starts does switch device->host, usb stop does the opposite)
  32. - PMIC GPIOS (but not in generic subsystem)
  33. - PMIC "special" buttons (power, vol-)
  34. What is not working / known bugs:
  35. - SDHCI is slow (~2.5MiB/s for SD and eMMC)
  36. [1] To boot any kernel image, Little Kernel requires valid device tree for the
  37. platform it runs on. dtbTool creates device tree table that Little Kernel scans.
  38. Later on proper device tree is passed to next boot stage.
  39. Full device tree is not required to boot u-boot. Enough would be:
  40. /dts-v1/;
  41. / {
  42. model = "Qualcomm Technologies, Inc. Dragonboard 410c";
  43. compatible = "qcom,dragonboard", "qcom,apq8016-sbc";
  44. qcom,msm-id = <0xce 0x0 0xf8 0x0 0xf9 0x0 0xfa 0x0 0xf7 0x0>;
  45. qcom,board-id = <0x10018 0x0>;
  46. #address-cells = <0x2>;
  47. #size-cells = <0x2>;
  48. chosen { };
  49. aliases { };
  50. memory {
  51. device_type = "memory";
  52. reg = <0 0x80000000 0 0x3da00000>;
  53. };
  54. };
  55. but for simplicity (and because size of image is not that critical) we use
  56. existing Qualcomm device trees.
  57. [2] Note that ramdisk is required, even if it is unused.