Advertisement
Guest User

Untitled

a guest
Nov 14th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.70 KB | None | 0 0
  1. projectname=ultra96v2_oob_2019_1
  2. userhome=/scratch/$USER
  3. sdboot=/run/media/pastor/BOOT
  4. sdrootfs=/run/media/$USER/84303126-e7a6-4aee-af15-1fe43dc3f8c4
  5. outputdir=/net/heap/$USER/current_image
  6. bootpart=/dev/sdc1
  7. rootfspart=/dev/sdc2
  8. mountopts="rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2"
  9.  
  10. mkdir -p $sdboot
  11. mkdir -p $sdrootfs
  12.  
  13. if ! grep -qs $sdboot /proc/mounts; then    
  14.     mount -o $mountopts $bootpart $sdboot
  15. fi
  16.  
  17. # copy files to boot partition and unpack image to ext4 partition
  18. cp -avr $outputdir/BOOT.BIN $sdboot/
  19. cp -avr $outputdir/image.ub $sdboot/
  20. dd if=$outputdir/rootfs.ext4 of=$rootfspart status=progress
  21. sync
  22.  
  23. umount $sdboot
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement