Re: switching from initrd to initramfs

2009-07-08 Thread Mikhail Zaturenskiy
> I was hoping to convert this working initrd to initramfs before I try
> and create my own initrd, I'm still learning about this process. I got
> this to work yesterday morning, but I'm not sure what changed or what
> I'm doing differently...
> Can somebody help me figure out what's missing?

Never mind, got it! :)  For reference, here is what I did:
First I made a custom init file called "init_mz" with  the following contents:
#!/bin/sh
echo "hello! processing init_mz"

#Create all the symlinks to /bin/busybox
echo "installing busybox links..."
busybox --install -s
echo "done installing busybox links..."

#Mount things needed by this script
echo "mounting proc..."
mount -t proc proc /proc
echo "done mounting proc..."
echo "mounting sysfs..."
mount -t sysfs sysfs /sys
echo "done mounting sysfs..."

#Create device nodes
echo "creating /dev nodes..."
mknod /dev/null c 1 3
mknod /dev/tty c 5 0
mdev -s
echo "done creating /dev nodes..."

echo "exec-ing sh..."
exec /bin/sh

At this point booting with the "rdinit=/init_mz" kernel argument worked.

Then I removed pretty much everything unnecessary from my root tree,
cross-compiled a busybox v1.14.2 with defconfg (except
statically-linked), and created the few necessary links, so my tree
looks like this:


|-- bin
|   |-- busybox
|   |-- echo -> busybox
|   |-- mount -> busybox
|   `-- sh -> busybox
|-- dev
|-- init_mz
|-- proc
|-- sbin
|-- sys
`-- usr
|-- bin
`-- sbin
**
I could probably also get rid of /dev /proc /sbin /sys /usr* /bin/echo
and /bin/mount and just create those on the fly in the init_mz file.

I'm building the initramfs ramdisk using:
find | cpio -ovc | gzip -v9 > ../initramfs.cpio.gz
mkimage -T ramdisk -C gzip -n 'Test Ramdisk Image' -d
../initramfs.cpio.gz ../uCpio

For my kernel arguments I'm using "console=ttyCPM0,9600n8
root=/dev/ram rw rdinit=/init_mz" and that is all! I now have a
functional initramfs that's 0.97MB large.

For a while I was confused because "ls" output had file names with
strange symbols such as "1;34mbin0m" for "bin", but I figured out that
it's because supposedly those represent font colors and I'm using
HyperTerminal which doesn't support them.

I hope somebody will find this useful.

Mikhail Zaturenskiy
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


switching from initrd to initramfs

2009-07-08 Thread Mikhail Zaturenskiy
er noop registered
io scheduler deadline registered (default)
Generic RTC Driver v1.07
fa80.serial: ttyCPM0 at MMIO 0xc500ea80 (irq = 19) is a CPM UART
fa20.serial: ttyCPM1 at MMIO 0xc5016a20 (irq = 29) is a CPM UART
brd: module loaded
loop: module loaded
eth0 (): not using net_device_ops yet
eth0: fs_enet: 00:00:00:00:00:00
eth1 (): not using net_device_ops yet
eth1: fs_enet: 00:00:00:00:00:00
FEC MII Bus: probed
fe00.flash: Found 2 x16 devices at 0x0 in 32-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
fe00.flash: CFI does not contain boot bank location. Assuming top.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
List of all partitions:
1f00   32768 mtdblock0 (driver?)
No filesystem could mount root, tried:  ext2 cramfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
Rebooting in 180 seconds..
**

I was hoping to convert this working initrd to initramfs before I try
and create my own initrd, I'm still learning about this process. I got
this to work yesterday morning, but I'm not sure what changed or what
I'm doing differently...
Can somebody help me figure out what's missing?

Thanks,
Mikhail Zaturenskiy
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: RAMDISK on EP88xc

2009-07-06 Thread Mikhail Zaturenskiy
On Mon, Jul 6, 2009 at 3:18 PM, Scott Wood wrote:
> Try omitting the spaces around the equal sign.

AHA! Lesson learned :)  thanks Scott! That did it.
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: RAMDISK on EP88xc

2009-07-06 Thread Mikhail Zaturenskiy
>> After doing this testing I have a side question:
>> If I modify just arch/powerpc/configs/ep88x_defconfig, not all changes
>> are reflected in the resulting .config when i do "make
>> ep88x_defconfig; make uImage". I ended up having to modify
>> arch/powerpc/Kconfig, arch/powerpc/configs/ep88xc_defconfig,
>> fs/ext2/Kconfig and init/Kconfig to get "make ep88x_defconfig; make
>> uImage" to create a properly configured image, but this really doesn't
>> feel right. What's the proper way to set up a defconfig?
>
> What changes are you trying to make to the config, and what did you change
> in the Kconfig files?
>


in arch/powerpc/Kconfig:
+   config BLK_DEV_LOOP
+   tristate
+   default y

+   config BLK_DEV_RAM
+   tristate
+   default y

+   config BLK_DEV_RAM_COUNT
+   int
+   default 16

+   config BLK_DEV_RAM_SIZE
+   int
+   default 32768

in arch/powerpc/configs/ep88xc_defconfig:
+   CONFIG_BLK_DEV = y
-   CONFIG_BLK_DEV is not set
-   CONFIG_BLK_DEV_INITRD is not set
-   CONFIG_EXT2_FS is not set

in fs/ext2/Kconfig/"config EXT2_FS":
+   default y

in init/Kconfig/"config BLK_DEV_INITRD":
+   default y


If I make changes just to arch/powerpc/configs/ep88xc_defconfig they
don't seem to be propagated to the resulting configuration when using
"make ep88xc_defconfig"
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: RAMDISK on EP88xc

2009-07-06 Thread Mikhail Zaturenskiy
> If you have time, could you bisect to see when the slowdown was introduced?
>
> -Scott
>

Scott, I tested with kernels 2.6.28, 2.6.29 and 2.6.30 all obtained
from git.kernel.org and configured the same.
So, on my EP88xc board 2.6.28 and 2.6.29 work ok, 2.6.30 has the
slowdown issue after loading a ramdisk.

After doing this testing I have a side question:
If I modify just arch/powerpc/configs/ep88x_defconfig, not all changes
are reflected in the resulting .config when i do "make
ep88x_defconfig; make uImage". I ended up having to modify
arch/powerpc/Kconfig, arch/powerpc/configs/ep88xc_defconfig,
fs/ext2/Kconfig and init/Kconfig to get "make ep88x_defconfig; make
uImage" to create a properly configured image, but this really doesn't
feel right. What's the proper way to set up a defconfig?

Thanks,
Mikhail Zaturenskiy
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: RAMDISK on EP88xc

2009-07-02 Thread Mikhail Zaturenskiy
>> Frank! That worked like a charm! I downloaded linux-2.6.26 source from
>> git.kernel.org, inserted the config options previously mentioned,
>> compiled ok, keeping U-Boot ramdisk and my DTS same it booted right up
>> and no more "slow motion" issue.
>
> If you have time, could you bisect to see when the slowdown was introduced?

I'm leaving in 5 minutes, but I'll try to find some time next week to
check this out.

Mikhail
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: RAMDISK on EP88xc

2009-07-02 Thread Mikhail Zaturenskiy
> This is very interesting. I recently experienced a similar problem when
> upgrading from 2.6.26-rc6 to 2.6.31-rc1 (torvalds mainline kernel).
>
> I didn't had the time to figure out what was happening, so I went back to
> 2.6.26-rc6. Just for the test, could you try to go back to 2.6.26 and see if
> the problem remains?

Frank! That worked like a charm! I downloaded linux-2.6.26 source from
git.kernel.org, inserted the config options previously mentioned,
compiled ok, keeping U-Boot ramdisk and my DTS same it booted right up
and no more "slow motion" issue.

Thanks! Now I just need to make myself a custom ramdisk.
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: RAMDISK on EP88xc

2009-07-02 Thread Mikhail Zaturenskiy
> Here is what's happening:
> *
> RAMDISK: gzip image found at block 0
> VFS: Mounted root (ext2 filesystem) on device 1:0.
> Freeing unused kernel memory: 112k init
>
> <4 minutes pass>
>
> init started: BusyBox v1.7.1 (2008-04-02 09:14:47 MEST)
>
> <2 minutes pass>
>
> starting pid 403, tty '': '/etc/rc.sh'
>
> < etc... >
> *

went out to lunch for 20 minutes, new output on screen:
*
Freeing unused kernel memory: 112k init
init started: BusyBox v1.7.1 (2008-04-02 09:14:47 MEST)
starting pid 403, tty '': '/etc/rc.sh'
starting pid 408, tty '': '/bin/application'
starting pid 409, tty '': '/bin/sh'
### Application running ...
process '/bin/application' (pid 408) exited. Scheduling it for restart.
starting pid 411, tty '': '/bin/application
*
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: RAMDISK on EP88xc

2009-07-02 Thread Mikhail Zaturenskiy
> Just as an intermediate update on the issue, I've made progress and it
> hangs later down the line, see below:
> 
> Using Embedded Planet EP88xC machine description
> Linux version 2.6.30-rc2-01402-gd4e2f68-dirty (dev...@localhost.localdomain) 
> (gc
> c version 4.2.2) #3 Thu Jul 2 11:00:54 CDT 2009
> Found initrd at 0xc3dbb000:0xc3f6d056
> Zone PFN ranges:
>  DMA      0x -> 0x4000
>  Normal   0x4000 -> 0x4000
> Movable zone start PFN for each node
> early_node_map[1] active PFN ranges
>    0: 0x -> 0x4000
> MMU: Allocated 72 bytes of context maps for 16 contexts
> Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
> Kernel command line: console=ttyCPM0,9600n8 root=/dev/ram loglevel=7 
> init=/sbin/
> init
> NR_IRQS:512
> PID hash table entries: 256 (order: 8, 1024 bytes)
> Decrementer Frequency = 0x5f5e10
> clocksource: timebase mult[2800] shift[22] registered
> console [ttyCPM0] enabled
> Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
> Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
> Memory: 60716k/65536k available (2136k kernel code, 4752k reserved, 100k 
> data, 9
> 9k bss, 112k init)
> SLUB: Genslabs=12, HWalign=16, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
> Calibrating delay loop... 12.39 BogoMIPS (lpj=61952)
> Mount-cache hash table entries: 512
> net_namespace: 296 bytes
> NET: Registered protocol family 16
> bio: create slab  at 0
> NET: Registered protocol family 2
> IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
> TCP established hash table entries: 2048 (order: 2, 16384 bytes)
> TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
> TCP: Hash tables configured (established 2048 bind 2048)
> TCP reno registered
> NET: Registered protocol family 1
> checking if image is initramfs...
> rootfs image is not initramfs (no cpio magic); looks like an initrd
> Freeing initrd memory: 1736k freed
> msgmni has been set to 122
> io scheduler noop registered
> io scheduler deadline registered (default)
> Generic RTC Driver v1.07
> fa80.serial: ttyCPM0 at MMIO 0xc500ea80 (irq = 19) is a CPM UART
> fa20.serial: ttyCPM1 at MMIO 0xc5016a20 (irq = 29) is a CPM UART
> brd: module loaded
> loop: module loaded
> eth0: fs_enet: 00:00:00:00:00:00
> eth1: fs_enet: 00:00:00:00:00:00
> FEC MII Bus: probed
> fe00.flash: Found 2 x16 devices at 0x0 in 32-bit bank
>  Amd/Fujitsu Extended Query Table at 0x0040
> fe00.flash: CFI does not contain boot bank location. Assuming top.
> number of CFI chips: 1
> cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
> TCP cubic registered
> NET: Registered protocol family 17
> RPC: Registered udp transport module.
> RPC: Registered tcp transport module.
> RAMDISK: gzip image found at block 0
> VFS: Mounted root (ext2 filesystem) readonly on device 1:0.
> Freeing unused kernel memory: 112k init
> 
>
> Now searching for cause, looks like it's "init" related...
>

Wow... I just found out that it's not actually "hanging" at this
point.. it's just working in "slow motion"... I found out by leaving
the machine and coming back half an hour later to find additional
output and eventually even a prompt.

Here is what's happening:
*
RAMDISK: gzip image found at block 0
VFS: Mounted root (ext2 filesystem) on device 1:0.
Freeing unused kernel memory: 112k init

<4 minutes pass>

init started: BusyBox v1.7.1 (2008-04-02 09:14:47 MEST)

<2 minutes pass>

starting pid 403, tty '': '/etc/rc.sh'

< etc... >
*

I've tried a couple different ramdisk images (another one with a much
older version of busybox), with similar results. Anybody have an idea
about what's going on here?
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: RAMDISK on EP88xc

2009-07-02 Thread Mikhail Zaturenskiy
>> I haven't tried CONFIG_BLK_DEV or CONFIG_BLK_DEV_LOOP and am still
>> playing around with the values for CONFIG_BLK_DEV_RAM_COUNT and
>> CONFIG_BLK_DEV_RAM_SIZE. Strangely, the DEV_RAM defines are completely
>> missing from my config so I have to put them in manually... (as
>> opposed to via menuconfig). I'll post back when it's working or when
>> I've tried all of this and still am getting some error.
>
> If you don't have CONFIG_BLK_DEV defined, you can't have 
> CONFIG_BLK_DEV_RAM_COUNT
> or CONFIG_BLK_DEV_RAM_SIZE.  Use 'menuconfig' to help straighten this out.
>
>> Meanwhile a side question - why does BLK_DEV_RAM_COUNT default to 16?
>
> This is just the number of unique RAM disk devices supported.

I see, thanks Gary, I'll leave that unmodified then. I only really
need 1 but it doesn't seem to negatively affect anything if I leave it
at 16.

Just as an intermediate update on the issue, I've made progress and it
hangs later down the line, see below:

Using Embedded Planet EP88xC machine description
Linux version 2.6.30-rc2-01402-gd4e2f68-dirty (dev...@localhost.localdomain) (gc
c version 4.2.2) #3 Thu Jul 2 11:00:54 CDT 2009
Found initrd at 0xc3dbb000:0xc3f6d056
Zone PFN ranges:
  DMA  0x -> 0x4000
  Normal   0x4000 -> 0x4000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0x -> 0x4000
MMU: Allocated 72 bytes of context maps for 16 contexts
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: console=ttyCPM0,9600n8 root=/dev/ram loglevel=7 init=/sbin/
init
NR_IRQS:512
PID hash table entries: 256 (order: 8, 1024 bytes)
Decrementer Frequency = 0x5f5e10
clocksource: timebase mult[2800] shift[22] registered
console [ttyCPM0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 60716k/65536k available (2136k kernel code, 4752k reserved, 100k data, 9
9k bss, 112k init)
SLUB: Genslabs=12, HWalign=16, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 12.39 BogoMIPS (lpj=61952)
Mount-cache hash table entries: 512
net_namespace: 296 bytes
NET: Registered protocol family 16
bio: create slab  at 0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
checking if image is initramfs...
rootfs image is not initramfs (no cpio magic); looks like an initrd
Freeing initrd memory: 1736k freed
msgmni has been set to 122
io scheduler noop registered
io scheduler deadline registered (default)
Generic RTC Driver v1.07
fa80.serial: ttyCPM0 at MMIO 0xc500ea80 (irq = 19) is a CPM UART
fa20.serial: ttyCPM1 at MMIO 0xc5016a20 (irq = 29) is a CPM UART
brd: module loaded
loop: module loaded
eth0: fs_enet: 00:00:00:00:00:00
eth1: fs_enet: 00:00:00:00:00:00
FEC MII Bus: probed
fe00.flash: Found 2 x16 devices at 0x0 in 32-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
fe00.flash: CFI does not contain boot bank location. Assuming top.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RAMDISK: gzip image found at block 0
VFS: Mounted root (ext2 filesystem) readonly on device 1:0.
Freeing unused kernel memory: 112k init


Now searching for cause, looks like it's "init" related...
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: RAMDISK on EP88xc

2009-07-02 Thread Mikhail Zaturenskiy
On Thu, Jul 2, 2009 at 2:10 AM, Frank
Svendsbøe wrote:
> On Wed, Jul 1, 2009 at 10:14 PM, Mikhail
> Zaturenskiy wrote:
> Hmm... according to "Kernel command line: console=ttyCPM0,9600n8
> loglevel=7" you haven't
> specified where root is. Add root=/dev/ram to the kernel command line,
> and specify where the
> init process is located (for instance init=/sbin/init).
>
> I haven't tried Denks ramdisk image. You can create one for yourself
> using dd, gzip and U-Boots
> mkimage tool. If the ramdisk image is larger than 4MB, you must either
> change the default
> CONFIG_BLK_DEV_RAM_SIZE=4096, or set ramdisk size in the kernel command line.
>
> Btw, I use an older kernel than you use, but I have these defined:
> CONFIG_BLK_DEV=y
> CONFIG_BLK_DEV_LOOP=y
> CONFIG_BLK_DEV_RAM=y
> CONFIG_BLK_DEV_RAM_COUNT=16
> CONFIG_BLK_DEV_RAM_SIZE=4096
>
> Maybe they're obsolete now, but you can try to add them to your defconfig 
> file.
>
> Good luck ;-)
>

Thanks Frank, this seems to be leading me down the right path. I tried
some of those defines out yesterday and they got the kernel to at
least attempt to load the ramdisk, so I'm getting somewhere. Also
added root=/dev/ram (also tried /dev/ram0) and init=/sbin/init but for
now things are failing before processing those args.

I haven't tried CONFIG_BLK_DEV or CONFIG_BLK_DEV_LOOP and am still
playing around with the values for CONFIG_BLK_DEV_RAM_COUNT and
CONFIG_BLK_DEV_RAM_SIZE. Strangely, the DEV_RAM defines are completely
missing from my config so I have to put them in manually... (as
opposed to via menuconfig). I'll post back when it's working or when
I've tried all of this and still am getting some error.

Meanwhile a side question - why does BLK_DEV_RAM_COUNT default to 16?
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: RAMDISK on EP88xc

2009-07-01 Thread Mikhail Zaturenskiy
> Hi Mikhail,
> Try setting CONFIG_EXT2_FS=y, then recompile your kernel and reboot.

Hi Frank, just tried that but still getting the same "Unpacking
initramfs... failed!" output
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


RAMDISK on EP88xc

2009-07-01 Thread Mikhail Zaturenskiy
NFIG_DEBUG_BLOCK_EXT_DEVT is not set
# CONFIG_FAULT_INJECTION is not set
# CONFIG_LATENCYTOP is not set
# CONFIG_DEBUG_PAGEALLOC is not set
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_TRACING_SUPPORT=y

#
# Tracers
#
# CONFIG_FUNCTION_TRACER is not set
# CONFIG_SCHED_TRACER is not set
# CONFIG_CONTEXT_SWITCH_TRACER is not set
# CONFIG_EVENT_TRACER is not set
# CONFIG_BOOT_TRACER is not set
# CONFIG_TRACE_BRANCH_PROFILING is not set
# CONFIG_STACK_TRACER is not set
# CONFIG_KMEMTRACE is not set
# CONFIG_WORKQUEUE_TRACER is not set
# CONFIG_BLK_DEV_IO_TRACE is not set
# CONFIG_SAMPLES is not set
CONFIG_HAVE_ARCH_KGDB=y
# CONFIG_KGDB is not set
CONFIG_PRINT_STACK_DEPTH=64
# CONFIG_DEBUG_STACKOVERFLOW is not set
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_CODE_PATCHING_SELFTEST is not set
# CONFIG_FTR_FIXUP_SELFTEST is not set
# CONFIG_MSI_BITMAP_SELFTEST is not set
# CONFIG_XMON is not set
# CONFIG_IRQSTACKS is not set
# CONFIG_BDI_SWITCH is not set
# CONFIG_PPC_EARLY_DEBUG is not set

#
# Security options
#
# CONFIG_KEYS is not set
# CONFIG_SECURITY is not set
# CONFIG_SECURITYFS is not set
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
# CONFIG_CRYPTO is not set
CONFIG_PPC_CLOCK=y
CONFIG_PPC_LIB_RHEAP=y
# CONFIG_VIRTUALIZATION is not set
**

Thanks,
Mikhail Zaturenskiy
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: Trouble "Transferring control to Linux (at address 00000000)"

2009-07-01 Thread Mikhail Zaturenskiy
>> As for my device tree, I reverted back to the original version with
>> nothing filled in and just replaced 0xfa20 with 0xf000 as Gary
>> suggested earlier.
>
>Would it be a problem to also dynamically fixup IMMR in the device tree
>from U-Boot?
>
>Cheers
> Detlev

Hi Detlev, it would be nice but how do I do this?
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: Trouble "Transferring control to Linux (at address 00000000)"

2009-06-30 Thread Mikhail Zaturenskiy
> Check the clock-frequency of the CPM BRG node.  If u-boot isn't setting the
> memory, it's probably not setting this either.

I set the CPM BRG "clock-frequency = <153609>" (value obtained from
u-boot's 'brginfo' command), set my CPU "clock-frequency =
<1>" (down from 13000) to match what u-boot is using, and
used the "console=ttyCPM0,9600n8" boot arg and I've finally got
console output! Thanks everyone!

I'll still try to figure out how to get u-boot to fill all this in.
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: Trouble "Transferring control to Linux (at address 00000000)"

2009-06-30 Thread Mikhail Zaturenskiy
> I'll still try to figure out how to get u-boot to fill all this in.
Got it... thanks to
"http://www.mail-archive.com/u-boot-us...@lists.sourceforge.net/msg05111.html";

I made sure that CONFIG_OF_LIBFDT and CONFIG_OF_BOARD_SETUP were both
present in "u-boot-2009.03/include/configs/EP88x.h". Then added the
following to the very end of "u-boot-2009.03/board/ep88x/ep88x.c":

#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
{
 ft_cpu_setup(blob, bd);
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

I suppose I could have put this code in w/o the "#if defined..." and
forget about the "CONFIG_OF_BOARD_SETUP" flag since I'm not really
using the "fdt boardsetup" command, but whatever.

As for my device tree, I reverted back to the original version with
nothing filled in and just replaced 0xfa20 with 0xf000 as Gary
suggested earlier.

Once again, thanks to all those who offered suggestions!
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: Trouble "Transferring control to Linux (at address 00000000)"

2009-06-29 Thread Mikhail Zaturenskiy
> Change "root=" to "console=".
Thank you for clarifying.

I tried this but I get the following in my memory dump:

<6>Using Embedded Planet EP88xC ??achine description?
<5>Linux ver??ion 2.6.30-rc2-01402-gd4e2f68-d??rty
(dev...@localhost.localdoma??n) (gcc version 4.2.2) #1 Mon J??n 29
11:35:28 CDT 2009?
<7>Top o?? RAM: 0x400' Total RAM: 0x4??0?
<7>Memory hole size: 0MB???
>4>Zone PFN ranges:?
<4>  DMA?? 0x -> 0x4000?
<4>  ??ormal   0x4000 -> 0x400???
<4>Movable zone start PFN for ??ach node?
<4>early_node_map[1] a??tive PFN ranges?
<4>0: 0x000?? -> 0x4000?
<7>On node 0??totalpages: 16384?
<7>free_area_??nit_node: node 0' pgdat c021bf7??' node_mem_map c023f000?
<7>  DM?? zone: 128 pages used for memma???
<7>  DMA zone: 0 pages reserve???
<7>  DMA zone: 16256 pages' LI??O batch:3?
<6>MMU: Allocated 72 ??ytes of context maps for 16 con??exts?
<4>Built 1 zonelists in Zo??e order' mobility grouping on. ??Total pages: 16256?
<5>Kernel co??mand line: console=ttyCPM0'9600??8 loglevel=7?
<6>NR_IRQS:512?
<7>??rq: irq 5 on host /s...@f000??interrupt-controller@0 mapped
t?? virtual irq 16?
<7>irq: irq 0 o?? host /s...@f000/c...@9c0/int??rrupt-control...@930
mapped to ??irtual irq 17?
<4>PID hash table??entries: 256 (order: 8' 1024 by??es)?
<4>Decrementer Frequency = ??x7bfa48?
<7>irq: irq 15 on host ??...@f000/interrupt-controll...@0 mapped
to virtual irq 18?
<7??time_init: decrementer frequenc?? = 8.125000 MHz?
<7>time_init: p??ocessor frequency   = 130.0?? MHz?
<6>clocksource: timebase m??lt[1ec4ec4f] shift[22] register??d?
<7>clockevent: decrementer mu??t[214] shift[16] cpu[0]?
<7>irq:??irq 4 on host /s...@f000/cpm??9c0/interrupt-control...@930
ma??ped to virtual irq 19?
<6>consol?? [ttyCPM0] enabled

Seems like at that point it begins to redirect output to ttyCPM0 but
still nothing showing on the console...
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: Trouble "Transferring control to Linux (at address 00000000)"

2009-06-29 Thread Mikhail Zaturenskiy
Hi Scott,

> s/root=/console=/
I'm not quite sure what you mean by this.

> Alternatively, you can set /chosen/linux,stdout-path to poin to the serial
> node you want to use for the console.
If you look at the bottom of ep88xc.dts that I attached with my
previous post, I added the following:
chosen {
linux,stdout-path = "/s...@f000/c...@9c0/ser...@a80"; // MZ 
-
added this 'chosen' section
};

However it did not seem to help, unless I did this wrong... still no
console output.

Thanks,
Mikhail
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: Trouble "Transferring control to Linux (at address 00000000)"

2009-06-29 Thread Mikhail Zaturenskiy
Hi Gary

> Did you try 'root=ttyCPM0,9600'?

Gave that a shot just now, doesn't seem to have changed anything other
than that it now says "VFS: Cannot open root device ttyCMP0,9600" or
unknown-block(2,0)." But thanks for the suggestion though.

What exactly was this supposed to do? I thought that the "root=" boot
argument did not play a role in console output of the boot
information.
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: Trouble "Transferring control to Linux (at address 00000000)"

2009-06-29 Thread Mikhail Zaturenskiy
he hash table entries: 8192 (order: 3' 32768??bytes)?
<6>Inode-cache hash table entries: 4096 (order: 2' 16384 bytes)?
<6>Memor??: 62532k/65536k available (2064k kernel code' 2940k
reserved' 100k data' 99k bs??' 96k init)?
<6>SLUB: Genslabs=12' HWalign=16' Order=0-3' MinObjects=0' CPUs=1' ??odes=1?
<6>Calibrating delay loop... 16.12 BogoMIPS (lpj=80640)?
<4>Mount-cache h??sh table entries: 512?
<6>net_namespace: 296 bytes?
<6>NET: Registered protocol f??mily 16?
<4>bio: create slab  at 0?
<7>Switched to high resolution mode on??CPU 0?
<6>NET: Registered protocol family 2?
<6>IP route cache hash table entries?? 1024 (order: 0' 4096 bytes)?
<6>TCP established hash table entries: 2048 (order?? 2' 16384 bytes)?
<6>TCP bind hash table entries: 2048 (order: 1' 8192 bytes)?
<6??TCP: Hash tables configured (established 2048 bind 2048)?
<6>TCP reno registered??
<6>NET: Registered protocol family 1?
<6>msgmni has been set to 122?
<6>io schedu??er noop registered?
<6>io scheduler deadline registered (default)?
<6>Generic RTC??Driver v1.07?
<7>irq: irq 4 on host /s...@f000/c...@9c0/interrupt-control...@9??0
mapped to virtual irq 19?
<6>fa80.serial: ttyCPM0 at MMIO 0xc500ea80 (irq ?? 19) is a CPM UART?
<7>irq: irq 29 on host /s...@f000/c...@9c0/interrupt-contr??l...@930
mapped to virtual irq 29?
<6>fa20.serial: ttyCPM1 at MMIO 0xc501aa2?? (irq = 29) is a CPM UART?
<7>irq: irq 3 on host /s...@f000/interrupt-control?...@0 mapped to
virtual irq 20?
<6>eth0: fs_enet: 00:00:00:00:00:00?
<7>irq: irq 7??on host /s...@f000/interrupt-control...@0 mapped to
virtual irq 21?
<6>eth1: ??s_enet: 00:00:00:00:00:00?
<6>FEC MII Bus: probed?
<6>fe00.flash: Found 2 x16??devices at 0x0 in 32-bit bank?
<4> Amd/Fujitsu Extended Query Table at 0x0040?
<4??fe00.flash: CFI does not contain boot bank location. Assuming top.?
<5>numbe?? of CFI chips: 1?
<5>cfi_cmdset_0002: Disabling erase-suspend-program due to cod?? brokenness.?
<6>TCP cubic registered?
<6>NET: Registered protocol family 17?
<6>R??C: Registered udp transport module.?
<6>RPC: Registered tcp transport module.?
<3??Root-NFS: No NFS server available' giving up.?
<3>VFS: Unable to mount root fs v??a NFS' trying floppy.?
<4>VFS: Cannot open root device "" or unknown-block??2'0)?
<4>Please append a correct "root=" boot option; here are the available
par??itions:?
<4>1f00   32768 mtdblock0 driver: of-flash?
<0>Kernel panic - no?? syncing: VFS: Unable to mount root fs on
unknown-block(2'0)?
<4>Call Trace:?
<4>??c381fed0] [c00069e0] show_stack+0x44/0x16c (unreliable)?
<4>[c381ff10] [c001bc6c?? panic+0x8c/0x168?
<4>[c381ff60] [c01ecb80] mount_block_root+0x12c/0x244?
<4>[c38??ffb0] [c01ecdf4] prepare_namespace+0x4c/0x1c4?
<4>[c381ffd0] [c01ec1b0] kernel_i??it+0xd0/0xfc?
<4>[c381fff0] [c000da60] kernel_thread+0x4c/0x68?
<0>Rebooting in 1??0 seconds..?

At this point, my primary goal is to get console output working before
I do anything else. I've tried different "console=x" boot arguments
and I've added the "chosen" section to my DTS, but still no output.
Anyone have suggestions about this? Is something else messed up in my
DTS?

Thanks,
Mikhail Zaturenskiy


ep88xc.dts
Description: Binary data


EP88x.h
Description: Binary data
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: Trouble "Transferring control to Linux (at address 00000000)"

2009-06-26 Thread Mikhail Zaturenskiy
Hi Scott,

> This isn't the denx list;
I've noticed :) but I'm still learning about this whole process so I
though I could get some general suggestions.

> what kernel version is that, and with what
> modifications from mainline?
Kernel is v2.6.30, I'm not yet familiar enough with it to know what's
been modified from mainline, just following instructions.

> Note that ep88xc.dts in mainline is intended for use with PlanetCore, which
> is what ships on that board.  You may need to make modifications for it to
> work with u-boot (at the least, the IMMR base is probably different).
Hmm, this hasn't occurred to me, thank you for pointing it out.

> Also, make sure u-boot is properly updating the memory size in the device
> tree.  Can you dump the post-fixup device tree in u-boot?
Not sure, but I'll try to find out if that's possible. It'd certainly
answer a lot of questions...

Thanks,
Mikhail Zaturenskiy
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Trouble "Transferring control to Linux (at address 00000000)"

2009-06-26 Thread Mikhail Zaturenskiy
post-mortem analysis
(http://www.denx.de/wiki/view/DULG/LinuxPostMortemAnalysis) and came
up with the following message:
<6>Using Embedded Planet EP88xC machine description.
<0>Kernel panic - not syncing: Error: Failed to allocate 0x1
0x80..
<0>.
<4>Call Trace:.
<4>69e0]
show_stack...21f00] [c001bcb4]
panic+0x8c/0x1 [c01fac70] lmb_alloc+0x0/0xc.
<4>[c0221f70] [c01_page+0x60/0x74.
<4>[c0221f80] [c01a4484] pte_alloc_one_kernel+0x

I'm not quite sure where to go from here to get linux working. Anybody
have any suggestions?

Thank you,
Mikhail Zaturenskiy
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev