Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added jessie 4.1.7 kernel, tools for building kernel and modified REA…
…DME.md
- Loading branch information
1 parent
7d7c7cf
commit 9fdabc1
Showing
8 changed files
with
142 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
# qemu-rpi-kernel | ||
Qemu kernel for emulating Rpi on QEMU | ||
|
||
While I was searching the internet about emulating QEMU, most of the guides pointed to link https://xecdesign.com/downloads/linux-qemu/kernel-qemu which is dead as of now. | ||
While I was searching the internet about emulating QEMU, most of the guides pointed to link https://xecdesign.com/downloads/linux-qemu/kernel-qemu which is dead as of now. | ||
So making it available on github for someone who would like to use it. | ||
Hope it helps. | ||
|
||
Please note that this kernel has been tested against wheezy image of raspbian but it doesn't work with newer jessie raspbian images. | ||
This repo contains two kernels. | ||
|
||
kernel-qemu-3.10.25-wheezy, which is the original kernel from link https://xecdesign.com/downloads/linux-qemu/kernel-qemu - Works fine with any wheezy image with changes mentioned in wiki. | ||
|
||
kernel-qemu-4.1.7-jessie, which is newer kernel compiled compatible with jessie as well as it works well with older wheezy images, build scripts are in tools folder for reference. | ||
|
||
Known issues: | ||
|
||
1. kernel-qemu-4.1.7-jessie doesn't seem to work properly with 2014-09-24 jessie image as it sends to emergency mode after making standard changes in .img file. Feel free to contribute to wiki / create a PR if you have found a work around for this issue. | ||
|
||
Go through wiki page for step by step guide how to emulate raspberry pi on Qemu on any platform (Win, linux or Mac Os) |
File renamed without changes.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
In this subsection, I've included tools for who want to build kernel themselves. | ||
|
||
build-kernel-qemu script helps one to automate kernel building process for any debian based distro. | ||
|
||
For other OSes, like windows and Mac OS X, you can have a similar tools like gcc-arm-linux-gnueabihf and more and follow | ||
build-kernel-qemu line by line to build kernel yourself. | ||
|
||
Please note that build-kernel-qemu is not an original work of mine and credit for it goes to original author. | ||
|
||
I've taken building references from the links below: | ||
|
||
https://web.archive.org/web/20131210001638/http://xecdesign.com/compiling-a-kernel/ | ||
https://web.archive.org/web/20131209235952/http://xecdesign.com/compiling-qemu/ | ||
https://web.archive.org/web/20131210001407/http://xecdesign.com/working-with-qemu/ | ||
https://web.archive.org/web/20131210001526/http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/ | ||
|
||
build-kernel-qemu references : | ||
|
||
https://github.com/johnlane/rpi-utils/blob/master/kernel/build-kernel-qemu | ||
https://github.com/polaco1782/raspberry-qemu/blob/master/build-kernel-qemu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
# | ||
# Build ARM kernel 4.1.7 for QEMU Raspberry Pi Emulation | ||
# | ||
####################################################### | ||
|
||
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 4.1.7+ 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-4.1.y | ||
git checkout 77798915750db46f10bb449e1625d6368ea42e25 | ||
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 | ||
EOF | ||
|
||
make -j 4 -k ARCH=arm CROSS_COMPILE=${TOOLCHAIN}- menuconfig | ||
make -j 4 -k ARCH=arm CROSS_COMPILE=${TOOLCHAIN}- | ||
cd .. | ||
cp linux/arch/arm/boot/zImage kernel-qemu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
diff -rupN linux/arch/arm/mach-versatile/Kconfig linux.b/arch/arm/mach-versatile/Kconfig | ||
--- linux/arch/arm/mach-versatile/Kconfig 2015-10-12 20:42:55.161811668 -0300 | ||
+++ linux.b/arch/arm/mach-versatile/Kconfig 2015-10-12 16:12:43.125862874 -0300 | ||
@@ -4,7 +4,6 @@ menu "Versatile platform type" | ||
config ARCH_VERSATILE_PB | ||
bool "Support Versatile Platform Baseboard for ARM926EJ-S" | ||
default y | ||
- select CPU_ARM926T | ||
select MIGHT_HAVE_PCI | ||
help | ||
Include support for the ARM(R) Versatile Platform Baseboard | ||
@@ -12,7 +11,6 @@ config ARCH_VERSATILE_PB | ||
|
||
config MACH_VERSATILE_AB | ||
bool "Support Versatile Application Baseboard for ARM926EJ-S" | ||
- select CPU_ARM926T | ||
help | ||
Include support for the ARM(R) Versatile Application Baseboard | ||
for the ARM926EJ-S. | ||
diff -rupN linux/arch/arm/mm/Kconfig linux.b/arch/arm/mm/Kconfig | ||
--- linux/arch/arm/mm/Kconfig 2015-10-12 20:42:55.165811668 -0300 | ||
+++ linux.b/arch/arm/mm/Kconfig 2015-10-12 16:14:36.525859523 -0300 | ||
@@ -71,7 +71,7 @@ config CPU_ARM9TDMI | ||
|
||
# ARM920T | ||
config CPU_ARM920T | ||
- bool "Support ARM920T processor" if (ARCH_MULTI_V4T && ARCH_INTEGRATOR) | ||
+ bool "Support ARM920T processor" if ARCH_INTEGRATOR || ARCH_VERSATILE_PB || ARCH_VERSATILE_AB | ||
select CPU_32v4T | ||
select CPU_ABRT_EV4T | ||
select CPU_CACHE_V4WT | ||
@@ -89,7 +89,7 @@ config CPU_ARM920T | ||
|
||
# ARM922T | ||
config CPU_ARM922T | ||
- bool "Support ARM922T processor" if (ARCH_MULTI_V4T && ARCH_INTEGRATOR) | ||
+ bool "Support ARM922T processor" if ARCH_INTEGRATOR || ARCH_VERSATILE_PB || ARCH_VERSATILE_AB | ||
select CPU_32v4T | ||
select CPU_ABRT_EV4T | ||
select CPU_CACHE_V4WT | ||
@@ -127,7 +127,7 @@ config CPU_ARM925T | ||
|
||
# ARM926T | ||
config CPU_ARM926T | ||
- bool "Support ARM926T processor" if (!ARCH_MULTIPLATFORM || ARCH_MULTI_V5) && (ARCH_INTEGRATOR || MACH_REALVIEW_EB) | ||
+ bool "Support ARM926T processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB || ARCH_VERSATILE_PB || ARCH_VERSATILE_AB | ||
select CPU_32v5 | ||
select CPU_ABRT_EV5TJ | ||
select CPU_CACHE_VIVT | ||
@@ -135,6 +135,7 @@ config CPU_ARM926T | ||
select CPU_CP15_MMU | ||
select CPU_PABRT_LEGACY | ||
select CPU_TLB_V4WBI if MMU | ||
+ depends on !CPU_V6 && !CPU_V7 | ||
help | ||
This is a variant of the ARM920. It has slightly different | ||
instruction sequences for cache and TLB operations. Curiously, | ||
@@ -358,7 +359,7 @@ config CPU_PJ4B | ||
|
||
# ARMv6 | ||
config CPU_V6 | ||
- bool "Support ARM V6 processor" if (!ARCH_MULTIPLATFORM || ARCH_MULTI_V6) && (ARCH_INTEGRATOR || MACH_REALVIEW_EB || MACH_REALVIEW_PBX) | ||
+ bool "Support ARM V6 processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB || MACH_REALVIEW_PBX || MACH_BCM2708 || ARCH_VERSATILE_PB || ARCH_VERSATILE_AB | ||
select CPU_32v6 | ||
select CPU_ABRT_EV6 | ||
select CPU_CACHE_V6 |