[U-Boot] Nokia RX-51 (N900) board broken

Hello,
Nokia N900 board does not work anymore from master branch in qemu. I bisected first commit which broke it. It is:
41623c91b09a0c865fab41acdaff30f060f29ad6 arm: move exception handling out of start.S files
Before this commit uboot on n900 in qemu working fine. Since this commit qemu crash with fatal error (see below). I bisected other two commits which changed error behaviour, but still uboot is not working...
============================================
Range: 41623c91b09a0c865fab41acdaff30f060f29ad6 .. 5bfdcebf73f843b4a0968e87cff9ad6546358c8d
Commit: 41623c91b09a0c865fab41acdaff30f060f29ad6 Author: Albert ARIBAUD albert.u.boot@aribaud.net 2014-04-15 16:13:51 Committer: Albert ARIBAUD albert.u.boot@aribaud.net 2014-05-15 16:24:53 Message: arm: move exception handling out of start.S files
Error: qemu crashed with error message:
qemu: fatal: Trying to execute code outside RAM or ROM at 0x00014080 R00=00000000 R01=000007a3 R02=80000100 R03=80500508 R04=805003c8 R05=800003e8 R06=80531db0 R07=804ffb98 R08=00000000 R09=00000800 R10=80000140 R11=00000000 R12=80000414 R13=402064b0 R14=80100004 R15=00014080 PSR=600001db -ZC- A und32
============================================
Range: 58f9e1ae6391a1fbb7ca024ae45e288aabb88807 .. 2e07c249a67e055db294818ff063d502d15db0f8
Commit: 58f9e1ae6391a1fbb7ca024ae45e288aabb88807 Author: Benoit Thebaudeau benoit.thebaudeau.dev@gmail.com 2014-09-03 23:32:33 Committer: Albert ARIBAUD albert.u.boot@aribaud.net 2014-09-11 18:04:34
Error: uboot freezed without any error message in serial console and with broken screen output
============================================
Range: c57a642384df0dfaacc8e9c6c06d76b5aecb965d .. b7b3b8c6a0bfc87047cb18a7abfa06fb6e9d0331
Commit: c57a642384df0dfaacc8e9c6c06d76b5aecb965d Author: Georges Savoundararadj savoundg@gmail.com 2014-10-28 23:16:10 Committer: Tom Rini trini@ti.com 2014-10-29 14:02:17 Message: arm: make .vectors section allocatable
Error: uboot printed error to serial console and rebooted machine:
prefetch abort pc : [<00000000>] lr : [<8fdd3684>] sp : 8fcefe78 ip : 0000002a fp : 8fdfd96c r10: 8fdfda3c r9 : 8fceff24 r8 : 8fdfd968 r7 : 80000140 r6 : 000000ff r5 : 80000420 r4 : 80000420 r3 : 40208000 r2 : 00000004 r1 : 00000000 r0 : 0000002a Flags: nzcv IRQs on FIQs on Mode USER_26 Resetting CPU ...

Dear Pali Rohár,
On Sat, Jan 3, 2015 at 11:47 AM, Pali Rohár pali.rohar@gmail.com wrote:
Hello,
Nokia N900 board does not work anymore from master branch in qemu. I bisected first commit which broke it. It is:
41623c91b09a0c865fab41acdaff30f060f29ad6 arm: move exception handling out of start.S files
Before this commit uboot on n900 in qemu working fine. Since this commit qemu crash with fatal error (see below). I bisected other two commits which changed error behaviour, but still uboot is not working...
============================================
Range: 41623c91b09a0c865fab41acdaff30f060f29ad6 .. 5bfdcebf73f843b4a0968e87cff9ad6546358c8d
Commit: 41623c91b09a0c865fab41acdaff30f060f29ad6 Author: Albert ARIBAUD albert.u.boot@aribaud.net 2014-04-15 16:13:51 Committer: Albert ARIBAUD albert.u.boot@aribaud.net 2014-05-15 16:24:53 Message: arm: move exception handling out of start.S files
Error: qemu crashed with error message:
qemu: fatal: Trying to execute code outside RAM or ROM at 0x00014080 R00=00000000 R01=000007a3 R02=80000100 R03=80500508 R04=805003c8 R05=800003e8 R06=80531db0 R07=804ffb98 R08=00000000 R09=00000800 R10=80000140 R11=00000000 R12=80000414 R13=402064b0 R14=80100004 R15=00014080 PSR=600001db -ZC- A und32
============================================
Range: 58f9e1ae6391a1fbb7ca024ae45e288aabb88807 .. 2e07c249a67e055db294818ff063d502d15db0f8
Commit: 58f9e1ae6391a1fbb7ca024ae45e288aabb88807 Author: Benoit Thebaudeau benoit.thebaudeau.dev@gmail.com 2014-09-03 23:32:33 Committer: Albert ARIBAUD albert.u.boot@aribaud.net 2014-09-11 18:04:34
Error: uboot freezed without any error message in serial console and with broken screen output
============================================
Range: c57a642384df0dfaacc8e9c6c06d76b5aecb965d .. b7b3b8c6a0bfc87047cb18a7abfa06fb6e9d0331
Commit: c57a642384df0dfaacc8e9c6c06d76b5aecb965d Author: Georges Savoundararadj savoundg@gmail.com 2014-10-28 23:16:10 Committer: Tom Rini trini@ti.com 2014-10-29 14:02:17 Message: arm: make .vectors section allocatable
Error: uboot printed error to serial console and rebooted machine:
prefetch abort pc : [<00000000>] lr : [<8fdd3684>]
Can you tell from the .map or .lst files what this 0x8fdd3684 address corresponds to in the source code?
sp : 8fcefe78 ip : 0000002a fp : 8fdfd96c r10: 8fdfda3c r9 : 8fceff24 r8 : 8fdfd968 r7 : 80000140 r6 : 000000ff r5 : 80000420 r4 : 80000420 r3 : 40208000 r2 : 00000004 r1 : 00000000 r0 : 0000002a Flags: nzcv IRQs on FIQs on Mode USER_26 Resetting CPU ...
Best regards, Benoît

On Saturday 03 January 2015 19:13:32 Benoît Thébaudeau wrote:
Dear Pali Rohár,
On Sat, Jan 3, 2015 at 11:47 AM, Pali Rohár
pali.rohar@gmail.com wrote:
Hello,
Nokia N900 board does not work anymore from master branch in qemu. I bisected first commit which broke it. It is:
41623c91b09a0c865fab41acdaff30f060f29ad6 arm: move exception handling out of start.S files
Before this commit uboot on n900 in qemu working fine. Since this commit qemu crash with fatal error (see below). I bisected other two commits which changed error behaviour, but still uboot is not working...
============================================
Range: 41623c91b09a0c865fab41acdaff30f060f29ad6 .. 5bfdcebf73f843b4a0968e87cff9ad6546358c8d
Commit: 41623c91b09a0c865fab41acdaff30f060f29ad6 Author: Albert ARIBAUD albert.u.boot@aribaud.net 2014-04-15 16:13:51 Committer: Albert ARIBAUD albert.u.boot@aribaud.net 2014-05-15 16:24:53 Message: arm: move exception handling out of start.S files
Error: qemu crashed with error message:
qemu: fatal: Trying to execute code outside RAM or ROM at 0x00014080 R00=00000000 R01=000007a3 R02=80000100 R03=80500508 R04=805003c8 R05=800003e8 R06=80531db0 R07=804ffb98 R08=00000000 R09=00000800 R10=80000140 R11=00000000 R12=80000414 R13=402064b0 R14=80100004 R15=00014080 PSR=600001db -ZC- A und32
============================================
Range: 58f9e1ae6391a1fbb7ca024ae45e288aabb88807 .. 2e07c249a67e055db294818ff063d502d15db0f8
Commit: 58f9e1ae6391a1fbb7ca024ae45e288aabb88807 Author: Benoit Thebaudeau benoit.thebaudeau.dev@gmail.com 2014-09-03 23:32:33 Committer: Albert ARIBAUD albert.u.boot@aribaud.net 2014-09-11 18:04:34
Error: uboot freezed without any error message in serial console and with broken screen output
============================================
Range: c57a642384df0dfaacc8e9c6c06d76b5aecb965d .. b7b3b8c6a0bfc87047cb18a7abfa06fb6e9d0331
Commit: c57a642384df0dfaacc8e9c6c06d76b5aecb965d Author: Georges Savoundararadj savoundg@gmail.com 2014-10-28 23:16:10 Committer: Tom Rini trini@ti.com 2014-10-29 14:02:17 Message: arm: make .vectors section allocatable
Error: uboot printed error to serial console and rebooted machine:
prefetch abort pc : [<00000000>] lr : [<8fdd3684>]
Can you tell from the .map or .lst files what this 0x8fdd3684 address corresponds to in the source code?
Hello, it will take some time. I need to find out again how to tell gdb different relocation offset as rx51 board has special asm code for relocation. I forgot that and without configuring correct offset it is not easy to tell you that...
sp : 8fcefe78 ip : 0000002a fp : 8fdfd96c r10: 8fdfda3c r9 : 8fceff24 r8 : 8fdfd968 r7 : 80000140 r6 : 000000ff r5 : 80000420 r4 : 80000420 r3 : 40208000 r2 : 00000004 r1 : 00000000 r0 : 0000002a Flags: nzcv IRQs on FIQs on Mode USER_26 Resetting CPU ...
Best regards, Benoît

Hi Pali Rohár,
I am trying to reproduce the bug but I think I need the qflasher program for converting the u-boot.bin image into a qemu-compatible image. [1] [2]
Where can I get qflasher? Could you explain how to run Nokia RX-51 u-boot's image on qemu?
Thanks a lot,
Best regards,
Georges
[1] http://www.babyaries.org/source/libmeegotouch/save/nand [2] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-June/174805.html
Le 03/01/2015 11:47, Pali Rohár a écrit :
Hello,
Nokia N900 board does not work anymore from master branch in qemu. I bisected first commit which broke it. It is:
41623c91b09a0c865fab41acdaff30f060f29ad6 arm: move exception handling out of start.S files
Before this commit uboot on n900 in qemu working fine. Since this commit qemu crash with fatal error (see below). I bisected other two commits which changed error behaviour, but still uboot is not working...

Hello,
here are commands how to compile u-boot for nokia n900, convert uboot image into n900 nand MTD file and run it under linaro arm version of qemu (upstream version of qemu have not merged n900 support yet):
$ export ARCH=arm $ export CROSS_COMPILE=arm-linux-gnueabi- $ make nokia_rx51_config $ make $ qflasher -x xloader-qemu.bin -s secondary-qemu.bin \ -k u-boot.bin -m rx51 -o u-boot.mtd $ qemu-system-arm -M n900 -mtdblock u-boot.mtd -serial /dev/tty
You need: * qflasher - Nokia generator of nand MTD image with CAL data * xloader-qemu.bin - Nokia first stage bootloader (X-Loader) * secondary-qemu.bin - Nokia second stage bootloader (NOLO) * qemu-system-arm - Linaro arm version of qemu
Linaro arm version of qemu can be downloaded e.g. from ubuntu: http://packages.ubuntu.com/source/precise/qemu-linaro (I'm using this version)
Nokia qflasher and bootloaders are proprietary and closed source but could be found on internet. License allows to redistribute binaries for non commercial purposes. If you are unable to find it on internet anymore (originally they were hosted on website repo.meego.com before intel turned it off) and you are OK with that license, I can send you needed files.
==== Copyright (c) Nokia Corporation 2010 All Rights Reserved.
This material, including documentation and any related computer programs, is protected by copyright controlled by Nokia Corporation. All rights are reserved. Modifying, adapting and/or translating, any or all of this material requires the prior written consent of Nokia. Distribution for commercial purposes not allowed without prior written approval from Nokia. ====
On Sunday 04 January 2015 22:46:41 Georges Savoundararadj wrote:
Hi Pali Rohár,
I am trying to reproduce the bug but I think I need the qflasher program for converting the u-boot.bin image into a qemu-compatible image. [1] [2]
Where can I get qflasher? Could you explain how to run Nokia RX-51 u-boot's image on qemu?
Thanks a lot,
Best regards,
Georges
[1] http://www.babyaries.org/source/libmeegotouch/save/nand [2] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-Jun e/174805.html
Le 03/01/2015 11:47, Pali Rohár a écrit :
Hello,
Nokia N900 board does not work anymore from master branch in qemu. I bisected first commit which broke it. It is:
41623c91b09a0c865fab41acdaff30f060f29ad6 arm: move exception handling out of start.S files
Before this commit uboot on n900 in qemu working fine. Since this commit qemu crash with fatal error (see below). I bisected other two commits which changed error behaviour, but still uboot is not working...

Hi Pali Rohár,
Le 04/01/2015 23:14, Pali Rohár a écrit :
Hello,
here are commands how to compile u-boot for nokia n900, convert uboot image into n900 nand MTD file and run it under linaro arm version of qemu (upstream version of qemu have not merged n900 support yet):
$ export ARCH=arm $ export CROSS_COMPILE=arm-linux-gnueabi- $ make nokia_rx51_config $ make $ qflasher -x xloader-qemu.bin -s secondary-qemu.bin \ -k u-boot.bin -m rx51 -o u-boot.mtd $ qemu-system-arm -M n900 -mtdblock u-boot.mtd -serial /dev/tty
You need:
- qflasher - Nokia generator of nand MTD image with CAL data
- xloader-qemu.bin - Nokia first stage bootloader (X-Loader)
- secondary-qemu.bin - Nokia second stage bootloader (NOLO)
- qemu-system-arm - Linaro arm version of qemu
Linaro arm version of qemu can be downloaded e.g. from ubuntu: http://packages.ubuntu.com/source/precise/qemu-linaro (I'm using this version)
Nokia qflasher and bootloaders are proprietary and closed source but could be found on internet. License allows to redistribute binaries for non commercial purposes. If you are unable to find it on internet anymore (originally they were hosted on website repo.meego.com before intel turned it off) and you are OK with that license, I can send you needed files.
==== Copyright (c) Nokia Corporation 2010 All Rights Reserved.
This material, including documentation and any related computer programs, is protected by copyright controlled by Nokia Corporation. All rights are reserved. Modifying, adapting and/or translating, any or all of this material requires the prior written consent of Nokia. Distribution for commercial purposes not allowed without prior written approval from Nokia. ====
I am OK with that. Please send me the needed files.
Thanks,
Best regards,
Georges

Hi Pali Rohár,
The "prefetch abort exception" occurs in the function do_omap3_emu_romcode_call (in arch/arm/cpu/armv7/omap3/lowlevel_init.S) when executing the instruction "SMC #1".
I can't figure out what makes the difference between the working and the not-working versions. Maybe we should monitor the Secure Configuration Register but gdb does not allow to watch the coprocessor registers.
I hope it helps.
Regards,
Georges
Le 04/01/2015 23:28, Georges Savoundararadj a écrit :
Hi Pali Rohár,
Le 04/01/2015 23:14, Pali Rohár a écrit :
Hello,
here are commands how to compile u-boot for nokia n900, convert uboot image into n900 nand MTD file and run it under linaro arm version of qemu (upstream version of qemu have not merged n900 support yet):
$ export ARCH=arm $ export CROSS_COMPILE=arm-linux-gnueabi- $ make nokia_rx51_config $ make $ qflasher -x xloader-qemu.bin -s secondary-qemu.bin \ -k u-boot.bin -m rx51 -o u-boot.mtd $ qemu-system-arm -M n900 -mtdblock u-boot.mtd -serial /dev/tty
You need:
- qflasher - Nokia generator of nand MTD image with CAL data
- xloader-qemu.bin - Nokia first stage bootloader (X-Loader)
- secondary-qemu.bin - Nokia second stage bootloader (NOLO)
- qemu-system-arm - Linaro arm version of qemu
Linaro arm version of qemu can be downloaded e.g. from ubuntu: http://packages.ubuntu.com/source/precise/qemu-linaro (I'm using this version)
Nokia qflasher and bootloaders are proprietary and closed source but could be found on internet. License allows to redistribute binaries for non commercial purposes. If you are unable to find it on internet anymore (originally they were hosted on website repo.meego.com before intel turned it off) and you are OK with that license, I can send you needed files.
==== Copyright (c) Nokia Corporation 2010 All Rights Reserved.
This material, including documentation and any related computer programs, is protected by copyright controlled by Nokia Corporation. All rights are reserved. Modifying, adapting and/or translating, any or all of this material requires the prior written consent of Nokia. Distribution for commercial purposes not allowed without prior written approval from Nokia. ====
I am OK with that. Please send me the needed files.
Thanks,
Best regards,
Georges

ooo, thanks very much for help!
On non omap HS devices that SMC instruction must not be called. Qemu emulate omap GP device (not HS), so here is must not be called too. I remember that linux kernel crashed when called similar function in qemu.
I temporary commented do_omap3_emu_romcode_call asm code and qemu does not crash anymore.
Can somebody look into uboot code how to disable calling any code which is using smc instructions on non HS devices?
It looks like do_omap3_emu_romcode_call() is called for nokia n900 only from board code. So check for HS device can be added here...
Commenting do_omap3_emu_romcode_call() in board/nokia/rx51/rx51.c also fixed problem in qemu.
On Tuesday 06 January 2015 23:03:23 Georges Savoundararadj wrote:
Hi Pali Rohár,
The "prefetch abort exception" occurs in the function do_omap3_emu_romcode_call (in arch/arm/cpu/armv7/omap3/lowlevel_init.S) when executing the instruction "SMC #1".
I can't figure out what makes the difference between the working and the not-working versions. Maybe we should monitor the Secure Configuration Register but gdb does not allow to watch the coprocessor registers.
I hope it helps.
Regards,
Georges
Le 04/01/2015 23:28, Georges Savoundararadj a écrit :
Hi Pali Rohár,
Le 04/01/2015 23:14, Pali Rohár a écrit :
Hello,
here are commands how to compile u-boot for nokia n900, convert uboot image into n900 nand MTD file and run it under linaro arm version of qemu (upstream version of qemu have not merged n900 support yet):
$ export ARCH=arm $ export CROSS_COMPILE=arm-linux-gnueabi- $ make nokia_rx51_config $ make $ qflasher -x xloader-qemu.bin -s secondary-qemu.bin \
-k u-boot.bin -m rx51 -o u-boot.mtd
$ qemu-system-arm -M n900 -mtdblock u-boot.mtd -serial /dev/tty
You need:
- qflasher - Nokia generator of nand MTD image with CAL
data * xloader-qemu.bin - Nokia first stage bootloader (X-Loader) * secondary-qemu.bin - Nokia second stage bootloader (NOLO) * qemu-system-arm - Linaro arm version of qemu
Linaro arm version of qemu can be downloaded e.g. from ubuntu: http://packages.ubuntu.com/source/precise/qemu-linaro (I'm using this version)
Nokia qflasher and bootloaders are proprietary and closed source but could be found on internet. License allows to redistribute binaries for non commercial purposes. If you are unable to find it on internet anymore (originally they were hosted on website repo.meego.com before intel turned it off) and you are OK with that license, I can send you needed files.
==== Copyright (c) Nokia Corporation 2010 All Rights Reserved.
This material, including documentation and any related computer programs, is protected by copyright controlled by Nokia Corporation. All rights are reserved. Modifying, adapting and/or translating, any or all of this material requires the prior written consent of Nokia. Distribution for commercial purposes not allowed without prior written approval from Nokia. ====
I am OK with that. Please send me the needed files.
Thanks,
Best regards,
Georges

Hi Pali Rohár,
Le 06/01/2015 23:19, Pali Rohár a écrit :
ooo, thanks very much for help!
On non omap HS devices that SMC instruction must not be called. Qemu emulate omap GP device (not HS), so here is must not be called too. I remember that linux kernel crashed when called similar function in qemu.
Are you sure? In the working version (before commit 41623c) SMC instruction is used (in the do_omap3_emu_romcode_call) and it works well.
I temporary commented do_omap3_emu_romcode_call asm code and qemu does not crash anymore.
Can somebody look into uboot code how to disable calling any code which is using smc instructions on non HS devices?
It looks like do_omap3_emu_romcode_call() is called for nokia n900 only from board code. So check for HS device can be added here...
Commenting do_omap3_emu_romcode_call() in board/nokia/rx51/rx51.c also fixed problem in qemu.
On Tuesday 06 January 2015 23:03:23 Georges Savoundararadj wrote:
Hi Pali Rohár,
The "prefetch abort exception" occurs in the function do_omap3_emu_romcode_call (in arch/arm/cpu/armv7/omap3/lowlevel_init.S) when executing the instruction "SMC #1".
I can't figure out what makes the difference between the working and the not-working versions. Maybe we should monitor the Secure Configuration Register but gdb does not allow to watch the coprocessor registers.
I hope it helps.
Regards,
Georges
Le 04/01/2015 23:28, Georges Savoundararadj a écrit :
Hi Pali Rohár,
Le 04/01/2015 23:14, Pali Rohár a écrit :
Hello,
here are commands how to compile u-boot for nokia n900, convert uboot image into n900 nand MTD file and run it under linaro arm version of qemu (upstream version of qemu have not merged n900 support yet):
$ export ARCH=arm $ export CROSS_COMPILE=arm-linux-gnueabi- $ make nokia_rx51_config $ make $ qflasher -x xloader-qemu.bin -s secondary-qemu.bin \
-k u-boot.bin -m rx51 -o u-boot.mtd
$ qemu-system-arm -M n900 -mtdblock u-boot.mtd -serial /dev/tty
You need:
- qflasher - Nokia generator of nand MTD image with CAL
data * xloader-qemu.bin - Nokia first stage bootloader (X-Loader) * secondary-qemu.bin - Nokia second stage bootloader (NOLO) * qemu-system-arm - Linaro arm version of qemu
Linaro arm version of qemu can be downloaded e.g. from ubuntu: http://packages.ubuntu.com/source/precise/qemu-linaro (I'm using this version)
Nokia qflasher and bootloaders are proprietary and closed source but could be found on internet. License allows to redistribute binaries for non commercial purposes. If you are unable to find it on internet anymore (originally they were hosted on website repo.meego.com before intel turned it off) and you are OK with that license, I can send you needed files.
==== Copyright (c) Nokia Corporation 2010 All Rights Reserved.
This material, including documentation and any related computer programs, is protected by copyright controlled by Nokia Corporation. All rights are reserved. Modifying, adapting and/or translating, any or all of this material requires the prior written consent of Nokia. Distribution for commercial purposes not allowed without prior written approval from Nokia. ====
I am OK with that. Please send me the needed files.
Thanks,
Best regards,
Georges

On Tuesday 06 January 2015 23:35:16 Georges Savoundararadj wrote:
Hi Pali Rohár,
Le 06/01/2015 23:19, Pali Rohár a écrit :
ooo, thanks very much for help!
On non omap HS devices that SMC instruction must not be called. Qemu emulate omap GP device (not HS), so here is must not be called too. I remember that linux kernel crashed when called similar function in qemu.
Are you sure?
Yes
In the working version (before commit 41623c) SMC instruction is used (in the do_omap3_emu_romcode_call) and it works well.
Anyway, calling that smc instruction is needed to prevent HW bug on real n900 device. Qemu does not have that HW bug and also do not implement code for that smc instruction.
So really, we should not call do_omap3_emu_romcode_call() function from board/nokia/rx51/rx51.c when uboot is running in qemu.
@Tom, Nishanth, or anybody from TI: how to check if omap device type is HS in uboot? In linux kernel it is possible by:
if (omap_type() == OMAP2_DEVICE_TYPE_SEC) { ... }
I temporary commented do_omap3_emu_romcode_call asm code and qemu does not crash anymore.
Can somebody look into uboot code how to disable calling any code which is using smc instructions on non HS devices?
It looks like do_omap3_emu_romcode_call() is called for nokia n900 only from board code. So check for HS device can be added here...
Commenting do_omap3_emu_romcode_call() in board/nokia/rx51/rx51.c also fixed problem in qemu.
On Tuesday 06 January 2015 23:03:23 Georges Savoundararadj
wrote:
Hi Pali Rohár,
The "prefetch abort exception" occurs in the function do_omap3_emu_romcode_call (in arch/arm/cpu/armv7/omap3/lowlevel_init.S) when executing the instruction "SMC #1".
I can't figure out what makes the difference between the working and the not-working versions. Maybe we should monitor the Secure Configuration Register but gdb does not allow to watch the coprocessor registers.
I hope it helps.
Regards,
Georges
Le 04/01/2015 23:28, Georges Savoundararadj a écrit :
Hi Pali Rohár,
Le 04/01/2015 23:14, Pali Rohár a écrit :
Hello,
here are commands how to compile u-boot for nokia n900, convert uboot image into n900 nand MTD file and run it under linaro arm version of qemu (upstream version of qemu have not merged n900 support yet):
$ export ARCH=arm $ export CROSS_COMPILE=arm-linux-gnueabi- $ make nokia_rx51_config $ make $ qflasher -x xloader-qemu.bin -s secondary-qemu.bin \
-k u-boot.bin -m rx51 -o u-boot.mtd
$ qemu-system-arm -M n900 -mtdblock u-boot.mtd -serial /dev/tty
You need:
- qflasher - Nokia generator of nand MTD image with CAL
data * xloader-qemu.bin - Nokia first stage bootloader (X-Loader) * secondary-qemu.bin - Nokia second stage bootloader (NOLO) * qemu-system-arm - Linaro arm version of qemu
Linaro arm version of qemu can be downloaded e.g. from ubuntu: http://packages.ubuntu.com/source/precise/qemu-linaro (I'm using this version)
Nokia qflasher and bootloaders are proprietary and closed source but could be found on internet. License allows to redistribute binaries for non commercial purposes. If you are unable to find it on internet anymore (originally they were hosted on website repo.meego.com before intel turned it off) and you are OK with that license, I can send you needed files.
==== Copyright (c) Nokia Corporation 2010 All Rights Reserved.
This material, including documentation and any related computer programs, is protected by copyright controlled by Nokia Corporation. All rights are reserved. Modifying, adapting and/or translating, any or all of this material requires the prior written consent of Nokia. Distribution for commercial purposes not allowed without prior written approval from Nokia. ====
I am OK with that. Please send me the needed files.
Thanks,
Best regards,
Georges

On 01/07/2015 03:12 AM, Pali Rohár wrote:
@Tom, Nishanth, or anybody from TI: how to check if omap device type is HS in uboot? In linux kernel it is possible by:
if (omap_type() == OMAP2_DEVICE_TYPE_SEC) { ... }
it should be. CONTROL_STATUS register exists in almost all omap2+ devices. http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm...
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm...
omap3 u-boot implements get_device_type
http://git.denx.de/?p=u-boot.git;a=blob;f=arch/arm/cpu/armv7/omap3/sys_info....
Macro HS_DEVICE could be used?
-- Regards, Nishanth Menon

On Thursday 08 January 2015 01:16:22 Nishanth Menon wrote:
On 01/07/2015 03:12 AM, Pali Rohár wrote:
@Tom, Nishanth, or anybody from TI: how to check if omap device type is HS in uboot? In linux kernel it is possible by:
if (omap_type() == OMAP2_DEVICE_TYPE_SEC) { ... }
it should be. CONTROL_STATUS register exists in almost all omap2+ devices. http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git /tree/arch/arm/mach-omap2/id.c#n53
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git /tree/arch/arm/mach-omap2/soc.h#n120
omap3 u-boot implements get_device_type
http://git.denx.de/?p=u-boot.git;a=blob;f=arch/arm/cpu/armv7/o map3/sys_info.c;h=bbb65bbe7263674c2b47b97ee05a9f588ed1c58f;hb= HEAD#l265
Macro HS_DEVICE could be used?
-- Regards, Nishanth Menon
Thanks, condition if (get_device_type() == HS_DEVICE) fixed problem with qemu. I will send patch to ML.
participants (4)
-
Benoît Thébaudeau
-
Georges Savoundararadj
-
Nishanth Menon
-
Pali Rohár