Developer:Guidelines

From foonas

Jump to: navigation, search

Contents

Licensing

When submitting code or modifications to the foonas project you are required to ensure that the changes or additions to the foonas repository are fit for usage and distribution under the GPL, LGPL or other appropriate license within the foonas project.

Git

Git Quick Reference

git-clone git://git.foonas.org/pub/scm/foonas.git /stuff/org.openembedded.dev # get the repository
git-log # view history
# edit files...
git-status # list modified/deleted/new files
git-add filename # Add a file to the staging area
git-reset HEAD filename # Unstage a file
git-rm filename # Remove a file from the working tree and staging area
git-diff --cached # Show the changes in the staging area
git-diff # Show the changes not yet in the staging area
git-commit # Commit the changes in the staging area
git-commit -a # Commit all other changes
# Edit files...
git-add filename
git-commit --amend # Amend the last commit
git-push ssh://user@foonas.org/pub/scm/foonas.git # Push changes in master branch to remote
git-branch -l # list branches
git-checkout -b my_branch # checkout a new branch
# Edit files, commit, amend, etc.
git-checkout master # checkout the master branch
git-merge my_branch # merge my_branch into the master
# Push, edit, commit, etc.
git-stash # temporarily stash the local changes
git-pull # Get changes from remote origin
git-stash list # List stashed changes
git-stash show # show the last stashed change
git-stash pop # Apply the last stashed change and remove it from the list

Commiting to openembedded.git

We use a commit message syntax to allow for easier reading of commit messages in the git SCM system.

distribution / package: Commit message
  • Ensure your changes build locally before committing
  • When you make a change, increment the PR variable of the package in question
  • If your package affects all distributions, use all for the distribution name

Openlink Versioning

When you commit an update to the trunk, update the SVN_REV variable in packages/openlink/openlink_svn.bb to match the revision number that your commit will appear as. This helps us match bugs from beta testers to a particular build. Also increment the PR variable so that it rebuilds properly on other devs systems.

Kernel Support

On ARM platforms please do not include XFS support of any kind. XFS currently has issues on this architecture that can lead to severe data corruption. Kernels compiled for foonas distributions should contain the following support:

foonas

  • Appletalk
  • ATAoE
  • HFS Plus
  • Device Mapper
  • Reiser FS
  • FUSE (provided by kernel module, not OpenEmbedded package)
  • ntfs-3g
  • USB storage
  • JFS

foonas-em

foonas-em has some optional kernel features that you would normally build in to the kernel as modules. This is so we can gain a small kernel size benefit from having the modules compressed inside the initramfs, hence it takes up a bit less space in flash.

  • Automatic kernel module loading (built in)
  • ext2 & ext3 (filesystem module)
  • jffs2 (optional, if platform requires it for flash storage)
  • JFS (filesystem module)
  • ReiserFS (optional filesystem module)
  • VFAT (optional filesystem module and NLS modules)
  • USB Mass storage (optional USB module)
  • ipv6 (built in)

foonas-iscsi

  • Kernel module unloading (built in)
  • ext3 (for devices with no flash storage, this is not supported probably initially, module)
  • jffs2 (for devices with config storage on flash, module)
  • CRC32C (crypto module)
  • libcrc32c (library module)
  • iSCSI Enterprise Target (extra-kernel module)
  • JFFS2 (filesystem module)
  • ipv6 (module)

Debug Builds

To build an image useful for debugging edit your local.conf file and uncomment the following two lines:

# DEBUG_BUILD = "1"
# INHIBIT_PACKAGE_STRIP = "1"

uClibc

Currently we use glibc for foonas builds and uClibc for foonas-em and foonas-iscsi builds. Previously it was required that you set this in your local.conf but this is now done for you in the distribution config files.

You may need to make a change (or possibly create) the platform specific config for uclibc which currently contains a hardcoded path from upstream.

In /stuff/build/org.openembedded.dev/packages/uclibc/uclibc-0.9.29/<platform>/uClibc.machine ensure the following variable is pointing to the right location in your toolchain:

KERNEL_HEADERS="/stuff/build/tmp/cross/<arch>-angstrom-linux-uclibc/include"

xfstests

If you want to run this package add xfstests to your build. Once you have compiled foonas, installed it and booted your box ensure your devices hostname has a corresponding entry in /etc/hosts and then run the following command:

update-alternatives --install /bin/df df /usr/bin/df.coreutils 1000

Now go to /opt/xfstests and read the README. You need two partitions which will be trashed along the way. At the bare minimum you need to put these into some environment variables with a mount point for each, for example:

export TEST_DEV="/dev/sda3"
export TEST_DIR="/media"
export SCRATCH_DEV="/dev/sda4"
export SCRATCH_MNT="/mnt"

Note that some of the tests may need attention to work properly.

Personal tools