Skip to content

Commit

Permalink
[nagara] Add Xperia 1 IV. SailfishOS-SonyXperia/bugs#105
Browse files Browse the repository at this point in the history
Signed-off-by: Björn Bidar <[email protected]>
  • Loading branch information
Thaodan committed May 17, 2024
0 parents commit 1d66ba7
Show file tree
Hide file tree
Showing 2,949 changed files with 159,115 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "droid-system-device"]
path = droid-system-device
url = ./droid-system-device/
55 changes: 55 additions & 0 deletions droid-system-common-device.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
%define __find_provides %{nil}
%define __find_requires %{nil}
%define __strip /bin/true
%define __provides_exclude_from ^/system/.*$
%define __requires_exclude ^.*$
%global debug_package %{nil}

Name: droid-system-%{habuild_device}-%{device}
# This package bundles system+vendor, remove old vendor package:
Provides: droid-system-vendor-%{habuild_device}-%{device}
Conflicts: droid-system-vendor-%{habuild_device}-%{device}
Obsoletes: droid-system-vendor-%{habuild_device}-%{device}
Summary: Built certain sources trees such as /system for Droid HAL adaptations
Version: 0.0.1
Release: 1
License: %{system_license}
Requires: droid-system-%{habuild_device}
Source0: %{name}-%{version}.tgz
Source1: droid-system-%{habuild_device}-rpmlintrc
URL: https://github.com/mer-hybris/droid-system-sony-template

%description
%{summary}

%prep
%setup -q -n %{name}-%{version}

# This section is empty on purpose
%build

%install
rm -rf $RPM_BUILD_ROOT tmp
mkdir -p $RPM_BUILD_ROOT/system/etc
cp %{device}/system/build.prop $RPM_BUILD_ROOT/system/build.prop
if [ -f %{device}/system/etc/prop.default ]; then
cp %{device}/system/etc/prop.default $RPM_BUILD_ROOT/system/etc/prop.default
echo "/system/etc/prop.default" >> tmp/extra_files
fi
mkdir -p $RPM_BUILD_ROOT/vendor/etc/vintf
cp %{device}/vendor/build.prop $RPM_BUILD_ROOT/vendor/build.prop
cp %{device}/vendor/etc/vintf/manifest.xml $RPM_BUILD_ROOT/vendor/etc/vintf/manifest.xml

mkdir tmp
touch tmp/extra_files
if [ -f %{device}/vendor/odm/etc/build.prop ]; then
mkdir -p $RPM_BUILD_ROOT/vendor/odm/etc
cp %{device}/vendor/odm/etc/build.prop $RPM_BUILD_ROOT/vendor/odm/etc/build.prop
echo "/vendor/odm/etc/build.prop" >> tmp/extra_files
fi

%files -f tmp/extra_files
%defattr(-,root,root,-)
/system/build.prop
/vendor/build.prop
/vendor/etc/vintf/manifest.xml
9 changes: 9 additions & 0 deletions droid-system-common.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
%define dsd_path ./

Requires(post): coreutils
Requires(post): libcap

# This package bundles system+vendor, remove old vendor package:
Provides: droid-system-vendor-%{rpm_device}
Conflicts: droid-system-vendor-%{rpm_device}
Obsoletes: droid-system-vendor-%{rpm_device}
1 change: 1 addition & 0 deletions droid-system-device
Submodule droid-system-device added at 807a23
2 changes: 2 additions & 0 deletions droid-system-license.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# grep checked-out AOSP tree for LICENSE files and identify licenses within
%define system_license ASL 2.0 and BSD and NCSA and zlib
20 changes: 20 additions & 0 deletions patches-system/ld.config.28.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/sparse/system/etc/ld.config.28.txt b/sparse/system/etc/ld.config.28.txt
index 6f9caee..19c89c1 100644
--- a/sparse/system/etc/ld.config.28.txt
+++ b/sparse/system/etc/ld.config.28.txt
@@ -68,6 +68,7 @@ namespace.default.permitted.paths += /system/product/app
namespace.default.permitted.paths += /system/product/priv-app
namespace.default.permitted.paths += /data
namespace.default.permitted.paths += /mnt/expand
+namespace.default.permitted.paths += /usr/libexec/droid-hybris/system/${LIB}

namespace.default.asan.search.paths = /data/asan/system/${LIB}
namespace.default.asan.search.paths += /system/${LIB}
@@ -265,6 +266,7 @@ namespace.default.search.paths += /vendor/${LIB}

namespace.default.permitted.paths = /odm
namespace.default.permitted.paths += /vendor
+namespace.default.permitted.paths += /usr/libexec/droid-hybris/system/${LIB}

namespace.default.asan.search.paths = /data/asan/odm/${LIB}
namespace.default.asan.search.paths += /odm/${LIB}
20 changes: 20 additions & 0 deletions patches-system/ld.config.29.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/sparse/system/etc/ld.config.29.txt b/sparse/system/etc/ld.config.29.txt
index 9ea549f..345bd6f 100644
--- a/sparse/system/etc/ld.config.29.txt
+++ b/sparse/system/etc/ld.config.29.txt
@@ -79,6 +79,7 @@ namespace.default.permitted.paths += /data
namespace.default.permitted.paths += /mnt/expand
namespace.default.permitted.paths += /apex/com.android.runtime/${LIB}/bionic
namespace.default.permitted.paths += /system/${LIB}/bootstrap
+namespace.default.permitted.paths += /usr/libexec/droid-hybris/system/${LIB}

namespace.default.asan.search.paths = /data/asan/system/${LIB}
namespace.default.asan.search.paths += /system/${LIB}
@@ -398,6 +399,7 @@ namespace.default.search.paths += /vendor/${LIB}
namespace.default.permitted.paths = /odm
namespace.default.permitted.paths += /vendor
namespace.default.permitted.paths += /system/vendor
+namespace.default.permitted.paths += /usr/libexec/droid-hybris/system/${LIB}

namespace.default.asan.search.paths = /data/asan/odm/${LIB}
namespace.default.asan.search.paths += /odm/${LIB}
5 changes: 5 additions & 0 deletions rpm/droid-system-bahamut-j8210.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%define habuild_device bahamut
%define device j8210

%include droid-system-license.inc
%include droid-system-common-device.inc
5 changes: 5 additions & 0 deletions rpm/droid-system-bahamut-j9210.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%define habuild_device bahamut
%define device j9210

%include droid-system-license.inc
%include droid-system-common-device.inc
7 changes: 7 additions & 0 deletions rpm/droid-system-bahamut.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
%define rpm_device bahamut

%define multiple_rpms 1

%include droid-system-license.inc
%include droid-system-common.inc
%include droid-system-device/droid-system.inc
5 changes: 5 additions & 0 deletions rpm/droid-system-griffin-j8110.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%define habuild_device griffin
%define device j8110

%include droid-system-license.inc
%include droid-system-common-device.inc
5 changes: 5 additions & 0 deletions rpm/droid-system-griffin-j9110.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%define habuild_device griffin
%define device j9110

%include droid-system-license.inc
%include droid-system-common-device.inc
7 changes: 7 additions & 0 deletions rpm/droid-system-griffin.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
%define rpm_device griffin

%define multiple_rpms 1

%include droid-system-license.inc
%include droid-system-common.inc
%include droid-system-device/droid-system.inc
5 changes: 5 additions & 0 deletions rpm/droid-system-kirin-i3113.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%define habuild_device kirin
%define device i3113

%include droid-system-license.inc
%include droid-system-common-device.inc
5 changes: 5 additions & 0 deletions rpm/droid-system-kirin-i4113.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%define habuild_device kirin
%define device i4113

%include droid-system-license.inc
%include droid-system-common-device.inc
8 changes: 8 additions & 0 deletions rpm/droid-system-kirin.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
%define rpm_device kirin

%define multiple_rpms 1

%include droid-system-license.inc
%include droid-system-common.inc
%include droid-system-device/droid-system.inc

5 changes: 5 additions & 0 deletions rpm/droid-system-mermaid-i3213.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%define habuild_device mermaid
%define device i3213

%include droid-system-license.inc
%include droid-system-common-device.inc
5 changes: 5 additions & 0 deletions rpm/droid-system-mermaid-i4213.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%define habuild_device mermaid
%define device i4213

%include droid-system-license.inc
%include droid-system-common-device.inc
8 changes: 8 additions & 0 deletions rpm/droid-system-mermaid.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
%define rpm_device mermaid

%define multiple_rpms 1

%include droid-system-license.inc
%include droid-system-common.inc
%include droid-system-device/droid-system.inc

5 changes: 5 additions & 0 deletions rpm/droid-system-pdx201-xqau51.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%define habuild_device pdx201
%define device xqau51

%include droid-system-license.inc
%include droid-system-common-device.inc
5 changes: 5 additions & 0 deletions rpm/droid-system-pdx201-xqau52.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%define habuild_device pdx201
%define device xqau52

%include droid-system-license.inc
%include droid-system-common-device.inc
8 changes: 8 additions & 0 deletions rpm/droid-system-pdx201.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
%define rpm_device pdx201

%define multiple_rpms 1

%include droid-system-license.inc
%include droid-system-common.inc
%include droid-system-device/droid-system.inc

5 changes: 5 additions & 0 deletions rpm/droid-system-pdx203-xqat51.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%define habuild_device pdx203
%define device xqat51

%include droid-system-license.inc
%include droid-system-common-device.inc
5 changes: 5 additions & 0 deletions rpm/droid-system-pdx203-xqat52.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%define habuild_device pdx203
%define device xqat52

%include droid-system-license.inc
%include droid-system-common-device.inc
8 changes: 8 additions & 0 deletions rpm/droid-system-pdx203.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
%define rpm_device pdx203

%define multiple_rpms 1

%include droid-system-license.inc
%include droid-system-common.inc
%include droid-system-device/droid-system.inc

5 changes: 5 additions & 0 deletions rpm/droid-system-pdx206-xqas52.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%define habuild_device pdx206
%define device xqas52

%include droid-system-license.inc
%include droid-system-common-device.inc
8 changes: 8 additions & 0 deletions rpm/droid-system-pdx206.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
%define rpm_device pdx206

%define multiple_rpms 1

%include droid-system-license.inc
%include droid-system-common.inc
%include droid-system-device/droid-system.inc

5 changes: 5 additions & 0 deletions rpm/droid-system-pdx213-xqbt52.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%define habuild_device pdx213
%define device xqbt52

%include droid-system-license.inc
%include droid-system-common-device.inc
8 changes: 8 additions & 0 deletions rpm/droid-system-pdx213.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
%define rpm_device pdx213

%define multiple_rpms 1

%include droid-system-license.inc
%include droid-system-common.inc
%include droid-system-device/droid-system.inc

5 changes: 5 additions & 0 deletions rpm/droid-system-pdx223-xqct54.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%define habuild_device pdx223
%define device xqct54

%include droid-system-license.inc
%include droid-system-common-device.inc
Loading

0 comments on commit 1d66ba7

Please sign in to comment.