Image build passed, download the image to VIM1 board successfully but boot without display, see LCD led turn to greed from red, but no display

I fetched android marashmallow source code. uboot build successfully, while android build failed.
attach the fail log.
Can someboby help me to solve this? thanks in advanced.

What’s the system version of your PC host? Did you Establishing a Build Environment?

PC:windows 7 64bit + Vmware(Ubuntu16.04).
Yes,I follow the step you post here: establishing a build environment.

build log as attached.
链接:https://share.weiyun.com/57REBDj

hint:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
build/core/host_shared_library_internal.mk:51: recipe for target ‘out/host/linux-x86/obj32/lib/libart.so’ failed
make: *** [out/host/linux-x86/obj32/lib/libart.so] Error 1

You can try to modify the file build/core/clang/HOST_x86_common.mk

diff --git a/core/clang/HOST_x86_common.mk b/core/clang/HOST_x86_common.mk
index 74b5a69..6ded42d 100644
--- a/core/clang/HOST_x86_common.mk
+++ b/core/clang/HOST_x86_common.mk
@@ -11,7 +11,8 @@ endif
 ifeq ($(HOST_OS),linux)
 CLANG_CONFIG_x86_LINUX_HOST_EXTRA_ASFLAGS := \
   --gcc-toolchain=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG) \
-  --sysroot=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/sysroot
+  --sysroot $($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/sysroot \
+  -B$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/bin

About more informations for it, please refer to this. Thanks.

your post failed.
I tried another method:
step1:

disable clang,modify “art/build/Android.common_build.mk”

Host.

ART_HOST_CLANG := false
ifneq ($(WITHOUT_HOST_CLANG),true)

By default, host builds use clang for better warnings.

ART_HOST_CLANG := false
endif

step2:
sudo apt-get install git-core gnupg flex bison gperf build-essentialzip curl zlib1g-dev gcc-multilib g+±multilib libc6-dev-i386lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip m4 && sudo apt-get update

step3:
continue to compile without “clean”

1 Like

Follow the steps above, android build passed.
log is here: https://share.weiyun.com/5s8sGja.
the update.img was downloaded pass but vim1 board boot without display, no UART log output so I am not sure if it boot up successfully or not.
the image is shown in below picture.

them i download back the image provided by khadas(android marshmallow), boot up successfully with normal display.

Did the VIM can display the first logo Khadas with yourself ROM? How did you build uboot? BTW, you need to check the UART port and give the printing log for me. Thanks!

1: no static log “khadas”
2: I got boot up successfully and boot up fail uart log.
pass log:https://share.weiyun.com/58PcSoD
fail log:https://share.weiyun.com/5o4mFcj

3:

You can try to modify the uboot source code following this

diff --git a/board/khadas/configs/kvim.h b/board/khadas/configs/kvim.h
index 8f7a3e4..bafc4b6 100644
--- a/board/khadas/configs/kvim.h
+++ b/board/khadas/configs/kvim.h
@@ -76,6 +76,7 @@
         "loadaddr=1080000\0"\
         "outputmode=1080p60hz\0" \
         "hdmimode=1080p60hz\0" \
+        "cvbsmode=576cvbs\0" \
         "display_width=1920\0" \
         "display_height=1080\0" \
         "display_bpp=16\0" \
@@ -97,6 +98,7 @@
         "EnableSelinux=disabled\0"\
         "recovery_part=recovery\0"\
         "recovery_offset=0\0"\
+        "cvbs_drv=0\0"\
         "initargs="\
              "rootfstype=ramfs init=/init console=ttyS0,115200 no_console_suspend earlyprintk=aml-ua
             "\0"\
@@ -304,7 +306,7 @@
 #define CONFIG_CMD_BMP 1
 
 #if defined(CONFIG_AML_VOUT)
-#undef CONFIG_AML_CVBS
+#define CONFIG_AML_CVBS
 #endif
 
 /* USB
diff --git a/common/cmd_hdmitx.c b/common/cmd_hdmitx.c
index 5ca80f3..f8e11eb 100644
--- a/common/cmd_hdmitx.c
+++ b/common/cmd_hdmitx.c
@@ -35,12 +35,12 @@ static int do_hpd_detect(cmd_tbl_t *cmdtp, int flag, int argc,
 
        if (st) {
                setenv("outputmode", getenv("hdmimode"));
-       #ifdef CONFIG_AML_CVBS
        } else {
+               #ifdef CONFIG_AML_CVBS
                setenv("outputmode", getenv("cvbsmode"));
-       #endif
-       } else {
+               #else
                setenv("outputmode", "1080p60hz");
+               #endif
        }
        return st;
 }

BTW, you need to build update image again.

$ cd PATH_YOUR_PROJECT
$ cd uboot
$ make distclean
$ make CROSS_COMPILE=aarch64-linux-gnu- kvim_defconfig
$ make CROSS_COMPILE=aarch64-linux-gnu-
$ cd PATH_YOUR_PROJECT
$ source build/envsetup.sh
$ lunch 9
$ make otapackage

follow your rule. it works. thanks, Terry.
BTW, I need to enable EMMC debug feature and print communicate information of system and EMMC in UART log. how should I do?

Why do you want to enable EMMC debug feature? What information do you want to see?

I will perform intensely test on my company Emmc.
suppose there should be a lot of errors will happen.
I need to do initial FA before demounting it from board.

Hi Terry
I encountered the similar issue as the title described.
I modified some files base on previous code.
Please help check if something wrong, thanks a lot.
Attach the boot up fail uart log.链接:https://share.weiyun.com/5ktPo6l

— a/arch/arm/boot/dts/amlogic/meson8m2_n200_2G.dts
+++ b/arch/arm/boot/dts/amlogic/meson8m2_n200_2G.dts
@@ -1,4 +1,4 @@
-/dts-v1/;
+hs2/dts-v1/;
#include “meson8.dtsi”
#include <dt-bindings/clock/meson8.h>
#include <dt-bindings/reset/aml_meson8m2_gate.h>
@@ -435,8 +435,8 @@ sdio{
ocr_avail = <0x00200080>; // 3.3:0x200000, 1.8+3.3:0x00200080
caps = “MMC_CAP_8_BIT_DATA”,“MMC_CAP_MMC_HIGHSPEED”,“MMC_CAP_SD_HIGHSPEED”, “MMC_CAP_NONREMOVABLE”,“MMC_CAP_ERASE”, “MMC_CAP_HW_RESET”; // MMC_CAP_NEEDS_POLL – for detect, MMC_CAP_NONREMOVABLE – for eMMC/TSD
caps2 = “MMC_CAP2_HS200_1_8V_SDR”;

  •           f_min = <300000>;
    
  •        f_max = <100000000>;
    
  •       f_min = <300000>;
    
  •        f_max = <200000000>; /*change to 200M from 100M */
           max_req_size = <0x20000>;          /**128KB*/
           gpio_dat3 =  <&gpio       BOOT_3       GPIO_ACTIVE_HIGH>;
           card_type = <1>; /* 0:unknown, 1:mmc card(include eMMC), 2:sd card(include tSD), 3:sdio device(ie:sdio-wifi), 4:SD combo (IO+mem) card, 5:NON sdio device(means sd/mmc card), other:reserved */
    

diff --git a/arch/arm64/boot/dts/amlogic/kvim.dts b/arch/arm64/boot/dts/amlogic/kvim.dts
index 15682dd…bba6d55 100644
— a/arch/arm64/boot/dts/amlogic/kvim.dts
+++ b/arch/arm64/boot/dts/amlogic/kvim.dts
@@ -443,7 +443,7 @@
“MMC_CAP_HW_RESET”, “MMC_CAP_ERASE”, “MMC_CAP_CMD23”;
caps2 = “MMC_CAP2_HS200”, “MMC_CAP2_HS400”;
f_min = <300000>;

  •        f_max = <100000000>;
    
  •        f_max = <200000000>; /*change to 200M from 100M*/
           max_req_size = <0x20000>;          /**256KB*/
              gpio_dat3 = <&gpio       BOOT_3      GPIO_ACTIVE_HIGH>;
              hw_reset =  <&gpio       BOOT_9      GPIO_ACTIVE_HIGH>;
    

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 7959dd0…fa308c3 100644
— a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -97,7 +97,7 @@ CONFIG_NLS_ISO8859_1=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_KERNEL=y
-# CONFIG_SCHED_DEBUG is not set
+CONFIG_SCHED_DEBUG=y
CONFIG_DEBUG_INFO=y

CONFIG_FTRACE is not set

CONFIG_ATOMIC64_SELFTEST=y
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index f68b9b9…5f6fd36 100644
— a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -63,7 +63,7 @@ extern void printascii(char *);

/* We show everything that is MORE important than this… /
#define MINIMUM_CONSOLE_LOGLEVEL 1 /
Minimum loglevel we let people use /
-#define DEFAULT_CONSOLE_LOGLEVEL 7 /
anything MORE serious than KERN_DEBUG /
+#define DEFAULT_CONSOLE_LOGLEVEL 8 /
anything MORE serious than KERN_DEBUG,change to 8 from 7 @2018/07/25, shenzhen*/

int __nosavedata console_printk[4] = {
DEFAULT_CONSOLE_LOGLEVEL, /* console_loglevel */
(END)

case closed, the issue has workaround to be resolved.