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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D21F1C433F5 for ; Wed, 27 Oct 2021 09:56:47 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5666761052 for ; Wed, 27 Oct 2021 09:56:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5666761052 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=etri.re.kr Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1mfffq-0008Q2-Dq for kernelnewbies@archiver.kernel.org; Wed, 27 Oct 2021 05:56:46 -0400 Received: from mscreen.etri.re.kr ([129.254.9.16]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (Exim 4.94.2) (envelope-from ) id 1mffdP-0005Ze-H0 for kernelnewbies@kernelnewbies.org; Wed, 27 Oct 2021 05:54:16 -0400 Received: from unknown (HELO send002-relay.gov-dooray.com) (211.180.235.153) by 129.254.9.16 with ESMTP; 27 Oct 2021 18:54:11 +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.112] (HELO smtp002-imp.gov-dooray.com) ([10.162.225.112]) by send002-relay.gov-dooray.com with SMTP id 99fad45a617921c3; Wed, 27 Oct 2021 18:54:11 +0900 DKIM-Signature: a=rsa-sha256; b=HGzto85/WruwiScnHu+ORGCzZ30/6dqqr/c9rJz0Y9L5+x+GbRd0w4USDeWAAidpnRjsYBmc3Z MQY5ILLchT0yecVsPNq7hYqlcSvgr2OlWgy4AmcF4pYJ7pmo74m+QxaRYbNUNsuzhXirnlnSHYF5 qDVWzOUKHUnSF/0DKMLz1rmn56ywRmx043uRM5VMIXFpjwhwIde8FZOzl3fun8maD98fTIiDzm/A ZAu3K9jrCP9bZCQmH5aDg0T7wXVShzt6fOaNZ4/Y8n70RnPQ9x1uNnCucOt62Sjgvr1HB0Ce7BNU kFOUr6guDNZMiCtty0/JIxA2x7bBe6ziPZTmlR4w==; c=relaxed/relaxed; s=selector; d=dooray.com; v=1; bh=HOgT1dTC2Wh42+F9lgM8wzDPwzHjP2IHG1sxfo/+4SA=; h=From:To:Subject:Message-ID; Received: from [129.254.132.39] (HELO CHANKIMPC) ([129.254.132.39]) by smtp002-imp.gov-dooray.com with SMTP id d51520dd617921c3; Wed, 27 Oct 2021 18:54:11 +0900 From: "Chan Kim" To: References: <040c01d7c640$f1f634d0$d5e29e70$@etri.re.kr> In-Reply-To: <040c01d7c640$f1f634d0$d5e29e70$@etri.re.kr> Subject: RE: What does LOADADDR=0x20008000 mean in linux kernel make command? and what is kernel load address? Date: Wed, 27 Oct 2021 18:54:10 +0900 Message-ID: <00d501d7cb18$97244830$c56cd890$@etri.re.kr> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Content-Language: ko Thread-Index: AQIo3DgcKug8dOwl+bvrwK/UmE6IL6tEeEEA 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="===============1206823426036809185==" Errors-To: kernelnewbies-bounces+kernelnewbies=archiver.kernel.org@kernelnewbies.org This is a multipart message in MIME format. --===============1206823426036809185== Content-Type: multipart/alternative; boundary="----=_NextPart_000_00D6_01D7CB64.070C6560" Content-Language: ko This is a multipart message in MIME format. ------=_NextPart_000_00D6_01D7CB64.070C6560 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello, For anyone's help.. I asked this question to unix stackexchage and received an answer. https://unix.stackexchange.com/questions/674155/what-does-loadaddr-0x2000800 0-mean-in-linux-kernel-make-command regards, Chan Kim From: Chan Kim Sent: Thursday, October 21, 2021 3:00 PM To: kernelnewbies@kernelnewbies.org Subject: What does LOADADDR=0x20008000 mean in linux kernel make command? and what is kernel load address? Hello all, I'm learning u-boot these days and have a question. Using qemu model, I could (using qemu) load the "Image" (for arm64) on memory location I want and I could run the kernel booting using `booti ker_add initrd_addr dtb_addr` command. As you know in arm64, the uImage format is not supported. Then, when building linux kernel for arm (32 bit) using u-boot, what does "make LOADADDR=0x20008000 uImage" mean? Regardless of this LOADADDR, we can load (from SD card or network) the uImage anywhere we want using u-boot shell. Then what is this LOADADDR? Does it mean that when we run `bootm` command, the u-boot program relocates the kernel image inside the uImage to 0x20008000? (and the kernel built not using position independent, PC-relative addressing..using hard absolute addresses..) Some years ago, we used kernel start address during the build and I had to load the kernel image exactly on that address. But this time I could load 'Image' anywhere I want and could run it. Why? Is it because I (not knowingly) compiled the arm64 'Image' using position independent address(-PIE option)? If someone with expertise could explain to me what's happening here, I would really really appreciate it. Thank you. Best regards, Chan Kim ------=_NextPart_000_00D6_01D7CB64.070C6560 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello,

For anyone’s = help..

I = asked this question to unix stackexchage and received an = answer.

https://unix.stackexchang= e.com/questions/674155/what-does-loadaddr-0x20008000-mean-in-linux-kernel= -make-command

regards,

Chan Kim

 

From:<= /b> Chan Kim = <ckim@etri.re.kr>
Sent: Thursday, October 21, 2021 3:00 = PM
To: kernelnewbies@kernelnewbies.org
Subject: What = does LOADADDR=3D0x20008000 mean in linux kernel make command? and what = is kernel load address?

 

Hello all,

I'm learning u-boot these days and have a = question.

Using qemu model, I could (using qemu) load the = Image = (for arm64) on memory location I want and I could run the kernel booting = using `booti ker_add initrd_addr dtb_addr` command. =

As you = know in arm64, the uImage format is not = supported.

Then, when building linux kernel for arm (32 bit) using = u-boot, what does make = LOADADDR=3D0x20008000 uImage mean? =

Regardless = of this LOADADDR, we can load (from SD card or network) the uImage = anywhere we want using u-boot shell. Then what is this = LOADADDR?

Does it mean that when we run `bootm` command, the u-boot = program relocates the kernel image inside the uImage to 0x20008000? =

(and the = kernel built not using position independent, PC-relative = addressing..using hard absolute addresses..)

Some years ago, we used kernel = start address during the build and I had to load the kernel image = exactly on that address. But this time I could load Image anywhere I want and = could run it. Why?

Is it because I (not knowingly) compiled the arm64 = Image = using position independent address(-PIE option)?

If someone with expertise could = explain to me whats happening here, I = would really really appreciate it.

Thank you.

Best = regards,

Chan Kim

 

 

------=_NextPart_000_00D6_01D7CB64.070C6560-- --===============1206823426036809185== 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 --===============1206823426036809185==--