-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathportenta-x8_build.sh
executable file
·65 lines (52 loc) · 2.14 KB
/
portenta-x8_build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Script to install and build the image for the Arduino Portenta X8
# More info at https://docs.arduino.cc/hardware/portenta-x8
# Script by Massimo Pennazio and Pablo Marquínez (@Arduino)
echo --------------------------------------------------------------------------
echo Starting wrapper script to setup and build an Image and the Flashing tools
echo @arduino Portenta-X8
echo 17 Oct 2023
echo
echo "User" $(whoami)
# Make sure its on the home directory
echo Changing directory to home
cd /workdir
# Git config
echo Git config to example credentials
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
# Initialize the git-repo and pull all the repos
echo Starting git-repo initialization
repo init -u https://github.com/pika-spark/lmp-manifest.git -m arduino.xml -b pika-spark
echo Pulling git-repo files
repo sync
# Build 'lmp-partner-arduino-image' image
echo Building Portenta-X8 image
DISTRO=lmp-base-xwayland MACHINE=portenta-x8 . setup-environment
echo "ACCEPT_FSL_EULA = \"1\"" >> conf/local.conf
bitbake lmp-devel-arduino-image
echo Exit X8 folder
cd ..
# Build flashing tools
echo Building tools
DISTRO=lmp-mfgtool MACHINE=portenta-x8 . setup-environment
echo "ACCEPT_FSL_EULA = \"1\"" >> conf/local.conf
echo "MFGTOOL_FLASH_IMAGE = \"lmp-partner-arduino-image\"" >> conf/local.conf
bitbake mfgtool-files
echo Exit tools folder
cd ..
# Copy files to the deploy folder
todaysDate=$(date +%d-%b-%H_%M)
echo copying files
DEPLOY_FOLDER=/workdir/$todaysDate
mkdir $DEPLOY_FOLDER
cp -L build-lmp-mfgtool/deploy/images/portenta-x8/mfgtool-files-portenta-x8.tar.gz $DEPLOY_FOLDER
cp -L build-lmp-xwayland/deploy/images/portenta-x8/imx-boot-portenta-x8 $DEPLOY_FOLDER
cp -L build-lmp-xwayland/deploy/images/portenta-x8/u-boot-portenta-x8.itb $DEPLOY_FOLDER
cp -L build-lmp-xwayland/deploy/images/portenta-x8/sit-portenta-x8.bin $DEPLOY_FOLDER
cp -L build-lmp-xwayland/deploy/images/portenta-x8/lmp-partner-arduino-image-portenta-x8.wic $DEPLOY_FOLDER
cd $DEPLOY_FOLDER
tar xvf mfgtool-files-portenta-x8.tar.gz
echo finished
echo Output folder called $todaysDate
echo
echo Read more at https://docs.arduino.cc/hardware/portenta-x8