Hi Greg,
Greg Ungerer wrote,

> Hi Waldemar,
> 
> On 25/08/16 07:34, Waldemar Brodkorb wrote:
> > Hi Greg,
> > Greg Ungerer wrote,
> > 
> >> Hi Waldemar,
> >>
> >> Waldemar Brodkorb wbx at openadk.org wrote:
> >>> Greg Ungerer wrote,
> >>>> Hi Waldemar,
> >>>> On 23/04/16 08:50, Waldemar Brodkorb wrote:
> >>>>> Hi Greg,
> >>>>> Greg Ungerer wrote,
> >>>>>
> >>>>>>> How could I generate the information for you? Do you have
> >>>>>>> a kernel patch I would need to apply? I can bootup a kernel
> >>>>>>> and execute code, I just can't type anything into the serial
> >>>>>>
> >>>>>> Attached is a kernel patch that modifies binfmt_flat to print
> >>>>>> out the reloc number along with the reloc error. That way we can
> >>>>>> map that back to the reloc entry number printed out in the verbose
> >>>>>> output from elf2flt at compile time.
> >>>>>
> >>>>> Thanks for the patch, will try it.
> >>>>>
> >>>>>>> I am not sure any Qemu Cortex-M3/4 system emulation is
> >>>>>>> available.
> >>>>>>
> >>>>>> Do you know of any qemu target machines that work out-of-the-box
> >>>>>> with a stock linux kernel with MMU disabled?
> >>>>>
> >>>>> No.
> >>>>>
> >>>>>> I used to use the gdb/ARMulator many years ago, but the kernel
> >>>>>> target machine (Atmel/at91eb01) is long gone in modern kernel
> >>>>>> version.
> >>>>>
> >>>>> I tried three different qemu forks, but they all only provide
> >>>>> system level emulation for bare-metal apps. Skyeye crashes for me
> >>>>> and recent GDB doesn't contain the old Armulator stuff.
> >>>>>
> >>>>> I tried Qemu mainline to bootup versatilepb/vexpress Linux kernel
> >>>>> without MMU, but get no output.
> >>>>
> >>>> Looking into the other ARM flat problem, I figured we need to get
> >>>> this problem solved as well.
> >>>>
> >>>> Turns out it is not too hard to get a Versatile target built
> >>>> and running on qemu in no-MMU mode. The only real change required
> >>>> is the attached patch - which fixes the IO device addressing problem.
> >>>>
> >>>> With this patch and starting with the versatile_defconfig you
> >>>> only need a couple of config changes and it will run on the
> >>>> versatile target in qemu. You need to disable CONFIG_MMU
> >>>> and set the DRAM sizing (base at 0, size 128MB).
> >>>>
> >>>> This patch is against a linux-4.4 kernel, and it looks like the
> >>>> versatile target has gone device tree from 4.5 and newer - so
> >>>> this patch won't apply or work on them as is.
> >>>
> >>> Can you show us the commandline you use? What -cpu do you use?
> >>
> >> To run qemu I use:
> >>
> >>   qemu-system-arm -M versatilepb -nographic -kernel images/zImage -append 
> >> "console=ttyAMA0,115200"
> >>
> >> The running system reports:
> >>
> >>   CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00091176
> >>   CPU: VIVT data cache, VIVT instruction cache
> >>   Machine: ARM-Versatile PB
> >>
> >> So its an ARM926 - but I didn't specify any CPU to qemu, I just
> >> let it default to whatever is the versatilepb qemu default.
> >>
> >> Attached is the linux kernel config I used to generate kernel.
> >>
> >> Note that I have had to make a couple of changes to elf2flt to get
> >> apps working. I'll send some emails about those soon. But that 
> >> doesn't affect getting the kernel running on qemu.
> > 
> > I can't get it working.
> > Can you explain what toolchain do you use?
> 
> My own manually compiled toolchain.
> 
> 
> > gcc version? binutils version? soft-float toolchain?
> 
>   gcc-5.4.0
>   binutils-2.26
> 
> Toolchain targeted at arm-uclinuxeabi using hard-float
> (as in --with-float=hard gcc configuration)
> 
> 
> > Are you using arm or thumb instructions?
> 
> ARM only.
> 
> 
> > Can you show me gcc -v of your cross-compiler?
> 
> Using built-in specs.
> COLLECT_GCC=arm-uclinuxeabi-gcc
> COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/arm-uclinuxeabi/5.4.0/lto-wrapper
> Target: arm-uclinuxeabi
> Configured with: ../configure --target=arm-uclinuxeabi --with-float=hard 
> --enable-multilib --with-system-zlib --disable-libsanitizer 
> --enable-languages=c,c++ --prefix=/usr/local
> Thread model: single
> gcc version 5.4.0 (GCC) 
> 
> Kernel is a pristine linux-4.4 with only the hardware IO patch
> listed earlier in the thread applied.
> 
> In the end I didn't need to modify elf2flt to get a working system
> using an arm-uclinuxeabi toolchain.

Thanks for the background information, finally I can get it working,
too. Thanks!

Waldemar
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to