[SLOF] Loading file from disk image

Thomas Huth thuth at redhat.com
Wed Jan 3 19:07:51 AEDT 2018


On 02.01.2018 18:26, Jd Lyons wrote:
> 
> 
>> On Jan 2, 2018, at 11:41 AM, Nikunj A Dadhania
>> <nikunj at linux.vnet.ibm.com <mailto:nikunj at linux.vnet.ibm.com>> wrote:
>>
>> Thomas Huth <thuth at redhat.com <mailto:thuth at redhat.com>> writes:
>>
>>> On 02.01.2018 16:38, Jd Lyons wrote:
>>>>
>>>>
>>>>> On Jan 2, 2018, at 10:10 AM, Thomas Huth <thuth at redhat.com
>>>>> <mailto:thuth at redhat.com>
>>>>> <mailto:thuth at redhat.com>> wrote:
>>>>>
>>>>> On 02.01.2018 16:02, Jd Lyons wrote:
>>>>>>
>>>>>>
>>>>>>> On Jan 2, 2018, at 9:25 AM, Thomas Huth <thuth at redhat.com
>>>>>>> <mailto:thuth at redhat.com>
>>>>>>> <mailto:thuth at redhat.com>> wrote:
>>>>>>>
>>>>>>> On 02.01.2018 15:17, Jd Lyons wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>> On Jan 2, 2018, at 8:43 AM, Jd Lyons <lyons_dj at yahoo.com
>>>>>>>>> <mailto:lyons_dj at yahoo.com>
>>>>>>>>> <mailto:lyons_dj at yahoo.com>> wrote:
>>>>>>>>>
>>>>>>>>> Joy!peffpwpc……
>>>>>>>>>
>>>>>>>>> 14677: [ a5] 0 0 0 2 1 5e77ef40 5e7d1078 4 0 
>>>>>>>>> 14679: [111] encode-int 0 0 2 1 5e77ef40 5e7d1078 4 5e7d107c 4 
>>>>>>>>> 1467b: [112] encode+ 0 0 2 1 5e77ef40 5e7d1078 8 
>>>>>>>>> 1467c: [ 12] b(") 0 0 2 1 5e77ef40 5e7d1078 8 1467e e 
>>>>>>>>> 1468d: [110] property 0 0 2 1 5e77ef40 
>>>>>>>>> 1468f: [127] finish-device 0 0 2 1 5e77ef40 
>>>>>>>>> 14691: [127] finish-device 0 0 2 1 5e77ef40 
>>>>>>>>> 14693: [de0] xde0 0 0 2 1 5e77ef40 
>>>>>>>>> 14694: [  0] end0 0 0 2 1 5e77ef40 
>>>>>>>>> restored fcode@ 5e77ef40 
>>>>>>>>> restored fcode-spread 1 
>>>>>>>>> restored fcode-offset 2 
>>>>>>>>> restored fcode-end 0 
>>>>>>>>> restored ip 0 
>>>>>>>>> ok
>>>>>>>>> 0 > dev /pci ls  
>>>>>>>>> 5e72ad60 :  /pci at 800000020000000
>>>>>>>>> 5e72d2e8 :  |-- ethernet at 0
>>>>>>>>> 5e72d9d8 :  +-- NVDA,Parent at 1
>>>>>>>>> 5e7cfab0 :      |-- 
>>>>>>>>>
>>>>>>>>
>>>>>>>> Seems to be having trouble populating the children,
>>>>>>>>
>>>>>>>> I should see:
>>>>>>>>
>>>>>>>>> 5e72d9d8 :  +-- NVDA,Parent at 1
>>>>>>>>> 5e7cfab0 :      |-- NVDA,Display-A
>>>>>>>
>>>>>>> Indeed, sounds like there is something wrong here. Does SLOF hang
>>>>>>> during
>>>>>>> the "ls" or do you get back to the firmware prompt? Could you please
>>>>>>> paste the whole log, right from the start of booting the VM?
>>>>>>>
>>>>>>
>>>>>> Seems to scroll on forever after the ls command, so there is some
>>>>>> data in the child, not sure what it is. I may try and let it run to
>>>>>> it’s end, I only gave it about 10 min.
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Not sure, but in case you've manually started the FCODE from the
>>>>>>> firmware prompt, maybe you've also got to open the node for
>>>>>>> "extension"
>>>>>>> instead. So instead of doing select-dev or open-dev, could you please
>>>>>>> try this instead:
>>>>>>>
>>>>>>> dev /pci/vga
>>>>>>> get-node extend-device
>>>>>>>
>>>>>>
>>>>>> Seems to matter the oder I do things, I haven’t figured the correct
>>>>>> oder of commands:
>>>>> [...]
>>>>>> 0 > dev /pci/vga   ok
>>>>>> 0 > get-node extend-device   ok
>>>>>> 0 > include evaluator.fs   ok
>>>>>> 0 > load disk1:,\666  
>>>>>> Trying to load:  from:
>>>>>> /vdevice/v-scsi at 71000002/disk at 8100000000000000:,\666 ...  ok
>>>>>> 0 > 4040 1 byte-load   no current instance
>>>>>> 0 > s" /pci/vga" select-dev   ok
>>>>>> 0 > load disk1:,\666  
>>>>>> Trying to load:  from:
>>>>>> /vdevice/v-scsi at 71000002/disk at 8100000000000000:,\666 ...  ok
>>>>>> 0 > 4040 1 byte-load   byte-load Undefined word
>>>>>>
>>>>>> 0 > 4040 1 byte-load   byte-load Undefined word
>>>>>>
>>>>>> 0 > include evaluator.fs   ok
>>>>>> 0 > 4040 1 byte-load   FCode called abort: IP 1405f 6 b 
>>>>>> Aborted
>>>>>> 0 > true to eva-debug?   ok
>>>>>> 0 > 4040 1 byte-load 
>>>>>
>>>>> Please always do the "include evaluator.fs" and "true to eva-debug?"
>>>>> commands first - otherwise the FCODE evaluator Forth words might get
>>>>> installed as words of /pci/vga only instead, and not of the global
>>>>> Forth
>>>>> dictionary.
>>>>>
>>>>> I think you should also do the "load disk1..." before changing to the
>>>>> /dev/vga node, since "load" might also tinker with the current device
>>>>> tree node. So please try this order:
>>>>>
>>>>> include evaluator.fs
>>>>> true to eva-debug?
>>>>> load disk1:,\666
>>>>> dev /pci/vga
>>>>> get-node extend-device
>>>>> 4040 1 byte-load
>>>>>
>>>>
>>>> Doing this seems to result in not getting the correct instance.
>>>
>>> Hmm, you could also try:
>>>
>>> include evaluator.fs
>>> true to eva-debug?
>>> load disk1:,\666
>>> s" /pci/vga" select-dev
>>> get-node extend-device
>>> 4040 1 byte-load
>>>
>>> ... if that does not help, then I'm also running out of ideas, sorry...
>>
>> As Thomas suggested, this is what i had to use when i was playing
>> around with FCODE;
>>
>> diff --git a/board-qemu/slof/pci-phb.fs b/board-qemu/slof/pci-phb.fs
>> index 4f8e702..053c4db 100644
>> --- a/board-qemu/slof/pci-phb.fs
>> +++ b/board-qemu/slof/pci-phb.fs
>> @@ -16,6 +16,7 @@
>>
>>
>> ." Populating " pwd cr
>> +get-node extend-device
>>
>>
> 
> Thanks, I seem to be having trouble setting up my cross compiler on Debian 9
> 
> I did:
> 
> sudo apt install gcc-powerpc64-linux-gnu
> [sudo] password for jam: 
> Reading package lists... Done
> Building dependency tree       
> Reading state information... Done
> The following packages were automatically installed and are no longer
> required:
>   glx-alternative-mesa libgldispatch0-nvidia libnvidia-eglcore
>   libnvidia-glcore libopengl0-glvnd-nvidia libvulkan1 libxnvctrl0 update-glx
> Use 'sudo apt autoremove' to remove them.
> The following additional packages will be installed:
>   binutils-powerpc64-linux-gnu cpp-6-powerpc64-linux-gnu
>   cpp-powerpc64-linux-gnu gcc-6-cross-base-ports gcc-6-powerpc64-linux-gnu
>   gcc-6-powerpc64-linux-gnu-base libasan3-ppc64-cross libatomic1-ppc64-cross
>   libc6-dev-ppc64-cross libc6-ppc64-cross libgcc-6-dev-ppc64-cross
>   libgcc1-ppc64-cross libgomp1-ppc64-cross libitm1-ppc64-cross
>   libstdc++6-ppc64-cross libubsan0-ppc64-cross linux-libc-dev-ppc64-cross
> Suggested packages:
>   binutils-doc gcc-6-locales cpp-doc gcc-6-multilib-powerpc64-linux-gnu
>   gcc-6-doc libgcc1-dbg-ppc64-cross libgomp1-dbg-ppc64-cross
>   libitm1-dbg-ppc64-cross libatomic1-dbg-ppc64-cross
> libasan3-dbg-ppc64-cross
>   liblsan0-dbg-ppc64-cross libtsan0-dbg-ppc64-cross
> libubsan0-dbg-ppc64-cross
>   libcilkrts5-dbg-ppc64-cross libmpx2-dbg-ppc64-cross
>   libquadmath0-dbg-ppc64-cross flex bison gdb-powerpc64-linux-gnu gcc-doc
> The following NEW packages will be installed:
>   binutils-powerpc64-linux-gnu cpp-6-powerpc64-linux-gnu
>   cpp-powerpc64-linux-gnu gcc-6-cross-base-ports gcc-6-powerpc64-linux-gnu
>   gcc-6-powerpc64-linux-gnu-base gcc-powerpc64-linux-gnu
> libasan3-ppc64-cross
>   libatomic1-ppc64-cross libc6-dev-ppc64-cross libc6-ppc64-cross
>   libgcc-6-dev-ppc64-cross libgcc1-ppc64-cross libgomp1-ppc64-cross
>   libitm1-ppc64-cross libstdc++6-ppc64-cross libubsan0-ppc64-cross
>   linux-libc-dev-ppc64-cross
> 0 upgraded, 18 newly installed, 0 to remove and 127 not upgraded.
> Need to get 20.9 MB of archives.
> After this operation, 69.5 MB of additional disk space will be used.
> Do you want to continue? [Y/n] y
> Get:1 http://ftp.us.debian.org/debian stretch/main amd64
> gcc-6-powerpc64-linux-gnu-base amd64 6.3.0-18cross1 [180 kB]
> Get:2 http://ftp.us.debian.org/debian stretch/main amd64
> cpp-6-powerpc64-linux-gnu amd64 6.3.0-18cross1 [5,969 kB]
> Get:3 http://ftp.us.debian.org/debian stretch/main amd64
> cpp-powerpc64-linux-gnu amd64 4:6.3.0-4 [15.6 kB]
> Get:4 http://ftp.us.debian.org/debian stretch/main amd64
> binutils-powerpc64-linux-gnu amd64 2.28-5 [2,318 kB]
> Get:5 http://ftp.us.debian.org/debian stretch/main amd64
> gcc-6-cross-base-ports all 6.3.0-18cross1 [173 kB]
> Get:6 http://ftp.us.debian.org/debian stretch/main amd64
> libc6-ppc64-cross all 2.24-10cross1 [1,321 kB]
> Get:7 http://ftp.us.debian.org/debian stretch/main amd64
> libgcc1-ppc64-cross all 1:6.3.0-18cross1 [28.3 kB]
> Get:8 http://ftp.us.debian.org/debian stretch/main amd64
> libgomp1-ppc64-cross all 6.3.0-18cross1 [64.5 kB]
> Get:9 http://ftp.us.debian.org/debian stretch/main amd64
> libitm1-ppc64-cross all 6.3.0-18cross1 [27.8 kB]
> Get:10 http://ftp.us.debian.org/debian stretch/main amd64
> libatomic1-ppc64-cross all 6.3.0-18cross1 [8,526 B]
> Get:11 http://ftp.us.debian.org/debian stretch/main amd64
> libstdc++6-ppc64-cross all 6.3.0-18cross1 [374 kB]
> Get:12 http://ftp.us.debian.org/debian stretch/main amd64
> libasan3-ppc64-cross all 6.3.0-18cross1 [271 kB]
> Get:13 http://ftp.us.debian.org/debian stretch/main amd64
> libubsan0-ppc64-cross all 6.3.0-18cross1 [103 kB]
> Get:14 http://ftp.us.debian.org/debian stretch/main amd64
> libgcc-6-dev-ppc64-cross all 6.3.0-18cross1 [653 kB]
> Get:15 http://ftp.us.debian.org/debian stretch/main amd64
> gcc-6-powerpc64-linux-gnu amd64 6.3.0-18cross1 [6,260 kB]
> Get:16 http://ftp.us.debian.org/debian stretch/main amd64
> gcc-powerpc64-linux-gnu amd64 4:6.3.0-4 [1,376 B]
> Get:17 http://ftp.us.debian.org/debian stretch/main amd64
> linux-libc-dev-ppc64-cross all 4.9.25-1cross1 [783 kB]
> Get:18 http://ftp.us.debian.org/debian stretch/main amd64
> libc6-dev-ppc64-cross all 2.24-10cross1 [2,325 kB]
> Fetched 20.9 MB in 6s (3,017 kB/s)                                      
>       
> Selecting previously unselected package
> gcc-6-powerpc64-linux-gnu-base:amd64.
> (Reading database ... 211221 files and directories currently installed.)
> Preparing to unpack
> .../00-gcc-6-powerpc64-linux-gnu-base_6.3.0-18cross1_amd64.deb ...
> Unpacking gcc-6-powerpc64-linux-gnu-base:amd64 (6.3.0-18cross1) ...
> Selecting previously unselected package cpp-6-powerpc64-linux-gnu.
> Preparing to unpack
> .../01-cpp-6-powerpc64-linux-gnu_6.3.0-18cross1_amd64.deb ...
> Unpacking cpp-6-powerpc64-linux-gnu (6.3.0-18cross1) ...
> Selecting previously unselected package cpp-powerpc64-linux-gnu.
> Preparing to unpack .../02-cpp-powerpc64-linux-gnu_4%3a6.3.0-4_amd64.deb ...
> Unpacking cpp-powerpc64-linux-gnu (4:6.3.0-4) ...
> Selecting previously unselected package binutils-powerpc64-linux-gnu.
> Preparing to unpack .../03-binutils-powerpc64-linux-gnu_2.28-5_amd64.deb ...
> Unpacking binutils-powerpc64-linux-gnu (2.28-5) ...
> Selecting previously unselected package gcc-6-cross-base-ports.
> Preparing to unpack .../04-gcc-6-cross-base-ports_6.3.0-18cross1_all.deb ...
> Unpacking gcc-6-cross-base-ports (6.3.0-18cross1) ...
> Selecting previously unselected package libc6-ppc64-cross.
> Preparing to unpack .../05-libc6-ppc64-cross_2.24-10cross1_all.deb ...
> Unpacking libc6-ppc64-cross (2.24-10cross1) ...
> Selecting previously unselected package libgcc1-ppc64-cross.
> Preparing to unpack
> .../06-libgcc1-ppc64-cross_1%3a6.3.0-18cross1_all.deb ...
> Unpacking libgcc1-ppc64-cross (1:6.3.0-18cross1) ...
> Selecting previously unselected package libgomp1-ppc64-cross.
> Preparing to unpack .../07-libgomp1-ppc64-cross_6.3.0-18cross1_all.deb ...
> Unpacking libgomp1-ppc64-cross (6.3.0-18cross1) ...
> Selecting previously unselected package libitm1-ppc64-cross.
> Preparing to unpack .../08-libitm1-ppc64-cross_6.3.0-18cross1_all.deb ...
> Unpacking libitm1-ppc64-cross (6.3.0-18cross1) ...
> Selecting previously unselected package libatomic1-ppc64-cross.
> Preparing to unpack .../09-libatomic1-ppc64-cross_6.3.0-18cross1_all.deb ...
> Unpacking libatomic1-ppc64-cross (6.3.0-18cross1) ...
> Selecting previously unselected package libstdc++6-ppc64-cross.
> Preparing to unpack .../10-libstdc++6-ppc64-cross_6.3.0-18cross1_all.deb ...
> Unpacking libstdc++6-ppc64-cross (6.3.0-18cross1) ...
> Selecting previously unselected package libasan3-ppc64-cross.
> Preparing to unpack .../11-libasan3-ppc64-cross_6.3.0-18cross1_all.deb ...
> Unpacking libasan3-ppc64-cross (6.3.0-18cross1) ...
> Selecting previously unselected package libubsan0-ppc64-cross.
> Preparing to unpack .../12-libubsan0-ppc64-cross_6.3.0-18cross1_all.deb ...
> Unpacking libubsan0-ppc64-cross (6.3.0-18cross1) ...
> Selecting previously unselected package libgcc-6-dev-ppc64-cross.
> Preparing to unpack
> .../13-libgcc-6-dev-ppc64-cross_6.3.0-18cross1_all.deb ...
> Unpacking libgcc-6-dev-ppc64-cross (6.3.0-18cross1) ...
> Selecting previously unselected package gcc-6-powerpc64-linux-gnu.
> Preparing to unpack
> .../14-gcc-6-powerpc64-linux-gnu_6.3.0-18cross1_amd64.deb ...
> Unpacking gcc-6-powerpc64-linux-gnu (6.3.0-18cross1) ...
> Selecting previously unselected package gcc-powerpc64-linux-gnu.
> Preparing to unpack .../15-gcc-powerpc64-linux-gnu_4%3a6.3.0-4_amd64.deb ...
> Unpacking gcc-powerpc64-linux-gnu (4:6.3.0-4) ...
> Selecting previously unselected package linux-libc-dev-ppc64-cross.
> Preparing to unpack
> .../16-linux-libc-dev-ppc64-cross_4.9.25-1cross1_all.deb ...
> Unpacking linux-libc-dev-ppc64-cross (4.9.25-1cross1) ...
> Selecting previously unselected package libc6-dev-ppc64-cross.
> Preparing to unpack .../17-libc6-dev-ppc64-cross_2.24-10cross1_all.deb ...
> Unpacking libc6-dev-ppc64-cross (2.24-10cross1) ...
> Setting up linux-libc-dev-ppc64-cross (4.9.25-1cross1) ...
> Setting up binutils-powerpc64-linux-gnu (2.28-5) ...
> Processing triggers for libc-bin (2.24-11+deb9u1) ...
> Processing triggers for man-db (2.7.6.1-2) ...
> Setting up gcc-6-powerpc64-linux-gnu-base:amd64 (6.3.0-18cross1) ...
> Setting up gcc-6-cross-base-ports (6.3.0-18cross1) ...
> Setting up libc6-ppc64-cross (2.24-10cross1) ...
> Setting up libitm1-ppc64-cross (6.3.0-18cross1) ...
> Setting up libgcc1-ppc64-cross (1:6.3.0-18cross1) ...
> Setting up libatomic1-ppc64-cross (6.3.0-18cross1) ...
> Setting up libc6-dev-ppc64-cross (2.24-10cross1) ...
> Setting up libstdc++6-ppc64-cross (6.3.0-18cross1) ...
> Setting up cpp-6-powerpc64-linux-gnu (6.3.0-18cross1) ...
> Setting up libgomp1-ppc64-cross (6.3.0-18cross1) ...
> Setting up libubsan0-ppc64-cross (6.3.0-18cross1) ...
> Setting up libasan3-ppc64-cross (6.3.0-18cross1) ...
> Setting up libgcc-6-dev-ppc64-cross (6.3.0-18cross1) ...
> Setting up cpp-powerpc64-linux-gnu (4:6.3.0-4) ...
> Setting up gcc-6-powerpc64-linux-gnu (6.3.0-18cross1) ...
> Setting up gcc-powerpc64-linux-gnu (4:6.3.0-4) ...
> jam at debian:~$ 
> 
> 
> Then I did:
> 
> export CROSS="powerpc64-unknown-linux-gnu-"
> jam at debian:~/SLOF-master$ make qemu
> ******** Building qemu system ********
>  ====== Building common libraries ======
> [CC]strcat.o
> /bin/sh: 1: powerpc64-unknown-linux-gnu-gcc: not found

How's the cross compiler named in that Debian package? You need to
specify the correct prefix with the "CROSS" variable. E.g. maybe it's
rather:

export CROSS="powerpc64-linux-gnu-"

without the "unknown" in it.

 Thomas



More information about the SLOF mailing list