We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Showing results for 
Search instead for 
Did you mean: 
Scholar ronnywebers
Registered: ‎10-10-2014

Howto build a user module for Ubuntu rfs instead of petalinux rootfs

I managed to build a user module and get it loading / unloading on a petalinux rootfs, as described in UG1144.


The first steps are :


# create a user module template for 'mymodule' -> see <project>/project-spec/meta-user/recipes-modules
petalinux-create -t modules --name mymodule --enable

# build the user module

according to UG1144, the build process output goes here :


mymodule rpm.png

I can see 4 'rpm' files, which seem to be packages that can be installed. 


Then UG1144 continues with these commands, to build the 'mymodule' into the petalinux image :


cd <project_root>
petalinux-build -c rootfs
petalinux-build -x package

When I try this out, everything works fine on my hardware target, I can indeed  'modprobe' and 'rmmod' my own generated module.


Now question : what do I need to do to get the same working on a Ubuntu RFS which I'm using, instead of a petalinux rfs? (The Ubuntu RFS is working, but I don't know how to add 'mymodule' correctly)


I don't think I can tell petalinux to use my Ubuntu image and run the 'petalinux-build -c rootfs' command ?

Do I need to use one of the .rpm files?


Also I found out that in the petalinux rfs, there are a bunch of files in the /lib/modules/<kernel version> folder :


modules files.png


I think these must be correct too before 'mymodule' can load? It's unclear to me what these files do / mean. Should I just copy these from the 'petalinux' image to my 'ubuntu' image? or how do I get these files corectly setup or generated on my Ubuntu image? Is this part of the 'rpm' install procedure?

** kudo if the answer was helpful. Accept as solution if your question is answered **
0 Kudos
1 Reply
Registered: ‎12-04-2016

Re: Howto build a user module for Ubuntu rfs instead of petalinux rootfs



See if this help you out:-

Edit this FIT image input file to have ubuntu root file system path:-



And convert this input file to image.ub using this command:-

mkimage -f build/tmp/deploy/images/plnx_aarch64/fitImage.its-1.0-r0  image.ub


0 Kudos