[Galaxy S I9000 Android Development] malcho:
Here is example of what i have done with codenameandroid source.

First thanks to Trojan38 for helping with this.

I created folder CNA in my home folder.

repo init -u https://github.com/CNA/android_manifest.git -b jellybean

repo sync

After repo is synced i copied local_manifest.xml from cm10 to include galaxysmtd into source three.

This file can be found in .repo folder.When u open you repo folder you have to enable Show hidden files.

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_samsung_galaxysmtd" path="device/samsung/galaxysmtd" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_device_samsung_aries-common" path="device/samsung/aries-common" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_kernel_samsung_aries" path="kernel/samsung/aries" remote="github" revision="jellybean" />
<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" remote="github" revision="jellybean" />
</manifest>

Also you have to copy these 2 folders from cm10 repo:

/vendor/samsung/aries-common

/vendor/samsung/galaxysmtd

Then go to folder /vendor/cna

Open file vendorsetup.sh

Add lunch combo for galaxysmtd like on code bellow:

add_lunch_combo cna_crespo-userdebug
add_lunch_combo cna_crespo4g-userdebug
add_lunch_combo cna_grouper-userdebug
add_lunch_combo cna_maguro-userdebug
add_lunch_combo cna_stingray-userdebug
add_lunch_combo cna_stingray_cdma-userdebug
add_lunch_combo cna_toro-userdebug
add_lunch_combo cna_toroplus-userdebug
add_lunch_combo cna_umts_everest-userdebug
add_lunch_combo cna_wingray-userdebug
add_lunch_combo cna_d2att-userdebug
add_lunch_combo cna_d2spr-userdebug
add_lunch_combo cna_d2tmo-userdebug
add_lunch_combo cna_d2usc-userdebug
add_lunch_combo cna_d2vzw-userdebug
add_lunch_combo cna_i9300-userdebug
add_lunch_combo cna_galaxysmtd-userdebug

Then go to folder /vendor/cna/products

Create file cna_galaxysmtd.mk

File should look like this

$(call inherit-product, device/samsung/galaxysmtd/full_galaxysmtd.mk)

# Inherit some common stuff.
$(call inherit-product, vendor/cna/config/common_full_phone.mk)

# Inherit some common stuff.
$(call inherit-product, vendor/cna/config/gsm.mk)

PRODUCT_COPY_FILES += \
vendor/cna/prebuilt/hdpi/bootanimation.zip:system/media/bootanimation.zip

# Release name
PRODUCT_RELEASE_NAME := GT-I9000

PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_NAME=GT-I9000 BUILD_FINGERPRINT="samsung/GT-I9000/GT-I9000:2.3.5/GINGERBREAD/XXJVT:user/release-keys" PRIVATE_BUILD_DESC="GT-I9000-user 2.3.5 GINGERBREAD XXJVT release-keys"

PRODUCT_NAME := cna_galaxysmtd
PRODUCT_DEVICE := galaxysmtd
PRODUCT_BRAND := samsung
PRODUCT_MODEL := GT-I9000
PRODUCT_MANUFACTURER := samsung

In that same folder open file AndroidProducts.mk

File should look like this

PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/cna_crespo.mk \
$(LOCAL_DIR)/cna_crespo4g.mk \
$(LOCAL_DIR)/cna_grouper.mk \
$(LOCAL_DIR)/cna_maguro.mk \
$(LOCAL_DIR)/cna_stingray.mk \
$(LOCAL_DIR)/cna_stingray_cdma.mk \
$(LOCAL_DIR)/cna_toro.mk \
$(LOCAL_DIR)/cna_toroplus.mk \
$(LOCAL_DIR)/cna_umts_everest.mk \
$(LOCAL_DIR)/cna_wingray.mk \
$(LOCAL_DIR)/cna_d2att.mk \
$(LOCAL_DIR)/cna_d2spr.mk \
$(LOCAL_DIR)/cna_d2tmo.mk \
$(LOCAL_DIR)/cna_d2usc.mk \
$(LOCAL_DIR)/cna_d2vzw.mk \
$(LOCAL_DIR)/cna_i9300.mk \
$(LOCAL_DIR)/cna_galaxysmtd.mk \

Then do another repo sync.

Then build like this:

. build/envsetup.sh

lunch (choose galaxysmtd)

mka squish

This is how my manifest file looks like.It includes some part of code from CM10.

You can download it from this location.File is default.xml

https://drive.google.com/#folders/0Bw09xjTGhT_HeHF1OVpNYnNwTmM

Want to include something from source into your builds?

For example i want to include DSPManager form CM10 into CNA build.

I will open default.xml file(manifest file) on this location .repo/manifests

Add this line into file

<project path="packages/apps/DSPManager" name="CyanogenMod/android_packages_apps_DSPManager" remote="github" revision="jellybean" />

Go to folder /build/target/product and open file core.mk

Add DSPManager like in code bellow at beggining of the file.

PRODUCT_BRAND := generic
PRODUCT_DEVICE := generic
PRODUCT_NAME := core

PRODUCT_PROPERTY_OVERRIDES := \
ro.config.notification_sound=Proxima.ogg \
ro.config.alarm_alert=Cesium.ogg

PRODUCT_PACKAGES := \
ApplicationsProvider \
BackupRestoreConfirmation \
Browser \
Contacts \
ContactsProvider \
DSPManager \
DefaultContainerService \
DownloadProvider \
DownloadProviderUi \

Like this all your builds for all devices will have DSP Manager included.