Message ID | 1480691143-19845-1-git-send-email-vladimir.murzin@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi, On Fri, Dec 02, 2016 at 03:05:18PM +0000, Vladimir Murzin wrote: > there was little interest to run A-class with MMU disabled (or > 1:1 MMU mapping) as well. With a few more changes, on a Cortex-A platform, Kernel reached maximum it can proceed w/o user space help, i.e. upto, "Kernel panic - not syncing: No working init found." Creating user space executables suitable for Cortex-A !MMU is the distance to reach prompt. Seems no !MMU A-class suitable toolchains are available, the existing !MMU toolchains available are for either M or R class. Looks like FDPIC one's also are so (cc'ing Maxime & Mickeal in case they have some input here). And compiling a suitable compiler failed. Let know if any signposts to travel the remaining distance. PS: Version used was v2 instead of this v3 series. Regards afzal
On Saturday, December 10, 2016 11:46:39 PM CET Afzal Mohammed wrote: > Hi, > > On Fri, Dec 02, 2016 at 03:05:18PM +0000, Vladimir Murzin wrote: > > > there was little interest to run A-class with MMU disabled (or > > 1:1 MMU mapping) as well. > > With a few more changes, on a Cortex-A platform, Kernel reached > maximum it can proceed w/o user space help, i.e. upto, > > "Kernel panic - not syncing: No working init found." > > Creating user space executables suitable for Cortex-A !MMU is the > distance to reach prompt. > > Seems no !MMU A-class suitable toolchains are available, the existing > !MMU toolchains available are for either M or R class. Looks like > FDPIC one's also are so (cc'ing Maxime & Mickeal in case they have > some input here). > > And compiling a suitable compiler failed. > > Let know if any signposts to travel the remaining distance. > > PS: Version used was v2 instead of this v3 series. What's wrong with the R class toolchain? Arnd
>>>>> "Afzal" == Afzal Mohammed <afzal.mohd.ma@gmail.com> writes: Hi, > Creating user space executables suitable for Cortex-A !MMU is the > distance to reach prompt. > Seems no !MMU A-class suitable toolchains are available, the existing > !MMU toolchains available are for either M or R class. Looks like > FDPIC one's also are so (cc'ing Maxime & Mickeal in case they have > some input here). > And compiling a suitable compiler failed. > Let know if any signposts to travel the remaining distance. You can build a toolchain and initramfs with Buildroot. Have a look at the stm32f429 nommu config: https://git.buildroot.net/buildroot/tree/configs/stm32f429_disco_defconfig
Hi, On Sat, Dec 10, 2016 at 08:19:19PM +0100, Arnd Bergmann wrote: > On Saturday, December 10, 2016 11:46:39 PM CET Afzal Mohammed wrote: > > Seems no !MMU A-class suitable toolchains are available, the existing > > !MMU toolchains available are for either M or R class. Looks like > > FDPIC one's also are so (cc'ing Maxime & Mickeal in case they have > > some input here). > > > > And compiling a suitable compiler failed. > > > > Let know if any signposts to travel the remaining distance. > What's wrong with the R class toolchain? Yes, hoping that R class toochain for Linux would help here. After a sleep, the same thing came to my mind. The search for R class toolchains turned up baremetal ones only (including Linaro's), but seems there are people using R class with Linux, so the journey now is to get/create R class Linux toolchain. Regards afzal
Hi, On Sat, Dec 10, 2016 at 10:15:35PM +0100, Peter Korsgaard wrote: > >>>>> "Afzal" == Afzal Mohammed <afzal.mohd.ma@gmail.com> writes: > > Seems no !MMU A-class suitable toolchains are available, the existing > > !MMU toolchains available are for either M or R class. Looks like > > FDPIC one's also are so (cc'ing Maxime & Mickeal in case they have > > some input here). > > > And compiling a suitable compiler failed. > > > Let know if any signposts to travel the remaining distance. > You can build a toolchain and initramfs with Buildroot. Have a look at > the stm32f429 nommu config: > > https://git.buildroot.net/buildroot/tree/configs/stm32f429_disco_defconfig iiuc, it builds one for Cortex-M. i already had a file system w/ busybox compiled using a Cortex-M toolchain (stolen from Pengutronix's OSELAS.Toolchain), which works on Cortex M4 (Vybrid VF610 M4 core). But it does not work here, i.e. on Cortex A, seems the above mentioned also would have the same effect. And in buildroot, couldn't see Cortex R option in menuconfig, and selecting Cortex-A's excludes flat binary target & presents only with ELF. Here compiler was attempted to be built using crosstool-NG, target selected was "arm-unknown-linux-gnueabi", and in crosstool-NG menuconfig, MMU was deselected, upon building target got changed to "arm-unknown-linux-uclibcgnueabi". After building binutils & pass 1 compiler, it failed while building multilib. Probably would have to dive into toolchain details now. Regards afzal
>>>>> "Afzal" == Afzal Mohammed <afzal.mohd.ma@gmail.com> writes: Hi, >> You can build a toolchain and initramfs with Buildroot. Have a look at >> the stm32f429 nommu config: >> >> https://git.buildroot.net/buildroot/tree/configs/stm32f429_disco_defconfig > iiuc, it builds one for Cortex-M. i already had a file system w/ > busybox compiled using a Cortex-M toolchain (stolen from > Pengutronix's OSELAS.Toolchain), which works on Cortex M4 (Vybrid > VF610 M4 core). But it does not work here, i.e. on Cortex A, seems the > above mentioned also would have the same effect. Hmm, I'm not sure why a cortex-M toolchain wouldn't work on cortex-A, I thought the 'M' instruction set was a pure subset of the 'A'. > And in buildroot, couldn't see Cortex R option in menuconfig, and > selecting Cortex-A's excludes flat binary target & presents only with > ELF. We indeed don't have cortex-R support. I'm not aware of any cortex-R Linux support. When you select a cortex-A variant, then we enable MMU support by default, but you can disable it under toolchain options (Enable MMU) and then the flat binary option is available.
Hi all, You can find an R toolchain here: https://github.com/mickael-guene/fdpic_manifest/releases/download/v7-r-1.0.1/toolset-v7-r-1.0.1-0-gbdcc6a7c-armv7-r.tgz It's an fdpic toolset for cortex-r cpu class. gcc version is quite old (4.7). Note also that generated code may crash on class A cpu due to generation of udiv/sdiv which is optional for class A. (cortex a15 is ok but not a9). Hope it helps Regards Mickael On 12/11/2016 09:01 PM, Peter Korsgaard wrote: >>>>>> "Afzal" == Afzal Mohammed <afzal.mohd.ma@gmail.com> writes: > > Hi, > > >> You can build a toolchain and initramfs with Buildroot. Have a look at > >> the stm32f429 nommu config: > >> > >> https://git.buildroot.net/buildroot/tree/configs/stm32f429_disco_defconfig > > > iiuc, it builds one for Cortex-M. i already had a file system w/ > > busybox compiled using a Cortex-M toolchain (stolen from > > Pengutronix's OSELAS.Toolchain), which works on Cortex M4 (Vybrid > > VF610 M4 core). But it does not work here, i.e. on Cortex A, seems the > > above mentioned also would have the same effect. > > Hmm, I'm not sure why a cortex-M toolchain wouldn't work on cortex-A, I > thought the 'M' instruction set was a pure subset of the 'A'. > > > And in buildroot, couldn't see Cortex R option in menuconfig, and > > selecting Cortex-A's excludes flat binary target & presents only with > > ELF. > > We indeed don't have cortex-R support. I'm not aware of any cortex-R > Linux support. > > When you select a cortex-A variant, then we enable MMU support by > default, but you can disable it under toolchain options (Enable MMU) and > then the flat binary option is available. >
Hi, On 12/12/16 07:07, mickael guene wrote: > Hi all, > > You can find an R toolchain here: > https://github.com/mickael-guene/fdpic_manifest/releases/download/v7-r-1.0.1/toolset-v7-r-1.0.1-0-gbdcc6a7c-armv7-r.tgz > > It's an fdpic toolset for cortex-r cpu class. gcc version is > quite old (4.7). > > Note also that generated code may crash on class A cpu due to > generation of udiv/sdiv which is optional for class A. > (cortex a15 is ok but not a9). > > Hope it helps Unfortunately, it doesn't help because it depends on FDPIC Linux patches which are out of tree and no link has been given. M-class toolchain should just work with A-class; you don't even need to disable MMU to try it out after d782e42 ("ARM: 8594/1: enable binfmt_flat on systems with an MMU"). Cheers Vladimir > > Regards > Mickael > > On 12/11/2016 09:01 PM, Peter Korsgaard wrote: >>>>>>> "Afzal" == Afzal Mohammed <afzal.mohd.ma@gmail.com> writes: >> >> Hi, >> >> >> You can build a toolchain and initramfs with Buildroot. Have a look at >> >> the stm32f429 nommu config: >> >> >> >> https://git.buildroot.net/buildroot/tree/configs/stm32f429_disco_defconfig >> >> > iiuc, it builds one for Cortex-M. i already had a file system w/ >> > busybox compiled using a Cortex-M toolchain (stolen from >> > Pengutronix's OSELAS.Toolchain), which works on Cortex M4 (Vybrid >> > VF610 M4 core). But it does not work here, i.e. on Cortex A, seems the >> > above mentioned also would have the same effect. >> >> Hmm, I'm not sure why a cortex-M toolchain wouldn't work on cortex-A, I >> thought the 'M' instruction set was a pure subset of the 'A'. >> >> > And in buildroot, couldn't see Cortex R option in menuconfig, and >> > selecting Cortex-A's excludes flat binary target & presents only with >> > ELF. >> >> We indeed don't have cortex-R support. I'm not aware of any cortex-R >> Linux support. >> >> When you select a cortex-A variant, then we enable MMU support by >> default, but you can disable it under toolchain options (Enable MMU) and >> then the flat binary option is available. >> >
On Sun, Dec 11, 2016 at 12:31:04PM +0530, Afzal Mohammed wrote: > And in buildroot, > couldn't see Cortex R option in menuconfig, and selecting Cortex-A's > excludes flat binary target & presents only with ELF. That's something which has changed in the kernel - you can now build for MMUful platforms, and run flat binaries. See commit d782e426b835 ("ARM: 8594/1: enable binfmt_flat on systems with an MMU").
diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c index 40a7c4a..c737124 100644 --- a/drivers/mtd/nand/orion_nand.c +++ b/drivers/mtd/nand/orion_nand.c @@ -65,7 +65,7 @@ static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) */ register uint64_t x asm ("r2"); - asm volatile ("ldrd\t%0, [%1]" : "=&r" (x) : "r" (io_base)); +// asm volatile ("ldrd\t%0, [%1]" : "=&r" (x) : "r" (io_base)); buf64[i++] = x; } i *= 8;