Most of this page is deprecated by now, because OpenEmbedded switched from bitkeeper to monotone and from oemake to bitbake.
These are notes I took as I slowly climbed the OE/BK learning curve.
Feel free to clarify/correct anything as this is just a starting point.
Note that this page uses building OpenSlug as the worked example, whereas the GettingStarted guide uses building Unslung the worked example. Hence the two pages differ for a good reason.
The initial repo clone (from your OE root):
bk clone bk://nslu2-linux.bkbits.net/packages
bk clone bk://nslu2-linux.bkbits.net/oe
bk clone bk://nslu2-linux.bkbits.net/nslu2-package-symlinks
To print or change BK parent
bk parent
To pull in all the latest changes(from within oe/packages folder:
bk pull; bk -r co -q
To undo the most recent pull:
bk unpull
To make a package(s):
oemake <package(s)>
To clean a package(s):
oemake -c clean <package(s)>
ex: oemake -c clean uclibc
To build a complete openslug flash image:
oemake openslug-image (assuming you are building openslug)
(Resulting image is in $OEBUILD/tmp/deploy/images/)
(!!!!! Note that all subsequent oemake commands have to
be run from within the build/ directory !!!!!.)
To extract the kernel and ramdisk files from the final bootstrap-image file
(from within the $OEBUILD/tmp/deploy/images/):
splitnslu unpack openslug-image-nslu2-???
To make a file editable (IMPORTANT!):
bk edit <file>
<editor> <file>
or
bk editor <file> (uses your $EDITOR)
To undo a changeset:
bk undo
To undo a local change to a file:
bk unedit
or
use the 'discard' option of bk citool
To unlock a file:
bk unlock
To create/commit a changeset (GUI):
bk citool
To create a changeset: (command-line)
bk ci <each modified file>
bk add <each new file>
bk commit -y"comments"
To send a changeset to mailing list for peer review:
bk changes (to obtain changeset#)
bk send -r <changeset#> nslu-changesets@lists.sf.net
To push up all new changesets to parent:
bk parent bk://nslu2-linux@nslu2-linux.bkbits.net/openembedded (to use SSH, which requires write access)
bk push
To receive and apply a changeset received by mail:
bk receive < <changeset email file>
bk resolve
To review changesets:
bk csets
Revision Tool:
bk revtool (then open the file in question)
Creating a patch:
diff -urNd oldtree/ newtree/ > patch
Add a patch to a package:
add a "file://blahblah.patch;patch=1" entry to the package's SRC_URI.
Listing locally modified files:
bk sfiles -c shows local modifications (as does bk -r diffs -u, since
it shows diffs of all files against the repo but is horribly slow) bk sfiles -pC (and bk pending) shows changes that have been checked in, but not yet included in a changeset bk sfiles -x shows files that are in the repository but not yet controlled by bk (handy to make sure you didnt forget to
bk add all the patches from a build) bk sfiles -c | bk diffs -u -
Showing the content of the PN variables of a package .oe file:
oebuild showdata <path_to_package_oe_file> | grep PN.*=
Forcing a package to retrieve a specific snapshot:
Add "CVSDATE_<package_name> = <YYYYMMDD>" to the appropriate configuration file (ex: conf/local.conf)
Flashing final image to NSLU2 using Redboot (requires serial/telnet access):
from host shell:
splitnslu unpack <oe produced image from build/tmp/deploy/images/>
from RedBoot prompt:
ip_address -l 192.168.2.77 -h 192.168.2.1
load -r -v -b 0x1000000 <tftp_path>/ramdisk.gz
load -r -v -b 0x1d00000 <tftp_path>/vmlinuz
exec 0x1d00000
======================================
Important files:
$OEBUILD/conf:
-local.conf
$OEROOT/packages/meta/:
- bootstrap-image.oe
- task-bootstrap.oe
- openslug-image.oe
- unslung-*.oe
$OEROOT/packages/conf/distro/:
- openslug.conf
$OEROOT/packages/conf/machine/:
- nslu2.conf
$OEROOT/packages/ipkg:
$OEROOT/packages/files:
- device_table*
$OEROOT/packages/classes:
- nslu2_flashimg.oeclass
- kernel.oeclass
$OEROOT/packages/base-files:
- nslu2/fstab
- etc/host.conf
- etc/nsswitch.conf
$OEROOT/packages/linux/:
- nslu2-openslug_2.6.7.oe
$OEROOT/packages/linux/nslu2-openslug-2.6.7:
- defconfig (contains the linux kernel config settings!!!!)
- various patches