make file for building the raspberry pi linux kernel for use with qemu
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


makefile and resources for building the raspberry pi fork of the linux kernel 
for use with qemu and the arch linux raspberry pi image.

this was all derived from the tutorial at

arch linux notes:
  * config: CONFIG_CGROUPS=y
  * config: CONFIG_VFAT_FS=y
  * config: CONFIG_NLS_CODEPAGE_437=y
  * config: CONFIG_NLS_ISO8859_1=y
  * reference:
  * disk image: fstab must be changed; s/\/dev\/mmcblk0p1/\/dev\/sda1/
  * note: systemd fails to start kernel modules target; im not sure if this is a problem.

boot command line for arch linux:
qemu-system-arm -cpu arm1176 -m 256 -M versatilepb \
	-no-reboot -nographic \
	-kernel kernel-qemu-arm.gz -append "root=/dev/sda2 panic=2 console=ttyAMA0 rw" \
	-hda <disk image> \
	-net nic -net user,hostfwd=tcp::9999-:22

resizing raw disk image partition/filesystem:
qemu-img resize <disk.img> <N>G
fdisk <disk.img>
delete partition and create new partition of the same type and starting at the same block.
sudo losetup -o $((<block start> * <block size>)) -f <disk.img>
sudo file -s /dev/loop0
sudo resize2fs /dev/loop0
sudo losetup -d /dev/loop0

converting raw disk image to qcow2 format:
`qemu-img convert -p -f raw -O qcow2 <disk.img> <disk.qcow2>`