msm8916-mainline / gen-uboot-img Goto Github PK
View Code? Open in Web Editor NEWGenerate lk2nd and U-Boot based bootchain for msm8916 devices
License: BSD 3-Clause "New" or "Revised" License
Generate lk2nd and U-Boot based bootchain for msm8916 devices
License: BSD 3-Clause "New" or "Revised" License
The panel in my Samsung A5 goes blank when booting into U-Boot. As suggested by @TravMurav, it can be worked around by removing both regulators on the panel:
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts
index 6f22afd40fa6..d40d7d624d6e 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts
@@ -9,29 +9,6 @@ / {
compatible = "samsung,a5u-eur", "qcom,msm8916";
chassis-type = "handset";
- reg_vlcd_vdd3: regulator-vlcd-vdd3 {
- compatible = "regulator-fixed";
- regulator-name = "vlcd_vdd3";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- vin-supply = <&pm8916_s4>;
-
- gpio = <&tlmm 87 GPIO_ACTIVE_HIGH>;
- enable-active-high;
-
- pinctrl-names = "default";
- pinctrl-0 = <&lcd_on_default>;
- };
-
- reg_vlcd_vci: regulator-vlcd-vci {
- compatible = "regulator-fixed";
- regulator-name = "vlcd_vci";
- regulator-min-microvolt = <3000000>;
- regulator-max-microvolt = <3000000>;
-
- gpio = <&tlmm 87 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
reg_touch_key: regulator-touch-key {
compatible = "regulator-fixed";
@@ -89,8 +66,6 @@ panel@0 {
compatible = "samsung,ea8061v-ams497ee01";
reg = <0>;
- vdd3-supply = <®_vlcd_vdd3>;
- vci-supply = <®_vlcd_vci>;
reset-gpios = <&tlmm 25 GPIO_ACTIVE_LOW>;
port {
I confirmed that both regulators must be removed. Removing one or the other continues to display a blank screen.
When booting U-Boot with lk2nd.pass-simplefb=uboot
command line, the following exception is triggered in lk2nd:
[670] simplefb: switching to xrgb888 because u-boot can't do 24
[720] data abort
[720] translation fault on write
[720] DFAR 0x8e300000 (fault address)
[720] DFSR 0x805 (fault status register)
[730] data abort, halting
[730] r0 0x8e300000 r1 0x90300020 r2 0x00083fc0 r3 0x1e000000
[740] r4 0xbf000000 r5 0x00000000 r6 0x00000000 r7 0x00000000
[740] r8 0x33000000 r9 0x01000000 r10 0x00000000 r11 0x00000000
[750] r12 0x01a15000 usp 0x00000000 ulr 0x00000000 pc 0x8f6213a0
[750] spsr 0x20000153
[760] fiq r13 0x8f649000 r14 0x864001b8
[760] irq r13 0x8f655260 r14 0x8f60ca28
[760] *svc r13 0x8f684d00 r14 0x8f62b334
[770] und r13 0x8f649000 r14 0xffbce774
[770] sys r13 0x00000000 r14 0x00000000
[770] bottom of stack at 0x8f684d00:
0x8f684d00: 8f67ee14 81e00000 8f644100 8f644140 |..g......Ad..Ad.|
0x8f684d10: 00000000 00000000 8e000000 8f67ee14 |..............g.|
0x8f684d20: 90000000 8f62b334 8f68dd84 4b3f9c01 |......b...h....K|
0x8f684d30: 8f63eb04 00000001 8f68dd84 8f62afdc |..c.......h...b.|
0x8f684d40: 0000c704 4b3f9c01 0000c6e8 81e00000 |.......K........|
0x8f684d50: 81e0c724 6f6f6275 81e00074 ffffffff |....uboot.......|
0x8f684d60: 00000015 4b3f9c01 8f63af89 8f63af81 |.......K..c...c.|
0x8f684d70: 8f63af89 00001d64 81e00000 8f623200 |..c.d.........b.|
$ addr2line -e build-lk2nd-msm8916/lk 0x8f6213a0
/var/home/sam/src/lk2nd/lib/libc/string/arch/arm/memcpy.S:87
Manually commenting out mdp_set_xrgb8888
and instead using mdp_set_rgb565
does work.
Following the README steps does not work for me on my samsung-a5:
fastboot flash boot build/thirdstage.ext2
[10] platform_init()
[10] target_init()
[20] MMC card: R311MB (0.0, 02 1999), manufacturer: 15, OEM: 100, capacity: 15758000128 bytes
[30] SDHC Running in HS200 mode
[30] Done initialization of the card
[40] lk2nd_init()
[40] Booted @ 0x80008000, r0=0x0, r1=0x0, r2=0x81e00000
[40] Found valid DTB with 2679 bytes total
[50] Command line from previous bootloader: lk2nd androidboot.sec_atd.tty=/dev/ttyHSL0 loglevel=4 sec_log=0x100000@0xafe00008 sec_dbg=0x80000@0xaff00008 androidboot.revision=2 androidboot.warranty_bit=1 androidboot.bootloader=A500FUXXU1CRH1 lpm_levels.sleep_disabled=1 fg_reset=0 androidboot.boot_recovery=0 sec_debug.reset_reason=0x0 androidboot.debug_level=0x4f4c sec_debug.enable=0 sec_debug.enable_user=0 androidboot.cp_debug_level=0x55FF sec_debug.enable_cp_debug=0 vmalloc=340M cordon=1d6857fcf41f3591b612de318be7096f connie=SM-A500FU_OPEN_EUR_1ec4fee05502ae748df4adb3c47ca77c lcd_id=0x822003 androidboot.security_mode=1526595584 androidboot.emmc=true androidboot.serialno=2508c401 androidboot.mode=charger androidboot.baseband=lpm lcd_id=0x822003 mdss_mdp.panel=1:dsi:0:ss_dsi_panel_EA8061V_AMS497EE01_HD:1:none
[120] Failed to find matching lk2nd device node: -1
[130] MDP continuous splash detected: pipe RGB_0, base: 0x8e000000, stride: 2160, src: 720x1280 (0,0), img: 720x1280, out: 720x1280 (0,0), format: 0x2243f (bpp: 3)
[140] Display refresh: cmd mode: 0, auto refresh: 0 (sel: 0x1f20)
[150] Registering wrapper bio devices...
[160] Registering mmc_sdhci bio devices...
[170] Error: Command timeout error
[170] Failure getting OCR response from MMC Card
[170] MMC card failed to respond, try for SD card
[180] Error: Command timeout error
[180] The response for CMD8 does not match the supplied value
[180] Failed to initialize SD card
[190] Failed detecting MMC/SDC @ slot2
[190] SD card MMC is unavailable.
[190] block devices:
[200] | dev | label | size | Leaf |
[200] | wrp0p27 | lk2nd | 512 KiB | Yes |
[210] | wrp0p26 | userdata | 12063 MiB | Yes |
[210] | wrp0p25 | hidden | 180 MiB | Yes |
[220] | wrp0p24 | cache | 200 MiB | Yes |
[220] | wrp0p23 | system | 2400 MiB | Yes |
[230] | wrp0p22 | persdata | 9 MiB | Yes |
[230] | wrp0p21 | persist | 8 MiB | Yes |
[240] | wrp0p20 | ssd | 8 KiB | Yes |
[240] | wrp0p19 | fsc | 3 MiB | Yes |
[250] | wrp0p18 | backup | 6 MiB | Yes |
[250] | wrp0p17 | fota | 5 MiB | Yes |
[260] | wrp0p16 | recovery | 15 MiB | Yes |
[270] | wrp0p15 | boot | 12 MiB | Yes |
[270] | wrp0p14 | modemst2 | 3 MiB | Yes |
[280] | wrp0p13 | modemst1 | 3 MiB | Yes |
[280] | wrp0p12 | efs | 14 MiB | Yes |
[290] | wrp0p11 | param | 10 MiB | Yes |
[290] | wrp0p10 | pad | 10 MiB | Yes |
[300] | wrp0p9 | sec | 16 KiB | Yes |
[300] | wrp0p8 | fsg | 3 MiB | Yes |
[310] | wrp0p7 | qhee | 512 KiB | Yes |
[310] | wrp0p6 | qsee | 512 KiB | Yes |
[320] | wrp0p5 | rpm | 512 KiB | Yes |
[320] | wrp0p4 | aboot | 2 MiB | Yes |
[330] | wrp0p3 | ddr | 32 KiB | Yes |
[330] | wrp0p2 | sbl1 | 512 KiB | Yes |
[340] | wrp0p1 | modem | 57 MiB | Yes |
[340] | wrp0p0 | apnhlos | 15 MiB | Yes |
[350] | wrp0 | | 15028 MiB | |
[360] boot: Trying to boot from the file system...
[360] Loading (boot) image (4196352): start
[390] Loading (boot) image (4196352): done
[390] use_signed_kernel=0, is_unlocked=1, is_tampered=0.
[400] Uncpmpressed kernel in use
[400] Kernel image not patched..Unable to locate dt offset
[410] DTB offset is incorrect, kernel image does not have appended DTB
[410] Device info 0x000000ce/00010000/0x00010008/0, pmic 0x2000b/0x0/0x0/0x0
[420] ERROR: Appended Device Tree Blob not found
[420] ERROR: Could not do normal boot. Reverting to fastboot mode.
[430] fastboot_init()
[530] USB init ept @ 0x8f68b000
[550] udc_start()
[660] -- reset --
[660] -- portchange --
[840] -- reset --
[840] -- portchange --
[1050] fastboot: processing commands
[1080] fastboot: getvar:product
[1580] fastboot: getvar:version
[2090] fastboot: getvar:version-bootloader
[2590] fastboot: getvar:serialno
[3090] fastboot: getvar:secure
[12790] fastboot: oem log
OKAY [ 0.002s]
Finished. Total time: 0.002s
I worked around this by wrapping U-Boot in its own boot.img
for now:
$ cat build/u-boot-nodtb.bin.gz build/linux/arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dtb > u-boot.bin
$ ~/src/lk2nd/lk2nd/scripts/mkbootimg \
--kernel=u-boot.bin \
--output=u-boot.img \
--cmdline="lk2nd.pass-simplefb=uboot" \
--base=0x80000000
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.