realme-rmx1851: new device (MR 4431)

[ci:skip-build] already built successfully in CI
This commit is contained in:
Joseph 2023-09-30 13:08:23 +01:00 committed by Clayton Craft
parent ae3832e43e
commit 6b537d26d5
No known key found for this signature in database
GPG key ID: 4A4CED6D7EDF950A
16 changed files with 6568 additions and 0 deletions

View file

@ -0,0 +1,37 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-realme-rmx1851
pkgdesc="Realme 3 Pro"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
linux-realme-rmx1851
mkbootimg
postmarketos-base
"
makedepends="devicepkg-dev"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
source="
deviceinfo
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
nonfree_firmware() {
pkgdesc="Crypto, Fingerprint, Camera, ect Firmware"
depends="firmware-realme-rmx1851"
mkdir "$subpkgdir"
}
sha512sums="
8f83b5b8fe8c901a9c403f88fee2afdcd8d8e0c84d551fb373a5fcf6149943616229f8ea78fa2d14640a62d96db646bb7544a06b4573bf4b5357c111154da598 deviceinfo
"

View file

@ -0,0 +1,33 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.
deviceinfo_format_version="0"
deviceinfo_name="Realme 3 Pro"
deviceinfo_manufacturer="Realme"
deviceinfo_codename="realme-rmx1851"
deviceinfo_year="2019"
deviceinfo_dtb="qcom/sdm710"
deviceinfo_arch="aarch64"
# Device related
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="1080"
deviceinfo_screen_height="2340"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="console=ttyMSM0,115200n8 earlycon=msm_geni_serial,0xA90000 androidboot.hardware=qcom androidboot.console=ttyMSM0 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 service_locator.enable=1 androidboot.configfs=true androidboot.usbcontroller=a600000.dwc3 swiotlb=1 loop.max_part=7 androidboot.wificountrycode=us buildvariant=userdebug"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_mtk_mkimage="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_pagesize="4096"
deviceinfo_header_version="1"
deviceinfo_flash_offset_base="0x00000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x00000000"
deviceinfo_flash_offset_second="0x00000000"
deviceinfo_flash_offset_tags="0x00000100"

View file

@ -0,0 +1,51 @@
pkgname=firmware-realme-rmx1851
pkgver=1
pkgrel=0
_commit="697763677ea2d42757bf4bc3c585abd028aafdbb"
pkgdesc="Firmware files for Realme 3 Pro"
url="https://postmarketos.org"
arch="aarch64"
license="proprietary"
options="!strip !check !archcheck !spdx !tracedeps pmb:cross-native"
# Source
_files="a615_zap.b00 a_fp.b05 cryptoeng.b07
a615_zap.b01 a_fp.b06 cryptoeng.mdt
a615_zap.b02 a_fp.b07 cryptoeng.b06
a615_zap.elf a_fp.mdt ipa_fws.b00
a615_zap.mdt CAMERA_ICP.elf ipa_fws.b01
a630_gmu.bin cryptoeng.b00 ipa_fws.b02
a630_sqe.fw cryptoeng.b01 ipa_fws.b03
a_fp.b00 cryptoeng.b02 ipa_fws.b04
a_fp.b01 cryptoeng.b03 ipa_fws.elf
a_fp.b02 cryptoeng.b04 ipa_fws.mdt
a_fp.b03 cryptoeng.b05 tfa98xx_18621.cnt
a_fp.b04"
_files_fastchg="oppo_vooc_fw.bin"
_files_tp="FW_HX_NF83112A_DSJM_FAE.img FW_HX_NF83112A_DSJM.img FW_HX_NF83112A_DSJM_TEST.img"
source="$pkgname-$_commit.tar.gz::https://github.com/josephnglynn/firmware-realme-rmx1851/archive/$_commit.tar.gz"
builddir="$srcdir/firmware-realme-rmx1851-$_commit"
package() {
# /lib/firmware/postmarketos
for _i in $_files; do
install -D -m644 "$_i" \
"$pkgdir"/lib/firmware/postmarketos/"$_i"
done
# /lib/firmware/postmarketos/fastchg/18621
for _i in $_files_fastchg; do
install -D -m644 "fastchg/18621/$_i" \
"$pkgdir/lib/firmware/postmarketos/fastchg/18621/$_i"
done
# /lib/firmware/postmarketos/tp/18621
for _i in $_files_tp; do
install -D -m644 "tp/18621/$_i" \
"$pkgdir/lib/firmware/postmarketos/tp/18621/$_i"
done
}
sha512sums="
877be6fe85f408e7f87a762ba5058fe68f725c76132f9385ba246fa3bd6a2407104b3d608cc8da0e453ea2832e388e0e6488b2d70326604825dddd7b803a06f1 firmware-realme-rmx1851-697763677ea2d42757bf4bc3c585abd028aafdbb.tar.gz
"

View file

@ -0,0 +1,92 @@
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm64/configs/lineageos_RMX1851_defconfig
pkgname=linux-realme-rmx1851
pkgver=4.9.217
pkgrel=0
pkgdesc="Realme 3 Pro kernel fork"
arch="aarch64"
_carch="arm64"
_flavor="realme-rmx1851"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="
bash
bc
bison
devicepkg-dev
findutils
flex
openssl-dev
perl
"
# Source
_repository="android_kernel_realme_sdm710"
_commit="e172e0dcbb71312e3b50dd9c10835874b5022f1b"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/HyperTeam/$_repository/archive/$_commit.tar.gz
$_config
fix_bluetooth_include_paths.patch
fix_camera_include_paths.patch
fix_charger_includes.patch
fix_makefile_wrapper_script.patch
fix_qcacld_errors.patch
fix_trace_includes_0001.patch
fix_trace_includes_0002.patch
fix_trace_includes_0003.patch
fix_techpack_kbuild.patch
remove_bootloader_cmdline_opts.patch
fix_fbdev_trace.patch
"
builddir="$srcdir/$_repository-$_commit"
_outdir="out"
prepare() {
default_prepare
. downstreamkernel_prepare
}
build() {
unset LDFLAGS
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" \
dtbs
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" \
"$_flavor" "$_outdir"
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" \
INSTALL_MOD_PATH="$pkgdir" modules_install
# Not working for some reason
# make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
# KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" \
# INSTALL_DTBS_PATH="$pkgdir/boot/dtbs" dtbs_install
cp -ra "$_outdir/arch/arm64/boot/dts" "$pkgdir/usr/share/dtb"
}
sha512sums="
ec182b39fcfcd14b331eb468942ff18d7dd066af2139eafb2f1596ddd22be18b63aba46fb33513f9d3e90d50099802766aafa39dbd9076ed5bd263a8b2963189 linux-realme-rmx1851-e172e0dcbb71312e3b50dd9c10835874b5022f1b.tar.gz
9d1ef899eac4fc09e0b131c3248ee2ec02dac725480c1d4d13815a384be14d21982bc74348d7e766bab3cfa097dfebeae666522b6ed3ecc31bca54795bd40aef config-realme-rmx1851.aarch64
5292b53cd14bd4effd9ca41345e9d9b658c863d014e376e39f3cbc31d75ce18f9020642b1289470063f69b49f81721d46b5eb549636d784bd6bccf98ce7a60f8 fix_bluetooth_include_paths.patch
dcbcc980a4f8d0f870c52244ef3dafab52cc53cfa63dc95eccd76e707194ff74daf0fc3b9a984929be717f63b63ddddb3679beb749d8e7cdc7de9c20a994875b fix_camera_include_paths.patch
93c1adc00dcd5ff3557fd64e85a93bf5699dac10d4c8ef00ef32c01de4dbf48ede00c6b95c2528b96b011598124da723c0f9c8f6b06437763767401ecf5c24b7 fix_charger_includes.patch
c8d97d591f4b139fd43b1cf4bbb43e85ba802776f20592064ea11b73f1473a9004ae8027f7ceeb25596335fba7bf61324649e691d56dacaaf59a8ed21a3b897b fix_makefile_wrapper_script.patch
a4fd63f7b625dfa33857791e60ead8f441ec352eba0871573fcce3d329f17f65582ba5d41af239894e93b476ab91fbe313a93683299132cef7ee1966b41cd542 fix_qcacld_errors.patch
0a8f5cd036618fb0420d08acaad4ba398de81534f6e02e27146ed3888eb9a851fe19925456bdb30cb9a6cbe14cff90c371444e7205aa181f5544441e1c70556c fix_trace_includes_0001.patch
dd50d0541edef946dd857676b3054bda4132de29e46f53beb5a756f1fe05ea4100ce4f546be498eed29e3cef558571903fc31d15bc6e02dbcddef0fb33e1f108 fix_trace_includes_0002.patch
8d202261b4cfe5e7086e7390f6f783e4fc723120bc8bbb2ab02ab445d2a44064a10028cfedee20cc38d4af3a74d53ae4f429d1bba79fe45c1361ef88193ac96d fix_trace_includes_0003.patch
313f9c1def33e1fc78e82571787ed151659421981a9ef8cd5c9e652af5f4bffa6118fd82ad5069e3c93450ce4a8cca72b0323ab3a30a8df799beb996438a7b06 fix_techpack_kbuild.patch
9ce867c4254b537ef5d2485780c26b72da8a3a8767ba71557f3b48d6c550e0e14c8c3e575b31bf65d2878f08a8a4926e48a1c2f1be534bf80a7a57f58313b0fd remove_bootloader_cmdline_opts.patch
e6d420ecc371279dc4d76b75059e9c783114ca586318f9ab63fed3a030b8460a3eb6ed805f3b44ca6da1dc4389787b4b2530fa05a4be8c0036e81b425e65d513 fix_fbdev_trace.patch
"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,56 @@
diff --git a/drivers/bluetooth/btfm_slim.c b/drivers/bluetooth/btfm_slim.c
index a52e89bf2..55d8135c6 100644
--- a/drivers/bluetooth/btfm_slim.c
+++ b/drivers/bluetooth/btfm_slim.c
@@ -23,8 +23,8 @@
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <sound/tlv.h>
-#include <btfm_slim.h>
-#include <btfm_slim_wcn3990.h>
+#include "btfm_slim.h"
+#include "btfm_slim_wcn3990.h"
#include <linux/bluetooth-power.h>
int btfm_slim_write(struct btfmslim *btfmslim,
diff --git a/drivers/bluetooth/btfm_slim_codec.c b/drivers/bluetooth/btfm_slim_codec.c
index 4c6986a53..35c1c74fb 100644
--- a/drivers/bluetooth/btfm_slim_codec.c
+++ b/drivers/bluetooth/btfm_slim_codec.c
@@ -24,7 +24,7 @@
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <sound/tlv.h>
-#include <btfm_slim.h>
+#include "btfm_slim.h"
static int bt_soc_enable_status;
int btfm_feedback_ch_setting;
diff --git a/drivers/bluetooth/btfm_slim_wcn3990.c b/drivers/bluetooth/btfm_slim_wcn3990.c
index 8cebb5064..564f561f5 100644
--- a/drivers/bluetooth/btfm_slim_wcn3990.c
+++ b/drivers/bluetooth/btfm_slim_wcn3990.c
@@ -10,8 +10,8 @@
* GNU General Public License for more details.
*/
#include <linux/slimbus/slimbus.h>
-#include <btfm_slim.h>
-#include <btfm_slim_wcn3990.h>
+#include "btfm_slim.h"
+#include "btfm_slim_wcn3990.h"
/* WCN3990 Port assignment */
struct btfmslim_ch wcn3990_rxport[] = {
diff --git a/drivers/bluetooth/btfm_slim_wcn3990.h b/drivers/bluetooth/btfm_slim_wcn3990.h
index 694fe7516..49a311b5f 100644
--- a/drivers/bluetooth/btfm_slim_wcn3990.h
+++ b/drivers/bluetooth/btfm_slim_wcn3990.h
@@ -12,7 +12,7 @@
#ifndef BTFM_SLIM_WCN3990_H
#define BTFM_SLIM_WCN3990_H
//#ifdef CONFIG_BTFM_SLIM_WCN3990
-#include <btfm_slim.h>
+#include "btfm_slim.h"
/* Registers Address */
#define CHRK_SB_COMP_TEST 0x00000000

View file

@ -0,0 +1,111 @@
diff --git a/drivers/media/platform/msm/camera_oppo/cam_core/cam_context.h b/drivers/media/platform/msm/camera_oppo/cam_core/cam_context.h
index ffceea22a..77e53ea58 100644
--- a/drivers/media/platform/msm/camera_oppo/cam_core/cam_context.h
+++ b/drivers/media/platform/msm/camera_oppo/cam_core/cam_context.h
@@ -16,7 +16,7 @@
#include <linux/mutex.h>
#include <linux/spinlock.h>
#include <linux/kref.h>
-#include "cam_req_mgr_interface.h"
+#include "../cam_req_mgr/cam_req_mgr_interface.h"
#include "cam_hw_mgr_intf.h"
/* Forward declarations */
diff --git a/drivers/media/platform/msm/camera_oppo/cam_isp/isp_hw_mgr/hw_utils/include/cam_isp_packet_parser.h b/drivers/media/platform/msm/camera_oppo/cam_isp/isp_hw_mgr/hw_utils/include/cam_isp_packet_parser.h
index e3f2ce26e..de3506163 100644
--- a/drivers/media/platform/msm/camera_oppo/cam_isp/isp_hw_mgr/hw_utils/include/cam_isp_packet_parser.h
+++ b/drivers/media/platform/msm/camera_oppo/cam_isp/isp_hw_mgr/hw_utils/include/cam_isp_packet_parser.h
@@ -16,7 +16,7 @@
#include <linux/types.h>
#include <uapi/media/cam_isp.h>
#include "cam_isp_hw_mgr_intf.h"
-#include "cam_ife_hw_mgr.h"
+#include "../cam_ife_hw_mgr.h"
#include "cam_hw_intf.h"
#include "cam_packet_util.h"
diff --git a/drivers/media/platform/msm/camera_oppo/cam_sensor_module/cam_cci/cam_cci_dev.h b/drivers/media/platform/msm/camera_oppo/cam_sensor_module/cam_cci/cam_cci_dev.h
index 0c190a481..0274229cf 100644
--- a/drivers/media/platform/msm/camera_oppo/cam_sensor_module/cam_cci/cam_cci_dev.h
+++ b/drivers/media/platform/msm/camera_oppo/cam_sensor_module/cam_cci/cam_cci_dev.h
@@ -30,9 +30,9 @@
#include <media/v4l2-event.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-subdev.h>
-#include <cam_sensor_cmn_header.h>
+#include "../cam_sensor_utils/cam_sensor_cmn_header.h"
#include <cam_io_util.h>
-#include <cam_sensor_util.h>
+#include "../cam_sensor_utils/cam_sensor_util.h"
#include <cam_subdev.h>
#include <cam_cpas_api.h>
#include "cam_cci_hwreg.h"
diff --git a/drivers/media/platform/msm/camera_oppo/cam_sensor_module/cam_sensor_io/cam_sensor_i2c.h b/drivers/media/platform/msm/camera_oppo/cam_sensor_module/cam_sensor_io/cam_sensor_i2c.h
index e68df8065..8ecca87c6 100644
--- a/drivers/media/platform/msm/camera_oppo/cam_sensor_module/cam_sensor_io/cam_sensor_i2c.h
+++ b/drivers/media/platform/msm/camera_oppo/cam_sensor_module/cam_sensor_io/cam_sensor_i2c.h
@@ -17,7 +17,7 @@
#include <media/v4l2-subdev.h>
#include <media/cam_sensor.h>
#include <media/cam_sensor.h>
-#include "cam_cci_dev.h"
+#include "../cam_cci/cam_cci_dev.h"
#include "cam_sensor_io.h"
#define I2C_POLL_TIME_MS 5
diff --git a/drivers/media/platform/msm/camera_oppo/cam_sensor_module/cam_sensor_io/cam_sensor_io.h b/drivers/media/platform/msm/camera_oppo/cam_sensor_module/cam_sensor_io/cam_sensor_io.h
index ec5ed25c0..464598295 100644
--- a/drivers/media/platform/msm/camera_oppo/cam_sensor_module/cam_sensor_io/cam_sensor_io.h
+++ b/drivers/media/platform/msm/camera_oppo/cam_sensor_module/cam_sensor_io/cam_sensor_io.h
@@ -15,7 +15,7 @@
#include <media/cam_sensor.h>
-#include "cam_sensor_cmn_header.h"
+#include "../cam_sensor_utils/cam_sensor_cmn_header.h"
#define CCI_MASTER 1
#define I2C_MASTER 2
diff --git a/drivers/media/platform/msm/camera_oppo/cam_sensor_module/cam_sensor_utils/cam_sensor_util.h b/drivers/media/platform/msm/camera_oppo/cam_sensor_module/cam_sensor_utils/cam_sensor_util.h
index dfca9ab63..deab98fdf 100644
--- a/drivers/media/platform/msm/camera_oppo/cam_sensor_module/cam_sensor_utils/cam_sensor_util.h
+++ b/drivers/media/platform/msm/camera_oppo/cam_sensor_module/cam_sensor_utils/cam_sensor_util.h
@@ -18,7 +18,7 @@
#include <linux/gpio.h>
#include <linux/of_gpio.h>
#include <linux/of.h>
-#include <cam_sensor_cmn_header.h>
+#include "cam_sensor_cmn_header.h"
#include <cam_req_mgr_util.h>
#include <cam_req_mgr_interface.h>
#include <cam_mem_mgr.h>
diff --git a/drivers/media/platform/msm/camera_oppo/cam_sync/cam_sync_util.h b/drivers/media/platform/msm/camera_oppo/cam_sync/cam_sync_util.h
index ae7d5421e..c5cfb0a72 100644
--- a/drivers/media/platform/msm/camera_oppo/cam_sync/cam_sync_util.h
+++ b/drivers/media/platform/msm/camera_oppo/cam_sync/cam_sync_util.h
@@ -14,7 +14,7 @@
#define __CAM_SYNC_UTIL_H__
-#include <cam_sync_api.h>
+#include "cam_sync_api.h"
#include "cam_sync_private.h"
#include "cam_debug_util.h"
diff --git a/drivers/media/platform/msm/camera_oppo/cam_utils/cam_trace.h b/drivers/media/platform/msm/camera_oppo/cam_utils/cam_trace.h
index 90ec56669..a4c5e52d7 100644
--- a/drivers/media/platform/msm/camera_oppo/cam_utils/cam_trace.h
+++ b/drivers/media/platform/msm/camera_oppo/cam_utils/cam_trace.h
@@ -23,9 +23,9 @@
#include <linux/tracepoint.h>
#include <media/cam_req_mgr.h>
-#include "cam_req_mgr_core.h"
-#include "cam_req_mgr_interface.h"
-#include "cam_context.h"
+#include "../cam_req_mgr/cam_req_mgr_core.h"
+#include "../cam_req_mgr/cam_req_mgr_interface.h"
+#include "../cam_core/cam_context.h"
TRACE_EVENT(cam_context_state,
TP_PROTO(const char *name, struct cam_context *ctx),

View file

@ -0,0 +1,26 @@
diff --git a/drivers/power/oppo/charger_ic/oppo_bq25882.c b/drivers/power/oppo/charger_ic/oppo_bq25882.c
index 06d4a197e..d7360890f 100644
--- a/drivers/power/oppo/charger_ic/oppo_bq25882.c
+++ b/drivers/power/oppo/charger_ic/oppo_bq25882.c
@@ -64,7 +64,7 @@ extern void mt_power_off(void);
#include "../oppo_vooc.h"
#include "../oppo_gauge.h"
-#include <oppo_bq25882.h>
+#include "oppo_bq25882.h"
static struct chip_bq25882 *charger_ic = NULL;
diff --git a/drivers/power/oppo/charger_ic/oppo_da9313.c b/drivers/power/oppo/charger_ic/oppo_da9313.c
index 3f2391839..e900784a4 100644
--- a/drivers/power/oppo/charger_ic/oppo_da9313.c
+++ b/drivers/power/oppo/charger_ic/oppo_da9313.c
@@ -68,7 +68,7 @@ extern void mt_power_off(void);
#include "../oppo_vooc.h"
#include "../oppo_gauge.h"
-#include <oppo_da9313.h>
+#include "oppo_da9313.h"
#include <linux/proc_fs.h>
static struct chip_da9313 *the_chip = NULL;

View file

@ -0,0 +1,28 @@
diff --git a/drivers/video/fbdev/msm/mdss_debug.h b/drivers/video/fbdev/msm/mdss_debug.h
index 64df339b4..c600095f4 100644
--- a/drivers/video/fbdev/msm/mdss_debug.h
+++ b/drivers/video/fbdev/msm/mdss_debug.h
@@ -78,8 +78,8 @@ struct vbif_debug_bus {
#define MDSS_XLOG_IOMMU(...) mdss_xlog(__func__, __LINE__, MDSS_XLOG_IOMMU, \
##__VA_ARGS__, DATA_LIMITER)
-#define ATRACE_END(name) trace_tracing_mark_write(current->tgid, name, 0)
-#define ATRACE_BEGIN(name) trace_tracing_mark_write(current->tgid, name, 1)
+#define ATRACE_END(name) trace_tracing_mark_write_mdss(current->tgid, name, 0)
+#define ATRACE_BEGIN(name) trace_tracing_mark_write_mdss(current->tgid, name, 1)
#define ATRACE_FUNC() ATRACE_BEGIN(__func__)
#define ATRACE_INT(name, value) \
diff --git a/drivers/video/fbdev/msm/mdss_mdp_trace.h b/drivers/video/fbdev/msm/mdss_mdp_trace.h
index 35a126ba3..4a03d26b8 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_trace.h
+++ b/drivers/video/fbdev/msm/mdss_mdp_trace.h
@@ -428,7 +428,7 @@ TRACE_EVENT(mdp_cmd_wait_pingpong,
__entry->kickoff_cnt)
);
-TRACE_EVENT(tracing_mark_write,
+TRACE_EVENT(tracing_mark_write_mdss,
TP_PROTO(int pid, const char *name, bool trace_begin),
TP_ARGS(pid, name, trace_begin),
TP_STRUCT__entry(

View file

@ -0,0 +1,23 @@
diff --git a/Makefile b/Makefile
index c9e396333..1bd619ed0 100644
--- a/Makefile
+++ b/Makefile
@@ -348,7 +348,7 @@ include scripts/Kbuild.include
# Make variables (CC, etc...)
AS = $(CROSS_COMPILE)as
LD = $(CROSS_COMPILE)ld
-REAL_CC = $(CROSS_COMPILE)gcc
+CC = $(CROSS_COMPILE)gcc
LDGOLD = $(CROSS_COMPILE)ld.gold
CPP = $(CC) -E
AR = $(CROSS_COMPILE)ar
@@ -364,9 +364,6 @@ PERL = perl
PYTHON = python
CHECK = sparse
-# Use the wrapper for the compiler. This wrapper scans for new
-# warnings and causes the build to stop upon encountering them
-CC = $(PYTHON) $(srctree)/scripts/gcc-wrapper.py $(REAL_CC)
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
-Wbitwise -Wno-return-void $(CF)

View file

@ -0,0 +1,281 @@
diff --git a/drivers/staging/qca-wifi-host-cmn/umac/cmn_services/serialization/src/wlan_serialization_utils_i.h b/drivers/staging/qca-wifi-host-cmn/umac/cmn_services/serialization/src/wlan_serialization_utils_i.h
index 6b9c82f0b..8f7206343 100644
--- a/drivers/staging/qca-wifi-host-cmn/umac/cmn_services/serialization/src/wlan_serialization_utils_i.h
+++ b/drivers/staging/qca-wifi-host-cmn/umac/cmn_services/serialization/src/wlan_serialization_utils_i.h
@@ -570,7 +570,7 @@ bool wlan_serialization_match_cmd_blocking(
* Return: Pointer to the node member in the list
*/
qdf_list_node_t *
-wlan_serialization_find_cmd(qdf_list_t *queue, uint32_t match_type,
+wlan_serialization_find_cmd(qdf_list_t *queue, enum wlan_serialization_match_type match_type,
struct wlan_serialization_command *cmd,
enum wlan_serialization_cmd_type cmd_type,
struct wlan_objmgr_pdev *pdev,
diff --git a/drivers/staging/qca-wifi-host-cmn/umac/cp_stats/dispatcher/src/wlan_cp_stats_mc_ucfg_api.c b/drivers/staging/qca-wifi-host-cmn/umac/cp_stats/dispatcher/src/wlan_cp_stats_mc_ucfg_api.c
index 44c517de4..cd31abbc7 100644
--- a/drivers/staging/qca-wifi-host-cmn/umac/cp_stats/dispatcher/src/wlan_cp_stats_mc_ucfg_api.c
+++ b/drivers/staging/qca-wifi-host-cmn/umac/cp_stats/dispatcher/src/wlan_cp_stats_mc_ucfg_api.c
@@ -626,7 +626,7 @@ QDF_STATUS ucfg_mc_cp_stats_cca_stats_get(struct wlan_objmgr_vdev *vdev,
}
QDF_STATUS ucfg_mc_cp_stats_set_rate_flags(struct wlan_objmgr_vdev *vdev,
- uint32_t flags)
+ enum tx_rate_info flags)
{
struct vdev_mc_cp_stats *vdev_mc_stats;
struct vdev_cp_stats *vdev_cp_stats_priv;
diff --git a/drivers/staging/qca-wifi-host-cmn/utils/logging/src/wlan_logging_sock_svc.c b/drivers/staging/qca-wifi-host-cmn/utils/logging/src/wlan_logging_sock_svc.c
index 724ae687a..18bc25772 100644
--- a/drivers/staging/qca-wifi-host-cmn/utils/logging/src/wlan_logging_sock_svc.c
+++ b/drivers/staging/qca-wifi-host-cmn/utils/logging/src/wlan_logging_sock_svc.c
@@ -606,9 +606,9 @@ static int pktlog_send_per_pkt_stats_to_user(void)
* Free old skb in case or error before assigning new skb
* to the free list.
*/
- if (free_old_skb)
+ if (free_old_skb) {
dev_kfree_skb(pstats_msg->skb);
-
+ }
spin_lock_irqsave(&gwlan_logging.pkt_stats_lock, flags);
pstats_msg->skb = skb_new;
list_add_tail(&pstats_msg->node,
diff --git a/drivers/staging/qca-wifi-host-cmn/wmi/src/wmi_unified.c b/drivers/staging/qca-wifi-host-cmn/wmi/src/wmi_unified.c
index f0a5b32ad..6be0b2096 100644
--- a/drivers/staging/qca-wifi-host-cmn/wmi/src/wmi_unified.c
+++ b/drivers/staging/qca-wifi-host-cmn/wmi/src/wmi_unified.c
@@ -1233,7 +1233,7 @@ static int debug_wmi_log_size_show(struct seq_file *m, void *v)
((struct seq_file *)file->private_data)->private;\
struct wmi_log_buf_t *wmi_log = &wmi_handle->log_info. \
wmi_##func_base##_buf_info; \
- char locbuf[50]; \
+ char locbuf[50] = {}; \
\
if ((!buf) || (count > 50)) \
return -EFAULT; \
@@ -1289,7 +1289,7 @@ static ssize_t debug_wmi_enable_write(struct file *file, const char __user *buf,
wmi_unified_t wmi_handle =
((struct seq_file *)file->private_data)->private;
int k, ret;
- char locbuf[50];
+ char locbuf[50] = {};
if ((!buf) || (count > 50))
return -EFAULT;
diff --git a/drivers/staging/qca-wifi-host-cmn/wmi/src/wmi_unified_api.c b/drivers/staging/qca-wifi-host-cmn/wmi/src/wmi_unified_api.c
index ceeccd673..7e59134d7 100644
--- a/drivers/staging/qca-wifi-host-cmn/wmi/src/wmi_unified_api.c
+++ b/drivers/staging/qca-wifi-host-cmn/wmi/src/wmi_unified_api.c
@@ -345,7 +345,7 @@ wmi_unified_wow_remove_wakeup_pattern_send(
}
QDF_STATUS wmi_unified_ap_ps_cmd_send(wmi_unified_t wmi_handle,
- uint8_t *peer_addr,
+ uint8_t peer_addr[QDF_MAC_ADDR_SIZE],
struct ap_ps_params *param)
{
if (wmi_handle->ops->send_set_ap_ps_param_cmd)
diff --git a/drivers/staging/qcacld-3.0/core/hdd/src/wlan_hdd_cfg80211.h b/drivers/staging/qcacld-3.0/core/hdd/src/wlan_hdd_cfg80211.h
index eb9e83d7a..5ab5942da 100644
--- a/drivers/staging/qcacld-3.0/core/hdd/src/wlan_hdd_cfg80211.h
+++ b/drivers/staging/qcacld-3.0/core/hdd/src/wlan_hdd_cfg80211.h
@@ -373,7 +373,7 @@ int wlan_hdd_send_avoid_freq_event(struct hdd_context *hdd_ctx,
* Return: 0 on success or failure reason
*/
int wlan_hdd_send_hang_reason_event(struct hdd_context *hdd_ctx,
- uint32_t reason, uint8_t *data,
+ enum qdf_hang_reason reason, uint8_t *data,
size_t data_len);
int wlan_hdd_send_avoid_freq_for_dnbs(struct hdd_context *hdd_ctx,
diff --git a/drivers/staging/qcacld-3.0/core/hdd/src/wlan_hdd_tx_rx.c b/drivers/staging/qcacld-3.0/core/hdd/src/wlan_hdd_tx_rx.c
index 6621c1582..8cc598ff0 100644
--- a/drivers/staging/qcacld-3.0/core/hdd/src/wlan_hdd_tx_rx.c
+++ b/drivers/staging/qcacld-3.0/core/hdd/src/wlan_hdd_tx_rx.c
@@ -3099,7 +3099,7 @@ int hdd_set_mon_rx_cb(struct net_device *dev)
}
qdf_status = sme_create_mon_session(hdd_ctx->mac_handle,
- adapter->mac_addr.bytes,
+ (uint8_t (*)[6])adapter->mac_addr.bytes,
adapter->vdev_id);
if (QDF_STATUS_SUCCESS != qdf_status) {
hdd_err("sme_create_mon_session() failed to register. Status= %d [0x%08X]",
diff --git a/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_admit_control.c b/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_admit_control.c
index 2ab5220c0..e08a63b4d 100644
--- a/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_admit_control.c
+++ b/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_admit_control.c
@@ -166,10 +166,11 @@ lim_validate_tspec(struct mac_context *mac,
switch (pTspec->tsinfo.traffic.accessPolicy) {
case SIR_MAC_ACCESSPOLICY_EDCA:
retval = lim_validate_tspec_edca(mac, pTspec, pe_session);
- if (retval != QDF_STATUS_SUCCESS)
+ if (retval != QDF_STATUS_SUCCESS) {
pe_warn("EDCA tspec invalid");
- break;
-
+ }
+ break;
+
case SIR_MAC_ACCESSPOLICY_HCCA:
case SIR_MAC_ACCESSPOLICY_BOTH:
/* TBD: should we support hybrid tspec as well?? for now, just fall through */
@@ -329,9 +330,10 @@ static QDF_STATUS lim_admit_policy(struct mac_context *mac,
admitPolicyInfo,
&mac->lim.tspecInfo[0],
pe_session);
- if (retval != QDF_STATUS_SUCCESS)
+ if (retval != QDF_STATUS_SUCCESS) {
pe_err("rejected by BWFactor policy");
- break;
+ }
+ break;
case WNI_CFG_ADMIT_POLICY_REJECT_ALL:
retval = QDF_STATUS_E_FAILURE;
diff --git a/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_api.c b/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_api.c
index 514b29fe9..f373f043b 100644
--- a/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_api.c
+++ b/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_api.c
@@ -1074,9 +1074,10 @@ static QDF_STATUS pe_drop_pending_rx_mgmt_frames(struct mac_context *mac_ctx,
qdf_spin_unlock(&mac_ctx->sys.bbt_mgmt_lock);
if (mac_ctx->sys.sys_bbt_pending_mgmt_count ==
(MGMT_RX_PACKETS_THRESHOLD / 4)) {
- if (!(mac_ctx->rx_packet_drop_counter % 100))
+ if (!(mac_ctx->rx_packet_drop_counter % 100)) {
pe_debug("No.of pending RX management frames reaches to 1/4th of threshold, rx_packet_drop_counter: %d",
mac_ctx->rx_packet_drop_counter);
+ }
mac_ctx->rx_packet_drop_counter++;
}
return QDF_STATUS_SUCCESS;
diff --git a/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_process_cfg_updates.c b/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_process_cfg_updates.c
index 31f1be6d4..8e2c2396f 100644
--- a/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_process_cfg_updates.c
+++ b/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_process_cfg_updates.c
@@ -127,9 +127,10 @@ void lim_handle_param_update(struct mac_context *mac, eUpdateIEsType cfgId)
msg.type = SIR_LIM_UPDATE_BEACON;
status = lim_post_msg_api(mac, &msg);
- if (status != QDF_STATUS_SUCCESS)
+ if (status != QDF_STATUS_SUCCESS) {
pe_err("Failed lim_post_msg_api %u", status);
- break;
+ }
+ break;
}
default:
break;
diff --git a/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_process_sme_req_messages.c
index d10581d17..d824bb113 100644
--- a/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_process_sme_req_messages.c
+++ b/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_process_sme_req_messages.c
@@ -4630,9 +4630,10 @@ bool lim_process_sme_req_messages(struct mac_context *mac,
break;
case eWNI_SME_ASSOC_CNF:
- if (pMsg->type == eWNI_SME_ASSOC_CNF)
+ if (pMsg->type == eWNI_SME_ASSOC_CNF) {
pe_debug("Received ASSOC_CNF message");
- __lim_process_sme_assoc_cnf_new(mac, pMsg->type,
+ }
+ __lim_process_sme_assoc_cnf_new(mac, pMsg->type,
msg_buf);
break;
diff --git a/drivers/staging/qcacld-3.0/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/drivers/staging/qcacld-3.0/core/mac/src/sys/legacy/src/utils/src/parser_api.c
index fd867753c..1e4cc643f 100644
--- a/drivers/staging/qcacld-3.0/core/mac/src/sys/legacy/src/utils/src/parser_api.c
+++ b/drivers/staging/qcacld-3.0/core/mac/src/sys/legacy/src/utils/src/parser_api.c
@@ -5910,7 +5910,7 @@ QDF_STATUS populate_dot11f_rrm_ie(struct mac_context *mac,
void populate_mdie(struct mac_context *mac,
tDot11fIEMobilityDomain *pDot11f,
- uint8_t mdie[SIR_MDIE_SIZE])
+ uint8_t * mdie)
{
pDot11f->present = 1;
pDot11f->MDID = (uint16_t) ((mdie[1] << 8) | (mdie[0]));
diff --git a/drivers/staging/qcacld-3.0/core/sme/inc/sme_api.h b/drivers/staging/qcacld-3.0/core/sme/inc/sme_api.h
index a44e8e8c1..d473bea09 100644
--- a/drivers/staging/qcacld-3.0/core/sme/inc/sme_api.h
+++ b/drivers/staging/qcacld-3.0/core/sme/inc/sme_api.h
@@ -2102,7 +2102,7 @@ sme_apf_read_work_memory(mac_handle_t mac_handle,
#endif /* FEATURE_WLAN_APF */
uint32_t sme_get_wni_dot11_mode(mac_handle_t mac_handle);
-QDF_STATUS sme_create_mon_session(mac_handle_t mac_handle, uint8_t *bssid,
+QDF_STATUS sme_create_mon_session(mac_handle_t mac_handle, tSirMacAddr *bssid,
uint8_t vdev_id);
/**
diff --git a/drivers/staging/qcacld-3.0/core/sme/src/common/sme_api.c b/drivers/staging/qcacld-3.0/core/sme/src/common/sme_api.c
index 6ace402e0..9ec5c2df9 100644
--- a/drivers/staging/qcacld-3.0/core/sme/src/common/sme_api.c
+++ b/drivers/staging/qcacld-3.0/core/sme/src/common/sme_api.c
@@ -13283,7 +13283,7 @@ uint32_t sme_get_wni_dot11_mode(mac_handle_t mac_handle)
*
* Return: QDF_STATUS_SUCCESS on success, non-zero error code on failure.
*/
-QDF_STATUS sme_create_mon_session(mac_handle_t mac_handle, tSirMacAddr bss_id,
+QDF_STATUS sme_create_mon_session(mac_handle_t mac_handle, tSirMacAddr* bss_id,
uint8_t vdev_id)
{
QDF_STATUS status = QDF_STATUS_E_FAILURE;
diff --git a/drivers/staging/qcacld-3.0/core/sme/src/csr/csr_api_scan.c b/drivers/staging/qcacld-3.0/core/sme/src/csr/csr_api_scan.c
index ea344f1ba..a484851df 100644
--- a/drivers/staging/qcacld-3.0/core/sme/src/csr/csr_api_scan.c
+++ b/drivers/staging/qcacld-3.0/core/sme/src/csr/csr_api_scan.c
@@ -59,7 +59,7 @@ static void csr_set_cfg_valid_channel_list(struct mac_context *mac,
static void csr_save_tx_power_to_cfg(struct mac_context *mac,
tDblLinkList *pList,
- uint32_t cfgId);
+ enum band_info band);
static void csr_set_cfg_country_code(struct mac_context *mac,
uint8_t *countryCode);
diff --git a/drivers/staging/qcacld-3.0/core/wma/src/wma_dev_if.c b/drivers/staging/qcacld-3.0/core/wma/src/wma_dev_if.c
index 4327dcaca..18251b68d 100644
--- a/drivers/staging/qcacld-3.0/core/wma/src/wma_dev_if.c
+++ b/drivers/staging/qcacld-3.0/core/wma/src/wma_dev_if.c
@@ -2717,7 +2717,7 @@ QDF_STATUS wma_post_vdev_create_setup(struct wlan_objmgr_vdev *vdev)
return QDF_STATUS_E_FAILURE;
}
-enum mlme_bcn_tx_rate_code wma_get_bcn_rate_code(uint16_t rate)
+uint32_t wma_get_bcn_rate_code(uint16_t rate)
{
/* rate in multiples of 100 Kbps */
switch (rate) {
diff --git a/drivers/staging/qcacld-3.0/core/wma/src/wma_main.c b/drivers/staging/qcacld-3.0/core/wma/src/wma_main.c
index 2ffe11508..18a81f63a 100644
--- a/drivers/staging/qcacld-3.0/core/wma/src/wma_main.c
+++ b/drivers/staging/qcacld-3.0/core/wma/src/wma_main.c
@@ -6312,13 +6312,11 @@ static void wma_print_populate_soc_caps(struct target_psoc_info *tgt_hdl)
WMA_LOGD("%s: <====== HW mode cap printing starts ======>", __func__);
/* print cap of each hw mode */
for (i = 0; i < total_mac_phy_cnt; i++) {
- if (&mac_phy_cap[i]) {
WMA_LOGD("====>: hw mode id[%d], phy id[%d]",
mac_phy_cap[i].hw_mode_id,
mac_phy_cap[i].phy_id);
tmp = &mac_phy_cap[i];
wma_print_mac_phy_capabilities(tmp, i);
- }
}
WMA_LOGD("%s: <====== HW mode cap printing ends ======>\n", __func__);
}
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c
index f0e867e78..a8541f3c6 100755
--- a/drivers/usb/gadget/configfs.c
+++ b/drivers/usb/gadget/configfs.c
@@ -15,7 +15,7 @@
#include <linux/usb/ch9.h>
#ifdef CONFIG_USB_F_NCM
-#include <function/u_ncm.h>
+#include "function/u_ncm.h"
#endif
#ifdef CONFIG_USB_CONFIGFS_F_ACC

View file

@ -0,0 +1,10 @@
diff --git a/techpack/audio/ipc/Kbuild b/techpack/audio/ipc/Kbuild
index f6a67fa..cfed23c 100644
--- a/techpack/audio/ipc/Kbuild
+++ b/techpack/audio/ipc/Kbuild
@@ -236,4 +236,4 @@ obj-$(CONFIG_WCD_DSP_GLINK) += wglink_dlkm.o
wglink_dlkm-y := $(WDSP_GLINK)
# inject some build related information
-CDEFINES += -DBUILD_TIMESTAMP=\"$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')\"
+DEFINES += -DBUILD_TIMESTAMP=\"$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')\"

View file

@ -0,0 +1,50 @@
diff --git a/drivers/clk/qcom/mdss/mdss_pll_trace.h b/drivers/clk/qcom/mdss/mdss_pll_trace.h
index cd4fda6c7..1c7225a46 100644
--- a/drivers/clk/qcom/mdss/mdss_pll_trace.h
+++ b/drivers/clk/qcom/mdss/mdss_pll_trace.h
@@ -112,5 +112,5 @@ TRACE_EVENT(mdss_pll_trace_counter,
/* This part must be outside protection */
#undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/clk/qcom/mdss
#include <trace/define_trace.h>
diff --git a/drivers/gpu/msm/adreno_trace.h b/drivers/gpu/msm/adreno_trace.h
index bf5e79883..bf72623ca 100644
--- a/drivers/gpu/msm/adreno_trace.h
+++ b/drivers/gpu/msm/adreno_trace.h
@@ -17,7 +17,7 @@
#undef TRACE_SYSTEM
#define TRACE_SYSTEM kgsl
#undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/msm
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_FILE adreno_trace
diff --git a/drivers/gpu/msm/kgsl_events.c b/drivers/gpu/msm/kgsl_events.c
index 47582daf8..097e3dbaa 100644
--- a/drivers/gpu/msm/kgsl_events.c
+++ b/drivers/gpu/msm/kgsl_events.c
@@ -15,7 +15,7 @@
#include <linux/list.h>
#include <linux/workqueue.h>
#include <linux/debugfs.h>
-#include <kgsl_device.h>
+#include "kgsl_device.h"
#include "kgsl_debugfs.h"
#include "kgsl_trace.h"
diff --git a/drivers/gpu/msm/kgsl_trace.h b/drivers/gpu/msm/kgsl_trace.h
index b40a16122..3be17d574 100644
--- a/drivers/gpu/msm/kgsl_trace.h
+++ b/drivers/gpu/msm/kgsl_trace.h
@@ -17,7 +17,7 @@
#undef TRACE_SYSTEM
#define TRACE_SYSTEM kgsl
#undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/msm
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_FILE kgsl_trace

View file

@ -0,0 +1,35 @@
diff --git a/drivers/media/platform/msm/camera_oppo/cam_utils/cam_trace.h b/drivers/media/platform/msm/camera_oppo/cam_utils/cam_trace.h
index a4c5e52d7..c8cdba4d3 100644
--- a/drivers/media/platform/msm/camera_oppo/cam_utils/cam_trace.h
+++ b/drivers/media/platform/msm/camera_oppo/cam_utils/cam_trace.h
@@ -17,7 +17,7 @@
#undef TRACE_SYSTEM
#define TRACE_SYSTEM camera
#undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/media/platform/msm/camera_oppo/cam_utils/
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_FILE cam_trace
diff --git a/drivers/platform/msm/ipa/ipa_clients/rndis_ipa_trace.h b/drivers/platform/msm/ipa/ipa_clients/rndis_ipa_trace.h
index bf66c1e20..9f603e93a 100644
--- a/drivers/platform/msm/ipa/ipa_clients/rndis_ipa_trace.h
+++ b/drivers/platform/msm/ipa/ipa_clients/rndis_ipa_trace.h
@@ -77,5 +77,5 @@ TRACE_EVENT(
/* This part must be outside protection */
#undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/platform/msm/ipa/ipa_clients/
#include <trace/define_trace.h>
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_trace.h b/drivers/platform/msm/ipa/ipa_v3/ipa_trace.h
index b67899ba8..7081c9c6b 100644
--- a/drivers/platform/msm/ipa/ipa_v3/ipa_trace.h
+++ b/drivers/platform/msm/ipa/ipa_v3/ipa_trace.h
@@ -149,5 +149,5 @@ TRACE_EVENT(
/* This part must be outside protection */
#undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/platform/msm/ipa/ipa_v3/
#include <trace/define_trace.h>

View file

@ -0,0 +1,13 @@
diff --git a/drivers/soc/qcom/tracer_pkt_private.h b/drivers/soc/qcom/tracer_pkt_private.h
index fc760e6b6..5573aec2f 100644
--- a/drivers/soc/qcom/tracer_pkt_private.h
+++ b/drivers/soc/qcom/tracer_pkt_private.h
@@ -15,7 +15,7 @@
#undef TRACE_SYSTEM
#define TRACE_SYSTEM tracer_pkt
#undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/soc/qcom/
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_FILE tracer_pkt_private

View file

@ -0,0 +1,80 @@
From 92e3310d2db157deacb86ef5db8c8c8d38251312 Mon Sep 17 00:00:00 2001
From: Alexey Min <alexey.min@gmail.com>
Date: Wed, 11 Sep 2019 21:51:40 +0300
Subject: [PATCH 3/6] Add config option to fix bootloader cmdline args
Android bootloader passes some arguments in kernel command
line, that make booting custom OSes harder:
* skip_initramfs
* root=PARTUUID=...
* init=/init
Those parameters override default boot partition to hardcoded,
set init binary to /init, disable booting from initramfs.
If enabled, those parameters will be erased from bootloader's
command line, and custom OS can boot the way it likes.
Signed-off-by: Alexey Min <alexey.min@gmail.com>
---
arch/arm64/Kconfig | 17 +++++++++++++++++
drivers/of/fdt.c | 14 ++++++++++++++
2 files changed, 31 insertions(+)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 2829edba6aa5..bd9f05f83c7e 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1125,6 +1125,23 @@ config CMDLINE_FORCE
command-line options your boot loader passes to the kernel.
endchoice
+config CMDLINE_DROP_DANGEROUS_ANDROID_OPTIONS
+ bool "Drop certain dangerous options from cmdline"
+ default n
+ help
+ Android bootloader passes some arguments in kernel command
+ line, that make booting custom OSes harder:
+
+ * skip_initramfs
+ * root=PARTUUID=...
+ * init=/init
+
+ Those parameters override default boot partition to hardcoded,
+ set init binary to /init, disable booting from initramfs.
+
+ If enabled, those parameters will be erased from bootloader's
+ command line, and custom OS can boot the way it likes.
+
config EFI_STUB
bool
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index ca175710c4c8..fd8257589648 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -1012,6 +1012,20 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname,
pr_debug("Command line is: %s\n", (char*)data);
+#ifdef CONFIG_CMDLINE_DROP_DANGEROUS_ANDROID_OPTIONS
+ pr_err("Replacing dangerous cmdline options...");
+ cmdline = strstr((const char *)data, "skip_initramfs");
+ if (cmdline)
+ *cmdline = '_';
+ cmdline = strstr((const char *)data, "root=");
+ if (cmdline)
+ *cmdline = '_';
+ cmdline = strstr((const char *)data, "init=");
+ if (cmdline)
+ *cmdline = '_';
+ pr_err("Command line now is: %s\n", (char*)data);
+#endif
+
/* break now */
return 1;
}
--
2.24.1