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 F4077C433EF for ; Thu, 21 Oct 2021 06:05:12 +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 0393D6112D for ; Thu, 21 Oct 2021 06:05:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0393D6112D 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 1mdRBv-0001sZ-8b; Thu, 21 Oct 2021 02:04:39 -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 1mdR7z-0008Fj-OC for kernelnewbies@kernelnewbies.org; Thu, 21 Oct 2021 02:00:36 -0400 Received: from unknown (HELO send002-relay.gov-dooray.com) (211.180.235.153) by 129.254.9.16 with ESMTP; 21 Oct 2021 15:00:27 +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 ecb2b1b7617101fb; Thu, 21 Oct 2021 15:00:27 +0900 DKIM-Signature: a=rsa-sha256; b=T7Yd/f/PcjSokY5ta8XzOC9taG1AVZUcZjVpfxzd56GwVPMcES2m+ZaajWvr+S2CAxlV4OoVI8 a7eMHMt6CTVrYYTQfU63f7KfylcVsIJfPTNX5fu23RhGuwMWJTOPYOYgqhxhHkcmCv0OLphy58It +uFhvOWFs23YdWpSaOIbQfZmrZuGe/8K/2VfvOYyxtBDOq2pyvRCDzA9Np8qapr5CN2kc42kjadW i2ctd0elenPpYlTqZAxleSbDCOooDzNWwngQ0SxY818F0FLuuyN0m7JRFX1EpGrcLN6YdNvaMcq5 trlFN6UvMqrsIWe3eKcicqsLhtqnFX6vW+zUQFkg==; c=relaxed/relaxed; s=selector; d=dooray.com; v=1; bh=knwAfZGBJQJDvnkVJQyEvAGeDrUCfRSMSYlQ7/O6xZc=; 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 beadf9eb617101fb; Thu, 21 Oct 2021 15:00:27 +0900 From: "Chan Kim" To: Subject: What does LOADADDR=0x20008000 mean in linux kernel make command? and what is kernel load address? Date: Thu, 21 Oct 2021 15:00:26 +0900 Message-ID: <040c01d7c640$f1f634d0$d5e29e70$@etri.re.kr> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AdfGQO4VcWuyJBs5SJGkEuZNG7MNnw== Content-Language: ko 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="===============1341893816934702421==" Errors-To: kernelnewbies-bounces@kernelnewbies.org This is a multipart message in MIME format. --===============1341893816934702421== Content-Type: multipart/alternative; boundary="----=_NextPart_000_040D_01D7C68C.61DEA020" Content-Language: ko This is a multipart message in MIME format. ------=_NextPart_000_040D_01D7C68C.61DEA020 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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_040D_01D7C68C.61DEA020 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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 what’s = happening here, I would really really appreciate it. =

Thank = you.

Best = regards,

Chan Kim

 

 

------=_NextPart_000_040D_01D7C68C.61DEA020-- --===============1341893816934702421== 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 --===============1341893816934702421==--