[Desire HD Android Development] LuHe:
It's actually really easy to build a rootfs if you're running Fedora or Ubuntu.

I've posted some instructions here.

At first you have to install the Image creator MIC2.

Then you need a kickstart file (if you've ever used Fedora you'll already know them - they are also used in anaconda). You can define the included packages and do a basic system configuration.

My ks file (handset-armv7hl-dhd.ks) is based on the one for the Nexus port:

lang en_US.UTF-8
keyboard us
timezone --utc America/Los_Angeles
auth --useshadow --enablemd5
part / --size=1600 --ondisk mmcblk1p2 --fstype=ext2
#part swap --size=256 --ondisk mmcblk0p --fstype=swap

rootpw meego
xconfig --startxonboot
desktop --autologinuser=meego --defaultdesktop=DUI --session=/usr/bin/mcompositor
user --name meego --groups audio,video --password meego

repo --name=1.2.0.90-oss --baseurl=http://repo.meego.com/MeeGo/builds/1.2.0.90/latest/repos/oss/armv7hl/packages --save --debuginfo --source --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-meego01
repo --name=1.2.0.90-non-oss --baseurl=http://repo.meego.com/MeeGo/builds/1.2.0.90/latest/repos/non-oss/armv7hl/packages --save --debuginfo --source --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-meego01

%packages --excludedocs
@MeeGo Compliance
@MeeGo Core
@MeeGo X Window System
@MeeGo Handset Desktop
@MeeGo Handset Applications
@Nokia N900 Support

# Xorg needs a driver
xorg-x11-drv-fbdev
mesa-dri-swrast-driver
xorg-x11-server-Xorg-setuid

#xorg-x11-drv-omapfb
xorg-x11-utils-xinput
xorg-x11-utils-xev

mesa-dri-swrast-driver
mesa-libEGL
mesa-libGL
mesa-libGLESv1
mesa-libGLESv2
mesa-libGLU
#mesa-libGLUT
freeglut
mesa-libOpenVG

# on n900 alsa comes as a dependency
alsa-utils
alsa-plugins-pulseaudio

# Some extra tools and libs
#openssh-server
xterm
#wget
#qt-demos
#connman-test
#strace
#sensorfw
#libmeegotouch-devel
#bootchart
#widgetgallery

%end

%post
# make sure there aren't core files lying around
rm -f /core*

# Prelink can reduce boot time
if [ -x /usr/sbin/prelink ]; then
/usr/sbin/prelink -aRqm
fi

# Set up sane defaults for mthemedaemon settings
Config_Src=`gconftool-2 --get-default-source`
gconftool-2 --direct --config-source $Config_Src \
-s -t string /meegotouch/theme/target DHD

# sed -i 's!showStatusBar=false!showStatusBar=true!g' /etc/meegotouch/devices.conf

cat >>/etc/meegotouch/devices.conf <<EOF
[DHD]
resolutionX=480
resolutionY=800
ppiX=256
ppiY=256
showStatusBar=true
EOF

cat >/usr/share/meegotouch/targets/Default.conf <<EOF
[resolution]
X=480
Y=800
[ppi]
X=256
Y=256
[allowedOrientations]
keyboardOpen = 270
keyboardClosed = 270
[other]
showStatusBar=true
EOF

#cat >/usr/bin/startdui <<EOF
##!/bin/sh
#/usr/bin/mthemedaemon &
#/usr/bin/sysuid -software -remote-theme &
#/usr/bin/meego-im-uiserver -software -remote-theme &
#/usr/bin/mdecorator -software -remote-theme &
#/usr/bin/duihome --desktop -software -remote-theme &
#EOF
#chmod +x /usr/bin/startdui

# You can use the Android Debug Bridge(adb)
echo "/bin/adbd &" >>/etc/rc.d/rc.local

# symlink init
ln -s /sbin/init /init

# Temporary fix to the meego-handset-fixup rpm package
sed -i 's!aava!DHD!g' /etc/gconf/gconf.xml.defaults/%gconf-tree.xml

# Make sure phonesim is autostarted
[ ! -e /etc/xdg/autostart/phonesim.desktop ] && cp /usr/share/applications/phonesim.desktop /etc/xdg/autostart/

cat > /sbin/bootchartd-long << EOF
#!/bin/sh
exec /sbin/bootchartd -n 4000
EOF
chmod +x /sbin/bootchartd-long
%end

%post --nochroot
if [ -n "$IMG_NAME" ]; then
echo "BUILD: $IMG_NAME" >> $INSTALL_ROOT/etc/meego-release
fi

# Copy in the extras needed for our image

# Android Debugger Bridge
cp -v /root/meego/extras/adbd $INSTALL_ROOT/bin/adbd
chmod u+x $INSTALL_ROOT/bin/adbd

# Kernel modules, WiFi driver
cp -v -R /root/meego/lee/firmware $INSTALL_ROOT/lib/
cp -v -R /root/meego/lee/modules $INSTALL_ROOT/lib/
ln -s / $INSTALL_ROOT/system

# Xorg config
#cp extras/90-hd2-msmfb.conf $INSTALL_ROOT/etc/X11/xorg.conf.d/90-hd2-msmfb.conf

# Software rendering for the UI
sed -i 's!mcompositor!duihome -software!g' $INSTALL_ROOT/etc/sysconfig/uxlaunch

# Enable software rendering systemwide
echo 'export M_USE_SOFTWARE_RENDERING=1' >> $INSTALL_ROOT/home/meego/.bashrc

%end

This one includes the kernel modules from your ubuntu build (copied to /root/meego/lee) and the Android Debug Bridge (adbd copied from my device).

The create a ext2 image run this command:

mic-image-creator --run-mode=1 --cache=mycachedir --format=loop --arch=armv7hl --save-kernel --config=handset-armv7hl-dhd.ks

This image can be renamed to rootfs.ext2 and copied to the sdcard.

Please note that the UI is not yet working - the software rendering seems to cause a lot of problems.

Also the touchscreen isn't working fully (although events are generated as you can see in xev or xterm)

EDIT: Touchpad is working correctly with mtev driver (xorg-x11-drv-mtev)

EDIT2: graphic seems to work too with software rendering