Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Save current path
- pushd . > /dev/null
- # Change current path to where this script is saved
- DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
- cd $DIR
- # Copy hardware files
- # This is in place of petalinux-config --get-hw-description because there is no
- # way to force it to not display the config GUI
- echo INFO: Updating hardware files from ../SDK/Projects/MagDAQ_GPIO_Linux_hw/
- cp -fr ../SDK/Projects/MagDAQ_GPIO_Linux_hw/board ./project-spec/hw-description
- 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
- # Build Linux image
- echo INFO: Starting PetaLinux build. This might take a while!
- petalinux-build > build.log 2>&1
- echo INFO: Finished building PetaLinux.
- # Package linux image
- echo INFO: Copying files to SD folder
- petalinux-package --boot --u-boot ./images/linux/u-boot.elf --fpga ./images/linux/basicIO_bd_wrapper.bit --force > package.log 2>&1
- # Copy to the SD card folder
- cp -f ./images/linux/{BOOT.BIN,basicIO_bd_wrapper.bit,image.ub,system.dtb} ../../SD/BOOT/
- cp -f ./images/linux/rootfs.ext4 ../../SD/ROOTFS/
- echo INFO: SD card files ready to deploy
- # Restore original path
- popd > /dev/null
Add Comment
Please, Sign In to add comment