Advertisement
Guest User

Untitled

a guest
Nov 1st, 2016
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. import SAMBA 3.1
  2. import SAMBA.Connection.JLink 3.1
  3. import SAMBA.Device.SAMA5D2 3.1
  4.  
  5. AppletLoader {
  6. connection: JLinkConnection {
  7. //port: "99999999"
  8. }
  9.  
  10. device: SAMA5D2 {
  11. config {
  12. nandIoset: 2
  13. nandBusWidth: 8
  14. nandHeader: 0xc0902405
  15. }
  16. }
  17.  
  18. onConnectionOpened: {
  19.  
  20. // initialize NAND flash applet
  21. appletInitialize("nandflash")
  22.  
  23. // erase all memory
  24. appletErase(0, connection.applet.memorySize)
  25. // appletErase(0, 0x1000000)
  26.  
  27.  
  28. // write files
  29. appletWrite(0x00000, "boot.bin", true)
  30. appletWrite(0x10000, "zImage")
  31. appletWrite(0x1000000, "at91-sama5d2_xplained.dtb")
  32. appletWrite(0x1100000, "rootfs.ubi")
  33.  
  34. // initialize boot config applet
  35. appletInitialize("bootconfig")
  36.  
  37. // Use BUREG0 as boot configuration word
  38. appletWriteBootCfg(BootCfg.BSCR, BSCR.fromText("VALID,BUREG0"))
  39.  
  40. // Enable external boot only on NFC IOSET2
  41. appletWriteBootCfg(BootCfg.BUREG0,
  42. BCW.fromText("EXT_MEM_BOOT,UART1_IOSET1,JTAG_IOSET1," +
  43. "SDMMC1_DISABLED,SDMMC0_DISABLED,NFC_IOSET2," +
  44. "NFC_IOSET1,SPI1_DISABLED,SPI0_DISABLED," +
  45. "QSPI1_DISABLED,QSPI0_DISABLED"))
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement