Kernel Newbies archive on lore.kernel.org
 help / color / Atom feed
From: Oscar Carter <oscar.carter@gmx.com>
To: kernelnewbies@kernelnewbies.org
Cc: Oscar Carter <oscar.carter@gmx.com>
Subject: Help to test the powerpc architecture
Date: Sun, 2 Aug 2020 16:27:03 +0200
Message-ID: <20200802142703.GA3575@ubuntu> (raw)

Hi,

I'm working in a new feature for the powerpc (64 bits little endian)
architecture. Since I can't test it in a real environment, I need to
emulate this arch. To do this I use qemu-ppc. My problem is that the
built kernel don't boot in qemu.

To build the kernel:

make defconfig ARCH=powerpc

Then I set to NO the CONFIG_KEXEC option as I found that qemu can't
boot a KEXEC kernel. And now:

make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- -j4

Finally I obtain a zImage in arch/powerpc/boot/ directory.

Before to run qemu I create a rootfs with debootstrap. Then I run qemu
with the following parameters:

qemu-system-ppc -kernel /media/ubuntu/Data/linux/arch/powerpc/boot/zImage \
		-append "root=/dev/sda console=ttyS0" \
		-drive file=qemu_image.img,index=0,media=disk,format=raw \
		--nographic

If I add the "-prom-env boot-args=-v" to the end of the last command I get
the same result. The qemu always stops at this point:

>> =============================================================
>> OpenBIOS 1.1 [Dec 27 2018 23:11]
>> Configuration device id QEMU version 1 machine id 2
>> CPUs: 1
>> Memory: 128M
>> UUID: 00000000-0000-0000-0000-000000000000
>> CPU type PowerPC,750
milliseconds isn't unique.
Welcome to OpenBIOS v1.1 built on Dec 27 2018 23:11
>> [ppc] Kernel already loaded (0x01000000 + 0x009085d8) (initrd 0x00000000 + 0x00000000)
>> [ppc] Kernel command line: root=/dev/sda console=ttyS0
>> switching to new context:

Also, I've tried to build the kernel with a DTB embedded in the image,
but not luck. The same result again.

make ps3_defconfig ARCH=powerpc
make ARCH=powerpc simpleImage.ps3 CROSS_COMPILE=powerpc-linux-gnu- -j4

I'm stuck at this point. I don't know how to configure the kernel to be
able to boot with qemu. Any help to point me to the right direction
will be greatly appreciated.

Thank's in advance.
Oscar Carter

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

             reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-02 14:27 Oscar Carter [this message]
2020-08-10  9:13 ` Santosh S

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=20200802142703.GA3575@ubuntu \
    --to=oscar.carter@gmx.com \
    --cc=kernelnewbies@kernelnewbies.org \
    /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

Kernel Newbies archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernelnewbies/0 kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ https://lore.kernel.org/kernelnewbies \
		kernelnewbies@kernelnewbies.org
	public-inbox-index kernelnewbies

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernelnewbies.kernelnewbies


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git