Accepting request 577302 from home:algraf:branches:hardware:boot

This package contains the device tree chunks used and provided by
the raspberry pi firmware.

OBS-URL: https://build.opensuse.org/request/show/577302
OBS-URL: https://build.opensuse.org/package/show/hardware:boot/raspberrypi-firmware-dt?expand=0&rev=1
This commit is contained in:
Andreas Färber 2018-02-16 16:28:55 +00:00 committed by Git OBS Bridge
commit 516842cde9
7 changed files with 155 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

36
get-from-git.sh Normal file
View File

@ -0,0 +1,36 @@
#!/bin/bash
LINUX_BRANCH=rpi-4.14.y
# this is a huge hunk of stuff, so reuse the local repo if possible
if [ -d linux/.git ]; then
cd linux
git remote update
git checkout origin/$LINUX_BRANCH
cd ..
else
set -e
git clone -b $LINUX_BRANCH --depth 1 https://github.com/raspberrypi/linux.git
set +e
fi
TOPDIR=$(pwd)
# Copy device tree files
SOURCES="COPYING arch/arm/boot/dts arch/arm64/boot/dts/broadcom/*bcm27* scripts/dtc/include-prefixes/ include"
cd linux
LINE=$(git log --format=format:"%h %ai" -- ${SOURCES}|head -n 1)
set -- $LINE
REV=$1
DATE=$2
VER=${DATE//-/.}
set -e
git archive --prefix=raspberrypi-firmware-dt-$VER/ -o $TOPDIR/raspberrypi-firmware-dt-${VER}.tar HEAD -- ${SOURCES}
cd ..
osc rm -f raspberrypi-firmware-dt-*.tar.xz || true
xz --force raspberrypi-firmware-dt-${VER}.tar
osc add raspberrypi-firmware-dt-${VER}.tar.xz
sed -i "s/^Version:.*/Version: $VER/" raspberrypi-firmware-dt.spec
osc vc raspberrypi-firmware-dt -m "Update to $REV ($DATE)"
sh pre_checkin.sh

3
pre_checkin.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
osc service localrun format_spec_file

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b10df7b59c8cb2e9edadd6d593c72a155204cefc04e7d63b4bf2332cbb1d9a53
size 5801240

View File

@ -0,0 +1,4 @@
-------------------------------------------------------------------
Fri Feb 16 15:40:47 UTC 2018 - agraf@suse.com
- Initial commit of 7ba7fbcc4 (2018-02-02)

View File

@ -0,0 +1,85 @@
#
# spec file for package raspberrypi-firmware-dt
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: raspberrypi-firmware-dt
Version: 2018.02.02
Release: 0
Summary: Device trees for the Raspberry Pi firmware loader
License: GPL-2.0
Group: System/Boot
Url: https://github.com/raspberrypi/linux/
Source: raspberrypi-firmware-dt-%{version}.tar.xz
Requires: raspberrypi-firmware
BuildRequires: raspberrypi-firmware
BuildRequires: dtc
BuildArch: noarch
%description
This package provides additional device tree base files as well as overlays
for the Raspberry Pi boot process.
%prep
%setup
%build
SRCDIR=`pwd`
mkdir pp
PPDIR=`pwd`/pp
export DTC_FLAGS="-R 4 -p 0x1000 -@ -H epapr"
for dts in arch/arm/boot/dts/bcm27*dts arch/arm64/boot/dts/broadcom/bcm27*dts; do
target=$(basename ${dts%*.dts})
cpp -x assembler-with-cpp -undef -D__DTS__ -nostdinc -I. -I$SRCDIR/include/ -I$SRCDIR/scripts/dtc/include-prefixes/ -P $dts -o $PPDIR/$target.dts
dtc $DTC_FLAGS -I dts -O dtb -i ./$(dirname $dts) -o $PPDIR/$target.dtb $PPDIR/$target.dts
done
export DTC_FLAGS="-R 0 -p 0 -@ -H epapr"
for dts in arch/arm/boot/dts/overlays/*dts; do
target=$(basename ${dts%*.dts})
target=${target%*-overlay}
mkdir -p $PPDIR/overlays
cpp -x assembler-with-cpp -undef -D__DTS__ -nostdinc -I. -I$SRCDIR/include/ -I$SRCDIR/scripts/dtc/include-prefixes/ -P $dts -o $PPDIR/overlays/$target.dts
dtc $DTC_FLAGS -I dts -O dtb -i ./$(dirname $dts) -o $PPDIR/overlays/$target.dtbo $PPDIR/overlays/$target.dts
done
%define dtbdir /boot/vc
%install
install -m 700 -d %{buildroot}%{dtbdir}/
install -m 700 -d %{buildroot}%{dtbdir}/overlays
for dtb in pp/*.dtb; do
install -m 644 $dtb %{buildroot}%{dtbdir}/
done
for dtbo in pp/overlays/*.dtbo; do
install -m 644 $dtbo %{buildroot}%{dtbdir}/overlays/
done
%post
if mountpoint -q /boot/efi && [ ! -L /boot/efi ]; then
cp -r /boot/vc/*dtb /boot/vc/overlays /boot/efi/
fi
%files
%defattr(-,root,root)
%doc COPYING
%dir /boot/vc/overlays
/boot/vc/*dtb
/boot/vc/overlays/*dtbo
%changelog