[OE-core] [PATCH 1/2] scripts/runqemu: qemumips support up to 2GiB RAM

He Zhe zhe.he at windriver.com
Thu Jul 5 09:37:19 UTC 2018



On 2018年07月04日 21:29, Khem Raj wrote:
> i think you can squash both patches into one. Additionally we should
> be able to cover mipsel case as well

I started a build with latest poky and only set DEFAULTTUE=mipsel. Is this the right way to use little endian?

Then I got the following error and found kernel and kernel modules output are all big endian.

ERROR: linux-yocto-4.14.48+gitAUTOINC+94457657b8_6c2433d7c5-r0 do_package_qa: QA Issue: Endiannes did not match (1 to 0) on /work/qemumips-poky-linux/linux-yocto/4.14.48+gitAUTOINC+94457657b8_6c2433d7c5-r0/packages-split/kernel-module-i2c-dev-4.14.48-yocto-standard/lib/modules/4.14.48-yocto-standard/kernel/drivers/i2c/i2c-dev.ko [arch]

Then I tried to build a empty file.
tmp/work/x86_64-linux/gcc-cross-mipsel/8.1.0-r0/recipe-sysroot-native/usr/bin/mipsel-poky-linux/mipsel-poky-linux-gcc -c a.c
as: unrecognized option '-EL'

Does it mean there something wrong with little endian toolchain?

Zhe

> On Tue, Jul 3, 2018 at 11:57 PM He Zhe <zhe.he at windriver.com> wrote:
>> OE uses qemumips to simulate a Malta board by default.
>>
>> As upstream qemu introduced:
>> https://git.qemu.org/?p=qemu.git;a=commit;h=94c2b6aff43cdfcfdfb552773a6b6b973a72ef0b
>>
>> The Malta board can support up to 2GiB of RAM which should
>> be able to boot a Linux kernel built with CONFIG_HIGHMEM
>> enabled and passing "-m 2048" to QEMU and appending the
>> following kernel parameters:
>> ...
>> mem=256M at 0x0 mem=256M at 0x90000000 mem=1536M at 0x20000000
>> ...
>>
>> But the following commit in kernel broke above mem=X at Y setting
>> which added the memory as reserved memory area.
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=73fbc1eba7ffa3bf0ad12486232a8a1edb4e4411
>> ...
>> commit 73fbc1eba7ffa3bf0ad12486232a8a1edb4e4411
>> Author: Marcin Nowakowski <marcin.nowakowski at imgtec.com>
>> Date:   Wed Nov 23 14:43:49 2016 +0100
>>
>>     MIPS: fix mem=X at Y commandline processing
>> ...
>>
>> So remove `mem=*' to disable user-defined physical RAM map
>> which let kernel itself caculates memory ranges.
>>
>> Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
>> Signed-off-by: He Zhe <zhe.he at windriver.com>
>> ---
>>  scripts/runqemu | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/scripts/runqemu b/scripts/runqemu
>> index de42d0f323..597e7e9a79 100755
>> --- a/scripts/runqemu
>> +++ b/scripts/runqemu
>> @@ -668,7 +668,10 @@ class BaseConfig(object):
>>              logger.info('QB_MEM is not set, use 512M by default')
>>              self.set('QB_MEM', '-m 512')
>>
>> -        self.kernel_cmdline_script += ' mem=%s' % self.get('QB_MEM').replace('-m','').strip() + 'M'
>> +        mach = self.get('MACHINE')
>> +        if mach != 'qemumips':
>> +            self.kernel_cmdline_script += ' mem=%s' % self.get('QB_MEM').replace('-m','').strip() + 'M'
>> +
>>          self.qemu_opt_script += ' %s' % self.get('QB_MEM')
>>
>>      def check_tcpserial(self):
>> --
>> 2.11.0
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core at lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core




More information about the Openembedded-core mailing list