foss-for-synopsys-dwc-arc-processors / linux

Helpful resources for users & developers of Linux kernel for ARC
22 stars 13 forks source link

Init Seqeunce #26

Closed TaikunZhang closed 3 years ago

TaikunZhang commented 4 years ago

Running into this issue after building linux image using buildroot...

[ 0.295944][ T1] Run /init as init process [ 0.295969][ T1] with arguments: [ 0.295987][ T1] /init [ 0.296002][ T1] with environment: [ 0.296020][ T1] HOME=/ [ 0.296036][ T1] TERM=linux [ 0.296386][ T1] Failed to execute /init (error -14) [ 0.296418][ T1] Run /sbin/init as init process [ 0.296573][ T1] with arguments: [ 0.296595][ T1] /sbin/init [ 0.296611][ T1] with environment: [ 0.296629][ T1] HOME=/ [ 0.296644][ T1] TERM=linux [ 0.296715][ T1] Starting init: /sbin/init exists but couldn't execute it (error -14) [ 0.296744][ T1] Run /etc/init as init process [ 0.296764][ T1] with arguments: [ 0.296781][ T1] /etc/init [ 0.296797][ T1] with environment: [ 0.296814][ T1] HOME=/ [ 0.296829][ T1] TERM=linux [ 0.296868][ T1] Run /bin/init as init process [ 0.296890][ T1] with arguments: [ 0.296908][ T1] /bin/init [ 0.296924][ T1] with environment: [ 0.296943][ T1] HOME=/ [ 0.296960][ T1] TERM=linux [ 0.296998][ T1] Run /bin/sh as init process [ 0.297021][ T1] with arguments: [ 0.297038][ T1] /bin/sh [ 0.297054][ T1] with environment: [ 0.297071][ T1] HOME=/ [ 0.297087][ T1] TERM=linux [ 0.297140][ T1] Starting init: /bin/sh exists but couldn't execute it (error -14) [ 0.297173][ T1] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance. [ 0.297234][ T1] ---[ end Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance. ]---

vineetgarc commented 4 years ago

We need more info on toolchain, kernel, and what config it is to know whats the issue

TaikunZhang commented 4 years ago

Version: Linux-5.6.3 Config: snps_archs38_haps_defconfig

How would I be able to find info on the toolchain?

vineetgarc commented 4 years ago

what version of buildroot ?

TaikunZhang commented 4 years ago

I just cloned the latest version today. Followed the instructions here but used my own tcf file for the sim.

https://github.com/foss-for-synopsys-dwc-arc-processors/linux/wiki/How-to-build-filesystem-and-kernel-images-for-ARC-cores-with-Buildroot

vineetgarc commented 4 years ago

and what simulator is this ? Please provide full boot log too

TaikunZhang commented 4 years ago

nsim_log.txt Using nsimdrv version 2019.09.01

vineetgarc commented 4 years ago

Is this free nSIM, im not sure if nsimdrv supports SMP. You have a SMP image which uses ARConnect IDU to connect uart interrupt. Can u upload your kernel image here

ncesser commented 4 years ago

nsimdrv does not support SMP.

TaikunZhang commented 4 years ago

I am not using the free version. Also I am unable to upload my vmlinux but I jsut followed the instructions from the link from this wiki.

TaikunZhang commented 4 years ago

How would I be able to build a linux kernel that can be supported by nsimdrv then?

ncesser commented 4 years ago

nsimdrv (free or otherwise) just doesn't support SMP at all. @vineetgarc can probably comment better on how to build Linux kernel for use with nsimdrv, but the Wiki suggests that you need to configure for a particular board and lists two board configurations suitable for nSIM (one for ARC 770, one for ARC HS38).

TaikunZhang commented 4 years ago

Yes that was what I followed however once I changed the config like it says in the wiki $ gvim configs/snps_archs38_haps_defconfig change BR2_LINUX_KERNEL_DEFCONFIG="nsim_hs"

I receieve this error while making the image; Can't find default configuration "arch/arc/configs/nsim_hs_defconfig"!

TaikunZhang commented 4 years ago

The current one I am using is the one the wiki explains without the modifications.

vineetgarc commented 4 years ago

Perhaps the wiki needs updating, we've renamed the kernel defconfigs from nsim_hs to haps_hs so you can select haps_hs and give it a try ! OTOH we don't know what options you are using with nsim drv so if that doesn't work you need to share those with us.

BTW just curious, what exactly is your project. Are you an ARC licensee, or a student or open source enthusiast ? You can email us directly (vgupta@synopsys.com) if you don't want to discuss that publicly.

TaikunZhang commented 4 years ago

I sent an email. Thanks

vineetgarc commented 3 years ago

@TaikunZhang Is there anything else we need to do for this issue - if not lets close this !