3

I'm trying to run the Ubuntu 14 Raspberry Pi ARM image in QEMU, and for that I need the kernel that matches the version used in the image.

If I mount the image and run file vmlinuz I see:

vmlinuz: symbolic link to `boot/vmlinuz-3.18.0-20-rpi2'

so I'm interpreting that to mean that image uses kernel version 3.18.0.

Using this guide, I tried compiling this version of the kernel, which I'm doing with:

TOOLCHAIN=arm-linux-gnueabihf

sudo apt-get update && sudo apt-get install git libncurses5-dev gcc-arm-linux-gnueabihf
git clone https://github.com/raspberrypi/linux.git
cd linux
# checking out 3.18.0+ branch - change it if you want to change kernel version
# for kernel specific hash, have a looks at : https://github.com/raspberrypi/linux/commits/rpi-3.18.y
# git checkout 1bb18c8f721ef674a447f3622273f2e2de7a205c
make ARCH=arm versatile_defconfig
cat >> .config << EOF
CONFIG_CROSS_COMPILE="$TOOLCHAIN"
CONFIG_CPU_V6=y
CONFIG_ARM_ERRATA_411920=y
CONFIG_ARM_ERRATA_364296=y
CONFIG_AEABI=y
CONFIG_OABI_COMPAT=y
CONFIG_PCI=y
CONFIG_SCSI=y
CONFIG_SCSI_SYM53C8XX_2=y
CONFIG_BLK_DEV_SD=y
CONFIG_BLK_DEV_SR=y
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_TMPFS=y
CONFIG_INPUT_EVDEV=y
CONFIG_EXT3_FS=y
CONFIG_EXT4_FS=y
CONFIG_VFAT_FS=y
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ISO8859_1=y
CONFIG_FONT_8x16=y
CONFIG_LOGO=y
CONFIG_VFP=y
CONFIG_CGROUPS=y
CONFIG_MMC_BCM2835=y
CONFIG_MMC_BCM2835_DMA=y
CONFIG_DMADEVICES=y
CONFIG_DMA_BCM2708=y
EOF

make savedefconfig
#make -j 4 -k ARCH=arm CROSS_COMPILE=${TOOLCHAIN}- menuconfig
make -j 4 -k ARCH=arm CROSS_COMPILE=${TOOLCHAIN}- bzImage
cd ..
cp linux/arch/arm/boot/zImage kernel-qemu-3.18

However, when I go to run this kernel with qemu-system-arm, I get the error:

Error: unrecognized/unsupported processor variant (0x410fb767).

Also, I'm noticing the make command removes my changes to the .config file.

How do I fix this error?

Can I use the vmlinuz file from the image instead of compiling my own from scratch?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.