From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5DE88C00140 for ; Fri, 12 Aug 2022 08:34:52 +0000 (UTC) Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.95) (envelope-from ) id 1oMQ80-0007Fv-MP for kernelnewbies@archiver.kernel.org; Fri, 12 Aug 2022 04:34:48 -0400 Received: from mscreen.etri.re.kr ([129.254.9.16]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA (Exim 4.95) (envelope-from ) id 1oMQ5g-0002lt-6V for kernelnewbies@kernelnewbies.org; Fri, 12 Aug 2022 04:32:24 -0400 Received: from unknown (HELO send002-relay.gov-dooray.com) (211.180.235.153) by 129.254.9.16 with ESMTP; 12 Aug 2022 17:32:18 +0900 X-Original-SENDERIP: 211.180.235.153 X-Original-MAILFROM: ckim@etri.re.kr X-Original-RCPTTO: kernelnewbies@kernelnewbies.org Received: from [10.162.225.106] (HELO smtp001-imp.gov-dooray.com) ([10.162.225.106]) by send002-relay.gov-dooray.com with SMTP id 714e00d562f61012; Fri, 12 Aug 2022 17:32:18 +0900 DKIM-Signature: a=rsa-sha256; b=AVARneZUapUBvc+bTqUvpWBrXejsZ3oNvTPmWu2YY6U95ipoCnbX+P0g+EhRB0CWgsW+oF3CQw dN0zn5u26iYl9IjU2H24NDPISpLqa8jI9VyAu9TIg/jzuOkY/5XceDE15ZeLRN1FDRCQk+rHM11M ZCqAy8xZWMdUZJFQb78fiIX+LGAS3I0qqAbeakO2sR47BzL7eM5iJBz8Fh1I223JzJQNj+dg2pZU wkBrPlRtQ5Jq6KpWRjlkQ0R3MHhlBnDpnFL2lJ6JLXgln2aoQk0msrap2coV+WcDplvEY0AFckiQ W7UR2o7mTfd6giJT1asiraK8t7NIF/VD3EBIXygw==; c=relaxed/relaxed; s=selector; d=dooray.com; v=1; bh=VCL/iNs9fsz6S79e3TX8v2gYHDaU51b/P1wzjzpPBeE=; h=From:To:Subject:Message-ID; Received: from [129.254.132.39] (HELO CHANKIMPC) ([129.254.132.39]) by smtp001-imp.gov-dooray.com with SMTP id 4c7ca7b962f61011; Fri, 12 Aug 2022 17:32:17 +0900 From: "Chan Kim" To: Subject: busybox shell doesn't come up or get stuck.. where should I look or how should I debug it? Date: Fri, 12 Aug 2022 17:32:16 +0900 Message-ID: <03db01d8ae26$07e35980$17aa0c80$@etri.re.kr> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Content-Language: ko Thread-Index: AdiuJeo2wxrj9FNkSaK0BSjvi0Ar1g== X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1328569256530848184==" Errors-To: kernelnewbies-bounces+kernelnewbies=archiver.kernel.org@kernelnewbies.org This is a multipart message in MIME format. --===============1328569256530848184== Content-Type: multipart/alternative; boundary="----=_NextPart_000_03DC_01D8AE71.77CBEBE0" Content-Language: ko This is a multipart message in MIME format. ------=_NextPart_000_03DC_01D8AE71.77CBEBE0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi all, I'm trying to boot linux with minimal config on our FPGA board which is under development. After months of trying (but I tried this intermittently) I think I'm about to see the shell prompt. (there was a bug in interconnect driver that I found yesterday, this caused a long delay) Anyway, when I run linux kernel on a qemu machine, the boot process ends like this at the shell prompt. (The echo '### INIT SCRIPT ###' was put in /init script which is in the initramfs) Run /init as init process ### INIT SCRIPT ### mount: mounting none on /tmp failed: Invalid argument This boot took 2.12 seconds /bin/sh: can't access tty; job control turned off / # / # Now, when I run it on our FPGA board using u-boot, it ends like this. Run /init as init process ### INIT SCRIPT ### mount: mounting none on /tmp failed: Invalid argument This boot took 0.00 seconds /bin/sh: can't acce So it seems this init_kernel thread executes /init and /init excutes /bin/sh at the end. this is the /init script. #!/bin/sh echo "### INIT SCRIPT ###" mkdir /proc /sys /tmp mount -t proc none /proc mount -t sysfs none /sys mount -t tmpfs none /tmp echo -e "\nThis boot took $(cut -d' ' -f1 /proc/uptime) seconds\n" #ifconfig eth0 10.0.2.15 netmask 255.255.255.0 up #route add default gw 10.0.2.2 exec /bin/sh Somehow the busybox applet /bin/sh is stuck somewhere. Can anybody tell me where I should look? Or how to debug this? Thanks in advance! Chan Kim ------=_NextPart_000_03DC_01D8AE71.77CBEBE0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable busybox shell doesn't come up or get stuck.. where should I look = or how should I debug it?

Hi all,

I'm trying to boot linux with minimal = config on our FPGA = board which is under = development.

After months of trying (but I tried this intermittently) I think I'm about to = see the shell prompt.

(there was a bug in interconnect driver that I found = yesterday, this caused a long = delay)

Anyway, when I run linux kernel on a qemu machine, the boot = process ends like this at the shell prompt.

(The echo '### INIT SCRIPT ###' = was put in /init script which is in the initramfs)

    =

    Run /init as init = process

    ### INIT SCRIPT ###

    mount: mounting none on /tmp failed: = Invalid argument

    =

    This boot took 2.12 = seconds

    =

    /bin/sh: can't access tty; job control = turned off

    / #

    / #

Now, when I run it on our FPGA board using u-boot, it ends = like this.

    =

    Run /init as init = process

    ### INIT SCRIPT ###

    mount: mounting none on /tmp failed: Invalid = argument

    =

    This boot took 0.00 seconds

    =

    /bin/sh: can't acce

   

So it seems this init_kernel = thread executes /init and /init = excutes /bin/sh at the end.

this is the /init script.

    #!/bin/sh

    echo "### INIT SCRIPT ###"

    mkdir /proc /sys /tmp

    mount -t proc none /proc

    mount -t sysfs none = /sys

    mount -t tmpfs none /tmp

    echo -e "\nThis boot took $(cut -d' ' -f1 /proc/uptime) = seconds\n"

    #ifconfig eth0 10.0.2.15 netmask 255.255.255.0 up

    #route add default gw 10.0.2.2

    exec /bin/sh

Somehow the = busybox applet = /bin/sh is stuck somewhere.

Can anybody tell me where I should look? Or how to debug this?

Thanks in advance!

Chan Kim

------=_NextPart_000_03DC_01D8AE71.77CBEBE0-- --===============1328569256530848184== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============1328569256530848184==--