Skip to content

Commit

Permalink
Merge branches 'rebase/dts', 'rebase/hl', 'rebase/fb', 'rebase/ro', '…
Browse files Browse the repository at this point in the history
…rebase/elp' and 'rebase/sd09' into rebase/next
  • Loading branch information
TravMurav committed Mar 10, 2024
7 parents aaa9efa + 25a5934 + 1eba969 + 651ce44 + a9076b2 + 72fe0b2 + ba3b1a9 commit 6461706
Show file tree
Hide file tree
Showing 88 changed files with 4,923 additions and 111 deletions.
1 change: 1 addition & 0 deletions lib/zlib_inflate/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ OBJS += \
$(LOCAL_DIR)/inftrees.o \
$(LOCAL_DIR)/inflate.o \
$(LOCAL_DIR)/inffast.o \
$(LOCAL_DIR)/uncompr.o \
$(LOCAL_DIR)/decompress.o
4 changes: 4 additions & 0 deletions lk2nd/boot/extlinux.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@ static bool expand_conf(struct label *label, const char *root)
if (!fs_file_exists(path))
snprintf(path, sizeof(path), "%s/%s/qcom-%s.dtb", root, label->dtbdir, dtbfiles[i]);

/* boot-deploy drops the vendor dir when copying dtbs. */
if (!fs_file_exists(path))
snprintf(path, sizeof(path), "%s/%s/%s.dtb", root, label->dtbdir, dtbfiles[i]);

if (fs_file_exists(path)) {
label->dtb = strndup(path, sizeof(path));
break;
Expand Down
4 changes: 4 additions & 0 deletions lk2nd/device/2nd/partition.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ static void lk2nd_partition_split_mmc(void)
#ifdef LK2ND_PARTITION_SIZE
partition_split_mmc(LK2ND_PARTITION_BASE, LK2ND_PARTITION_NAME,
LK2ND_PARTITION_SIZE / block_size, false);
#ifdef QHYPSTUB_PARTITION_SIZE
partition_split_mmc(QHYPSTUB_PARTITION_BASE, QHYPSTUB_PARTITION_NAME,
QHYPSTUB_PARTITION_SIZE / block_size, true);
#endif
#endif
}

Expand Down
7 changes: 7 additions & 0 deletions lk2nd/device/2nd/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ DEFINES += \
LK2ND_PARTITION_SIZE=($(LK2ND_PARTITION_SIZE))
endif

ifneq ($(QHYPSTUB_PARTITION_SIZE),)
DEFINES += \
QHYPSTUB_PARTITION_BASE="$(QHYPSTUB_PARTITION_BASE)" \
QHYPSTUB_PARTITION_NAME="$(QHYPSTUB_PARTITION_NAME)" \
QHYPSTUB_PARTITION_SIZE=($(QHYPSTUB_PARTITION_SIZE))
endif

include $(if $(BUILD_GPL),$(LOCAL_DIR)/gpl/rules.mk)

ifneq ($(OUTBOOTIMG),)
Expand Down
16 changes: 16 additions & 0 deletions lk2nd/device/dts/msm8226/apq8026-asus-sparrow.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// SPDX-License-Identifier: BSD-3-Clause

#include <skeleton64.dtsi>
#include <lk2nd.dtsi>

/ {
qcom,msm-id = <QCOM_ID_APQ8026 0x20000>;
qcom,board-id = <QCOM_BOARD_ID_MTP 3005>;
};

&lk2nd {
model = "ASUS ZenWatch 2";
compatible = "asus,sparrow";

lk2nd,dtb-files = "apq8026-asus-sparrow";
};
25 changes: 25 additions & 0 deletions lk2nd/device/dts/msm8226/apq8026-huawei-sturgeon.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// SPDX-License-Identifier: BSD-3-Clause

#include <skeleton64.dtsi>
#include <lk2nd.dtsi>

/ {
qcom,msm-id = <QCOM_ID_APQ8026 0x20000>;
qcom,board-id = <QCOM_BOARD_ID_MTP 4>;
};

&lk2nd {
model = "Huawei Watch";
compatible = "huawei,sturgeon";

lk2nd,dtb-files = "apq8026-huawei-sturgeon";

gpio-keys {
compatible = "gpio-keys";

power {
lk2nd,code = <KEY_HOME>;
gpios = <&pmic_pon GPIO_PMIC_PWRKEY 0>;
};
};
};
20 changes: 20 additions & 0 deletions lk2nd/device/dts/msm8226/apq8026-lg-lenok.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// SPDX-License-Identifier: BSD-3-Clause

#include <skeleton64.dtsi>
#include <lk2nd.dtsi>

/ {
qcom,msm-id = <QCOM_ID_APQ8026 0x20000>;
qcom,board-id = <132 0x0a>;

/* The bootloader checks the compatible too... */
compatible = "qcom,apq8026";
};

&lk2nd {
model = "LG G Watch R";
compatible = "lg,lenok";

lk2nd,dtb-files = "apq8026-lg-lenok";
};

64 changes: 64 additions & 0 deletions lk2nd/device/dts/msm8226/apq8026-samsung.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// SPDX-License-Identifier: BSD-3-Clause

#include <skeleton64.dtsi>
#include <lk2nd.dtsi>

/ {
qcom,msm-id = <0xC708FF01 3 0x20000>,
<0xC708FF01 9 0x20000>;
};

&lk2nd {
/* rev 3 */

matissewifi {
model = "Samsung Galaxy Tab 4 10.1 WiFi (SM-T530)";
compatible = "samsung,matisse-wifi", "samsung,matisse";
lk2nd,match-bootloader = "T530*";

lk2nd,dtb-files = "apq8026-samsung-matisse-wifi";

gpio-keys {
compatible = "gpio-keys";
home {
lk2nd,code = <KEY_HOME>;
gpios = <&tlmm 108 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
down {
lk2nd,code = <KEY_VOLUMEDOWN>;
gpios = <&tlmm 107 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
up {
lk2nd,code = <KEY_VOLUMEUP>;
gpios = <&tlmm 106 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
};
};

/* rev 9 */

milletwifi {
model = "Samsung Galaxy Tab 4 8.0 WiFi (SM-T330)";
compatible = "samsung,milletwifi", "samsung,millet";
lk2nd,match-bootloader = "T330*";

//FIXME: lk2nd,dtb-files = "apq8026-samsung-millet-wifi";

gpio-keys {
compatible = "gpio-keys";
home {
lk2nd,code = <KEY_HOME>;
gpios = <&tlmm 108 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
down {
lk2nd,code = <KEY_VOLUMEDOWN>;
gpios = <&tlmm 107 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
up {
lk2nd,code = <KEY_VOLUMEUP>;
gpios = <&tlmm 106 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
};
};

};
15 changes: 15 additions & 0 deletions lk2nd/device/dts/msm8226/msm8226-motorola-falcon.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// SPDX-License-Identifier: BSD-3-Clause

#include <skeleton64.dtsi>
#include <lk2nd.dtsi>

/ {
qcom,msm-id = <0x91 0x42 0x283C0>;
};

&lk2nd {
model = "Motorola Moto G 2013";
compatible = "motorola,falcon";

// FIXME: lk2nd,dtb-files = "msm8226-motorola-falcon";
};
32 changes: 32 additions & 0 deletions lk2nd/device/dts/msm8226/msm8226-samsung.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: BSD-3-Clause

#include <skeleton64.dtsi>
#include <lk2nd.dtsi>

/ {
qcom,msm-id = <0x9E08FF01 7 0x20000>;
};

&lk2nd {
/* rev 7 */

ms013g {
model = "Samsung Galaxy Grand 2";
compatible = "samsung,ms013g";

//FIXME: lk2nd,dtb-files = "apq8026-samsung-ms013g";

gpio-keys {
compatible = "gpio-keys";
down {
lk2nd,code = <KEY_VOLUMEDOWN>;
gpios = <&tlmm 107 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
up {
lk2nd,code = <KEY_VOLUMEUP>;
gpios = <&tlmm 106 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
};
};
};

42 changes: 42 additions & 0 deletions lk2nd/device/dts/msm8226/msm8926-htc-memul.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// SPDX-License-Identifier: BSD-3-Clause

#include <skeleton64.dtsi>
#include <lk2nd.dtsi>

/*
* Compile lk2nd with the following flags so that various lk2nd functionality
* works fine, e.g. fastboot oem lk_log && fastboot get_staged /dev/stdout
*
* SCRATCH_ADDR=0x20000000 SCRATCH_ADDR_512MAP=0x20000000 SCRATCH_SIZE_512MAP=0x10000000
*
* On this device the memory at 0x10000000 (default scratch memory address)
* allows writes but any read just returns zeroes. From Linux perspective this
* is reserved memory so we need to choose a different memory address.
*/

/ {
/* Actually htc,project-id */
qcom,msm-id = <293 0 0>;
};

&lk2nd {
memul {
model = "HTC One Mini 2";
compatible = "htc,memul";
lk2nd,match-cmdline = "* mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_mem_lg_novatek_35521_720p_video *";

// FIXME: lk2nd,dtb-files = "msm8926-htc-memul";

gpio-keys {
compatible = "gpio-keys";
down {
lk2nd,code = <KEY_VOLUMEDOWN>;
gpios = <&tlmm 107 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
up {
lk2nd,code = <KEY_VOLUMEUP>;
gpios = <&tlmm 108 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
};
};
};
15 changes: 15 additions & 0 deletions lk2nd/device/dts/msm8226/msm8926-huawei-g6-l11-vb.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// SPDX-License-Identifier: BSD-3-Clause

#include <skeleton64.dtsi>
#include <lk2nd.dtsi>

/ {
qcom,msm-id = <0xc8 0x1f51 0x00>;
};

&lk2nd {
model = "Huawei Ascend G6-L11 vb";
compatible = "huawei,g6-l11-vb";

//FIXME: lk2nd,dtb-files = "msm8926-huawei-g6-l11";
};
17 changes: 17 additions & 0 deletions lk2nd/device/dts/msm8226/msm8926-motorola-peregrine.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// SPDX-License-Identifier: BSD-3-Clause

#include <skeleton64.dtsi>
#include <lk2nd.dtsi>

/ {
qcom,msm-id = <0x91 0x44 0x82D0>;
};

&lk2nd {

model = "Motorola Moto G 4G 2013";
compatible = "motorola,peregrine";

//FIXME: lk2nd,dtb-files = "msm8926-motorola-peregrine";
};

35 changes: 35 additions & 0 deletions lk2nd/device/dts/msm8226/msm8926-samsung.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// SPDX-License-Identifier: BSD-3-Clause

#include <skeleton64.dtsi>
#include <lk2nd.dtsi>

/ {
qcom,msm-id = <0xC808FF01 2 0x10001>;
};

&lk2nd {
/* rev 2 */
matisselte {
model = "Samsung Galaxy Tab 4 10.1 LTE (SM-T535)";
compatible = "samsung,matisselte", "samsung,matisse";
lk2nd,match-bootloader = "T535*";

lk2nd,dtb-files = "msm8926-samsung-matisse", "apq8026-samsung-matisse-wifi";

gpio-keys {
compatible = "gpio-keys";
home {
lk2nd,code = <KEY_HOME>;
gpios = <&tlmm 108 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
down {
lk2nd,code = <KEY_VOLUMEDOWN>;
gpios = <&tlmm 107 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
up {
lk2nd,code = <KEY_VOLUMEUP>;
gpios = <&tlmm 106 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
};
};
};
30 changes: 30 additions & 0 deletions lk2nd/device/dts/msm8226/msm8926-v2-720p-mtp.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// SPDX-License-Identifier: BSD-3-Clause

#include <skeleton64.dtsi>
#include <lk2nd.dtsi>

/ {
qcom,msm-id = <QCOM_ID_MSM8926 0>;
qcom,board-id = <QCOM_BOARD_ID_MTP 0>;
};

&lk2nd {
coolpad-8730l {
model = "Coolpad 8730L";
compatible = "coolpad,8730l";
lk2nd,match-panel;

//FIXME: lk2nd,dtb-files = "msm8926-coolpad-8730l";

panel {
compatible = "lk2nd,panel";
qcom,mdss_dsi_otm1283a_boyi_hd_video {};
qcom,mdss_dsi_hx8394a_lide_hd_video {};
qcom,mdss_dsi_hx8394a_yashi_hd_video {};
qcom,mdss_dsi_hx8394a_yashi_cmi_hd_video {};
qcom,mdss_dsi_otm1283a_boyi_auo_hd_video {};
qcom,mdss_dsi_otm1283a_lide_cpt_hd_video {};
};
};
};

17 changes: 17 additions & 0 deletions lk2nd/device/dts/msm8226/rules.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# SPDX-License-Identifier: BSD-3-Clause
LOCAL_DIR := $(GET_LOCAL_DIR)

# NOTE: lenok wants to be first to be able to boot.
ADTBS += \
$(LOCAL_DIR)/apq8026-lg-lenok.dtb \

QCDTBS += \
$(LOCAL_DIR)/apq8026-asus-sparrow.dtb \
$(LOCAL_DIR)/apq8026-huawei-sturgeon.dtb \
$(LOCAL_DIR)/apq8026-samsung.dtb \
$(LOCAL_DIR)/msm8226-motorola-falcon.dtb \
$(LOCAL_DIR)/msm8226-samsung.dtb \
$(LOCAL_DIR)/msm8926-htc-memul.dtb \
$(LOCAL_DIR)/msm8926-huawei-g6-l11-vb.dtb \
$(LOCAL_DIR)/msm8926-motorola-peregrine.dtb \
$(LOCAL_DIR)/msm8926-samsung.dtb \
$(LOCAL_DIR)/msm8926-v2-720p-mtp.dtb \


DTBS += \
$(LOCAL_DIR)/lumia.dtb \
Loading

0 comments on commit 6461706

Please sign in to comment.