Transcript: creating one generic Atom BSP from another
Starting from scratch, we'll take a relatively generic Atom-based BSP and create another Atom-based BSP from that, that stands a good chance of booting and even booting into graphics, to serve as a starting point for a new BSP.
First set up poky:
trz@elmorro:/usr/local/test/yocto$ git init Initialized empty Git repository in /usr/local/test/yocto/.git/ trz@elmorro:/usr/local/test/yocto$ git remote add poky git://git.yoctoproject.org/poky.git trz@elmorro:/usr/local/test/yocto$ git remote update Fetching poky remote: Counting objects: 106111, done. remote: Compressing objects: 100% (36106/36106), done. remote: Total 106111 (delta 72275), reused 99193 (delta 66808) Receiving objects: 100% (106111/106111), 69.51 MiB | 518 KiB/s, done. Resolving deltas: 100% (72275/72275), done. From git://git.yoctoproject.org/poky * [new branch] 1.1_M1 -> poky/1.1_M1 * [new branch] 1.1_M2 -> poky/1.1_M2 * [new branch] bernard -> poky/bernard * [new branch] blinky -> poky/blinky * [new branch] clyde -> poky/clyde * [new branch] elroy -> poky/elroy * [new branch] green -> poky/green * [new branch] laverne -> poky/laverne * [new branch] master -> poky/master * [new branch] pinky -> poky/pinky * [new branch] purple -> poky/purple * [new tag] 1.1_M1.final -> 1.1_M1.final * [new tag] 1.1_M2.rc1 -> 1.1_M2.rc1 * [new tag] bernard-5.0.1 -> bernard-5.0.1 * [new tag] pinky-3.1.2 -> pinky-3.1.2 From git://git.yoctoproject.org/poky * [new tag] 1.1_M1.rc1 -> 1.1_M1.rc1 * [new tag] 1.1_M1.rc2 -> 1.1_M1.rc2 * [new tag] bernard-1.0rc1 -> bernard-1.0rc1 * [new tag] bernard-5.0 -> bernard-5.0 * [new tag] bernard-5.0-alpha -> bernard-5.0-alpha * [new tag] bernard-5.0rc1 -> bernard-5.0rc1 * [new tag] bernard-5.0rc2 -> bernard-5.0rc2 * [new tag] laverne-4.0 -> laverne-4.0 * [new tag] laverne-4.0.1 -> laverne-4.0.1 * [new tag] m4 -> m4 * [new tag] purple-3.2 -> purple-3.2 * [new tag] purple-3.2.1 -> purple-3.2.1 trz@elmorro:/usr/local/test/yocto$ git checkout -b bernard0 poky/bernard Branch bernard0 set up to track remote branch bernard from poky. Switched to a new branch 'bernard0' trz@elmorro:/usr/local/test/yocto$ git checkout -f
Now check out meta-intel:
trz@elmorro:/usr/local/test/yocto$ mkdir meta-intel trz@elmorro:/usr/local/test/yocto$ cd meta-intel trz@elmorro:/usr/local/test/yocto/meta-intel$ git init Initialized empty Git repository in /usr/local/test/yocto/meta-intel/.git/ trz@elmorro:/usr/local/test/yocto/meta-intel$ git remote add meta-intel git://git.yoctoproject.org/meta-intel.git trz@elmorro:/usr/local/test/yocto/meta-intel$ git remote update Fetching meta-intel remote: Counting objects: 1240, done. remote: Compressing objects: 100% (1008/1008), done. remote: Total 1240 (delta 513), reused 85 (delta 27) Receiving objects: 100% (1240/1240), 1.55 MiB | 510 KiB/s, done. Resolving deltas: 100% (513/513), done. From git://git.yoctoproject.org/meta-intel * [new branch] 1.1_M1 -> meta-intel/1.1_M1 * [new branch] 1.1_M2 -> meta-intel/1.1_M2 * [new branch] bernard -> meta-intel/bernard * [new branch] dvhart/n450 -> meta-intel/dvhart/n450 * [new branch] laverne -> meta-intel/laverne * [new branch] master -> meta-intel/master trz@elmorro:/usr/local/test/yocto/meta-intel$ git checkout -b bernard0 meta-intel/bernard Branch bernard0 set up to track remote branch bernard from meta-intel. Switched to a new branch 'bernard0' trz@elmorro:/usr/local/test/yocto/meta-intel$ git checkout -f
The crownbay-noemgd is the closest thing we have to generic for Atom-based BSPs, so let's start with that:
trz@elmorro:/usr/local/test/yocto/meta-intel$ cp -a meta-crownbay/ meta-mymachine
We want to get rid of anything crownbay, but keep and rename anything crownbay-noemgd. So:
trz@elmorro:/usr/local/test/yocto/meta-intel$ rm meta-mymachine/conf/machine/crownbay.conf trz@elmorro:/usr/local/test/yocto/meta-intel$ mv meta-mymachine/conf/machine/crownbay-noemgd.conf meta-mymachine/conf/machine/mymachine.conf
Next, let's look at mymachine.conf and see which, if any, changes we need there. Aside from the obvious comment changes (lines starting with '#'), there's nothing to change except for the SRCREV lines at the end, which basically tell the recipe which kernel commits to use.
First, we need to figure out which kernel we're using. For our bernard checkout, we see from the line in the mymachine.conf we copied that it's linux-yocto-stable:
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto-stable"
At the bottom of mymachine.conf, we see:
SRCREV_machine_pn-linux-yocto_crownbay-noemgd ?= "56fe215d3f1a2cc3a5a26482ac9809ba44495695" SRCREV_meta_pn-linux-yocto_crownbay-noemgd ?= "e1f85a470934a0cf6abde5d95533e74501822c6b" SRCREV_machine_pn-linux-yocto-stable_crownbay-noemgd ?= "56fe215d3f1a2cc3a5a26482ac9809ba44495695" SRCREV_meta_pn-linux-yocto-stable_crownbay-noemgd ?= "e1f85a470934a0cf6abde5d95533e74501822c6b"
Since we're only interested in linux-yocto-stable, we can remove the linux-yocto SRCREVS, but we need to update the SRCREVs for linux-yocto-stable. So we'll change the linux-yocto-stable lines above to point to the machine and meta branches we'll use for our new BSP.
For the initial version of the BSP, we'll use the "atom-pc-standard" machine branch, since we don't yet have our own, which is something to do in future iterations (not covered by this transcript - see the other tutorials for further steps).
We can find the atom-pc-standard commit id to use by looking in the linux-yocto-2.6.34 kernel repo at http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-2.6.34/commit/?h=atom-pc-standard for the machine branch and http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-2.6.34/commit/?h=wrs_meta for the meta branch (note that branch names have changed in later repos e.g. linux-yocto, so keep that in mind if upgrading your kernel later. So the final SRCREVS for our new kernel are:
SRCREV_machine_pn-linux-yocto-stable_mymachine ?= "72ca49ab08b8eb475cec82a10049503602325791" SRCREV_meta_pn-linux-yocto-stable_mymachine ?= "ec26387cb168e9e0976999b528b5a9dd62e3157a"