Hey folks! here’s the updates of past two weeks on the project!

I have cloned the latest haiku source and built the image file. With the generated image file I have emulated sdhci-pci device successfully. Following are the instructions to be followed:

Cloning the source code

git clone https://github.com/haiku/haiku.git
git clone https://github.com/haiku/buildtools.git

Compiling Source Code

Create a directory where you are going to save the build image and related files

mkdir generated.x86_64; cd generated.x86_64 For compiling

../configure --build-cross-tools x86_64 ../../buildtools

Building Image

Before building the image you need to install some dependencies

sudo apt-get install git nasm autoconf automake texinfo flex bison gawk build-essential unzip wget zip less zlib1g-dev libcurl4-openssl-dev genisoimage libtool

For creating nightly anyboot Haiku iso image

jam -q -j2 @nightly-anyboot ## Error! while building 

Now if you getting an error while building, specifically about haiku revision. Then,

cd haiku/build/jam
cat UserBuildConfig Now copy hrexxxxx, and change directory to haiku/generated.x86_64/build

cd haiku/generated.x86_64/build Then create and write into the file 

echo -n "hrevxxxxx" > haiku-revision After the building and emulation of the device, I have started finding out the device on the PCI bus so that I can add functionalities for data transfer and many more.

Emulation with Qemu

Installing Qemu

apt-get install qemu ### Boot OS in Virtual Drive First of all create a virtual harddrive in which you are going to boot the OS

qemu-img create haiku-vm.img 10G Now boot the OS in virtual drive 

sudo qemu-system-x86_64 -boot d -cdrom haiku/generated.x86_64/haiku-nightly-anyboot.iso -m 512 -hda haiku-vm.img

Now you can simply run the virtual drive

sudo qemu-system-x86_64 haiku-vm.img

Emulation

For emulation a sdhci-pci device

qemu-img create sd-card.img 10G
qemu-system-x86_64 haiku-vm.img  -drive if=sd,index=0,file=sd-card.img,id=mydrive -device sdhci-pci 

Creating Device Driver

I have referred device manager doc as it mentions following things:

APIs implemented so far:

To make the driver module loadable:

Loading the module

jam -q sdhci_pci will create a binary in 

generated.x86_64/objects/haiku/x86_64/release/add-ons/kernel/busses/sdhci You have to place it in 

config/non-packaged/add-ons/kernel/busses/mmc  After rebooting you can check debug messages in

cat /var/log/syslog | grep sdhci_pci Now I am working on finding out number of slots and registering them as child devices with their base adresses.   I have been updating the code on my remote github repo[1] almost everyday, feel free to review it :). Thanks!