Commit 724cffc8 authored by Pascal Bos's avatar Pascal Bos

removed old petalinux project

parent 5345ee37
Pipeline #2225 failed with stage
in 2 minutes and 19 seconds
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
if [ $# -eq 0 ]
then
echo "Usage: formatsd <device>"
echo "e.g.:"
echo " formatsd /dev/sdd"
echo "Make sure the SD card is not mounted, any existing partitions will be removed"
exit
fi
echo "Creating bootable SD card"
dd if=/dev/zero of=$1 bs=1024 count=1
fdisk $1 <mksd.cmds
mkfs.vfat -F 32 -s 2 -n BOOT ${1}1
mkfs.ext4 -L rootfs ${1}2
#!/bin/bash
if [ -z "$1" ] || [ -z "$2" ]; then
echo "instdist.sh <zip-file> <path-to-mount-root>"
echo "Installs a distribution zip (made with mkdist) on an SD card"
echo "<path-to-mount-root> is where the rootfs and BOOT folders are"
echo " /var/run/media/<username> for CentOS"
exit 0
fi
TMPDIR=$(mktemp -d)
# Bail out if the temp directory wasn't created successfully.
if [ ! -e $TMPDIR ]; then
echo "Failed to create temp directory"
exit 1
fi
# Make sure it gets removed even if the script exits abnormally.
trap "exit 1" HUP INT PIPE QUIT TERM
trap 'rm -rf "$TMPDIR"' EXIT
# unzip TMP dir
unzip $1 -d $TMPDIR
cp $TMPDIR/BOOT/* $2/BOOT/.
sudo tar -xvzf $TMPDIR/rootfs.tar.gz -C $2/rootfs/
echo "Unmounting, please wait..."
sudo umount $2/BOOT $2/rootfs
#!/bin/bash
# This script creates a distribution ZIP file
if [ -z "$1" ]; then
echo "mkdist.sh <zip-file>"
echo "Creates a distribution with <zip-file> name"
exit 0
fi
PETALINUX_DIR=../../embedded/testos/images/linux
FULLPATH=$PWD/$1
TMPDIR=$(mktemp -d)
# Bail out if the temp directory wasn't created successfully.
if [ ! -e $TMPDIR ]; then
echo "Failed to create temp directory"
exit 1
fi
# Make sure it gets removed even if the script exits abnormally.
trap "exit 1" HUP INT PIPE QUIT TERM
trap 'rm -rf "$TMPDIR"' EXIT
mkdir $TMPDIR/BOOT
cp $PETALINUX_DIR/BOOT.BIN $PETALINUX_DIR/image.ub $TMPDIR/BOOT/.
cp $PETALINUX_DIR/rootfs.tar.gz $TMPDIR/.
cd $TMPDIR
zip -r $FULLPATH *
o
x
h
255
s
63
c
r
n
p
1
+256M
n
p
2
a
1
t
1
c
t
2
83
w
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment