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 A542BC32771 for ; Fri, 19 Aug 2022 11:51:25 +0000 (UTC) Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.95) (envelope-from ) id 1oP0Wr-0003hv-Vz; Fri, 19 Aug 2022 07:51:10 -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 1oP0Wp-0003gy-0S for kernelnewbies@kernelnewbies.org; Fri, 19 Aug 2022 07:51:07 -0400 Received: from unknown (HELO send002-relay.gov-dooray.com) (211.180.235.153) by 129.254.9.16 with ESMTP; 19 Aug 2022 20:51:01 +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 1372b10f62ff7924; Fri, 19 Aug 2022 20:51:00 +0900 DKIM-Signature: a=rsa-sha256; b=AmYfBu43njik8aAAb3aliRlWxekO9xa5uoQRl9ZzCBaV5zsV5XY2ndl8nqxoqQnQWt+tj/T6Eh nxaYf1QstA06JqzRhE5R+SDmueAsxh8Nkzxh9fTHAF2zmOwOw5VwlOD0mYr97ovFt2wqOHMWCR7e KFWGv6ieVLo1hXJayERhlbwjdKgPjgNSnKSFU/u1C3DE8zPsedM6mzbHqqNhLPwGdvpFnkGUCr7o iOsDXl5WvecbcMdYt4O0zacQDxZBY/Fo7mFQ8BNyWu8Gtd1uB7RdO8tPYbr6fLrUYW9rlza8HyaC x63QHZaUeWZzVBmjXOZYMiAI4pOoNpoZQ3fa8XRw==; c=relaxed/relaxed; s=selector; d=dooray.com; v=1; bh=2ZOJYzIQnVHYa9WuWx3MlnSiyaihAh2kVqeTNqy7deo=; 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 f959f09462ff7924; Fri, 19 Aug 2022 20:51:00 +0900 From: "Chan Kim" To: References: <03db01d8ae26$07e35980$17aa0c80$@etri.re.kr> <060e01d8b2c2$0e319680$2a94c380$@etri.re.kr> <063501d8b2c8$1381b2e0$3a8518a0$@etri.re.kr> In-Reply-To: <063501d8b2c8$1381b2e0$3a8518a0$@etri.re.kr> Subject: RE: busybox shell doesn't come up or get stuck.. where should I look or how should I debug it? Date: Fri, 19 Aug 2022 20:50:58 +0900 Message-ID: <074001d8b3c1$f2e343f0$d8a9cbd0$@etri.re.kr> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Content-Language: ko Thread-Index: AQH56dwG32iNkvdzSZPNV4qwNP9iIAD/JTsgAxwBOBatUtO+MA== 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="===============1124538410219019842==" Errors-To: kernelnewbies-bounces@kernelnewbies.org This is a multipart message in MIME format. --===============1124538410219019842== Content-Type: multipart/alternative; boundary="----=_NextPart_000_0741_01D8B40D.62CC2470" Content-Language: ko This is a multipart message in MIME format. ------=_NextPart_000_0741_01D8B40D.62CC2470 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, all, I set a variable to true just before calling the ramdisk_exeucte_cmd (which is /init in this case) in the kernel_init function, And added printk in schedule() function so that it prints something it is called and when the previous variable is true. And found the program stops after the schedule function is called. Like this. Hello! i=115 Hello! i=116 Helloschedule! schedule! I checked the timer interrupt number was given correctly in the device tree (that's why schedule was called by the timer..). I stopped the experiment to do something else but will resume it next week by adding some prints. If anyone has any idea about what might be wrong, please tell me. Thanks for reading. Chan Kim From: Chan Kim Sent: Thursday, August 18, 2022 3:02 PM To: kernelnewbies@kernelnewbies.org Subject: RE: busybox shell doesn't come up or get stuck.. where should I look or how should I debug it? I had mistakenly omitted '-static' option when making init program.(repeated Hello! Print). So now the board output looks like this. (...) ### point 106-1 Run /init as init process ### point 106-2, ret = 0 Hello! i=0 Hello! i=1 Hello! i=2 ... Hello! i=115 Hello! i=116 Hello! i=117 He <=== hangs. So the running the 'init' program (whether it's a script or a binary program) is ok. The binary 'init' program stops after printing Hello 117 times so there seems to be more basic problem in H/W or device tree. And when the init script ran 'exec /bin/sh', the shell didn't start so 'running exec inside a script' can have a problem. If anyone has a suggestion or advice, I welcome it. Thank you! Chan Kim ------=_NextPart_000_0741_01D8B40D.62CC2470 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 set a variable = to true just before calling the ramdisk_exeucte_cmd (which is /init in = this case) in the kernel_init function,

And added printk = in schedule() function so that it prints something it is called and when = the previous variable is true.

And found the = program stops after the schedule function is called. Like = this.

 

Hello! = i=3D115

Hello! = i=3D116

Helloschedule!

schedule!

 

I checked the = timer interrupt number was given correctly in the device tree = (that’s why schedule was called by the = timer..).

I stopped the = experiment to do something else but will resume it next week by adding = some prints.

If anyone has any = idea about what might be wrong, please tell me.

Thanks for = reading.

 

Chan = Kim

From: Chan Kim = <ckim@etri.re.kr>
Sent: Thursday, August 18, 2022 3:02 = PM
To: kernelnewbies@kernelnewbies.org
Subject: RE: = busybox shell doesn't come up or get stuck.. where should I look or how = should I debug it?

 

I had mistakenly = omitted -static option when making init program.(repeated Hello! = Print).

So now the board = output looks like this.

(...)

### point 106-1

Run /init as init process

### point 106-2, ret =3D 0

Hello! i=3D0

Hello! i=3D1

Hello! i=3D2

...

Hello! i=3D115

Hello! i=3D116

Hello! i=3D117

He          &n= bsp; <=3D=3D=3D hangs.

So the running = the init = program (whether its a script or a = binary program) is ok.

The binary = init = program stops after printing Hello 117 times so there seems to be more = basic problem in H/W or device tree.  And when the init script ran = exec /bin/sh, the shell didnt start so = running exec inside a = script can have a problem. =

If anyone has a = suggestion or advice, I welcome it.

 

Thank = you!

Chan = Kim

 

------=_NextPart_000_0741_01D8B40D.62CC2470-- --===============1124538410219019842== 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 --===============1124538410219019842==--