Guest User

Untitled

a guest
Apr 19th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Save current path
  4. pushd . > /dev/null
  5.  
  6. # Change current path to where this script is saved
  7. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  8. cd $DIR
  9.  
  10. # Copy hardware files
  11. # This is in place of petalinux-config --get-hw-description because there is no
  12. # way to force it to not display the config GUI
  13. echo INFO: Updating hardware files from ../SDK/Projects/MagDAQ_GPIO_Linux_hw/
  14. cp -fr ../SDK/Projects/MagDAQ_GPIO_Linux_hw/board ./project-spec/hw-description
  15. cp -fr ../SDK/Projects/MagDAQ_GPIO_Linux_hw/{basicIO_bd_wrapper.bit,ps7_init.c,ps7_init.h,ps7_init.html,ps7_init.tcl,ps7_init_gpl.c,ps7_init_gpl.h,system.hdf} ./project-spec/hw-description
  16.  
  17. # Build Linux image
  18. echo INFO: Starting PetaLinux build. This might take a while!
  19. petalinux-build > build.log 2>&1
  20. echo INFO: Finished building PetaLinux.
  21.  
  22. # Package linux image
  23. echo INFO: Copying files to SD folder
  24. petalinux-package --boot --u-boot ./images/linux/u-boot.elf --fpga ./images/linux/basicIO_bd_wrapper.bit --force > package.log 2>&1
  25.  
  26. # Copy to the SD card folder
  27. cp -f ./images/linux/{BOOT.BIN,basicIO_bd_wrapper.bit,image.ub,system.dtb} ../../SD/BOOT/
  28. cp -f ./images/linux/rootfs.ext4 ../../SD/ROOTFS/
  29.  
  30. echo INFO: SD card files ready to deploy
  31.  
  32. # Restore original path
  33. popd > /dev/null
Add Comment
Please, Sign In to add comment