[[bc10/rowboat]] - Contents #contents * Summary [#c22b8cdb] > The previous section has argued what are the requirements for the build process of rowboat-eclair-dsp. It has showed~ how to obtained the mandatory files and explained why the kernel update is required. This section introduces the DSP~ stack and explains how to integrate the DSP stack with rowboat-eclair-dsp.~ * SGX and DSP integration, the DSP stack [#j02d2aa9] **Build [#sed7078f] > Execute the command below, and build the Android kernel, which is integrated with DSP and the userland.~ $ make TARGET_PRODUCT=beagleboard BUILD_WITH_GST=true dvsdk ***Fixing build errors [#h16eb971] > Since the kernel version is updated to 2.6.32, some errors occur as DSP stack is integrated. The locations of errors,~ error message and how to fix these errors are discussed. To use diff -u command, the differences between the original~ and the fixed code are compared. However, this section does not provide the farther explanations of how and why these~ errors happen. ~ > 1. external/ti-dsp/dvsdk_3_00_02_44/dsplink_1_61_03/packages/dsplink/gpp/src/arch/OMAP3530/shmem/Linux/omap3530_phy_shmem.c > ~/rowboat-eclair-dsp/external/ti-dsp/dvsdk_3_00_02_44/dsplink_1_61_03/packages/dsplink/gpp/src/../../gpp/src/arch/OMAP3530/shmem/Linux/omap3530_phy_shmem.c:131: error: implicit declaration of function 'IO_ADDRESS' > $ diff -u omap3530_phy_shmem.c.orig omap3530_phy_shmem.c --- omap3530_phy_shmem.c.orig 2010-06-29 20:53:20.341371121 +0900 +++ omap3530_phy_shmem.c 2010-07-05 14:19:04.614552881 +0900 @@ -128,12 +128,12 @@ halObject = (OMAP3530_HalObj *) halObj ; - halObject->generalCtrlBase = (Uint32)IO_ADDRESS(GENERAL_CONTROL_BASE) ; - halObject->iva2CmBase = (Uint32)IO_ADDRESS(IVA2_CM_BASE) ; - halObject->coreCmBase = (Uint32)IO_ADDRESS(CORE_CM_BASE) ; - halObject->perCmBase = (Uint32)IO_ADDRESS(PER_CM_BASE) ; - halObject->iva2PrmBase = (Uint32)IO_ADDRESS(IVA2_PRM_BASE) ; - halObject->mailboxBase = (Uint32)IO_ADDRESS(MAILBOX_BASE) ; + halObject->generalCtrlBase = (Uint32)ioremap(GENERAL_CONTROL_BASE, 4096) ; + halObject->iva2CmBase = (Uint32)ioremap(IVA2_CM_BASE, 8192) ; + halObject->coreCmBase = (Uint32)ioremap(CORE_CM_BASE, 8192) ; + halObject->perCmBase = (Uint32)ioremap(PER_CM_BASE, 8192) ; + halObject->iva2PrmBase = (Uint32)ioremap(IVA2_PRM_BASE, 8192) ; + halObject->mailboxBase = (Uint32)ioremap(MAILBOX_BASE, 4096) ; > 2. external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c > ~/rowboat-eclair-dsp/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c:1086: error: 'L_PTE_CACHEABLE' undeclared (first use in this function) > $ diff -u cmemk.c.orig cmemk.c --- cmemk.c.orig 2010-06-29 21:05:39.718696468 +0900 +++ cmemk.c 2010-07-05 14:28:27.767315616 +0900 @@ -1084,7 +1084,7 @@ static int set_cached(struct vm_area_struct *vma) { vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) | - (L_PTE_CACHEABLE | L_PTE_BUFFERABLE) + (L_PTE_MT_WRITETHROUGH | L_PTE_MT_BUFFERABLE) ); vma->vm_flags |= VM_RESERVED | VM_IO; > 3. external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c > ~/rowboat-eclair-dsp/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c:45:22: error: mach/dma.h: No such file or directory > $ diff -u sdmak.c.orig sdmak.c --- sdmak.c.orig 2010-06-29 21:13:45.434697722 +0900 +++ sdmak.c 2010-06-29 21:22:33.300049114 +0900 @@ -42,8 +42,8 @@ #include <asm/arch/tc.h> #else #include <mach/hardware.h> -#include <mach/dma.h> -#include <mach/tc.h> +#include <plat/dma.h> +#include <linux/tc.h> #endif /* > 4. external/ti-dsp/dvsdk_3_00_02_44/dmai_2_00_01_04/packages/ti/sdo/dmai/linux/Display_fbdev.c linux/Display_fbdev.c:45:29: error: mach/omapfb.h: No such file or directory > diff -u Display_fbdev.c.orig Display_fbdev.c --- Display_fbdev.c.orig 2010-06-29 21:48:52.347886578 +0900 +++ Display_fbdev.c 2010-06-29 21:46:37.214483328 +0900 @@ -42,7 +42,7 @@ #include <linux/fb.h> #ifdef Dmai_Device_omap3530 - #include <mach/omapfb.h> + #include <linux/omapfb.h> #else // #include <video/davincifb.h> #endif > 5. external/ti-dsp/dvsdk_3_00_02_44/dmai_2_00_01_04/packages/ti/sdo/dmai/Makefile ~/rowboat-eclair-dsp/kernel/include/asm-generic/signal.h:94: error:'__BITS_PER_LONG' undeclared here (not in a function) > $ diff -u Makefile.orig Makefile --- Makefile.orig 2010-06-29 22:01:32.699753968 +0900 +++ Makefile 2010-06-29 22:12:20.791781379 +0900 @@ -103,7 +103,7 @@ CPP_FLAGS += -I$(XDC_INSTALL_DIR)/packages -I$(DMAI_INSTALL_DIR)/packages -I$(CE_INSTALL_DIR)/packages -I$(FC_INSTALL_DIR)/packages -I$(XDAIS_INSTALL_DIR)/packages -DDmai_Device_$(PLATFORM_DEVICE) -GCC_CPP_FLAGS += $(CPP_FLAGS) -I$(LINUXKERNEL_INSTALL_DIR)/include -I$(LINUXKERNEL_INSTALL_DIR)/arch/arm/$(PLATFORM_ARCH)/include $(HAVE_AUTOCONFIG) -I$(CMEM_INSTALL_DIR)/packages -I$(LINK_INSTALL_DIR)/packages -DDmai_BuildOs_linux -Dxdc_target_types__=gnu/targets/std.h -I$(LINUXLIBS_INSTALL_DIR)/include -Dxdc_target_name__=arm/GCArmv7A +GCC_CPP_FLAGS += $(CPP_FLAGS) -I$(LINUXKERNEL_INSTALL_DIR)/arch/arm/$(PLATFORM_ARCH)/include $(HAVE_AUTOCONFIG) -I$(CMEM_INSTALL_DIR)/packages -I$(LINK_INSTALL_DIR)/packages -DDmai_BuildOs_linux -Dxdc_target_types__=gnu/targets/std.h -I$(LINUXLIBS_INSTALL_DIR)/include -Dxdc_target_name__=arm/GCArmv7A C64P_CPP_FLAGS += $(CPP_FLAGS) -I$(BIOS_INSTALL_DIR)/packages/ti/bios/include -I$(BIOS_INSTALL_DIR)/packages -DDmai_BuildOs_bios -Dxdc_target__='<ti/targets/std.h>' -I$(CODEGEN_INSTALL_DIR)/include -mv6400+ -pdse225 -eo$(PLATFORM_DEVICE).o$(EXT) #GCC_C_FLAGS += $(C_FLAGS) -Wall -Werror $(ANDROID_CFLAGS) > 6. external/ti-dsp/dvsdk_3_00_02_44/dmai_2_00_01_04/packages/ti/sdo/dmai/Makefile linux/omap3530/Framecopy_accel.c:51:32: error: linux/omap_resizer.h: No such file or directory '''include path''' that has changed at 5 returns to the original. $ diff -u Makefile.modified Makefile --- Makefile.modified 2010-06-29 22:12:20.791781379 +0900 +++ Makefile 2010-06-29 22:01:32.699753968 +0900 @@ -103,7 +103,7 @@ CPP_FLAGS += -I$(XDC_INSTALL_DIR)/packages -I$(DMAI_INSTALL_DIR)/packages -I$(CE_INSTALL_DIR)/packages -I$(FC_INSTALL_DIR)/packages -I$(XDAIS_INSTALL_DIR)/packages -DDmai_Device_$(PLATFORM_DEVICE) -GCC_CPP_FLAGS += $(CPP_FLAGS) -I$(LINUXKERNEL_INSTALL_DIR)/arch/arm/$(PLATFORM_ARCH)/include $(HAVE_AUTOCONFIG) -I$(CMEM_INSTALL_DIR)/packages -I$(LINK_INSTALL_DIR)/packages -DDmai_BuildOs_linux -Dxdc_target_types__=gnu/targets/std.h -I$(LINUXLIBS_INSTALL_DIR)/include -Dxdc_target_name__=arm/GCArmv7A +GCC_CPP_FLAGS += $(CPP_FLAGS) -I$(LINUXKERNEL_INSTALL_DIR)/include -I$(LINUXKERNEL_INSTALL_DIR)/arch/arm/$(PLATFORM_ARCH)/include $(HAVE_AUTOCONFIG) -I$(CMEM_INSTALL_DIR)/packages -I$(LINK_INSTALL_DIR)/packages -DDmai_BuildOs_linux -Dxdc_target_types__=gnu/targets/std.h -I$(LINUXLIBS_INSTALL_DIR)/include -Dxdc_target_name__=arm/GCArmv7A C64P_CPP_FLAGS += $(CPP_FLAGS) -I$(BIOS_INSTALL_DIR)/packages/ti/bios/include -I$(BIOS_INSTALL_DIR)/packages -DDmai_BuildOs_bios -Dxdc_target__='<ti/targets/std.h>' -I$(CODEGEN_INSTALL_DIR)/include -mv6400+ -pdse225 -eo$(PLATFORM_DEVICE).o$(EXT) #GCC_C_FLAGS += $(C_FLAGS) -Wall -Werror $(ANDROID_CFLAGS) *** The adjustments for avoiding the errors that occurs during/after booting [#i7f156fe] > Because of the adjustments shown above, the build process is successfully completed. Now, fix the errors that happens~ during/dafter boot process is finished.~ > 1. cmemk~ After a kernel module is loaded, the error message, '''cmemk: Unknown symbol init_mm''', appears, and does go farther.~ This is how to fix this error. > First, parts of config in kernel is rearranged. $ cd source buid/envsetup.sh $ cd kernel $ make menuconfig Select Kernel hacking, chooses Enable unused/obsolete exported symbols, and make it effective, and save it. To use~ '''make clean''' command, delete the files that have been already built and put under the kernel directory. After the~ adjustments, rebuild these files. > external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c $ diff -u cmemk.c.orig cmemk.c --- cmemk.c.orig 2010-06-29 21:05:39.718696468 +0900 +++ cmemk.c 2010-07-05 14:27:31.782329823 +0900 @@ -1026,10 +1026,10 @@ void show_pte(struct mm_struct *mm, unsigned long addr) { pgd_t *pgd; - +#if 0 if (!mm) mm = &init_mm; - +#endif printk(KERN_ALERT "pgd = %p\n", mm->pgd); pgd = pgd_offset(mm, addr); printk(KERN_ALERT "[%08lx] *pgd=%08lx", addr, pgd_val(*pgd)); @@ -1084,7 +1084,7 @@ static int set_cached(struct vm_area_struct *vma) { vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) | - (L_PTE_CACHEABLE | L_PTE_BUFFERABLE) + (L_PTE_MT_WRITETHROUGH | L_PTE_MT_BUFFERABLE) ); > external/ti-dsp/dvsdk_3_00_02_44/linuxutils_2_24_02/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c $ diff -u cmemk.c.orig cmemk.c --- cmemk.c.orig 2010-07-01 19:58:23.436891292 +0900 +++ cmemk.c 2010-07-01 19:59:01.642238507 +0900 @@ -1026,10 +1026,10 @@ void show_pte(struct mm_struct *mm, unsigned long addr) { pgd_t *pgd; - +#if 0 if (!mm) mm = &init_mm; - +#endif printk(KERN_ALERT "pgd = %p\n", mm->pgd); pgd = pgd_offset(mm, addr); printk(KERN_ALERT "[%08lx] *pgd=%08lx", addr, pgd_val(*pgd)); > 2. DMAI~ DMAI (DaVinci Multimedia Aplication Interface) does not work under the default setting of OMAP2/3 Display Subsystem,~ which is a part of omap kernel. Make the default configuration of '''Display.c''' of DMAI ineffective.~ > external/ti-dsp/dvsdk_3_00_02_44/dmai_2_00_01_04/packages/ti/sdo/dmai/linux/Display.c > $ diff -u Display.c.orig Display.c --- Display.c.orig 2010-07-05 16:23:35.693115944 +0900 +++ Display.c 2010-07-01 20:13:28.761149734 +0900 @@ -523,6 +523,7 @@ Char* displayDevice, VideoStd_Type *videoType, Int *rotation) { +#if 0 /* #ifdef Dmai_Device_omap3530 */ FsOptionsSequence *sequence = NULL; Display_Output currentDisplayOutput; > The changes described above are added, then execute build. $ make TARGET_PRODUCT=beagleboard BUILD_WITH_GST=true dvsdk Build of DSP stack from the beginning, follow the direction shown below. $ make TARGET_PRODUCT=beagleboard BUILD_WITH_GST=true dvsdk_clean $ make TARGET_PRODUCT=beagleboard BUILD_WITH_GST=true dvsdk > For the details of build control, please look at each variables in Makefile. **Creating rootfs [#kd853c36] > As the build process is completed without errors, rootfs of android is moved to bootable position. $ cd out/target/product/beagleboad $ mkdir android_rootfs $ cp -r root/* android_rootfs $ cp -r system android_rootfs **Network configuration [#od1c8fd2] > To be booted into rowboat, change the configuration of android rootfs for making network usable.~ > The configuration file is set up for each device, and the name of a configuration file can be '''initi.***.rc'''.~ The name of device is only used as it is listed on Hardware of '''/proc/cpuinfo'''. If a name is consist of more~ than two words, only the first word is valid, and it is written in small letters. Since bc10 is a clone of~ BeagleBoard, it is listed on Hardware as OMAP beagle board, so the file name can be defined as '''/android_rootfs/init.omap3.rc'''.~ The contents of the file is shown as below. on boot setprop net.dns1 8.8.8.8 service lan-setup /system/etc/init.omap3.sh oneshot DNS server in the configuration shown above is set for Google Public DNS. The configuration is freely changed~ for individual network environments. DNS server address of LAN can be altered for own needs.~ > Create '''/android_rootfs/system/etc/init.omap3.sh''', and the contents of the file is defined as below. #!/system/bin/sh netcfg eth0 up netcfg eth0 dhcp > This file enables USB ether to obtain the DHCP address and makes the device work as Android is booted.~ > To use Wifi, prepare for the readable kernel module, and the firmware file is put in to the right path~ such as system/etc/Wireless of android_rootfs. Then, Wifi cannot be controlled from GUI, but it is~ capable of data communications. ~ > #!/system/bin/sh insmod /system/lib/modules/rt3070sta.ro netcfg ra0 up netcfg ra0 dhcp *Reference [#a86ec12a] -Kernel 2.6.32 with DSP & SGX Drivers~ --http://groups.google.com/group/rowboat/browse_thread/thread/39381715e2204360~ -Getting build errors after repo sync~ --http://groups.google.com/group/rowboat/browse_thread/thread/133014a3b73ea72c~ -Rowboat Android Compile for BeagleBoard~ --http://tw.myblog.yahoo.com/stevegigijoe/article?mid=230&prev=232&next=227~