From: "Chan Kim" <ckim@etri.re.kr>
To: <u-boot@lists.denx.de>
Subject: please help, "Ram disk image is corrupt or invalid" (qemu virt machine, arm64)
Date: Wed, 13 Oct 2021 14:44:22 +0900 [thread overview]
Message-ID: <024601d7bff5$5fbd8e70$1f38ab50$@etri.re.kr> (raw)
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
next reply other threads:[~2021-10-13 5:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-13 5:44 Chan Kim [this message]
2021-10-19 7:32 ` please help, "Ram disk image is corrupt or invalid" (qemu virt machine, arm64) François Ozog
2021-10-19 9:59 ` Chan Kim
2021-10-19 10:43 ` Jaehoon Chung
2021-10-19 12:31 ` Chan Kim
2021-10-19 22:40 ` Jaehoon Chung
2021-10-22 1:33 ` Chan Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='024601d7bff5$5fbd8e70$1f38ab50$@etri.re.kr' \
--to=ckim@etri.re.kr \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.