[SOLVED] DragonBoard 410c linaro kernerl v4.14

Hi,

I’d like to ask how to get the linaro kernel source if it is possible.

I found the prebuilt images at the link below, and those images can provides a successful booting up process on my dragonboard 410c.
http://snapshots.linaro.org/96boards/dragonboard410c/linaro/aosp-master/latest/

Based on the linaro_android_build_cmds.sh inside, the AOSP is available so I can generate the workable system.img, vendor.img, and userdata.img by myself. However, there is no db410c-kernel/ folder in the downloaded package.

I had to follow the instructions at Building Android Open Source Project (AOSP) for Dragonboard - 96Boards to download the kernel source code for 410c. The git repo being used is http://git.linaro.org/landing-teams/working/qualcomm/kernel/.
Unfortunately, my built boot.img can not perform the same result as linaro’s prebuilt boot.img did (linaro’s boot image + my built system.img can work). I did follow the instructions to checkout the release/android/qcomlt-4.14 branch and change the deconfig inside, but it still didn’t work. The kernel crashed intermediately. The log is attached below for the information.

How can I get the kernel 4.14 for dragonboard 410c as well as the proper deconfig?
Thank you.


[ 4.020850] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 4.020875] [drm] Driver supports precise vblank timestamp query.
[ 4.027111] [drm] Initialized msm 1.2.0 20130625 for 1a00000.mdss on minor 0
[ 4.034806] [drm] Cannot find any crtc or sizes
[ 4.040847] input: gpio_keys as /devices/platform/gpio_keys/input/input2
[ 4.044416] rtc-pm8xxx 200f000.spmi:pm8916@0:rtc@6000: setting system clock to 1970-01-01 01:57:10 UTC (7030)
[ 4.051327] ALSA device list:▒[ 4.066136] Freeing unused kernel memory: 3136K
[ 4.072323] init: init first stage started!
[ 4.072822] init: [libfs_mgr]ReadFstabFromDt(): failed to read fstab from dt
[ 4.075756] init: [libfs_mgr]ReadDefaultFstab(): failed to find device default fstab
[ 4.082651] init: Failed to fstab for first stage mount
[ 4.090469] init: Using Android DT directory /proc/device-tree/firmware/android/
[ 4.095900] init: [libfs_mgr]ReadDefaultFstab(): failed to find device default fstab
[ 4.098352] usb 1-1: New USB device found, idVendor=0424, idProduct=2513
[ 4.098360] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 4.099181] hub 1-1:1.0: USB hub found
[ 4.099379] hub 1-1:1.0: 3 ports detected
[ 4.128189] init: First stage mount skipped (missing/incompatible/empty fstab in device tree)
[ 4.132210] init: Skipped setting INIT_AVB_VERSION (not in recovery mode)
[ 4.140731] init: execv("/system/bin/init") failed: No such file or directory
[ 4.205957] init: #00 pc 000b0180 /init (UnwindStackCurrent::UnwindFromContext(unsigned int, void*)+88)
[ 4.206028] init: #01 pc 00054f0f /init (android::init::InitFatalReboot()+54)
[ 4.214557] init: #02 pc 00056963 /init (android::init::InitAborter(char const*)+22)
[ 4.221576] init: #03 pc 0007d73f /init (android::base::LogMessage::~LogMessage()+406)
[ 4.229475] init: #04 pc 0004f853 /init (android::init::FirstStageMain(int, char**)+3538)
[ 4.237287] init: #05 pc 000f5413 /init (__real_libc_init(void*, void ()(), int ()(int, char**, char**), structors_array_t const*, bionic_tcb*)+386)
[ 4.245622] init: #06 pc 000f528b /init (__libc_init+38)
[ 4.259066] init: #07 pc 0004c02d /init (_start_main+32)
[ 4.264612] init: Reboot ending, jumping to kernel
[ 4.270239] remoteproc remoteproc0: powering up a204000.wcnss
[ 4.274769] remoteproc remoteproc0: Direct firmware load for wcnss.mdt failed with error -2
[ 4.280510] remoteproc remoteproc0: Falling back to user helper
[ 4.288705] ------------[ cut here ]------------
[ 4.294543] WARNING: CPU: 0 PID: 1529 at drivers/base/firmware_class.c:1092 _request_firmware+0x60c/0x768
[ 4.299398] Modules linked in:
[ 4.308855] CPU: 0 PID: 1529 Comm: kworker/0:4 Not tainted 4.14.61-dirty #1
[ 4.311808] Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT)
[ 4.318673] Workqueue: events request_firmware_work_func
[ 4.325609] task: ffff80003d4ae580 task.stack: ffff00000c860000
[ 4.330905] PC is at _request_firmware+0x60c/0x768
[ 4.336547] LR is at _request_firmware+0x604/0x768
[ 4.341407] pc : [] lr : [] pstate: 20400005
[ 4.346183] sp : ffff00000c863c20
[ 4.353730] x29: ffff00000c863c20 x28: 00000000fffffff5
[ 4.356944] x27: ffff000009596000 x26: ffff000008e1bee8
[ 4.362326] x25: ffff80003c585838 x24: 0000000000000005
[ 4.367621] x23: 00000000000000fa x22: ffff00000c863d60
[ 4.372916] x21: ffff80003c075800 x20: ffff00000951a000
[ 4.378211] x19: ffff80003d089280 x18: ffff00000951af88
[ 4.383506] x17: 0000000000000000 x16: 0000000000000000
[ 4.388802] x15: ffff00008966054f x14: 0000000000000006
[ 4.394096] x13: ffff00000966055d x12: ffff00000953e6e0
[ 4.399392] x11: ffff00000953e000 x10: 0000000005f5e0ff
[ 4.404687] x9 : ffff00000c863830 x8 : 6c65682072657375
[ 4.409982] x7 : ffff000008400b80 x6 : 00000000000001c4
[ 4.415277] x5 : 0000000000000000 x4 : 0000000000000000
[ 4.420572] x3 : ffff00000953ab78 x2 : 7403634da9586600
[ 4.425867] x1 : 0000000000000000 x0 : 00000000fffffff5
[ 4.431163] Call trace:
[ 4.436457] Exception stack(0xffff00000c863ae0 to 0xffff00000c863c20)
[ 4.438635] 3ae0: 00000000fffffff5 0000000000000000 7403634da9586600 ffff00000953ab78
[ 4.445233] 3b00: 0000000000000000 0000000000000000 00000000000001c4 ffff000008400b80
[ 4.453046] 3b20: 6c65682072657375 ffff00000c863830 0000000005f5e0ff ffff00000953e000
[ 4.460857] 3b40: ffff00000953e6e0 ffff00000966055d 0000000000000006 ffff00008966054f
[ 4.468670] 3b60: 0000000000000000 0000000000000000 ffff00000951af88 ffff80003d089280
[ 4.476483] 3b80: ffff00000951a000 ffff80003c075800 ffff00000c863d60 00000000000000fa
[ 4.484296] 3ba0: 0000000000000005 ffff80003c585838 ffff000008e1bee8 ffff000009596000
[ 4.492108] 3bc0: 00000000fffffff5 ffff00000c863c20 ffff0000086a3114 ffff00000c863c20
[ 4.499920] 3be0: ffff0000086a311c 0000000020400005 0000000000000000 ffff80003d4ae580
[ 4.507733] 3c00: ffffffffffffffff ffff00000c863c08 ffff00000c863c20 ffff0000086a311c
[ 4.515545] [] _request_firmware+0x60c/0x768
[ 4.523354] [] request_firmware+0x40/0x60
[ 4.529085] [] rproc_boot+0x124/0x440
[ 4.534553] [] rproc_auto_boot_callback+0x18/0x30
[ 4.539761] [] request_firmware_work_func+0x48/0x88
[ 4.546014] [] process_one_work+0x134/0x330
[ 4.552609] [] worker_thread+0x130/0x468
[ 4.558337] [] kthread+0xfc/0x128
[ 4.563719] [] ret_from_fork+0x10/0x18
[ 4.568490] —[ end trace 08eb1d549202ef51 ]—
[ 4.574092] remoteproc remoteproc0: firmware: wcnss.mdt will not be loaded
[ 4.578685] remoteproc remoteproc0: request_firmware failed: -11
[ 4.587245] reboot: Restarting system with command ‘bootloader’

Regards and Thanks
Ian

1 Like

Hi Ian

The exact details of how the binary kernels were built is in the version history for the dragonboard410c-kernel repo. See this commit:
https://android-git.linaro.org/device/linaro/dragonboard410c-kernel.git/commit/?h=dragonboard-kernels&id=cc94efb4e5a1c2e09aa2b1aa1ce60d8abf826843

Note that unfortunately there is a typo in the commit message (should be db410c-qcomlt-4.14_defconfig).

Hi danielt
Appreciate your help and the information so much.

I have a stupid question, how can I get the db410c-qcomlt-4.14_defconfig?

In fact, I had tried to make the deconfig and build the required Image.gz and apq8016-sbc.dtb based on the below steps. But, I still can NOT boot up the 410c kernel successfully.

  1. Clone the linaro source from the given repo
  2. Setup the toolchain.
    • export CROSS_COMPILE=gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
  3. Make kernel config (deconfig)
    • cd linaro-kernel/kernel/configs/
    • ./android-fetch-configs.sh
    • make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- qcom_defconfig android-recommended.config android-recommended-arm64.config android-base.config
  4. Then, build the kernel
    • make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j4
  5. At the end of a successful building, generate the db410c-qcomlt-4.14.gz-dtb
    • cat arch/arm64/boot/Image.gz arch/arm64/boot/dts/qcom/apq8016-sbc.dtb > db410c-qcomlt-4.14.gz-dtb
  6. Copy the db410c-qcomlt-4.14.gz-dtb to AOSP/device/linaro/dragonboard-kernels/, and then generate the bootimage only
    • make -j4 bootimage

I could have the positive result with the similar steps (except the deconfig generation) while I used the hikey620 device. Therefore, I’m wondering whether any things is wrong in my steps.

Any advice and suggestions will be greatly appreciated.

Regards and Thanks
Ian

Strange.

If the binary kernel works for you then I think you can extract the compiler version used to build it (early lines in dmesg) and the configuration (/proc/config.gz) from the running kernel.

Hi Danielt

Truly appreciate your advice and support.
After replacing the deconfig with db410c-qcomlt-4.14_defconfig, my 410c board can boot up successfully:)

Thank you so much.
Ian