This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
1. If i use the ramdisk filesystem,and bootarg as follwing
root=/dev/ram0 rw rootfstype=ext2 initrd=0x81000000,64M
fatload mmc 0 0x81000000 ramdisk.gz
p/s: ramdisk.gz about 16MB
As shown,How to MAP with memory?
2.
linux meminfo shows the MemFree info,
Is it the result after deduction 64MB??
Hi Justin,
I'm not sure I understand your first question correctly. Please check these links:
http://www.simtec.co.uk/products/SWLINUX/files/booting_article.html#d0e383
http://www.embeddedlinux.org.cn/EmbeddedLinuxPrimer/0136130550/ch06lev1sec4.html#ch06lev2sec16
The kernel uses the ATAG_RAMDISK and ATAG_INITRD2 tags to know the ramdisk location and the decompressed image size.
Regarding your second question - yes, it looks like this is after 64MB have been reserved.
Best regards,
Miroslav
Hi Miroslav
Thank you!!
about first question:
I want to know the 64M ramdisk start and end address of Physical memory
ex 0x8xxx xxxx ~ (0x8xxx xxxx +0x0400 0000) 64M
Justin, can you please try to "cat" /proc/iomem on your board and check if there is any information about the ramdisk under "System RAM". I'm not able to test it at the moment.
Best regards,
Miroslav
Hello Miroslav,
the System RAM is 256MB (our target board use 256MB DDR3 memory)
there is not any information about the ramdisk
4a101200-4a1012ff : cpsw
4a101200-4a1012ff : eth0
4a300000-4a33ffff : pruss_uio
4c000000-4c007fff : cpuidle-am33xx.0
50000000-50001fff : omap-gpmc
50000000-50001fff : omap-gpmc
53100000-531fffff : omap4-sham
53500000-535fffff : omap4-aes
80000000-8fffffff : System RAM
80008000-80592fff : Kernel text
805ce000-80666aa3 : Kernel data
root@am335x-evm:/proc#
Isn't there anything about the ramdisk loading in the U-Boot and Kernel boot logs? Please check.
Which version of U-Boot and Linux kernel do you use?
Best regards,
Miroslav
Hello Miroslav
Currently ,It is OK to use
Version:
Uboot:2013:01.01 , Kernel 3.2 , TI SDK 6.0
uenv.txt
bootargs=console=ttyO0,115200n8 root=/dev/ram0 rw rootfstype=ext2 initrd=0x81000000,64M
bootcmd=mmc rescan; fatload mmc 0 $loadaddr uImage; fatload mmc 0 0x81000000 ramdisk.gz; bootm
uenvcmd=boot
boot log:
U-Boot SPL 2013.01.01 (May 27 2014 - 11:26:40)
<<< use GPIO 0.14 LOW for HW reset PHY >>>
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO
Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO
Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
OMAP SD/MMC: 0
reading u-boot.img
reading u-boot.img
U-Boot 2013.01.01 (May 27 2014 - 11:26:40)
I2C: ready
DRAM: 256 MiB
WARNING: Caches not enabled
NAND: No NAND device found!!!
0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO
Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO
Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
Net: <ethaddr> not set. Validating first E-fuse MAC
DEBUG: get_phy_device =(002)
DEBUG: get_phy_device =(003)
DEBUG: addr=0 phy_id=ffffffff bus=cpsw
DEBUG: get_phy_device =(004)
DEBUG: get_phy_device =(005)
DEBUG: get_phy_device =(006)
DEBUG: PHY status read MII_BMCR =(0xffff) -1885158248 -1
DEBUG: PHY status read MII_BMCR =(0xffff)
DEBUG: PHY status read MII_BMCR =(0xffff)
PHY reset timed out
cpsw, usb_ether
Hit any key to stop autoboot: 0
mmc0 is current device
SD/MMC found on device 0
reading uEnv.txt
195 bytes read in 4 ms (46.9 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc ...
Running uenvcmd ...
reading uImage
3183256 bytes read in 321 ms (9.5 MiB/s)
reading ramdisk.gz
16797583 bytes read in 1664 ms (9.6 MiB/s)
## Booting kernel from Legacy Image at 80200000 ...
Image Name: Linux-3.2.0
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3183192 Bytes = 3 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Linux version 3.2.0 (root@am335xhost) (gcc version 4.7.3 20130226 (prerelease) (
crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) ) #64 Wed
May 28 14:14:51 CST 2014
CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: am335xevm
Memory policy: ECC disabled, Data cache writeback
AM335X ES2.1 (neon )
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024
Kernel command line: console=ttyO0,115200n8 root=/dev/ram0 rw rootfstype=ext2 in
itrd=0x81000000,64M
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 256MB = 256MB total
Memory: 187764k/187764k available, 74380k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
vmalloc : 0xd0800000 - 0xff000000 ( 744 MB)
lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0008000 - 0xc0593000 (5676 kB)
.init : 0xc0593000 - 0xc05ce000 ( 236 kB)
.data : 0xc05ce000 - 0xc0637d48 ( 424 kB)
.bss : 0xc0637d6c - 0xc0666aa4 ( 188 kB)
NR_IRQS:396
IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
Total of 128 interrupts on 1 active controller
OMAP clockevent source: GPTIMER2 at 24000000 Hz
omap_dm_timer_switch_src: Switching to HW default clocksource(sys_clkin_ck) for
timer1, this may impact timekeeping in low power state
OMAP clocksource: GPTIMER1 at 24000000 Hz
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
Console: colour dummy device 80x30
Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
pid_max: default: 32768 minimum: 301
Security Framework initialized
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
omap_hwmod: gfx: failed to hardreset
omap_hwmod: pruss: failed to hardreset
print_constraints: dummy:
NET: Registered protocol family 16
OMAP GPIO hardware version 0.1
omap_mux_init: Add partition: #1: core, flags: 0
omap_i2c.1: alias fck already exists
omap2_mcspi.1: alias fck already exists
omap2_mcspi.2: alias fck already exists
edma.0: alias fck already exists
edma.0: alias fck already exists
edma.0: alias fck already exists
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
registerd cppi-dma Intr @ IRQ 17
Cppi41 Init Done Qmgr-base(d087a000) dma-base(d0878000)
Cppi41 Init Done
musb-ti81xx musb-ti81xx: musb0, board_mode=0x11, plat_mode=0x1
musb-ti81xx musb-ti81xx: musb1, board_mode=0x11, plat_mode=0x1
omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz
tps65910 1-002d: JTAGREVNUM 0x0
print_constraints: VRTC:
print_constraints: VIO: at 1500 mV
print_constraints: VDD1: 600 <--> 1500 mV at 1325 mV normal
print_constraints: VDD2: 600 <--> 1500 mV at 1137 mV normal
print_constraints: VDD3: 5000 mV
print_constraints: VDIG1: at 1800 mV
print_constraints: VDIG2: at 1800 mV
print_constraints: VPLL: at 1800 mV
print_constraints: VDAC: at 1800 mV
print_constraints: VAUX1: at 1800 mV
print_constraints: VAUX2: at 3300 mV
print_constraints: VAUX33: at 3300 mV
print_constraints: VMMC: at 3300 mV
tps65910 1-002d: No interrupt support, no core IRQ
Advanced Linux Sound Architecture Driver Version 1.0.24.
Switching to clocksource gp timer
musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
musb-hdrc musb-hdrc.0: dma type: dma-cppi41
MUSB0 controller's USBSS revision = 4ea20800
musb0: Enabled SW babble control
musb-hdrc musb-hdrc.0: MUSB HDRC host driver
musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: MUSB HDRC host driver
usb usb1: Manufacturer: Linux 3.2.0 musb-hcd
usb usb1: SerialNumber: musb-hdrc.0
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
musb-hdrc musb-hdrc.0: USB Host mode controller at d083c000 using DMA, IRQ 18
musb-hdrc musb-hdrc.1: dma type: dma-cppi41
MUSB1 controller's USBSS revision = 4ea20800
musb1: Enabled SW babble control
musb-hdrc musb-hdrc.1: MUSB HDRC host driver
musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: MUSB HDRC host driver
usb usb2: Manufacturer: Linux 3.2.0 musb-hcd
usb usb2: SerialNumber: musb-hdrc.1
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
musb-hdrc musb-hdrc.1: USB Host mode controller at d083e800 using DMA, IRQ 19
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
rootfs image is not initramfs (no cpio magic); looks like an initrd
Freeing initrd memory: 65536K
NetWinder Floating Point Emulator V0.97 (double precision)
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
msgmni has been set to 494
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Could not set LED4 to fully on
omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
console [ttyO0] enabled
omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
omap4_rng omap4_rng: OMAP4 Random Number Generator ver. 2.00
brd: module loaded
loop: module loaded
i2c-core: driver [tsl2550] using legacy suspend method
i2c-core: driver [tsl2550] using legacy resume method
at24 1-0051: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
No daughter card found
at24 1-0055: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
<<< 1.02 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >>>
The board is a AM335x Starter Kit.
omap_hsmmc.0: alias fck already exists
omap-gpmc omap-gpmc: GPMC revision 6.0
registered am33xx_sr device
mtdoops: mtd device (mtddev=name/number) must be supplied
omap2-nand driver initializing
OneNAND driver initializing
CAN device driver interface
CAN bus driver for Bosch D_CAN controller 1.0
davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
davinci_mdio davinci_mdio.0: detected phy mask fffffffd
phy read clk = 0x3def
phy read clk = 0x3ed6
phy read rxd = 0x7777
phy read rxd = 0x0
davinci_mdio.0: probed
davinci_mdio davinci_mdio.0: phy[1]: device 0:01, driver unknown
usbcore: registered new interface driver zd1201
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver cdc_eem
usbcore: registered new interface driver dm9601
cdc_ncm: 04-Aug-2011
usbcore: registered new interface driver cdc_ncm
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
Linux video capture interface: v2.00
usbcore: registered new interface driver uvcvideo
USB Video Class driver (1.1.1)
OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
cpuidle: using governor ladder
cpuidle: using governor menu
omap4_aes_mod_init: loading AM33X AES driver
omap4-aes omap4-aes: AM33X AES hw accel rev: 3.02
omap4_aes_probe: probe() done
omap4_sham_mod_init: loading AM33X SHA/MD5 driver
omap4-sham omap4-sham: AM33X SHA/MD5 hw accel rev: 4.03
omap4_sham_probe: probe() done
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
usbcore: registered new interface driver snd-usb-audio
ALSA device list:
No soundcards found.
oprofile: hardware counters not available
oprofile: using timer interrupt.
nf_conntrack version 0.5.0 (3957 buckets, 15828 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
NET: Registered protocol family 17
can: controller area network core (rev 20090105 abi 8)
NET: Registered protocol family 29
can: raw protocol (rev 20090105)
can: broadcast manager protocol (rev 20090105 t)
Registering the dns_resolver key type
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
ThumbEE CPU extension supported.
mux: Failed to setup hwmod io irq -22
Power Management for AM33XX family
Trying to load am335x-pm-firmware.bin (60 secs timeout)
Copied the M3 firmware to UMEM
Cortex M3 Firmware Version = 0x181
create_regulator: VDD1: Failed to create debugfs directory
smartreflex smartreflex: am33xx_sr_probe: Driver initialized
clock: disabling unused clocks to save power
Detected MACID=1c:ba:8c:b7:6f:66
cpsw: Detected MACID = 1c:ba:8c:b7:6f:68
RAMDISK: gzip image found at block 0
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new high speed SDHC card at address 0001
mmcblk0: mmc0:0001 00000 3.69 GiB
mmcblk0: p1 p2 p3 p4
VFS: Mounted root (ext2 filesystem) on device 1:0.
Freeing init memory: 236K
INIT: version 2.88 booting
Error opening /dev/fb0: No such device
Starting udev
kjournald starting. Commit interval 5 seconds
EXT3-fs (mmcblk0p3): warning: maximal mount count reached, running e2fsck is rec
ommended
EXT3-fs (mmcblk0p3): using internal journal
EXT3-fs (mmcblk0p3): recovery complete
EXT3-fs (mmcblk0p3): mounted filesystem with ordered data mode
kjournald starting. Commit interval 5 seconds
EXT3-fs (mmcblk0p2): warning: maximal mount count reached, running e2fsck is rec
ommended
kjournald starting. Commit interval 5 seconds
EXT3-fs (mmcblk0p4): warning: maximal mount count reached, running e2fsck is rec
ommended
EXT3-fs (mmcblk0p2): using internal journal
EXT3-fs (mmcblk0p2): recovery complete
EXT3-fs (mmcblk0p4): using internal journal
EXT3-fs (mmcblk0p4): recovery complete
EXT3-fs (mmcblk0p4): mounted filesystem with ordered data mode
EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
Starting Bootlog daemon: bootlogd: cannot allocate pseudo tty: No such file or d
irectory
bootlogd.
ALSA: Restoring mixer settings...
/usr/sbin/alsactl: load_state:1686: No soundcards found...
Configuring network interfaces... done.
Configuring update-modules.
INIT: Entering runlevel: 5
>>>>>>>>>>>>>>>>>>>> cp /media/mmcblk0p1/fifoam335x_eth.ko /flash/bin
/flash/bin/setup.sh: line 63: syntax error near unexpected token `fi'
/flash/bin/setup.sh: line 63: `fi'
Starting system message bus: dbus.
Starting telnet daemon.
Starting portmap: done
hwclock: can't open '/dev/misc/rtc': No such file or directory
Starting syslogd/klogd: done
Stopping Bootlog daemon: bootlogd.
_____ _____ _ _
| _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
| | _| .'| . | . | | __| _| . | | | -_| _| _|
|__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
|___| |___|
Arago Project http://arago-project.org am335x-evm ttyO0
Arago 2013.05 am335x-evm ttyO0
am335x-evm login:
I don't see anything obvious in the bootlog, but if you do a "mount" command in my default SDK6.0, I see a 16 Mbyte RAMDISK at /media/ram that to which I can read and write.
root@am335x-evm:/mnt/nand# mount
rootfs on / type rootfs (rw)
/dev/root on / type ext3 (rw,relatime,errors=continue,barrier=1,data=ordered)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
none on /dev type tmpfs (rw,relatime,mode=755)
/dev/mmcblk0p1 on /media/mmcblk0p1 type vfat (rw,relatime,fmask=0022,dmask=0022,
codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sda1 on /media/sda1 type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=c
p437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw,relatime)
tmpfs on /var/volatile type tmpfs (rw,relatime,size=16384k)
tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)
tmpfs on /media/ram type tmpfs (rw,relatime,size=16384k)
/dev/mmcblk0p2 on /media/mmcblk0p2 type ext3 (rw,relatime,errors=continue,barrie
r=1,data=ordered)
Hello,
The ram size is 16384k,but it should be 64M
Please help check if there are any hidden problems,Thanks!!
============ RamDisk Production process ========================
dd if=/dev/zero of=ramdisk bs=1M count=64
mkfs ramdisk
y
mkdir mnt
mount -o loop ramdisk mnt
cp -r /sitara/arago-base-tisdk-image-am335x/* mnt
umount mnt
gzip ramdisk
================================
root@am335x-evm:~# mount
rootfs on / type rootfs (rw)
/dev/root on / type ext2 (rw,relatime,errors=continue)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
none on /dev type tmpfs (rw,relatime,mode=755)
/dev/mmcblk0p2 on /media/mmcblk0p2 type ext3 (rw,relatime,errors=continue,barrie
r=1,data=ordered)
/dev/mmcblk0p1 on /media/mmcblk0p1 type vfat (rw,relatime,fmask=0022,dmask=0022,
codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/mmcblk0p4 on /media/mmcblk0p4 type ext3 (rw,relatime,errors=continue,barrie
r=1,data=ordered)
/dev/mmcblk0p3 on /media/mmcblk0p3 type ext3 (rw,relatime,errors=continue,barrie
r=1,data=ordered)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw,relatime)
tmpfs on /var/volatile type tmpfs (rw,relatime,size=16384k)
tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)
tmpfs on /media/ram type tmpfs (rw,relatime,size=16384k)
/dev/mmcblk0p2 on /flash type ext3 (rw,relatime,errors=continue,barrier=1,data=o
rdered)
/dev/mmcblk0p3 on /user type ext3 (rw,relatime,errors=continue,barrier=1,data=or
dered)
root@am335x-evm:~#