-
Notifications
You must be signed in to change notification settings - Fork 2
/
note_br
56 lines (40 loc) · 1.21 KB
/
note_br
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
blackbox ~ # login user
* Setup output folder
$ mkdir br_ppc64
* Get sources
$ wget https://buildroot.uclibc.org/downloads/snapshots/buildroot-snapshot.tar.bz2
* Extract
$ tar xf buildroot-snapshot.tar.bz2
* Move into
$ cd buildroot
* We build out-of-tree, just setup once, don't bother saving now
$ make O=/path/to/your/output/folder
* Move back, now we have the Makefile to build out-of-tree!
$ cd ../br_ppc64
### we TARGET a (real or emulated) pp64
* Import a cfg
make defconfig BR2_DEFCONFIG=/path/to/valid/buildroot/defconfig
* Make changes
make menuconfig
### build
* We build kernel and initramfs as compressed cpio
$ make
### Optional
* Strip kernel
$ export PATH=${PATH}:/path/to/br_ppc64/host/usr/bin
$ powerpc64-linux-strip -s images/vmlinux
* Or
$ host/usr/bin/powerpc64-linux-strip -s images/vmlinux
### Booting on real TARGET
* Use current bootloaded (yaboot, GRUB2)
* From OpenFirmware (Forth command prompt, TFTP)
### Emulating
* Test on emulated qemu-system-TARGET
qemu-system-ppc64 \
-kernel images/vmlinux \
-initrd images/rootfs.cpio.xz \
-vnc :2 -vga std -m 512 \
-netdev user,id=net0 -device virtio-net-pci,netdev=net0 \
-device virtio-keyboard-pci
### Now bootstrap Fedora ppc64
* Todo