2009-11-23 12:51:41     Compile a small (<3MB) kernel for a BF533 STAMP

Document created by Aaronwu Employee on Aug 19, 2013
Version 1Show Document
  • View in full screen mode

2009-11-23 12:51:41     Compile a small (<3MB) kernel for a BF533 STAMP

Owen OH (IRELAND)

Message: 82655   

 

Hello All,

 

I'm new to Blackfin so would appreciate some pointers.

 

I've got a BF533 STAMP with 4MB flash. I've managed to put the latest u-boot onto it but am having trouble getting kernel into Flash (starting at 0x20040000), no doubt because my kernel image (uImage.initramfs) is 3.8MB!

 

I've tried to use the kernel without a filesystem (vmlinux) but results in a kernel panic, no filesystem. Not really suprising!

 

In my project I hope to use v4l (video 4 linux).

 

I'm hoping somebody can help me target what modules of the kernel take up a lot of space so I can reduce it's size. Does a different filesystem result in a smaller kernel?

 

Many thanks,

 

Owen

QuoteReplyEditDelete

 

 

2009-11-23 15:02:47     Re: Compile a small (<3MB) kernel for a BF533 STAMP

Mike Frysinger (UNITED STATES)

Message: 82662   

 

the kernel tends to make up a small part of the foot print.  the user space apps tend to take up a lot more space.  disable applications in the uclinux dist that you dont need.

QuoteReplyEditDelete

 

 

2009-11-23 16:08:08     Re: Compile a small (<3MB) kernel for a BF533 STAMP

Owen OH (IRELAND)

Message: 82666   

 

Mike,

 

Thanks, I'll take a look.

 

After I posted the message I went back to the project source & downloaded the supplied image file:

 

uImage-bf533-stamp-2009R1-RC6

 

it comes up with 4104123 bytes. Together with the u-boot code:

 

u-boot-bf533-stamp-bypass-2009R1-rc3.bin

 

which is 148712 bytes.

 

The two files total 4252835 which is larger than the available flash (4194304 bytes) so I'm wondering how anybody can fit both onto the BF533 STAMP board?

 

Thanks,

 

Owen

QuoteReplyEditDelete

 

 

2009-11-23 16:23:00     Re: Compile a small (<3MB) kernel for a BF533 STAMP

Michael Hennerich (GERMANY)

Message: 82667    It's easy to slim down uboot + kernel + initramfs to fit altogether into 1MB of flash -

 

You can find some example configurations here:

  docs.blackfin.uclinux.org/doku.php?id=fast_boot_example&s[]=fastboot

 

-Michael

QuoteReplyEditDelete

 

 

2009-11-23 16:36:21     Re: Compile a small (<3MB) kernel for a BF533 STAMP

Mike Frysinger (UNITED STATES)

Message: 82670   

 

we dont burn images into flash.  we test things by loading over the network.

QuoteReplyEditDelete

 

 

2009-11-24 02:51:04     Re: Compile a small (<3MB) kernel for a BF533 STAMP

Owen OH (IRELAND)

Message: 82686   

 

Ok,

 

Thanks both for the replies, I thought I was missing something!

 

I'll start pulling stuff out!

 

Owen

QuoteReplyEditDelete

 

 

2009-11-25 12:38:00     Re: Compile a small (<3MB) kernel for a BF533 STAMP

Owen OH (IRELAND)

Message: 82748   

 

In case it may help others:

 

I defaulted the kernel config, i.e.:

 

Default all settings (lose changes)

 

And the kernel I got was:

 

uImage.initramfs

 

size:

 

3.7 MB (3832621 bytes), just within the max of 3997695 bytes left after u-boot.

 

Anybody got pointer to some of the memory hogs?

 

Owen

QuoteReplyEditDelete

 

 

2009-11-25 13:23:18     Re: Compile a small (<3MB) kernel for a BF533 STAMP

Mike Frysinger (UNITED STATES)

Message: 82752   

 

  docs.blackfin.uclinux.org/doku.php?id=faq

(My uImage is too large to burn in my flash)

QuoteReplyEditDelete

 

 

2009-11-26 12:34:49     Re: Compile a small (<3MB) kernel for a BF533 STAMP

Owen OH (IRELAND)

Message: 82789   

 

Many thanks Mike,

 

Here's my listing, might be handy for others:

 

518236 ./romfs/lib/libstdc++.so.6

452612 ./romfs/lib/libgfortran.so.3

400768 ./romfs/bin/busybox

322196 ./romfs/lib/libgfortran.so.1

310452 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/fs/cifs/cifs.ko

274068 ./romfs/bin/strace

239992 ./romfs/lib/libc.so.0

199240 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/net/sunrpc/sunrpc.ko

182880 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/fs/nfs/nfs.ko

131180 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/fs/jffs2/jffs2.ko

119468 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/fs/yaffs2/yaffs.ko

116308 ./romfs/bin/boa

114656 ./romfs/bin/mkfs.jffs2

110224 ./romfs/bin/lsz

109940 ./romfs/bin/telnet

108720 ./romfs/bin/lrz

107152 ./romfs/bin/ftp

100548 ./romfs/bin/ftpd

93448 ./romfs/lib/libmudflapth.so.0

89080 ./romfs/lib/libmudflap.so.0

88184 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/fs/lockd/lockd.ko

84140 ./romfs/bin/jpegview

80964 ./romfs/lib/libobjc.so.2

78412 ./romfs/usr/bin/tset

77304 ./romfs/bin/bcdm

77016 ./romfs/bin/dhcpcd

76352 ./romfs/bin/mtdm

76312 ./romfs/bin/thdm

74804 ./romfs/bin/portmap

70660 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/fs/smbfs/smbfs.ko

68400 ./romfs/bin/gdbserver

66708 ./romfs/lib/libm.so.0

52120 ./romfs/lib/libgcc_s.so.1

43208 ./romfs/lib/libpthread.so.0

40644 ./romfs/bin/telnetd

33556 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/video/fb.ko

32800 ./romfs/bin/inetd

30384 ./romfs/bin/dhrystone

30360 ./romfs/lib/ld-uClibc.so.0

30068 ./romfs/bin/flash_eraseall

29708 ./romfs/bin/init

29328 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/mtd/chips/cfi_cmdset_0002.ko

26076 ./romfs/bin/watchdogd

24316 ./romfs/lib/libgomp.so.1

23180 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/media/video/videobuf-core.ko

23164 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/i2c/i2c-core.ko

22956 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/media/common/tuners/tuner-xc2028.ko

22296 ./romfs/bin/whetstone

19732 ./romfs/bin/reboot

19260 ./romfs/bin/version

18028 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/media/video/vivi.ko

15220 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/video/bfin_adv7393fb.ko

15212 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/media/common/tuners/xc5000.ko

15120 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/media/common/tuners/tuner-simple.ko

15116 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/lib/zlib_deflate/zlib_deflate.ko

14964 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/media/video/v4l2-common.ko

14208 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/media/common/tuners/mt20xx.ko

14128 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/media/common/tuners/tda9887.ko

14092 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/media/common/tuners/tda8290.ko

11712 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/char/bfin_sport.ko

11572 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/input/evdev.ko

11236 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/media/common/tuners/tuner-types.ko

11100 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/fs/binfmt_misc.ko

10608 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/media/video/videobuf-vmalloc.ko

10188 ./romfs/lib/libdl.so.0

9724 ./romfs/lib/libthread_db.so.1

9540 ./romfs/lib/libcrypt.so.0

8804 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/mtd/mtdchar.ko

8368 ./romfs/root/uclinux-config.gz

8264 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/media/common/tuners/tea5767.ko

8155 ./romfs/etc/mime.types

8108 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/i2c/i2c-dev.ko

7904 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/arch/blackfin/kernel/gptimers.ko

7887 ./romfs/home/httpd/tux-bf.gif

7887 ./romfs/etc/tux-bf.gif

6316 ./romfs/home/httpd/tux-wink.gif

6160 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/char/bfin_jtag_comm.ko

6060 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/fs/nls/nls_base.ko

5880 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/mtd/chips/cfi_util.ko

5846 ./romfs/home/httpd/boa.conf

5846 ./romfs/etc/boa.conf

5824 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/media/common/tuners/tea5761.ko

5696 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/char/simple-gpio.ko

5224 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/mtd/maps/bfin-async-flash.ko

5016 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/mtd/chips/cfi_probe.ko

4252 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/char/bfin-dma.ko

4200 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/mtd/chips/gen_probe.ko

4056 ./romfs/lib/libutil.so.0

4036 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/video/cfbfillrect.ko

3264 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/video/cfbcopyarea.ko

3258 ./romfs/usr/share/terminfo/x/xterm

3248 ./romfs/lib/librt.so.0

2670 ./romfs/home/httpd/favicon.ico

2624 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/mtd/chips/map_rom.ko

2612 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/modules.dep

2604 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/video/cfbimgblt.ko

2286 ./romfs/etc/rc

2048 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/lib/crc-ccitt.ko

2037 ./romfs/home/httpd/index.html

1756 ./romfs/lib/libresolv.so.0

1744 ./romfs/lib/libnsl.so.0

1740 ./romfs/usr/share/terminfo/l/linux

1623 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/modules.order

1279 ./romfs/usr/share/terminfo/v/vt220

1279 ./romfs/usr/share/terminfo/v/vt200

1194 ./romfs/usr/share/terminfo/v/vt100-am

1194 ./romfs/usr/share/terminfo/v/vt100

1194 ./romfs/usr/share/terminfo/v/vt100

1148 ./romfs/lib/modules/2.6.28.10-ADI-2009R1/kernel/drivers/hid/hid-dummy.ko

1101 ./romfs/etc/motd

1026 ./romfs/home/httpd/tuxsit_small.gif

875 ./romfs/etc/ld.so.cache

802 ./romfs/root/vendor-board-config.gz

411 ./romfs/etc/services

338 ./romfs/etc/filesystems

321 ./romfs/etc/inittab

292 ./romfs/etc/protocols

269 ./romfs/etc/modprobe.conf

248 ./romfs/etc/mdev.conf

165 ./romfs/etc/hosts

88 ./romfs/etc/inetd.conf

72 ./romfs/etc/version

66 ./romfs/etc/passwd

45 ./romfs/etc/profile

38 ./romfs/etc/group

17 ./romfs/etc/host.conf

12 ./romfs/etc/issue

9 ./romfs/etc/TZ

 

 

 

 

Owen

Attachments

    Outcomes