xref: /OK3568_Linux_fs/buildroot/docs/manual/beyond-buildroot.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun// -*- mode:doc; -*-
2*4882a593Smuzhiyun// vim: set syntax=asciidoc:
3*4882a593Smuzhiyun
4*4882a593Smuzhiyun== Beyond Buildroot
5*4882a593Smuzhiyun
6*4882a593Smuzhiyun=== Boot the generated images
7*4882a593Smuzhiyun
8*4882a593Smuzhiyun==== NFS boot
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunTo achieve NFS-boot, enable _tar root filesystem_ in the _Filesystem
11*4882a593Smuzhiyunimages_ menu.
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunAfter a complete build, just run the following commands to setup the
14*4882a593SmuzhiyunNFS-root directory:
15*4882a593Smuzhiyun
16*4882a593Smuzhiyun-------------------
17*4882a593Smuzhiyunsudo tar -xavf /path/to/output_dir/rootfs.tar -C /path/to/nfs_root_dir
18*4882a593Smuzhiyun-------------------
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunRemember to add this path to +/etc/exports+.
21*4882a593Smuzhiyun
22*4882a593SmuzhiyunThen, you can execute a NFS-boot from your target.
23*4882a593Smuzhiyun
24*4882a593Smuzhiyun==== Live CD
25*4882a593Smuzhiyun
26*4882a593SmuzhiyunTo build a live CD image, enable the _iso image_ option in the
27*4882a593Smuzhiyun_Filesystem images_ menu. Note that this option is only available on
28*4882a593Smuzhiyunthe x86 and x86-64 architectures, and if you are building your kernel
29*4882a593Smuzhiyunwith Buildroot.
30*4882a593Smuzhiyun
31*4882a593SmuzhiyunYou can build a live CD image with either IsoLinux, Grub or Grub 2 as
32*4882a593Smuzhiyuna bootloader, but only Isolinux supports making this image usable both
33*4882a593Smuzhiyunas a live CD and live USB (through the _Build hybrid image_ option).
34*4882a593Smuzhiyun
35*4882a593SmuzhiyunYou can test your live CD image using QEMU:
36*4882a593Smuzhiyun
37*4882a593Smuzhiyun-------------------
38*4882a593Smuzhiyunqemu-system-i386 -cdrom output/images/rootfs.iso9660
39*4882a593Smuzhiyun-------------------
40*4882a593Smuzhiyun
41*4882a593SmuzhiyunOr use it as a hard-drive image if it is a hybrid ISO:
42*4882a593Smuzhiyun
43*4882a593Smuzhiyun-------------------
44*4882a593Smuzhiyunqemu-system-i386 -hda output/images/rootfs.iso9660
45*4882a593Smuzhiyun-------------------
46*4882a593Smuzhiyun
47*4882a593SmuzhiyunIt can be easily flashed to a USB drive with +dd+:
48*4882a593Smuzhiyun
49*4882a593Smuzhiyun-------------------
50*4882a593Smuzhiyundd if=output/images/rootfs.iso9660 of=/dev/sdb
51*4882a593Smuzhiyun-------------------
52*4882a593Smuzhiyun
53*4882a593Smuzhiyun=== Chroot
54*4882a593Smuzhiyun
55*4882a593SmuzhiyunIf you want to chroot in a generated image, then there are few thing
56*4882a593Smuzhiyunyou should be aware of:
57*4882a593Smuzhiyun
58*4882a593Smuzhiyun* you should setup the new root from the _tar root filesystem_ image;
59*4882a593Smuzhiyun
60*4882a593Smuzhiyun* either the selected target architecture is compatible with your host
61*4882a593Smuzhiyun  machine, or you should use some +qemu-*+ binary and correctly set it
62*4882a593Smuzhiyun  within the +binfmt+ properties to be able to run the binaries built
63*4882a593Smuzhiyun  for the target on your host machine;
64*4882a593Smuzhiyun
65*4882a593Smuzhiyun* Buildroot does not currently provide +host-qemu+ and +binfmt+
66*4882a593Smuzhiyun  correctly built and set for that kind of use.
67