From 516842cde9771e194a8a2d03a6a9621b74501845544b040da06d895e85792885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Fri, 16 Feb 2018 16:28:55 +0000 Subject: [PATCH] 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 --- .gitattributes | 23 ++++++ .gitignore | 1 + get-from-git.sh | 36 ++++++++++ pre_checkin.sh | 3 + raspberrypi-firmware-dt-2018.02.02.tar.xz | 3 + raspberrypi-firmware-dt.changes | 4 ++ raspberrypi-firmware-dt.spec | 85 +++++++++++++++++++++++ 7 files changed, 155 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 get-from-git.sh create mode 100644 pre_checkin.sh create mode 100644 raspberrypi-firmware-dt-2018.02.02.tar.xz create mode 100644 raspberrypi-firmware-dt.changes create mode 100644 raspberrypi-firmware-dt.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/get-from-git.sh b/get-from-git.sh new file mode 100644 index 0000000..ec5c345 --- /dev/null +++ b/get-from-git.sh @@ -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 diff --git a/pre_checkin.sh b/pre_checkin.sh new file mode 100644 index 0000000..6417148 --- /dev/null +++ b/pre_checkin.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +osc service localrun format_spec_file diff --git a/raspberrypi-firmware-dt-2018.02.02.tar.xz b/raspberrypi-firmware-dt-2018.02.02.tar.xz new file mode 100644 index 0000000..cf9c1ee --- /dev/null +++ b/raspberrypi-firmware-dt-2018.02.02.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b10df7b59c8cb2e9edadd6d593c72a155204cefc04e7d63b4bf2332cbb1d9a53 +size 5801240 diff --git a/raspberrypi-firmware-dt.changes b/raspberrypi-firmware-dt.changes new file mode 100644 index 0000000..35117ce --- /dev/null +++ b/raspberrypi-firmware-dt.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Fri Feb 16 15:40:47 UTC 2018 - agraf@suse.com + +- Initial commit of 7ba7fbcc4 (2018-02-02) diff --git a/raspberrypi-firmware-dt.spec b/raspberrypi-firmware-dt.spec new file mode 100644 index 0000000..9d51268 --- /dev/null +++ b/raspberrypi-firmware-dt.spec @@ -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