diff mbox series

[U-Boot,1/1] doc: slimbootloader: Update Linux booting steps on QEMU

Message ID A1484485FD99714DB2AB2C5EF81E7AC2AA7A3F53@ORSMSX116.amr.corp.intel.com
State Accepted
Commit 5a8558053dfc11056228aa71359915098aa1c4cb
Delegated to: Bin Meng
Headers show
Series [U-Boot,1/1] doc: slimbootloader: Update Linux booting steps on QEMU | expand

Commit Message

Park, Aiden Aug. 22, 2019, 9:31 p.m. UTC
Add steps to test Linux booting on QEMU with Yocto image.

Signed-off-by: Aiden Park <aiden.park@intel.com>
---
 doc/board/intel/slimbootloader.rst | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Comments

Bin Meng Aug. 26, 2019, 2:35 a.m. UTC | #1
Hi Aiden,

On Fri, Aug 23, 2019 at 5:31 AM Park, Aiden <aiden.park@intel.com> wrote:
>
> Add steps to test Linux booting on QEMU with Yocto image.
>
> Signed-off-by: Aiden Park <aiden.park@intel.com>
> ---
>  doc/board/intel/slimbootloader.rst | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
>
> diff --git a/doc/board/intel/slimbootloader.rst b/doc/board/intel/slimbootloader.rst
> index 07c9b126f7..375e676804 100644
> --- a/doc/board/intel/slimbootloader.rst
> +++ b/doc/board/intel/slimbootloader.rst
> @@ -86,6 +86,28 @@ The PayloadId can be any 4 Bytes value.
>
>     $ qemu-system-x86_64 -machine q35 -nographic -serial mon:stdio -pflash Outputs/qemu/SlimBootloader.bin
>
> +Test Linux booting on QEMU target
> +---------------------------------
> +
> +Let's use LeafHill (APL) Yocto image for testing.
> +Download it from http://downloads.yoctoproject.org/releases/yocto/yocto-2.0/machines/leafhill/.
> +
> +1. Prepare Yocto hard disk image::
> +
> +   $ wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.0/machines/leafhill/leafhill-4.0-jethro-2.0.tar.bz2
> +   $ tar -xvf leafhill-4.0-jethro-2.0.tar.bz2
> +   $ ls -l leafhill-4.0-jethro-2.0/binary/core-image-sato-intel-corei7-64.hddimg

nits: this line is not necessary

> +
> +2. Launch Slim Bootloader on QEMU with disk image::
> +
> +   $ qemu-system-x86_64 -machine q35 -nographic -serial mon:stdio -pflash Outputs/qemu/SlimBootloader.bin -drive id=mydrive,if=none,file=/path/to/core-image-sato-intel-corei7-64.hddimg,format=raw -device ide-hd,drive=mydrive
> +
> +3. Update boot environment values on shell::
> +
> +   => setenv bootfile vmlinuz
> +   => setenv bootdev scsi
> +   => boot

I followed all the instructions here, and I see the same problem as I
reported before: Invalid Boot Flag.

=> setenv bootfile vmlinuz
=> setenv bootdev scsi
=> boot
scanning bus for devices...
SATA link 0 timeout.
SATA link 1 timeout.
SATA link 2 timeout.
SATA link 3 timeout.
SATA link 4 timeout.
Target spinup took 0 ms.
AHCI 0001.0000 32 slots 6 ports 1.5 Gbps 0x3f impl SATA mode
flags: ncq only
Error: Invalid Boot Flag (found 0x0000, expected 0xaa55)

Regards,
Bin
Park, Aiden Aug. 26, 2019, 3:19 a.m. UTC | #2
Hi Bin,

> -----Original Message-----
> From: Bin Meng [mailto:bmeng.cn@gmail.com]
> Sent: Sunday, August 25, 2019 7:36 PM
> To: Park, Aiden <aiden.park@intel.com>
> Cc: Andy Shevchenko <andy.shevchenko@gmail.com>; u-boot@lists.denx.de
> Subject: Re: [PATCH 1/1] doc: slimbootloader: Update Linux booting steps on
> QEMU
> 
> Hi Aiden,
> 
> On Fri, Aug 23, 2019 at 5:31 AM Park, Aiden <aiden.park@intel.com> wrote:
> >
> > Add steps to test Linux booting on QEMU with Yocto image.
> >
> > Signed-off-by: Aiden Park <aiden.park@intel.com>
> > ---
> >  doc/board/intel/slimbootloader.rst | 22 ++++++++++++++++++++++
> >  1 file changed, 22 insertions(+)
> >
> > diff --git a/doc/board/intel/slimbootloader.rst
> > b/doc/board/intel/slimbootloader.rst
> > index 07c9b126f7..375e676804 100644
> > --- a/doc/board/intel/slimbootloader.rst
> > +++ b/doc/board/intel/slimbootloader.rst
> > @@ -86,6 +86,28 @@ The PayloadId can be any 4 Bytes value.
> >
> >     $ qemu-system-x86_64 -machine q35 -nographic -serial mon:stdio
> > -pflash Outputs/qemu/SlimBootloader.bin
> >
> > +Test Linux booting on QEMU target
> > +---------------------------------
> > +
> > +Let's use LeafHill (APL) Yocto image for testing.
> > +Download it from http://downloads.yoctoproject.org/releases/yocto/yocto-
> 2.0/machines/leafhill/.
> > +
> > +1. Prepare Yocto hard disk image::
> > +
> > +   $ wget http://downloads.yoctoproject.org/releases/yocto/yocto-
> 2.0/machines/leafhill/leafhill-4.0-jethro-2.0.tar.bz2
> > +   $ tar -xvf leafhill-4.0-jethro-2.0.tar.bz2
> > +   $ ls -l
> > + leafhill-4.0-jethro-2.0/binary/core-image-sato-intel-corei7-64.hddim
> > + g
> 
> nits: this line is not necessary
> 
This is just to show unzipped file path and make sure the file exists properly.

> > +
> > +2. Launch Slim Bootloader on QEMU with disk image::
> > +
> > +   $ qemu-system-x86_64 -machine q35 -nographic -serial mon:stdio
> > + -pflash Outputs/qemu/SlimBootloader.bin -drive
> > + id=mydrive,if=none,file=/path/to/core-image-sato-intel-corei7-64.hdd
> > + img,format=raw -device ide-hd,drive=mydrive
> > +
> > +3. Update boot environment values on shell::
> > +
> > +   => setenv bootfile vmlinuz
> > +   => setenv bootdev scsi
> > +   => boot
> 
> I followed all the instructions here, and I see the same problem as I reported
> before: Invalid Boot Flag.
> 
> => setenv bootfile vmlinuz
> => setenv bootdev scsi
> => boot
> scanning bus for devices...
> SATA link 0 timeout.
> SATA link 1 timeout.
> SATA link 2 timeout.
> SATA link 3 timeout.
> SATA link 4 timeout.
> Target spinup took 0 ms.
> AHCI 0001.0000 32 slots 6 ports 1.5 Gbps 0x3f impl SATA mode
> flags: ncq only
> Error: Invalid Boot Flag (found 0x0000, expected 0xaa55)
> 
This has a dependency on a patch - https://patchwork.ozlabs.org/patch/1150306/
which is still waiting to be applied.

> Regards,
> Bin

Best Regards,
Aiden
Bin Meng Aug. 26, 2019, 4:46 a.m. UTC | #3
Hi Aiden,

On Mon, Aug 26, 2019 at 11:20 AM Park, Aiden <aiden.park@intel.com> wrote:
>
> Hi Bin,
>
> > -----Original Message-----
> > From: Bin Meng [mailto:bmeng.cn@gmail.com]
> > Sent: Sunday, August 25, 2019 7:36 PM
> > To: Park, Aiden <aiden.park@intel.com>
> > Cc: Andy Shevchenko <andy.shevchenko@gmail.com>; u-boot@lists.denx.de
> > Subject: Re: [PATCH 1/1] doc: slimbootloader: Update Linux booting steps on
> > QEMU
> >
> > Hi Aiden,
> >
> > On Fri, Aug 23, 2019 at 5:31 AM Park, Aiden <aiden.park@intel.com> wrote:
> > >
> > > Add steps to test Linux booting on QEMU with Yocto image.
> > >
> > > Signed-off-by: Aiden Park <aiden.park@intel.com>
> > > ---
> > >  doc/board/intel/slimbootloader.rst | 22 ++++++++++++++++++++++
> > >  1 file changed, 22 insertions(+)
> > >
> > > diff --git a/doc/board/intel/slimbootloader.rst
> > > b/doc/board/intel/slimbootloader.rst
> > > index 07c9b126f7..375e676804 100644
> > > --- a/doc/board/intel/slimbootloader.rst
> > > +++ b/doc/board/intel/slimbootloader.rst
> > > @@ -86,6 +86,28 @@ The PayloadId can be any 4 Bytes value.
> > >
> > >     $ qemu-system-x86_64 -machine q35 -nographic -serial mon:stdio
> > > -pflash Outputs/qemu/SlimBootloader.bin
> > >
> > > +Test Linux booting on QEMU target
> > > +---------------------------------
> > > +
> > > +Let's use LeafHill (APL) Yocto image for testing.
> > > +Download it from http://downloads.yoctoproject.org/releases/yocto/yocto-
> > 2.0/machines/leafhill/.
> > > +
> > > +1. Prepare Yocto hard disk image::
> > > +
> > > +   $ wget http://downloads.yoctoproject.org/releases/yocto/yocto-
> > 2.0/machines/leafhill/leafhill-4.0-jethro-2.0.tar.bz2
> > > +   $ tar -xvf leafhill-4.0-jethro-2.0.tar.bz2
> > > +   $ ls -l
> > > + leafhill-4.0-jethro-2.0/binary/core-image-sato-intel-corei7-64.hddim
> > > + g
> >
> > nits: this line is not necessary
> >
> This is just to show unzipped file path and make sure the file exists properly.
>
> > > +
> > > +2. Launch Slim Bootloader on QEMU with disk image::
> > > +
> > > +   $ qemu-system-x86_64 -machine q35 -nographic -serial mon:stdio
> > > + -pflash Outputs/qemu/SlimBootloader.bin -drive
> > > + id=mydrive,if=none,file=/path/to/core-image-sato-intel-corei7-64.hdd
> > > + img,format=raw -device ide-hd,drive=mydrive
> > > +
> > > +3. Update boot environment values on shell::
> > > +
> > > +   => setenv bootfile vmlinuz
> > > +   => setenv bootdev scsi
> > > +   => boot
> >
> > I followed all the instructions here, and I see the same problem as I reported
> > before: Invalid Boot Flag.
> >
> > => setenv bootfile vmlinuz
> > => setenv bootdev scsi
> > => boot
> > scanning bus for devices...
> > SATA link 0 timeout.
> > SATA link 1 timeout.
> > SATA link 2 timeout.
> > SATA link 3 timeout.
> > SATA link 4 timeout.
> > Target spinup took 0 ms.
> > AHCI 0001.0000 32 slots 6 ports 1.5 Gbps 0x3f impl SATA mode
> > flags: ncq only
> > Error: Invalid Boot Flag (found 0x0000, expected 0xaa55)
> >
> This has a dependency on a patch - https://patchwork.ozlabs.org/patch/1150306/
> which is still waiting to be applied.
>

Thanks, now I am able to boot the Yocto Linux kernel image.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>

However when testing, I noticed that SlimBootloader does not support
multicore? If I passed "-smp 2" or "-smp 4" to QEMU, it failed to
boot. Logs below:

MP Init (Wakeup)
MP Init (Run)
Detected 2 CPU threads
 CPU  0 APIC ID: 0
 CPU  1 APIC ID: 1
PCI Enum
Call FspNotifyPhase(20) ... Success
ACPI Init
Less MADT entries than Number of cores..
ACPI Ret: Out of Resources
Error: Out of Resources

ACPI error !
STAGE_2: System halted!

Regards,
Bin
Park, Aiden Aug. 26, 2019, 4:55 a.m. UTC | #4
Hi Bin,

> -----Original Message-----
> From: Bin Meng [mailto:bmeng.cn@gmail.com]
> Sent: Sunday, August 25, 2019 9:47 PM
> To: Park, Aiden <aiden.park@intel.com>
> Cc: Andy Shevchenko <andy.shevchenko@gmail.com>; u-boot@lists.denx.de
> Subject: Re: [PATCH 1/1] doc: slimbootloader: Update Linux booting steps on
> QEMU
> 
> Hi Aiden,
> 
> On Mon, Aug 26, 2019 at 11:20 AM Park, Aiden <aiden.park@intel.com> wrote:
> >
> > Hi Bin,
> >
> > > -----Original Message-----
> > > From: Bin Meng [mailto:bmeng.cn@gmail.com]
> > > Sent: Sunday, August 25, 2019 7:36 PM
> > > To: Park, Aiden <aiden.park@intel.com>
> > > Cc: Andy Shevchenko <andy.shevchenko@gmail.com>;
> > > u-boot@lists.denx.de
> > > Subject: Re: [PATCH 1/1] doc: slimbootloader: Update Linux booting
> > > steps on QEMU
> > >
> > > Hi Aiden,
> > >
> > > On Fri, Aug 23, 2019 at 5:31 AM Park, Aiden <aiden.park@intel.com> wrote:
> > > >
> > > > Add steps to test Linux booting on QEMU with Yocto image.
> > > >
> > > > Signed-off-by: Aiden Park <aiden.park@intel.com>
> > > > ---
> > > >  doc/board/intel/slimbootloader.rst | 22 ++++++++++++++++++++++
> > > >  1 file changed, 22 insertions(+)
> > > >
> > > > diff --git a/doc/board/intel/slimbootloader.rst
> > > > b/doc/board/intel/slimbootloader.rst
> > > > index 07c9b126f7..375e676804 100644
> > > > --- a/doc/board/intel/slimbootloader.rst
> > > > +++ b/doc/board/intel/slimbootloader.rst
> > > > @@ -86,6 +86,28 @@ The PayloadId can be any 4 Bytes value.
> > > >
> > > >     $ qemu-system-x86_64 -machine q35 -nographic -serial mon:stdio
> > > > -pflash Outputs/qemu/SlimBootloader.bin
> > > >
> > > > +Test Linux booting on QEMU target
> > > > +---------------------------------
> > > > +
> > > > +Let's use LeafHill (APL) Yocto image for testing.
> > > > +Download it from
> > > > +http://downloads.yoctoproject.org/releases/yocto/yocto-
> > > 2.0/machines/leafhill/.
> > > > +
> > > > +1. Prepare Yocto hard disk image::
> > > > +
> > > > +   $ wget http://downloads.yoctoproject.org/releases/yocto/yocto-
> > > 2.0/machines/leafhill/leafhill-4.0-jethro-2.0.tar.bz2
> > > > +   $ tar -xvf leafhill-4.0-jethro-2.0.tar.bz2
> > > > +   $ ls -l
> > > > + leafhill-4.0-jethro-2.0/binary/core-image-sato-intel-corei7-64.h
> > > > + ddim
> > > > + g
> > >
> > > nits: this line is not necessary
> > >
> > This is just to show unzipped file path and make sure the file exists properly.
> >
> > > > +
> > > > +2. Launch Slim Bootloader on QEMU with disk image::
> > > > +
> > > > +   $ qemu-system-x86_64 -machine q35 -nographic -serial mon:stdio
> > > > + -pflash Outputs/qemu/SlimBootloader.bin -drive
> > > > + id=mydrive,if=none,file=/path/to/core-image-sato-intel-corei7-64
> > > > + .hdd img,format=raw -device ide-hd,drive=mydrive
> > > > +
> > > > +3. Update boot environment values on shell::
> > > > +
> > > > +   => setenv bootfile vmlinuz
> > > > +   => setenv bootdev scsi
> > > > +   => boot
> > >
> > > I followed all the instructions here, and I see the same problem as
> > > I reported
> > > before: Invalid Boot Flag.
> > >
> > > => setenv bootfile vmlinuz
> > > => setenv bootdev scsi
> > > => boot
> > > scanning bus for devices...
> > > SATA link 0 timeout.
> > > SATA link 1 timeout.
> > > SATA link 2 timeout.
> > > SATA link 3 timeout.
> > > SATA link 4 timeout.
> > > Target spinup took 0 ms.
> > > AHCI 0001.0000 32 slots 6 ports 1.5 Gbps 0x3f impl SATA mode
> > > flags: ncq only
> > > Error: Invalid Boot Flag (found 0x0000, expected 0xaa55)
> > >
> > This has a dependency on a patch -
> > https://patchwork.ozlabs.org/patch/1150306/
> > which is still waiting to be applied.
> >
> 
> Thanks, now I am able to boot the Yocto Linux kernel image.
> 
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> Tested-by: Bin Meng <bmeng.cn@gmail.com>
> 
Thanks Bin for your testing.

> However when testing, I noticed that SlimBootloader does not support
> multicore? If I passed "-smp 2" or "-smp 4" to QEMU, it failed to boot. Logs
> below:
> 
> MP Init (Wakeup)
> MP Init (Run)
> Detected 2 CPU threads
>  CPU  0 APIC ID: 0
>  CPU  1 APIC ID: 1
> PCI Enum
> Call FspNotifyPhase(20) ... Success
> ACPI Init
> Less MADT entries than Number of cores..
> ACPI Ret: Out of Resources
> Error: Out of Resources
> 
> ACPI error !
> STAGE_2: System halted!
>
We simply verified a single core system only with QEMU.
Let me fix this MADT issue on Slim Bootloader side.
Thanks a lot for bringing up this issue!
 
> Regards,
> Bin

Best Regards,
Aiden
Park, Aiden Sept. 10, 2019, 5:45 a.m. UTC | #5
Hi Bin,

> -----Original Message-----
> From: Park, Aiden
> Sent: Sunday, August 25, 2019 9:56 PM
> To: 'Bin Meng' <bmeng.cn@gmail.com>
> Cc: Andy Shevchenko <andy.shevchenko@gmail.com>; u-boot@lists.denx.de
> Subject: RE: [PATCH 1/1] doc: slimbootloader: Update Linux booting steps on
> QEMU
> 
> Hi Bin,
> 
> > -----Original Message-----
> > From: Bin Meng [mailto:bmeng.cn@gmail.com]
> > Sent: Sunday, August 25, 2019 9:47 PM
> > To: Park, Aiden <aiden.park@intel.com>
> > Cc: Andy Shevchenko <andy.shevchenko@gmail.com>; u-boot@lists.denx.de
> > Subject: Re: [PATCH 1/1] doc: slimbootloader: Update Linux booting
> > steps on QEMU
> >
> > Hi Aiden,
> >
> > On Mon, Aug 26, 2019 at 11:20 AM Park, Aiden <aiden.park@intel.com> wrote:
> > >
> > > Hi Bin,
> > >
> > > > -----Original Message-----
> > > > From: Bin Meng [mailto:bmeng.cn@gmail.com]
> > > > Sent: Sunday, August 25, 2019 7:36 PM
> > > > To: Park, Aiden <aiden.park@intel.com>
> > > > Cc: Andy Shevchenko <andy.shevchenko@gmail.com>;
> > > > u-boot@lists.denx.de
> > > > Subject: Re: [PATCH 1/1] doc: slimbootloader: Update Linux booting
> > > > steps on QEMU
> > > >
> > > > Hi Aiden,
> > > >
> > > > On Fri, Aug 23, 2019 at 5:31 AM Park, Aiden <aiden.park@intel.com> wrote:
> > > > >
> > > > > Add steps to test Linux booting on QEMU with Yocto image.
> > > > >
> > > > > Signed-off-by: Aiden Park <aiden.park@intel.com>
> > > > > ---
> > > > >  doc/board/intel/slimbootloader.rst | 22 ++++++++++++++++++++++
> > > > >  1 file changed, 22 insertions(+)
> > > > >
> > > > > diff --git a/doc/board/intel/slimbootloader.rst
> > > > > b/doc/board/intel/slimbootloader.rst
> > > > > index 07c9b126f7..375e676804 100644
> > > > > --- a/doc/board/intel/slimbootloader.rst
> > > > > +++ b/doc/board/intel/slimbootloader.rst
> > > > > @@ -86,6 +86,28 @@ The PayloadId can be any 4 Bytes value.
> > > > >
> > > > >     $ qemu-system-x86_64 -machine q35 -nographic -serial
> > > > > mon:stdio -pflash Outputs/qemu/SlimBootloader.bin
> > > > >
> > > > > +Test Linux booting on QEMU target
> > > > > +---------------------------------
> > > > > +
> > > > > +Let's use LeafHill (APL) Yocto image for testing.
> > > > > +Download it from
> > > > > +http://downloads.yoctoproject.org/releases/yocto/yocto-
> > > > 2.0/machines/leafhill/.
> > > > > +
> > > > > +1. Prepare Yocto hard disk image::
> > > > > +
> > > > > +   $ wget
> > > > > + http://downloads.yoctoproject.org/releases/yocto/yocto-
> > > > 2.0/machines/leafhill/leafhill-4.0-jethro-2.0.tar.bz2
> > > > > +   $ tar -xvf leafhill-4.0-jethro-2.0.tar.bz2
> > > > > +   $ ls -l
> > > > > + leafhill-4.0-jethro-2.0/binary/core-image-sato-intel-corei7-64
> > > > > + .h
> > > > > + ddim
> > > > > + g
> > > >
> > > > nits: this line is not necessary
> > > >
> > > This is just to show unzipped file path and make sure the file exists properly.
> > >
> > > > > +
> > > > > +2. Launch Slim Bootloader on QEMU with disk image::
> > > > > +
> > > > > +   $ qemu-system-x86_64 -machine q35 -nographic -serial
> > > > > + mon:stdio -pflash Outputs/qemu/SlimBootloader.bin -drive
> > > > > + id=mydrive,if=none,file=/path/to/core-image-sato-intel-corei7-
> > > > > + 64 .hdd img,format=raw -device ide-hd,drive=mydrive
> > > > > +
> > > > > +3. Update boot environment values on shell::
> > > > > +
> > > > > +   => setenv bootfile vmlinuz
> > > > > +   => setenv bootdev scsi
> > > > > +   => boot
> > > >
> > > > I followed all the instructions here, and I see the same problem
> > > > as I reported
> > > > before: Invalid Boot Flag.
> > > >
> > > > => setenv bootfile vmlinuz
> > > > => setenv bootdev scsi
> > > > => boot
> > > > scanning bus for devices...
> > > > SATA link 0 timeout.
> > > > SATA link 1 timeout.
> > > > SATA link 2 timeout.
> > > > SATA link 3 timeout.
> > > > SATA link 4 timeout.
> > > > Target spinup took 0 ms.
> > > > AHCI 0001.0000 32 slots 6 ports 1.5 Gbps 0x3f impl SATA mode
> > > > flags: ncq only
> > > > Error: Invalid Boot Flag (found 0x0000, expected 0xaa55)
> > > >
> > > This has a dependency on a patch -
> > > https://patchwork.ozlabs.org/patch/1150306/
> > > which is still waiting to be applied.
> > >
> >
> > Thanks, now I am able to boot the Yocto Linux kernel image.
> >
> > Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> > Tested-by: Bin Meng <bmeng.cn@gmail.com>
> >
> Thanks Bin for your testing.
> 
> > However when testing, I noticed that SlimBootloader does not support
> > multicore? If I passed "-smp 2" or "-smp 4" to QEMU, it failed to
> > boot. Logs
> > below:
> >
> > MP Init (Wakeup)
> > MP Init (Run)
> > Detected 2 CPU threads
> >  CPU  0 APIC ID: 0
> >  CPU  1 APIC ID: 1
> > PCI Enum
> > Call FspNotifyPhase(20) ... Success
> > ACPI Init
> > Less MADT entries than Number of cores..
> > ACPI Ret: Out of Resources
> > Error: Out of Resources
> >
> > ACPI error !
> > STAGE_2: System halted!
> >
> We simply verified a single core system only with QEMU.
> Let me fix this MADT issue on Slim Bootloader side.
> Thanks a lot for bringing up this issue!
> 
Now, Slim Bootloader supports -smp option on QEMU with the latest code base.
Thanks again for bringing this up.

> > Regards,
> > Bin
> 
> Best Regards,
> Aiden

Best Regards,
Aiden
Bin Meng Sept. 10, 2019, 6:26 a.m. UTC | #6
On Mon, Aug 26, 2019 at 12:46 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> Hi Aiden,
>
> On Mon, Aug 26, 2019 at 11:20 AM Park, Aiden <aiden.park@intel.com> wrote:
> >
> > Hi Bin,
> >
> > > -----Original Message-----
> > > From: Bin Meng [mailto:bmeng.cn@gmail.com]
> > > Sent: Sunday, August 25, 2019 7:36 PM
> > > To: Park, Aiden <aiden.park@intel.com>
> > > Cc: Andy Shevchenko <andy.shevchenko@gmail.com>; u-boot@lists.denx.de
> > > Subject: Re: [PATCH 1/1] doc: slimbootloader: Update Linux booting steps on
> > > QEMU
> > >
> > > Hi Aiden,
> > >
> > > On Fri, Aug 23, 2019 at 5:31 AM Park, Aiden <aiden.park@intel.com> wrote:
> > > >
> > > > Add steps to test Linux booting on QEMU with Yocto image.
> > > >
> > > > Signed-off-by: Aiden Park <aiden.park@intel.com>
> > > > ---
> > > >  doc/board/intel/slimbootloader.rst | 22 ++++++++++++++++++++++
> > > >  1 file changed, 22 insertions(+)
> > > >
> > > > diff --git a/doc/board/intel/slimbootloader.rst
> > > > b/doc/board/intel/slimbootloader.rst
> > > > index 07c9b126f7..375e676804 100644
> > > > --- a/doc/board/intel/slimbootloader.rst
> > > > +++ b/doc/board/intel/slimbootloader.rst
> > > > @@ -86,6 +86,28 @@ The PayloadId can be any 4 Bytes value.
> > > >
> > > >     $ qemu-system-x86_64 -machine q35 -nographic -serial mon:stdio
> > > > -pflash Outputs/qemu/SlimBootloader.bin
> > > >
> > > > +Test Linux booting on QEMU target
> > > > +---------------------------------
> > > > +
> > > > +Let's use LeafHill (APL) Yocto image for testing.
> > > > +Download it from http://downloads.yoctoproject.org/releases/yocto/yocto-
> > > 2.0/machines/leafhill/.
> > > > +
> > > > +1. Prepare Yocto hard disk image::
> > > > +
> > > > +   $ wget http://downloads.yoctoproject.org/releases/yocto/yocto-
> > > 2.0/machines/leafhill/leafhill-4.0-jethro-2.0.tar.bz2
> > > > +   $ tar -xvf leafhill-4.0-jethro-2.0.tar.bz2
> > > > +   $ ls -l
> > > > + leafhill-4.0-jethro-2.0/binary/core-image-sato-intel-corei7-64.hddim
> > > > + g
> > >
> > > nits: this line is not necessary
> > >
> > This is just to show unzipped file path and make sure the file exists properly.
> >
> > > > +
> > > > +2. Launch Slim Bootloader on QEMU with disk image::
> > > > +
> > > > +   $ qemu-system-x86_64 -machine q35 -nographic -serial mon:stdio
> > > > + -pflash Outputs/qemu/SlimBootloader.bin -drive
> > > > + id=mydrive,if=none,file=/path/to/core-image-sato-intel-corei7-64.hdd
> > > > + img,format=raw -device ide-hd,drive=mydrive
> > > > +
> > > > +3. Update boot environment values on shell::
> > > > +
> > > > +   => setenv bootfile vmlinuz
> > > > +   => setenv bootdev scsi
> > > > +   => boot
> > >
> > > I followed all the instructions here, and I see the same problem as I reported
> > > before: Invalid Boot Flag.
> > >
> > > => setenv bootfile vmlinuz
> > > => setenv bootdev scsi
> > > => boot
> > > scanning bus for devices...
> > > SATA link 0 timeout.
> > > SATA link 1 timeout.
> > > SATA link 2 timeout.
> > > SATA link 3 timeout.
> > > SATA link 4 timeout.
> > > Target spinup took 0 ms.
> > > AHCI 0001.0000 32 slots 6 ports 1.5 Gbps 0x3f impl SATA mode
> > > flags: ncq only
> > > Error: Invalid Boot Flag (found 0x0000, expected 0xaa55)
> > >
> > This has a dependency on a patch - https://patchwork.ozlabs.org/patch/1150306/
> > which is still waiting to be applied.
> >
>
> Thanks, now I am able to boot the Yocto Linux kernel image.
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> Tested-by: Bin Meng <bmeng.cn@gmail.com>
>

applied to u-boot-x86, thanks!
diff mbox series

Patch

diff --git a/doc/board/intel/slimbootloader.rst b/doc/board/intel/slimbootloader.rst
index 07c9b126f7..375e676804 100644
--- a/doc/board/intel/slimbootloader.rst
+++ b/doc/board/intel/slimbootloader.rst
@@ -86,6 +86,28 @@  The PayloadId can be any 4 Bytes value.
 
    $ qemu-system-x86_64 -machine q35 -nographic -serial mon:stdio -pflash Outputs/qemu/SlimBootloader.bin
 
+Test Linux booting on QEMU target
+---------------------------------
+
+Let's use LeafHill (APL) Yocto image for testing.
+Download it from http://downloads.yoctoproject.org/releases/yocto/yocto-2.0/machines/leafhill/.
+
+1. Prepare Yocto hard disk image::
+
+   $ wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.0/machines/leafhill/leafhill-4.0-jethro-2.0.tar.bz2
+   $ tar -xvf leafhill-4.0-jethro-2.0.tar.bz2
+   $ ls -l leafhill-4.0-jethro-2.0/binary/core-image-sato-intel-corei7-64.hddimg
+
+2. Launch Slim Bootloader on QEMU with disk image::
+
+   $ qemu-system-x86_64 -machine q35 -nographic -serial mon:stdio -pflash Outputs/qemu/SlimBootloader.bin -drive id=mydrive,if=none,file=/path/to/core-image-sato-intel-corei7-64.hddimg,format=raw -device ide-hd,drive=mydrive
+
+3. Update boot environment values on shell::
+
+   => setenv bootfile vmlinuz
+   => setenv bootdev scsi
+   => boot
+
 Build Instruction for Slim Bootloader for LeafHill (APL) target
 ---------------------------------------------------------------