-
Notifications
You must be signed in to change notification settings - Fork 8
/
README
41 lines (33 loc) · 1.27 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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 http://xecdesign.com/compiling-a-kernel/.
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: github.com/johnlane/rpi-utils
* 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>`