⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testing_the_uclinux_kernel.html

📁 ADI 公司blackfin系列的用户使用文挡。
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<ol><li class="level1"><div class="li"> <strong>Kgdb test</strong></div><ul><li class="level2"><div class="li">To test if the kgdb commands can work when using them to debug the kernel. The tested commands are list, c, break, bt, d, info break, step, print len, detach, and quit.</div></li><li class="level2"><div class="li"> Firstly, it needs to apply the kgdb patch.<pre class="code">cd linux-2.6.xpatch -p1 &lt; ../bfin_patch/kgdb_patch/kgdb_bfin_linux-2.6.x.patch</pre><p> The configuration changes are:</p><pre class="code">under Customize Kernel Settings== Select Kernel hacking ==    Enable Kernel debugging    Enable KGDB: kernel debugging with remote gdb    Enable KGDB: On ethernet    Enable KGDB: test    Enable Compiled-in Kernel Boot Parameter           add kgdboe=@10.100.4.50/,@10.100.4.174/( 10.100.4.50 is target ip address, 10.100.4.174 is host ip address ) </pre></div></li></ul></li><li class="level1"><div class="li"> <strong>Loadable module test</strong></div><ul><li class="level2"><div class="li"> To see if kernel supports module operation well, which includes insmod,lsmod,rmmod commands.On BF533 STAMP board,it is testing the ethernet module, and on BF537 STAMP board, there are a helloworld module to be tested.</div></li><li class="level2"><div class="li"> Build the uclinux kernel with module support:<pre class="code">under Customize Kernel Settings== Select Loadable module support ==    Enable  Enable loadable module support    Enable  Module unloading    Enable  Automatic kernel module loading  == Select Device Drivers == == Select Network device support ==   == Select Ethernet (10 or 100Mbit) ==      Select M SMC 91C9x/91C1xxx support                                                          </pre></div></li><li class="level2"><div class="li"> test the ethernet module as followed on the target:<pre class="code">insmod /lib/modules/2.6.12.1/kernel/drivers/net/smc91x.kolsmodifconfig eth0 10.100.4.50ping 10.100.4.174rmmod</pre></div></li></ul></li><li class="level1"><div class="li"> <strong>Pthread test</strong></div><ul><li class="level2"><div class="li"> To test the pthread function of the kernel. There are 7 cases about mutexes and conditions,semaphones usage,multi-thread searching,static variables thread-safe,etc.</div></li><li class="level2"><div class="li"> Select pthread test:<pre class="code">under Customize Vendor/User Settings== Select Blackfin test programs==    Enable  Pthread lib test </pre></div></li></ul></li><li class="level1"><div class="li"> <strong>Dynamic power management test</strong></div><ul><li class="level2"><div class="li"> To test if the dynamic power management function is enabled in the kernel and works right.</div></li><li class="level2"><div class="li"> Need to apply a patch first:<pre class="code">cd linux-2.6.xpatch -p1 &lt; ../bfin_patch/dpm_patch/dpm_blackfin_patch</pre></div></li><li class="level2"><div class="li"> Build the uclinux kernel to have following items:<pre class="code">under Customize Kernel Settings== Select Dynamic Power Management ==    Enable  Dynamic Power Management     Enable  Enable DPM Statistics Gathering == Select Device Drivers == == Select Character devices ==    Enable  Blackfin Power Management support    </pre></div></li></ul></li><li class="level1"><div class="li"> <strong>Strace</strong></div><ul><li class="level2"><div class="li"> To trace the system calls that are used when execute a command which helps to illustrate how the command actually works.</div></li><li class="level2"><div class="li"> It is recorded the output of executing three commands, pwd, date and dmesg.</div></li><li class="level2"><div class="li"> Select strace test:<pre class="code">under Customize Vendor/User Settings== Select Blackfin app programs==    Enable  strace </pre></div></li></ul></li><li class="level1"><div class="li"> <strong>Msh function test</strong></div><ul><li class="level2"><div class="li"> To enrich the feature of msh to support function call.</div></li><li class="level2"><div class="li"> Need to apply a patch first:<pre class="code">cd user/busybox/shellpatch -p0 &lt; ../../../bfin_patch/msh_patch/busybox-msh-patch</pre></div></li></ul></li><li class="level1"><div class="li"> <strong>Oprofile test</strong></div><ul><li class="level2"><div class="li"> Oprofile is capable of profiling all running code at low overhead on hardware and software interrupt handlers, kernel modules, the kernel, shared libraries, and applications. </div></li><li class="level2"><div class="li"> To add oprofile function, make the following selection:<pre class="code">under Customize Kernel Settings== Select Profiling support ==    Enable  Profiling support     Enable  OProfile system Profiling      under Customize Vendor/User Settings== Select Blackfin app programs ==   == Select oprofile ==                                                                </pre></div></li><li class="level2"><div class="li"> The oprofile kernel image is quite big, so it is needed to enlarge the default image size BLOCKS in vender/Analogdevices/BF533-STAMP/Makefile:<pre class="code">BLOCKS = 18432</pre></div></li></ul></li><li class="level1"><div class="li"> <strong>Java Virtual Machine</strong></div></li><li class="level1"><div class="li"> <strong>Load elf binary and dynamic object</strong></div><ul><li class="level2"><div class="li"> To test if the kernel built with flat toolchain could load elf binary and dynamic object.</div></li><li class="level2"><div class="li"> The test commands are: <pre class="code">bfin-uclinux-gcc -o libhelloworld.so helloworld.c -shared -mfdpicbfin-uclinux-gcc -o test_dll test_dll.c -mfdpic -ldlrcp libhelloworld.so root@10.100.4.50:/librcp test_dll root@10.100.4.50:/</pre><p> The test_dll.c is as following:</p><pre class="code">#include &lt;dlfcn.h&gt;int main(int argc, char* argv[]){	void *handle;	char *error;	int (*helloworld)(char *str);	int r;		handle = dlopen(&quot;libhelloworld.so&quot;, RTLD_NOW);	if (!handle) {		fprintf (stderr, &quot;%s\n&quot;, dlerror());		exit(1);	}		dlerror();    /* Clear any existing error */	helloworld = dlsym(handle, &quot;helloworld&quot;);	if ((error = dlerror()) != NULL)  {		fprintf (stderr, &quot;%s\n&quot;, error);		exit(1);	}	r = helloworld(&quot;hello\n&quot;);	printf(&quot;get %d\n&quot;, r);	dlclose(handle);		return 0;}</pre></div></li></ul></li><li class="level1"><div class="li"> <strong>Qt (mouse)</strong></div><ul><li class="level2"><div class="li"> Check<a href="http://docs.blackfin.uclinux.org/doku.php?id=qt_library" class="urlextern" title="http://docs.blackfin.uclinux.org/doku.php?id=qt_library"  rel="nofollow"> qt doc</a></div></li></ul></li><li class="level1"><div class="li"> <strong>MicroWin</strong></div><ul><li class="level2"><div class="li"> Please look into the doc:<a href="http://docs.blackfin.uclinux.org/doku.php?id=tft-lcd_card" class="urlextern" title="http://docs.blackfin.uclinux.org/doku.php?id=tft-lcd_card"  rel="nofollow">Microwin usage</a>.</div></li></ul></li><li class="level1"><div class="li"> <strong>Core B code loader</strong></div></li></ol></div><!-- SECTION [18744-23869] --><h3><a name="system_test" id="system_test">System test</a></h3><div class="level3"><ol><li class="level1"><div class="li"> <strong>Reboot test on RAMDISK</strong></div><ul><li class="level2"><div class="li">Reboot the system continuously for 30 times both to see if the linux kernel as an elf file can reboot successfully everytime.</div></li></ul></li><li class="level1"><div class="li"> <strong>Reboot on JFFS2 file system</strong></div><ul><li class="level2"><div class="li"> Programme the uboot, kernel uImage and file system all on flash, each in one MTD patition. per the instructions at :<a href="http://docs.blackfin.uclinux.org/doku.php?id=enabling_jffs2" class="urlextern" title="http://docs.blackfin.uclinux.org/doku.php?id=enabling_jffs2"  rel="nofollow">enable_jffs2</a></div></li></ul></li><li class="level1"><div class="li"> <strong>Boot a kernel-only uImage</strong></div><ul><li class="level2"><div class="li"> Boot the uImage made from vmlinux or disable when doing kernel configuration like following:<pre class="code">== Blackfin Processor Options ==  Disable   Enable RAM RootFS attached to the Kernel image(linux)== Select Device Drivers == == Memory Technology Devices(MTD) ==  == Mapping drivers for chip access    Disable   Generic uClinux RAM/ROM filesystem support</pre><p> Then we can get a kernel-only linux. Use this image to boot the STAMP board from SDRAM using jffs2 file system.   </p></div></li></ul></li><li class="level1"><div class="li"> <strong>Boot kernel and mount root JFFS2 fs from SPI flash</strong> </div><ul><li class="level2"><div class="li"> To test if it can boot from the kernel uImage on SPI flash and also mount the jffs2.img programmed on it as the root file system, which is useful when there are no flash chips on the target board. </div></li><li class="level2"><div class="li"> Change the boot mode of S1 swith on stamp board to 11, the board will start from the uboot in SPI flash.</div></li><li class="level2"><div class="li"> Have the same setting to kernel configuration except that:<pre class="code">== Select Device Drivers == == Select Memory Technology Devices (MTD) ==     Select - RAM/ROM/Flash chip drivers          Disable - ST MW320D compatible flash chip support              Enable  - ST M25P64 compatible flash chip support     Select - Mapping drivers for chip access          Disable - Blackfin BF533 Flash Chip Support          Enable 鈥

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -