ArmV8 architecture allows to have at EL1 execute a kernel-OS as 64 bits and at 
EL0 apps at 32 bits.
I was able to deploy a RootFS compiled as ARMv7 (32 bits) and boot a system to 
login prompt.

Problem is now with kernel modules. 
They are compiled in 64 bit mode, but they have to be insmod in a rootFS as 32 
I created the recipe below posted to deploy my hello-mod.ko into the /myfiles 
folder to do a manual test and insmod - it.
Yocto gave me a QA issue stating that the ko is built as AARC64 bits and it was 
expecting a 32 bits.

I temporarily changed the execution permissions of the hello-mod.ko and yocto 
is ok now. 
I would like to post the question if somebody has tried what I described above. 

>From the ARM architecture it is allowed, but I am not sure if it won't be a 
>natural flow for linux to support it.

I'd appreciate any pointers.



SUMMARY = "Example of how to deploy an binary Linux kernel module"
LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"

kmoddir = "/myfiles"
RDEPENDS_${PN} = "bash"


SRC_URI = "file://${MACHINE}/hello-mod.ko \
           file://COPYING \

#Don't configure or build this recipe
do_configure[noexec] = "1"
do_compile[noexec] = "1"

do_install_append() {
     mkdir -p ${D}${kmoddir}/
     install -d ${D}${kmoddir}/

     cp -P ${WORKDIR}/${MACHINE}/hello-mod.ko ${D}${kmoddir}/hello-mod.ko
     chmod -x ${D}${kmoddir}/hello-mod.ko
     #find ${D}${kmoddir} -type f -exec chmod 755 {} \;
     chown -R root:root "${D}"


#deploy files to final sysconfdir where rootfs will be generated
FILES_${PN} += "${kmoddir}/hello-mod.ko"

S = "${WORKDIR}"


linux-yocto mailing list

Reply via email to