summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2012-05-30 13:26:20 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-31 21:16:55 +0100
commit614308eef0c25a47a4d36e3058fce561ce53ef2e (patch)
tree8e242a4dfcd49edeb3e55475e774fddd647cbe20
parent69536d42f1a5a532b6aeae04b59511abfeaeaedc (diff)
downloadpoky-614308eef0c25a47a4d36e3058fce561ce53ef2e.tar.gz
documentation/dev-manual/dev-manual-kernel-appendix.xml: Comments removed
I removed two larges sections of old comments. (From yocto-docs rev: df1b08b621f2b449c7575b86ec90c40f1606c43d) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--documentation/dev-manual/dev-manual-kernel-appendix.xml344
1 files changed, 0 insertions, 344 deletions
diff --git a/documentation/dev-manual/dev-manual-kernel-appendix.xml b/documentation/dev-manual/dev-manual-kernel-appendix.xml
index 6b87eaa427..3ac49b92cf 100644
--- a/documentation/dev-manual/dev-manual-kernel-appendix.xml
+++ b/documentation/dev-manual/dev-manual-kernel-appendix.xml
@@ -811,352 +811,8 @@
811 width="2in" depth="3in" align="center" scalefit="1" /> 811 width="2in" depth="3in" align="center" scalefit="1" />
812 </para> 812 </para>
813 </section> 813 </section>
814
815
816
817<!-- <section id='is-vfat-supported'>
818 <title>Is VFAT Supported?</title>
819
820 <para>
821 <literallayout class='monospaced'>
822I entered runqemu qemux86 and it fires upthis fires up the emulator and uses the
823image and filesystem in the build area created in the previous section.
824
825Then I copied over a pre-created and formated 5.2MB VFAT file named vfat.img.
826I did this with scp vfat.img root@192.168.7.2:
827The file is in the root directory.
828I had to do this because the mkfs.vfat vfat.img command does not work.
829mkfs is not recognized in the qemu terminal session.
830
831when I try mount -o loop -t vfat vfat.img mnt/ I get the error
832mount: can't set up loop device: No space left on device.
833This error is because the loop module is not currently in the kernel image.
834However, this module is available in the
835build area in the tarball modules-2.6.37.6-yocto-starndard+-20-qemux86.tgz.
836You can add this to the kernel image by adding the
837IMAGE_INSTALL += " kernel-module-loop" statement at the top of the local.conf
838file in the build area and then rebuilding the kernel using bitbake.
839It should just build whatever is necessary and not go through an entire build again.
840
841
842
843
844 The <filename>menuconfig</filename> tool provides an interactive method with which
845 to set kernel configurations.
846 In order to use <filename>menuconfig</filename> from within the BitBake environment
847 you need to source an environment setup script.
848 This script is located in the local Yocto Project file structure and is called
849 <filename>oe-init-build-env</filename>.
850 </para>
851
852 <para>
853 The following command sets up the environment:
854 <literallayout class='monospaced'>
855 $ cd ~/poky
856 $ source oe-init-build-env
857 $ runqemu qemux86
858 Continuing with the following parameters:
859 KERNEL: [/home/scottrif/poky/build/tmp/deploy/images/bzImage-qemux86.bin]
860 ROOTFS: [/home/scottrif/poky/build/tmp/deploy/images/core-image-sato-qemux86.ext3]
861 FSTYPE: [ext3]
862 Setting up tap interface under sudo
863 Acquiring lockfile for tap0...
864 WARNING: distccd not present, no distcc support loaded.
865 Running qemu...
866 /home/scottrif/poky/build/tmp/sysroots/x86_64-linux/usr/bin/qemu
867 -kernel /home/scottrif/poky/build/tmp/deploy/images/bzImage-qemux86.bin
868 -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=no,downscript=no
869 -hda /home/scottrif/poky/build/tmp/deploy/images/core-image-sato-qemux86.ext3
870 -show-cursor -usb -usbdevice wacom-tablet -vga vmware -enable-gl -no-reboot
871 -m 128 &dash;&dash;append "vga=0 root=/dev/hda rw mem=128M ip=192.168.7.2::192.168.7.1:255.255.255.0 oprofile.timer=1 "
872 Enabling opengl
873 vmsvga_value_write: guest runs Linux.
874 </literallayout>
875 </para>
876 </section>
877
878 <section id='prepare-to-use-menuconfig'>
879 <title>Prepare to use <filename>menuconfig</filename></title>
880
881
882 <para>
883 [WRITER'S NOTE: Stuff from here down are crib notes]
884 </para>
885
886 <para>
887 Once menuconfig fires up you see all kinds of categories that you can interactively
888 investigate.
889 If they have an "M" in it then the feature is "modularized".
890 I guess that means that means that it needs to be manually linked in when the
891 kernel is booted??? (Not sure).
892 If they have an "*" then the feature is automatically part of the kernel.]
893 </para>
894
895 <para>
896 So the tmp/work/ area was created in poky and there is a .config file in there and
897 a .config.old file.
898 The old one must have been created when I exited from menuconfig after poking around
899 a bit.
900 Nope - appears to just be created automatically.
901 </para>
902
903 <para>
904 A good practice is to first determine what configurations you have for the kernel.
905 You can see the results by looking in the .config file in the build/tmp/work/qemux86-poky-linux area
906 of the local YP files.
907 There is a directory named linux-yocto-2.6.37* in the directory.
908 In that directory is a directory named linux-qemux86-standard-build.
909 In that directory you will find a file named .config that is the configuration file
910 for the kernel that will be used when you build the kernel.
911 You can open that file up and examine it.
912 If you do a search for "VFAT" you will see that that particular configuration is not
913 enabled for the kernel.
914 This means that you cannot print a VFAT text file, or for that matter, even mount one
915 from the image if you were to build it at this point.
916 </para>
917
918 <para>
919 You can prove the point by actually trying it at this point.
920 Here are the commands:
921 <literallayout class='monospaced'>
922 $ mkdir ~/vfat-test
923 $ cd ~/vfat-test
924 $ dd if=/dev/zero of=vfat.img bs=1024 count=5000 [creates a 5MB disk image]
925 5+0 records in
926 5+0 records out
927 5242880 bytes (5.2 MB) copied, 0.00798912 s, 656 MB/s
928 $ ls -lah [lists the contents of the new image. l=long, a=all, h=human readable]
929 total 5.1M
930 drwxr-xr-x 2 srifenbark scottrif 4.0K 2011-08-01 08:18 .
931 drwxr-xr-x 66 srifenbark scottrif 4.0K 2011-08-01 08:14 ..
932 -rw-r&dash;&dash;r&dash;&dash; 1 srifenbark scottrif 5.0M 2011-08-01 08:18 vfat.img
933 $ mkfs.vfat vfat.img [formats the disk image]
934 mkfs.vfat 3.0.7 (24 Dec 2009)
935 $ mkdir mnt [mounts the disk image]
936 $ sudo su [gives you root privilege]
937 # mount -o loop vfat.img mnt [mounts it as a loop device]
938 # ls mnt [shows nothing in mnt]
939 # mount [lists the mounted filesystems - note/dev/loop0]
940 /dev/sda1 on / type ext4 (rw,errors=remount-ro)
941 proc on /proc type proc (rw,noexec,nosuid,nodev)
942 none on /sys type sysfs (rw,noexec,nosuid,nodev)
943 none on /sys/fs/fuse/connections type fusectl (rw)
944 none on /sys/kernel/debug type debugfs (rw)
945 none on /sys/kernel/security type securityfs (rw)
946 none on /dev type devtmpfs (rw,mode=0755)
947 none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
948 none on /dev/shm type tmpfs (rw,nosuid,nodev)
949 none on /var/run type tmpfs (rw,nosuid,mode=0755)
950 none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
951 none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
952 binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
953 gvfs-fuse-daemon on /home/scottrif/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=srifenbark)
954 /dev/loop0 on /home/scottrif/vfat-test/mnt type vfat (rw)
955 # echo "hello world" > mnt/hello.txt [creates a text file in the mounted VFAT system]
956 # ls mnt [verifies the file is there]
957 hello.txt
958 # cat mnt/hello.txt [displays the contents of the file created]
959 hello world
960 # umount mnt [unmounts the system and destroys the loop]
961 # exit [gets out of privileged user mode]
962 exit
963
964 $ lsmod [this stuff Darren did to show me ]
965 Module Size Used by [the status of modules in the regular linux kernel]
966 nls_iso8859_1 4633 0
967 nls_cp437 6351 0
968 vfat 10866 0
969 fat 55350 1 vfat
970 snd_hda_codec_atihdmi 3023 1
971 binfmt_misc 7960 1
972 snd_hda_codec_realtek 279008 1
973 ppdev 6375 0
974 snd_hda_intel 25805 2
975 fbcon 39270 71
976 tileblit 2487 1 fbcon
977 font 8053 1 fbcon
978 bitblit 5811 1 fbcon
979 snd_hda_codec 85759 3 snd_hda_codec_atihdmi,snd_hda_codec_realtek,snd_hda_intel
980 softcursor 1565 1 bitblit
981 snd_seq_dummy 1782 0
982 snd_hwdep 6924 1 snd_hda_codec
983 vga16fb 12757 0
984 snd_pcm_oss 41394 0
985 snd_mixer_oss 16299 1 snd_pcm_oss
986 snd_pcm 87946 3 snd_hda_intel,snd_hda_codec,snd_pcm_oss
987 vgastate 9857 1 vga16fb
988 snd_seq_oss 31191 0
989 snd_seq_midi 5829 0
990 snd_rawmidi 23420 1 snd_seq_midi
991 radeon 744506 3
992 snd_seq_midi_event 7267 2 snd_seq_oss,snd_seq_midi
993 ttm 61007 1 radeon
994 snd_seq 57481 6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
995 drm_kms_helper 30742 1 radeon
996 snd_timer 23649 2 snd_pcm,snd_seq
997 snd_seq_device 6888 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
998 usb_storage 50377 0
999 snd 71283 16 \
1000 snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec, \
1001 snd_hwdep,snd_pcm_oss,snd_mixer_oss,snd_pcm, \
1002 snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
1003 soundcore 8052 1 snd
1004 psmouse 65040 0
1005 drm 198886 5 radeon,ttm,drm_kms_helper
1006 i2c_algo_bit 6024 1 radeon
1007 serio_raw 4918 0
1008 snd_page_alloc 8500 2 snd_hda_intel,snd_pcm
1009 dell_wmi 2177 0
1010 dcdbas 6886 0
1011 lp 9336 0
1012 parport 37160 2 ppdev,lp
1013 usbhid 41116 0
1014 ohci1394 30260 0
1015 hid 83888 1 usbhid
1016 ieee1394 94771 1 ohci1394
1017 tg3 122382 0
1018 </literallayout>
1019 </para>
1020 </section>
1021 </section> -->
1022</appendix> 814</appendix>
1023 815
1024<!-- 816<!--
1025
1026
1027EXTRA STUFF I MIGHT NEED BUT NOW SURE RIGHT NOW.
1028
1029In the standard layer structure you have several areas that you need to examine or
1030 modify.
1031 For this example the layer contains four areas:
1032 <itemizedlist>
1033 <listitem><para><emphasis><filename>conf</filename></emphasis> - Contains the
1034 <filename>layer.conf</filename> that identifies the location of the recipe files.
1035 </para></listitem>
1036 <listitem><para><emphasis><filename>images</filename></emphasis> - Contains the
1037 image recipe file.
1038 This recipe includes the base image you will be using and specifies other
1039 packages the image might need.</para></listitem>
1040 <listitem><para><emphasis><filename>recipes-bsp</filename></emphasis> - Contains
1041 recipes specific to the hardware for which you are developing the kernel.
1042 </para></listitem>
1043 <listitem><para><emphasis><filename>recipes-kernel</filename></emphasis> - Contains the
1044 "append" files that add information to the main recipe kernel.
1045 </para></listitem>
1046 </itemizedlist>
1047 </para>
1048
1049 <para>
1050 Let's take a look at the <filename>layer.conf</filename> in the
1051 <filename>conf</filename> directory first.
1052 This configuration file enables the Yocto Project build system to locate and
1053 use the information in your new layer.
1054 </para>
1055
1056 <para>
1057 The variable <filename>BBPATH</filename> needs to include the path to your layer
1058 as follows:
1059 <literallayout class='monospaced'>
1060 BBPATH := "${BBPATH}:${LAYERDIR}"
1061 </literallayout>
1062 And, the variable <filename>BBFILES</filename> needs to be modified to include your
1063 recipe and append files:
1064 <literallayout class='monospaced'>
1065 BBFILES := "${BBFILES} ${LAYERDIR}/images/*.bb \
1066 ${LAYERDIR}/images/*.bbappend \
1067 ${LAYERDIR}/recipes-*/*/*.bb \
1068 ${LAYERDIR}/recipes-*/*/*.bbappend"
1069 </literallayout>
1070 Finally, you need to be sure to use your layer name in these variables at the
1071 end of the file:
1072 <literallayout class='monospaced'>
1073 BBFILE_COLLECTIONS += "elc"
1074 BBFILE_PATTERN_elc := "^${LAYERDIR}/"
1075 BBFILE_PRIORITY_elc = "9"
1076 </literallayout>
1077 </para>
1078
1079 <para>
1080 The <filename>images</filename> directory contains an append file that helps
1081 further define the image.
1082 In our example, the base image is <filename>core-image-minimal</filename>.
1083 The image does, however, need some additional modules that we are using
1084 for this example.
1085 These modules support the amixer functionality.
1086 Here is the append file:
1087 <literallayout class='monospaced'>
1088 require recipes-core/images/poky-image-minimal.bb
1089
1090 IMAGE_INSTALL += "dropbear alsa-utils-aplay alsa-utils-alsamixer"
1091 IMAGE_INSTALL_append_qemux86 += " kernel-module-snd-ens1370 \
1092 kernel-module-snd-rawmidi kernel-module-loop kernel-module-nls-cp437 \
1093 kernel-module-nls-iso8859-1 qemux86-audio alsa-utils-amixer"
1094
1095 LICENSE = "MIT"
1096 </literallayout>
1097 </para>
1098
1099 <para>
1100 While the focus of this example is not on the BSP, it is worth mentioning that the
1101 <filename>recipes-bsp</filename> directory has the recipes and append files for
1102 features that the hardware requires.
1103 In this example, there is a script and a recipe to support the
1104 <filename>amixer</filename> functionality in QEMU.
1105 It is beyond the scope of this manual to go too deeply into the script.
1106 Suffice it to say that the script tests for the presence of the mixer, sets up
1107 default mixer values, enables the mixer, unmutes master and then
1108 sets the volume to 100.
1109 </para>
1110
1111 <para>
1112 The recipe <filename>qemu86-audio.bb</filename> installs and runs the
1113 <filename>amixer</filename> when the system boots.
1114 Here is the recipe:
1115 <literallayout class='monospaced'>
1116 SUMMARY = "Provide a basic init script to enable audio"
1117 DESCRIPTION = "Set the volume and unmute the Front mixer setting during boot."
1118 SECTION = "base"
1119 LICENSE = "MIT"
1120 LIC_FILES_CHKSUM = "file://${POKYBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
1121
1122 PR = "r4"
1123
1124 inherit update-rc.d
1125
1126 RDEPENDS = "alsa-utils-amixer"
1127
1128 SRC_URI = "file://qemux86-audio"
1129
1130 INITSCRIPT_NAME = "qemux86-audio"
1131 INITSCRIPT_PARAMS = "defaults 90"
1132
1133 do_install() {
1134 install -d ${D}${sysconfdir} \
1135 ${D}${sysconfdir}/init.d
1136 install -m 0755 ${WORKDIR}/qemux86-audio ${D}${sysconfdir}/init.d
1137 cat ${WORKDIR}/${INITSCRIPT_NAME} | \
1138 sed -e 's,/etc,${sysconfdir},g' \
1139 -e 's,/usr/sbin,${sbindir},g' \
1140 -e 's,/var,${localstatedir},g' \
1141 -e 's,/usr/bin,${bindir},g' \
1142 -e 's,/usr,${prefix},g' > ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
1143 chmod 755 ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
1144 }
1145 </literallayout>
1146 </para>
1147
1148 <para>
1149 The last area to look at is <filename>recipes-kernel</filename>.
1150 This area holds configuration fragments and kernel append files.
1151 The append file must have the same name as the kernel recipe, which is
1152 <filename>linux-yocto-2.6.37</filename> in this example.
1153 The file can <filename>SRC_URI</filename> statements to point to configuration
1154 fragments you might have in the layer.
1155 The file can also contain <filename>KERNEL_FEATURES</filename> statements that specify
1156 included kernel configurations that ship with the Yocto Project.
1157 </para>
1158-->
1159
1160<!--
1161vim: expandtab tw=80 ts=4 817vim: expandtab tw=80 ts=4
1162--> 818-->