Re: Try to load and run RTEMS Image on Cora-z7-10

2022-05-28 Thread Heinz Junkes
Hi Chris,

I am trying to understand the problems my student is having with the Cora-z7-10.

I am trying my hand at a beaglebone black and RTEMS6 (master).
Unfortunately I have similar problems.

I built the rtems-examples.

rtems/6/bin/arm-rtems6-objcopy -R -S --strip-debug -O binary posix_hello.exe 
posix_hello.bin
cat posix_hello.bin | gzip -9 >posix_hello.gz
rtems/6/bin/mkimage.py -A arm -O rtems -T kernel -a 0x8000 -e 0x8000 -n 
"PosixHello" -d posix_hello.gz posix_hello.img
I then copied this image file to the SD card of the beaglebone black.

and boot it :
…
BeagleBone Black:
BeagleBone: cape eeprom: i2c_probe: 0x54:
BeagleBone: cape eeprom: i2c_probe: 0x55:
BeagleBone: cape eeprom: i2c_probe: 0x56:
BeagleBone: cape eeprom: i2c_probe: 0x57:
Net: eth0: MII MODE
cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
=>
=> fatload mmc 0 0x8080 posix_hello.img
71208 bytes read in 7 ms (9.7 MiB/s)
=> fatload mmc 0 0x8800 am335x-boneblack.dtb
33325 bytes read in 3 ms (10.6 MiB/s)
=> bootm 0x8080 - 0x8800
## Booting kernel from Legacy Image at 8080 ...
Image Name: PosixHello
Created: 2022-05-28 20:26:28 UTC
Image Type: ARM RTEMS Kernel Image (gzip compressed)
Data Size: 71144 Bytes = 69.5 KiB
Load Address: 8000
Entry Point: 8000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
## Transferring control to RTEMS (at address 8000) ...

RTEMS Beagleboard: am335x-based
ARM Debug: 0x4b141000
*** FATAL ***
fatal source: 1 (INTERNAL_ERROR_RTEMS_API)
fatal code: 22 (0x0016)
RTEMS version: 6.0.0.74e532f1f67ed69fdb40d61159e4489fa34244ef
RTEMS tools: 10.3.1 20220224 (RTEMS 6, RSB 
49e3dac17765fa82ce2f754da839638ee352f95c, Newlib 64b2081)
executing thread ID: 0x089010001
executing thread name: IDLE
U-Boot SPL 2018.09-2-g0b54a51eee (Sep 10 2018 - 19:41:39 -0500)
Trying to boot from MMC2
Loading Environment from EXT4...
** Unable to use mmc 0:1 for loading the env **

U-Boot 2018.09-2-g0b54a51eee (Sep 10 2018 - 19:41:39 -0500), Build: 
jenkins-github_Bootloader-Builder-65

CPU : AM335X-GP rev 2.1
I2C: ready
DRAM: 512 MiB
...

Gruss Heinz


> On 4. May 2022, at 09:31, Chris Johns  wrote:
> 
> On 4/5/2022 3:56 pm, Sebastian Huber wrote:
>> On 03/05/2022 16:43, Sarmad Ahmad wrote:
>>> I create the image as follows
>>> 
>>> ./mkimage.py -A arm -O linux -T kernel -a 0x1000 -e 0x1000 -n RTEMS 
>>> -d
>>> hello.exe test5.img
>> 
>> Maybe there is an issue with the mkimage.py script. I would try to use the
>> mkimage tool from U-Boot.
> 
> I am using that script all the time with aarch64 and uboot without error. I am
> using `-O rtems` and not `-O linux` so I do not know if that makes a 
> difference.
> 
> Chris
> ___
> users mailing list
> users@rtems.org
> http://lists.rtems.org/mailman/listinfo/users

___
users mailing list
users@rtems.org
http://lists.rtems.org/mailman/listinfo/users

Re: Try to load and run RTEMS Image on Cora-z7-10

2022-05-28 Thread Chris Johns
On 29/5/2022 6:57 am, Heinz Junkes wrote:
> Hi Chris,
> 
> I am trying to understand the problems my student is having with the 
> Cora-z7-10.
> 
> I am trying my hand at a beaglebone black and RTEMS6 (master).
> Unfortunately I have similar problems.
> 
> I built the rtems-examples.
> 
> rtems/6/bin/arm-rtems6-objcopy -R -S --strip-debug -O binary posix_hello.exe 
> posix_hello.bin
> cat posix_hello.bin | gzip -9 >posix_hello.gz
> rtems/6/bin/mkimage.py -A arm -O rtems -T kernel -a 0x8000 -e 0x8000 
> -n "PosixHello" -d posix_hello.gz posix_hello.img
> I then copied this image file to the SD card of the beaglebone black.
> 
> and boot it :
> …
> BeagleBone Black:
> BeagleBone: cape eeprom: i2c_probe: 0x54:
> BeagleBone: cape eeprom: i2c_probe: 0x55:
> BeagleBone: cape eeprom: i2c_probe: 0x56:
> BeagleBone: cape eeprom: i2c_probe: 0x57:
> Net: eth0: MII MODE
> cpsw, usb_ether
> Press SPACE to abort autoboot in 2 seconds
> =>
> => fatload mmc 0 0x8080 posix_hello.img
> 71208 bytes read in 7 ms (9.7 MiB/s)
> => fatload mmc 0 0x8800 am335x-boneblack.dtb
> 33325 bytes read in 3 ms (10.6 MiB/s)
> => bootm 0x8080 - 0x8800
> ## Booting kernel from Legacy Image at 8080 ...
> Image Name: PosixHello
> Created: 2022-05-28 20:26:28 UTC
> Image Type: ARM RTEMS Kernel Image (gzip compressed)
> Data Size: 71144 Bytes = 69.5 KiB
> Load Address: 8000
> Entry Point: 8000
> Verifying Checksum ... OK
> Uncompressing Kernel Image ... OK
> ## Transferring control to RTEMS (at address 8000) ...
> 
> RTEMS Beagleboard: am335x-based
> ARM Debug: 0x4b141000
> *** FATAL ***
> fatal source: 1 (INTERNAL_ERROR_RTEMS_API)

The `rtems_fatal_error_occurred()` call is happening.

> fatal code: 22 (0x0016)

This code is the `rtems_status_code` which is `RTEMS_NOT_CONFIGURED`:

https://git.rtems.org/rtems/tree/cpukit/include/rtems/rtems/status.h#n204

I am not sure where this is called from. A grep shows only a few spots.

Chris
___
users mailing list
users@rtems.org
http://lists.rtems.org/mailman/listinfo/users