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 C5987C433F5 for ; Wed, 13 Oct 2021 05:44:42 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 61BB06023E for ; Wed, 13 Oct 2021 05:44:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 61BB06023E 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=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C74698332B; Wed, 13 Oct 2021 07:44:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=etri.re.kr Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=dooray.com header.i=@dooray.com header.b="FaE7QAWg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 23AB68346A; Wed, 13 Oct 2021 07:44:36 +0200 (CEST) Received: from mscreen.etri.re.kr (mscreen.etri.re.kr [129.254.9.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5B4268332B for ; Wed, 13 Oct 2021 07:44:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=etri.re.kr Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ckim@etri.re.kr Received: from unknown (HELO send002-relay.gov-dooray.com) (211.180.235.153) by 129.254.9.16 with ESMTP; 13 Oct 2021 14:44:23 +0900 X-Original-SENDERIP: 211.180.235.153 X-Original-MAILFROM: ckim@etri.re.kr X-Original-RCPTTO: u-boot@lists.denx.de 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 4bdea5ce61667237; Wed, 13 Oct 2021 14:44:23 +0900 DKIM-Signature: a=rsa-sha256; b=FaE7QAWgBdXDklsRjrIEiX5oruALpv1gsIOWVn1ag+e06lDJ2jodH74CVsMRkXqp9ceLzYE2lt nyrk1ibEdvJULRWPj/U2YPfcqyKm9EHr7F3ENlqB6ZmS4d26Z6UmFcXgNXMnj0ZgWFftlZYdNslM 7hZfO0iADRggwig/vrJQ1/qE6Y0NlUl0FUzejgL5vhKAAhbX+vuuJc+FV2D//L1HA+5XZTLGG8Xt +SjiN+6SGZn/QnFZnGYP3wl/LGkU7FTh/pzZk9vFtlwPoSmyd7g7az68BpiZdVl3Vswxa2Ajsm3x ga09tQbE3fjAA88bu8ONtxOec7Ho7QaFhQXFik9g==; c=relaxed/relaxed; s=selector; d=dooray.com; v=1; bh=lLm9TgMcYip1fqYeV6piryWzCGgIbD6fhH6Fhh7omvI=; 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 9b6bb5c561667236; Wed, 13 Oct 2021 14:44:23 +0900 From: "Chan Kim" To: Subject: please help, "Ram disk image is corrupt or invalid" (qemu virt machine, arm64) Date: Wed, 13 Oct 2021 14:44:22 +0900 Message-ID: <024601d7bff5$5fbd8e70$1f38ab50$@etri.re.kr> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: Ade/9V9GaMyfSwUEQS2Ar1slc7pJwg== Content-Language: ko Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hello all, I can boot linux kernel using this command line. ${QEMU_DIR}/qemu-system-aarch64 -M ${QMACHINE} -cpu cortex-a72 -kernel ${LINUX_DIR}/arch/arm64/boot/Image -initrd ${BUSYBOX_DIR}/initramfs.cpio.gz --append "root=/dev/ram init=/init nokaslr earlycon ip=dhcp" -m 2048M -nographic -netdev user,id=n1 -device e1000,netdev=n1 After reading some docs and getting helps, I tried u-boot. After loading Image (for arm64) and dtb.dtb, I could see the kernel booting to the final stage of deploying initramfs but it failed because I didn't give the initramfs.cpio.gz address. (I used "booti 0x40200000 - 0x40000000) So I added initramfs.cpio.gz under /opt/tftp, and loaded kernel, initramfs, and dbt on memory and gave "booti 0x40200000 0x42000000 0x40000000", addresses are kernel, initramfs and dtb). Below is the log. (please see the final error message below) ++ /home/ckim/QEMU/qemu/build/aarch64-softmmu/qemu-system-aarch64 -M virt -bios u-boot.bin -cpu cortex-a57 -bios u-boot.bin -nographic -drive if=pflash,format=raw,index=1,file=envstore.img -netdev user,id=net0,tftp=/opt/tftp -device e1000,netdev=net0 U-Boot 2021.10-00455-g50c84208ad (Oct 13 2021 - 12:58:40 +0900) DRAM: 128 MiB Flash: 64 MiB MMC: Loading Environment from Flash... *** Warning - bad CRC, using default environment In: pl011@9000000 Out: pl011@9000000 Err: pl011@9000000 Net: e1000: 52:54:00:12:34:56 eth0: e1000#0 Hit any key to stop autoboot: 0 starting USB... No working controllers found USB is stopped. Please issue 'usb start' first. scanning bus for devices... Device 0: unknown device Device 0: unknown device starting USB... No working controllers found BOOTP broadcast 1 BOOTP broadcast 2 BOOTP broadcast 3 DHCP client bound to address 10.0.2.15 (1004 ms) Using e1000#0 device TFTP from server 10.0.2.2; our IP address is 10.0.2.15 Filename 'boot.scr.uimg'. Load address: 0x40200000 Loading: * TFTP error: 'File not found' (1) Not retrying... BOOTP broadcast 1 BOOTP broadcast 2 BOOTP broadcast 3 DHCP client bound to address 10.0.2.15 (1001 ms) Using e1000#0 device TFTP from server 10.0.2.2; our IP address is 10.0.2.15 Filename 'boot.scr.uimg'. Load address: 0x40400000 Loading: * TFTP error: 'File not found' (1) Not retrying... => tftp 0x40000000 dtb.dtb Using e1000#0 device TFTP from server 10.0.2.2; our IP address is 10.0.2.15 Filename 'dtb.dtb'. Load address: 0x40000000 Loading: ################################################################# ######### 963.9 KiB/s done Bytes transferred = 1048576 (100000 hex) => tftp 0x40200000 Image Using e1000#0 device TFTP from server 10.0.2.2; our IP address is 10.0.2.15 Filename 'Image'. Load address: 0x40200000 Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################### 10 MiB/s done Bytes transferred = 26489344 (1943200 hex) => tftp 0x42000000 initramfs.cpio.gz Using e1000#0 device TFTP from server 10.0.2.2; our IP address is 10.0.2.15 Filename 'initramfs.cpio.gz'. Load address: 0x42000000 Loading: ################################################################# ################# 1 MiB/s done Bytes transferred = 1169894 (11d9e6 hex) => booti 0x40200000 0x42000000 0x40000000 Moving Image from 0x40200000 to 0x40280000, end=41c44000 Wrong Ramdisk Image Format Ramdisk image is corrupt or invalid At the end, it says "Ram disk image is corrupt or invalid". What am I doing wrong? I tried with un-gzipped file of initramfs, the same. Should I use real initrd format(dd image)? Any help will be very much appreciated. Thank you! Chan Kim