2009-01-22 08:02:22 uCLinux userspace in Flash or SD-Card....
Patrick Hotz (GERMANY)
Message: 68233
Hi guys,
after a lot of problems during the last days i think i should rework my complete uClinux-dist.
I am of the opinion that it should be possible to save lots of RAM with the right configuration of the uClinux2009pre....
Thats what i want to do:
1. Booting uCLinux without any ramdisk or a ramdisk which is only about 512Kb for the Kernel....
2. use flash as userspace....
3. save the /usr folder onto my SD-Card because i have not enugh free space (about 15Mb for QT-libraries and only 8Mb flash)
I have tried to reduce my uCLinux to a 1024Kb big ramdisk-size and use the /usr folder as a link onto my /usr folder on my SD-Card.... That´s worked OK....
The problem is that this very small uCLinux is not very useful because there are only a few commands which i can use...
I want to have a complete uCLinux with "openvpn, konquerror-embedded, QT-libraries" and some other programms without using a ramdisk of 25Mb or more....
Does anyone have done the same or can give me an example how i can do this?
I have seen that in "images" there is a file "vmimage".... can i boot this file and mount afterwards "rootfs.jffs2" ????
best regards
- Patrick
TranslateQuoteReplyEditDelete
2009-01-22 21:00:05 Re: uCLinux userspace in Flash or SD-Card....
Mike Frysinger (UNITED STATES)
Message: 68255
where you put the rootfs is up to you (and how you spread it around). you dont even need a ramdisk, we just make one because it's much easier to do development and prototype with it.
i dont understand why moving all the big applications to /usr is not working for you. it should work fine.
if you're confused about formats and/or rootfs, please read this page:
http://docs.blackfin.uclinux.org/doku.php?id=uclinux-dist:images
QuoteReplyEditDelete
2009-01-23 02:25:47 Re: uCLinux userspace in Flash or SD-Card....
Patrick Hotz (GERMANY)
Message: 68264
Hi Mike,
thats very simple:
We want to have a system which is able to handle VoIP calls and additional supports an epson display chip.
The display should have a resolution with 800x480 dots.
For a good uCLinux-system we need 6MB RAM, for VoIP software additionally about 8MB RAM and for our QT-applications about 16MB....
That means our software needs about 30MB Ram.... a little bit fewer than the 32Mb on our Board......
Moving the /usr folder works fine but i was not shure if the uClinux needs a ramdisk (untill yesterday). Now i will have a try to run it without ramdisk.....
I have tried to boot the vmImage first without any other filesystem on our flash.
The config in Kernel and Userspace is exactly the same as i use in uImage.ext2 (only the mtd-partition is different):
....
## Booting image at 20040000 ...
Image Name: Linux-2.6.28-ADI-2009R1-pre-svn6
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 991465 Bytes = 968.2 kB
Load Address: 00001000
Entry Point: 001ad504
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 1ad504
Linux version 2.6.28-ADI-2009R1-pre-svn6014 (photz@HWELinux) (gcc version 4.1.29
Warning: limiting memory to 30MB due to hardware anomaly 05000263
Board Memory: 32MB
Kernel Managed Memory: 32MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x0012cd50
rodata = 0x0012cd50-0x00185f40
bss = 0x00185f40-0x001935b4
data = 0x001935b4-0x001a4000
stack = 0x001a2000-0x001a4000
init = 0x001a4000-0x001bf000
available = 0x001bf000-0x01eff000
rootfs = 0x01eff000-0x01f00000
DMA Zone = 0x01f00000-0x02000000
Hardware Trace Active and Enabled
Boot Mode: 0
Blackfin support (C) 2004-2008 Analog Devices, Inc.
Compiled for ADSP-BF537 Rev 0.2
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 500 MHz core clock and 100 MHz System Clock
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
Data Cache Enabled for CPU0 (write-back)
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 7873
Kernel command line: console=ttyBF0,115200
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 128 (order: 7, 512 bytes)
console [ttyBF0] enabled
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory available: 29652k/32768k RAM, (108k init code, 1199k kernel code, 477k d)
Calibrating delay loop... 997.37 BogoMIPS (lpj=1994752)
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (9 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 48 KB (41 KB free)
PDA for CPU0 reserved at 001867c4
net_namespace: 288 bytes
NET: Registered protocol family 16
Blackfin GPIO Controller
Blackfin DMA Controller
cm_bf537_init(): registering device resources
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
JFFS2 version 2.2. (NAND) Â 2001-2006 Red Hat, Inc.
msgmni has been set to 57
io scheduler noop registered (default)
io scheduler cfq registered
bfin-dma: initialized
simple-gpio: now handling 48 GPIOs: 0 - 47
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART
bfin-uart.1: ttyBF1 at MMIO 0xffc02000 (irq = 20) is a BFIN-UART
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
arch/blackfin/mach-bf537/boards/tcm_bf537.c:bfin_get_ether_addr: Setting Etherne
bfin_mac_mdio: probed
bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1, mdc)
bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1
uclinux[mtd]: RAM probe address=0x1eff000 size=0xc0000000
Creating 1 MTD partitions on "RAM":
0x00000000-0xc0000000 : "ROMfs"
gpio-addr-flash: probing 16-bit flash bus
gpio-addr-flash: Found 1 x16 devices at 0x0 in 16-bit bank
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
Using auto-unlock on power-up/resume
cfi_cmdset_0001: Erase suspend on write enabled
cmdlinepart partition parsing not available
RedBoot partition parsing not available
gpio-addr-flash: Using board partition definition
Creating 3 MTD partitions on "gpio-addr-flash":
0x00000000-0x00040000 : "u-boot (256k)"
0x00040000-0x00180000 : "uClinux-kernel (1280k)"
0x00180000-0x00800000 : "filesystem (6656k)"
bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_7
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
mmc_spi spi0.1: ASSUMING 3.2-3.4 V slot power
mmc_spi spi0.1: SD/MMC host mmc0, no DMA, no WP, no poweroff
TCP cubic registered
NET: Registered protocol family 17
rtc-bfin rtc-bfin: setting system clock to 1970-01-01 00:05:50 UTC (350)
VFS: Cannot open root device "<NULL>" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00 3145728 mtdblock0 (driver?)
1f01 256 mtdblock1 (driver?)
1f02 1280 mtdblock2 (driver?)
1f03 6656 mtdblock3 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
This looks fine.... so i try to save the rootfs.ext2 on my flash....
If i booting now:
## Booting image at 20040000 ...
Image Name: Linux-2.6.28-ADI-2009R1-pre-svn6
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 991465 Bytes = 968.2 kB
Load Address: 00001000
Entry Point: 001ad504
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 1ad504
and the boot stops....
I dont think thats a problem of my memory because there is enugh free space between the two files..
vmImage (968KB on my harddisk) save at 0x20040000
rootfs.ext2 (5MB on my harddisk) save at 0x20180000
What i have made wrong?
- Patrick
TranslateQuoteReplyEditDelete
2009-01-23 03:08:45 Re: uCLinux userspace in Flash or SD-Card....
Patrick Hotz (GERMANY)
Message: 68266
Hi,
just a note:
I want to use a jffs2 root-filesystem, not a ext2....
how i can mount a jffs2 rootfs ??
"No filesystem could mount root, tried: ext2 vfat msdos"
What must i set in kernel config?
- Patrick
TranslateQuoteReplyEditDelete
2009-01-23 11:41:47 Re: uCLinux userspace in Flash or SD-Card....
Mike Frysinger (UNITED STATES)
Message: 68296
please read the documentation:
http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:jffs
QuoteReplyEditDelete
2009-01-23 16:15:19 Re: uCLinux userspace in Flash or SD-Card....
Patrick Hotz (GERMANY)
Message: 68308
Hi,
now my uClinux boots ok (my problem was the missing "rootfstype=jffs2").
But there is another problem i dont know what it means:
U-Boot-1.1.3-ADI-R06R2 (Jan 21 2008 - 18:30:22)
CPU: ADSP BF537 Rev.: 0.2
Board: Bluetechnix TCM-BF537 board
Support: http://www.bluetechnix.at/
Clock: VCO: 500 MHz, Core: 500 MHz, System: 100 MHz
SDRAM: 32 MB
Device ID of the Flash is 898820
Memory Map for the Flash
0x20000000 - 0x20800000 Single Flash Chip
Please type command flinfo for information on Sectors
FLASH: 8 MB
In: serial
Out: serial
Err: serial
Net: ADI BF537 EMAC
Hit any key to stop autoboot: 0
## Booting image at 20040000 ...
Image Name: Linux-2.6.28-ADI-2009R1-pre-svn6
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 991440 Bytes = 968.2 kB
Load Address: 00001000
Entry Point: 001ad504
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 1ad504
Linux version 2.6.28-ADI-2009R1-pre-svn6014 (photz@HWELinux) (gcc version 4.1.29
Warning: limiting memory to 30MB due to hardware anomaly 05000263
Board Memory: 32MB
Kernel Managed Memory: 32MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x0012cd50
rodata = 0x0012cd50-0x00185f54
bss = 0x00185f60-0x001935d4
data = 0x001935d4-0x001a4000
stack = 0x001a2000-0x001a4000
init = 0x001a4000-0x001bf000
available = 0x001bf000-0x01eff000
rootfs = 0x01eff000-0x01f00000
DMA Zone = 0x01f00000-0x02000000
Hardware Trace Active and Enabled
Boot Mode: 0
Blackfin support (C) 2004-2008 Analog Devices, Inc.
Compiled for ADSP-BF537 Rev 0.2
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 500 MHz core clock and 100 MHz System Clock
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
Data Cache Enabled for CPU0 (write-back)
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 7873
Kernel command line: root=/dev/mtdblock3 rw rootfstype=jffs2
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 128 (order: 7, 512 bytes)
console [ttyBF0] enabled
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory available: 29652k/32768k RAM, (108k init code, 1199k kernel code, 477k d)
Calibrating delay loop... 997.37 BogoMIPS (lpj=1994752)
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (9 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 48 KB (41 KB free)
PDA for CPU0 reserved at 001867e4
net_namespace: 288 bytes
NET: Registered protocol family 16
Blackfin GPIO Controller
Blackfin DMA Controller
cm_bf537_init(): registering device resources
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
JFFS2 version 2.2. (NAND) Â 2001-2006 Red Hat, Inc.
msgmni has been set to 57
io scheduler noop registered (default)
io scheduler cfq registered
bfin-dma: initialized
simple-gpio: now handling 48 GPIOs: 0 - 47
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART
bfin-uart.1: ttyBF1 at MMIO 0xffc02000 (irq = 20) is a BFIN-UART
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
arch/blackfin/mach-bf537/boards/tcm_bf537.c:bfin_get_ether_addr: Setting Etherne
bfin_mac_mdio: probed
bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1, mdc)
bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1
uclinux[mtd]: RAM probe address=0x1eff000 size=0xc0000000
Creating 1 MTD partitions on "RAM":
0x00000000-0xc0000000 : "ROMfs"
gpio-addr-flash: probing 16-bit flash bus
gpio-addr-flash: Found 1 x16 devices at 0x0 in 16-bit bank
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
Using auto-unlock on power-up/resume
cfi_cmdset_0001: Erase suspend on write enabled
cmdlinepart partition parsing not available
RedBoot partition parsing not available
gpio-addr-flash: Using board partition definition
Creating 3 MTD partitions on "gpio-addr-flash":
0x00000000-0x00040000 : "u-boot (256k)"
0x00040000-0x00180000 : "uClinux-kernel (1280k)"
0x00180000-0x00800000 : "filesystem (6656k)"
bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_7
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
mmc_spi spi0.1: ASSUMING 3.2-3.4 V slot power
mmc_spi spi0.1: SD/MMC host mmc0, no DMA, no WP, no poweroff
TCP cubic registered
NET: Registered protocol family 17
rtc-bfin rtc-bfin: setting system clock to 2009-01-23 16:53:17 UTC (1232729597)
Empty flash at 0x0000fffc ends at 0x00010000
CLEANMARKER node found at 0x00010000, not first node in block (0x00000000)
Empty flash at 0x0002fffc ends at 0x00030000
CLEANMARKER node found at 0x00030000, not first node in block (0x00020000)
Empty flash at 0x0004fffc ends at 0x00050000
CLEANMARKER node found at 0x00050000, not first node in block (0x00040000)
Empty flash at 0x0006fffc ends at 0x00070000
CLEANMARKER node found at 0x00070000, not first node in block (0x00060000)
Empty flash at 0x0008fffc ends at 0x00090000
CLEANMARKER node found at 0x00090000, not first node in block (0x00080000)
Empty flash at 0x000afffc ends at 0x000b0000
CLEANMARKER node found at 0x000b0000, not first node in block (0x000a0000)
Empty flash at 0x000cfffc ends at 0x000d0000
CLEANMARKER node found at 0x000d0000, not first node in block (0x000c0000)
Empty flash at 0x000efffc ends at 0x000f0000
CLEANMARKER node found at 0x000f0000, not first node in block (0x000e0000)
Empty flash at 0x0010fffc ends at 0x00110000
CLEANMARKER node found at 0x00110000, not first node in block (0x00100000)
Empty flash at 0x0012fffc ends at 0x00130000
CLEANMARKER node found at 0x00130000, not first node in block (0x00120000)
mmc_spi spi0.1: requested mode not fully supported
mmc_spi spi0.1: can't change chip-select polarity
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new SD card on SPI
VFS: Mounted root (jffs2 filesystem).
Freeing unused kernel memory: 108k freed
mmcblk0: mmc0:0000 3.75 GiB
mmcblk0:
dma_alloc_init: dma_page @ 0x001b8000 - 256 pages at 0x01f00000
start Network
mount SD/MMC-Card
create TUN/TAB device
mkdir: cannot create directory '/dev/net': File exists
mknod: /dev/net/tun: File exists
Welcome to:
____ _ _
/ __| ||_| _ _
_ _| | | | _ ____ _ _ \ \/ /
| | | | | | || | _ \| | | | \ /
| |_| | |__| || | | | | |_| | / \
| ___\____|_||_|_| |_|\____|/_/\_\
|_|
For further information see:
BusyBox v1.13.2 (2009-01-23 12:56:58 CET) built-in shell (msh)
Enter 'help' for a list of built-in commands.
root:/>
What does this messages mean?
How i can fix it?
- Patrick
TranslateQuoteReplyEditDelete
2009-01-23 17:05:06 Re: uCLinux userspace in Flash or SD-Card....
Mike Frysinger (UNITED STATES)
Message: 68309
please read the page i posted already ... it documents that
QuoteReplyEditDelete
2009-01-26 01:53:04 Re: uCLinux userspace in Flash or SD-Card....
Patrick Hotz (GERMANY)
Message: 68336
Thank you Mike,
now the filesystem works ok for me.
But the problem with the no booting kernel is already there.
If i want to boot my system after a few minutes without power supply the kernel stops at "Starting Kernel..."
U-Boot-1.1.3-ADI-R06R2 (Jan 21 2008 - 18:30:22)
CPU: ADSP BF537 Rev.: 0.2
Board: Bluetechnix TCM-BF537 board
Support: http://www.bluetechnix.at/
Clock: VCO: 500 MHz, Core: 500 MHz, System: 100 MHz
SDRAM: 32 MB
Device ID of the Flash is 898820
Memory Map for the Flash
0x20000000 - 0x20800000 Single Flash Chip
Please type command flinfo for information on Sectors
FLASH: 8 MB
In: serial
Out: serial
Err: serial
Net: ADI BF537 EMAC
Hit any key to stop autoboot: 0
## Booting image at 20040000 ...
Image Name: Linux-2.6.28-ADI-2009R1-pre-svn6
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 991440 Bytes = 968.2 kB
Load Address: 00001000
Entry Point: 001ad504
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 1ad504
If i load the uImage to ram (at 0x1000000), boot it directly from ram and restart the system with "reboot" the kernel on flash boots ok....
Do you know a reason for this?
- Patrick
TranslateQuoteReplyEditDelete
2009-01-26 01:56:46 Re: uCLinux userspace in Flash or SD-Card....
Mike Frysinger (UNITED STATES)
Message: 68337
try reading the kernel log:
http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:debug:post_mortem
QuoteReplyEditDelete
2009-01-26 02:27:41 Re: uCLinux userspace in Flash or SD-Card....
Patrick Hotz (GERMANY)
Message: 68338
Hi Mike,
i have looked at this log...
this is what i have got:
TCM-BF537> md.b 1874f0
001874f0: 3c 35 3e 4c 69 6e 75 78 20 76 65 72 73 69 6f 6e <5>Linux version
00187500: 20 32 2e 36 2e 32 38 2d 41 44 49 2d 32 30 30 39 2.6.28-ADI-2009
00187510: 52 31 2d 70 72 65 2d 73 76 6e 36 30 31 34 20 28 R1-pre-svn6014 (
00187520: 70 68 6f 74 7a 40 48 57 45 4c 69 6e 75 78 29 20 photz@HWELinux)
TCM-BF537> md.b 187530
00187530: 28 67 63 63 20 76 65 72 73 69 6f 6e 20 34 2e 31 (gcc version 4.1
00187540: 2e 32 20 28 41 44 49 20 73 76 6e 29 29 20 23 31 .2 (ADI svn)) #1
00187550: 30 35 20 46 72 69 20 4a 61 6e 20 32 33 20 31 31 05 Fri Jan 23 11
00187560: 3a 33 33 3a 33 35 20 43 45 54 20 32 30 30 39 0a :33:35 CET 2009.
TCM-BF537> md.b 187570
00187570: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00187580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00187590: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
001875a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
TCM-BF537> md.b 1875b0
001875b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
001875c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
001875d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
001875e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
TCM-BF537>
TranslateQuoteReplyEditDelete
2009-01-26 05:27:39 Re: uCLinux userspace in Flash or SD-Card....
Patrick Hotz (GERMANY)
Message: 68345
Hi,
now i think it works ok,
i have run a "make clean;make" and now it is running....
Now i have a other question,
how can i update the uCLinux?
The Kernel is no problem, i run a "dd" command on mtd2...
but the filesystem? i can not run a "dd" whilst it is mounted...
Any idea?
Regards
- Patrick
TranslateQuoteReplyEditDelete
2009-01-26 10:53:24 Re: uCLinux userspace in Flash or SD-Card....
Mike Frysinger (UNITED STATES)
Message: 68350
you generally dont update the entire root filesystem. you update the specific application/files you care about. otherwise, you pretty much have to do it from u-boot.