-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
image/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[submodule "cerbero"] | ||
path = cerbero | ||
url = https://gitlab.freedesktop.org/gstreamer/cerbero.git | ||
branch = 1.14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
sudo: required | ||
|
||
language: bash | ||
|
||
before_install: | ||
- sudo apt-get update | ||
|
||
script: | ||
- download.sh | ||
- mount.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
# Downloads latest raspbian lite image | ||
|
||
ZIP=raspbian_lite.zip | ||
IMG=raspbian_lite.img | ||
URL=https://downloads.raspberrypi.org/raspbian_lite_latest | ||
|
||
echo "Downloading latest raspbian lite release" | ||
mkdir -p image | ||
wget $URL -O image/${ZIP} | ||
|
||
echo "Extracting image" | ||
unzip image/${ZIP} -d image/ | ||
|
||
FILE=`zipinfo -1 image/${ZIP}` | ||
mv image/${FILE} image/${IMG} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
# Mounts raspbian image inside cerbero build system | ||
|
||
IMG='raspbian_lite.img' | ||
MNT='cerbero/config/raspbian_sysroot' | ||
|
||
# Attach loopback device | ||
LOOP_DEV=`losetup -f --show image/${IMG}` | ||
echo "Attached base loopback at: $LOOP_DEV" | ||
|
||
# Fetch and parse partition info | ||
LOOP=`basename ${LOOP_DEV}` | ||
SECTOR_SIZE=`cat /sys/block/${LOOP}/queue/hw_sector_size` | ||
ROOT_START=`fdisk -l $LOOP_DEV | grep ${LOOP_DEV}p2 | awk '{print $2}'` | ||
echo "Located root partition at sector $ROOT_START (sector size: ${SECTOR_SIZE}B)" | ||
|
||
mkdir -p $MNT | ||
mount image/${IMG} -o loop,offset=$(($ROOT_START*$SECTOR_SIZE)),rw $MNT | ||
if [[ $? != 0 ]]; then | ||
echo "Error mounting root partition" | ||
else | ||
echo "Mounted root partition to $MNT" | ||
fi | ||
|
||
losetup -d $LOOP_DEV | ||
echo "Closed loopback $LOOP_DEV" |