Posts

Showing posts with the label software

Building FreeBSD's SDIO driver for BeagleBone Black

Hi all, This post mainly concern with building FreeBSD's SDIO driver for BeagleBone Black by cross compiling it on AMD platform. I had few unresolved issues with the master branch of current FreeBSD tree. So, for this i used another unofficial branch: https://github.com/kibab/freebsd/tree/mmcam-new . It does have the required KERNCONF file with stable SDIO driver. A lot of steps below are similar to the one given on: https://forums.freebsd.org/threads/cross-compiling-beaglebone-on-amd64.64718/#post-384835   with slight but inevitable changes. Procedure:  Before proceeding you need to first install git. sudo pkg update -f sudo pkg install git  Setup project directory by mkdir /BBB  Clone the repository to /BBB/src by git clone -b mmcam-new https://github.com/kibab/freebsd.git /BBB/src Setup environment variables as setenv BASEDIR /BBB setenv MAKEOBJDIRPREFIX $BASEDIR/obj setenv TARGET arm setenv TARGET_ARCH armv6 Note that sometime it shows an error ...

Setting up FreeBSD environment on virtualbox

Image
Hi all, In this post we will review the procedure of setting up FreeBSD environment on virtualbox along with setting up Internet on the guest OS(this was pretty tricky!).BTW, my host OS is Ubuntu 14.04 So, i am assuming you have already installed virtualbox as per your host OS and has downloaded the FreeBSD amd64 iso image(If not you can do it from here and extract it appropriately to get a .iso file. Installing FreeBSD on virtualbox Installing FreeBSD on virtual box is pretty straight forward, just insert use the downloaded iso to boot up the VM with default hardware settings for 64 bit FreeBSD OS. Following will be the bootup window: Just press enter and follow default procedure. Don't attempt to configure network adapter at this stage ww'll do it later after complete installation. Note: Please don't forget to remove the installation disc from virtual machine settings after complete installation. Otherwise, every time during bootup it will recall the install procedure. S...

Implementing a MMC/SD/SDIO stack using CAM framework(Part 2)

Image
Hi, In the next part lets look at other files which makes up the SDIO stack within mmccam framework. Please have  a look at previous part for more info: http://81.4.107.225/wordpress/index.php/2018/03/19/implementing-a-mmc-sd-sdio-stack-using-cam-framework/ mmc_sdio.c +void sdio_fill_mmcio_rw_direct(union ccb *ccb, uint8_t f, uint8_t wr, uint32_t adr, uint8_t *data) { + struct ccb_mmcio *mmcio; + + CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, + ("sdio_fill_mmcio(f=%d, wr=%d, adr=%02x, data=%02x)\n", f, wr, adr, (data == NULL ? 0 : *data))); + mmcio = &ccb->mmcio; + + mmcio->cmd.opcode = SD_IO_RW_DIRECT; + mmcio->cmd.arg = SD_IO_RW_FUNC(f) | SD_IO_RW_ADR(adr); + if (wr) + mmcio->cmd.arg |= SD_IO_RW_WR | SD_IO_RW_RAW | SD_IO_RW_DAT(*data); + mmcio->cmd.flags = MMC_RSP_R5 | MMC_CMD_AC; + mmcio->cmd.data->len = 0; +} sdio_fill_mmcio_rw_direct is basically a wrapper for CMD_52 that's needed ...

Detailed SDIO protocol Implementation

Image
Reference: Wikipedia, https://www.sdcard.org/developers/overview/sdio/sdio_spec/Simplified_SDIO_Card_Spec.pdf  SDIO cards are intended to provide high speed data Input/Output on our regular sd card slot. SDIO cards are compatible with any sd card slot and will not cause any physical damage to the host if it's not compatible with SDIO. When SDIO is plugged in a SDIO compatible host, in its early stage it is in low power mode and consumes very little current. Host identifies the SDIO card ,it's power requirement, it's I/O capabilities etc. If host finds that power requirement is manageable and there is driver for the I/O functionality card is offering it allows the SDIO card to power up completely and start it's I/O functions.  SDIO card allows up to 7 different I/O functions along with 1 memory function. It's available in market in 2 form factors: miniSDIO and full size SDIO. For example http://www.spectec.com.tw/sdw-822..html is a miniSDIO wifi card by spectec. Typ...

Coding conventions : RTEMS

From my experience till now, If you desire to contribute to open source, it's necessary to adapt!! Your old sluggish, inconsistence coding practices wont do any good, neither to you nor to the community. ^^ That was my story!! After a month of working with professionals , I realized that my 5 years of coding was trash! It's not about logic, it's about ethics. To be a good coder, you don't only need to work on your algorithmic skills, but one should also have some ethics, a set of rules to which he adheres.  Earlier, I used to code the way i want to, the way i like. Nevertheless, I am really glad to have some one (In fact a lot of well wisher) trying to improve my skills, trying to lift me up towards professionalism. GSoC does pays it's purpose!! Thanks a lot, Mentors! I really learned a lot, even during my application period. So, this blog post is for new applicants or for someone willing to contribute to any open source community. I spent a lot of time and went thr...

Building and testing RTEMS-libbsd for BeagleBone Black BSP

------------------------------------------------------------------------ Building and testing libbsd for BeagleBone Black BSP ------------------------------------------------------------------------ == Installation overview == === Initial setup === - Jump into your workspace and make a directory named sandbox This folder will contain all our project files - cd sandbox/ - export sandbox=$PWD - git clone git://git.rtems.org/rtems-source-builder.git - git clone git://git.rtems.org/rtems.git - git clone git://git.rtems.org/rtems-libbsd.git === Building desired toolset for ARM === - cd rtems-source-builder/rtems/ - ../source-builder/sb-check - ../source-builder/sb-set-builder --prefix=$sandbox/5 5/rtems-arm - cd $sandbox - export PATH=$PWD/5/bin:$PATH After having required toolchain, we can now proceed towards building our Board Support Package(BSP) === Building Beagleboneblack BSP === - cd $sandbox - mkdir beagleboneblack - cd rtems - ./bootstrap -c &&  ./bootstrap - ../rtems-sourc...

Software licensing : Introduction and it's types

A lot of things changes when you write your first code for commercially use. Software licensing is one of those. Usually while coding for my own projects, i earlier use to omit this. However, recently i was hit hard by this 'vague' topic of licensing. So, i decided to study in depth about different types of licenses for open source and propriety usage and here's the summary: A software license is a type of contract between the company/person who produces the code and the one who uses it. It defines the terms of usage of that piece of code. Before moving forward i have a curious question: What if, i copy a code without accepting it's license and use it under my own terms?Who's gonna know it, just copy, paste and use!! ? Well after searching the net i came across various case studies, some of which are very interesting... Reference: here Now, coming to the types of available licenses in Open source community:  GNU GPL License   GPL license has mainly two versions,...

Software licensing : Introduction and it's types

Image
A lot of things changes when you write your first code for commercially use. Software licensing is one of those. Usually while coding for my own projects, i earlier use to omit this. However, recently i was hit hard by this 'vague' topic of licensing. So, i decided to study in depth about different types of licenses for open source and propriety usage and here's the summary: A software license is a type of contract between the company/person who produces the code and the one who uses it. It defines the terms of usage of that piece of code. Before moving forward i have a curious question: What if, i copy a code without accepting it's license and use it under my own terms?Who's gonna know it, just copy, paste and use!! ? Well after searching the net i came across various case studies, some of which are very interesting... Reference: here Now, coming to the types of available licenses in Open source community:  GNU GPL License GPL license has mai...

Operating System in a nutshell (Introduction to RTOS)

    This post is for brushing up few important OS concepts before moving forward to RTOS  

Semi dynamic webpage template

Image
    Semi dynamic webpage template with Google sheets integration INDEX Introduction Purpose Behind Proposed Work Experimental Results Conclusion References     Introduction   Our project aims at providing a semi-dynamic template of a fully fledged highly responsive webpage for small scale organizational usage. With improved security considerations and better organization this project integrates google sheets services as a database for a website. Google sheets being easy to deploy and use makes content updation easier and a lot more user friendly. Several other functionalities like Google scripting engine along with google forms can be very easily integrated with google sheets thus, can be used for real time and secure updation of website content. Furthermore, it separates developer and non-developer roles thus defining user privileges.   Several formatting and scripting languages like HTML, JQuery, PHP and CSS were used for complete frontend an...