cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
7,296 Views
Registered: ‎04-02-2010

Linux (initramfs) over Xilinx V2P

Jump to solution

Hi everyone,

 I'm following a tutorial to port linux over XUP V2P with ppc. I managed to port kernel.

 Now want to move over to rootfs building and porting everything through CF

 

 I can't get ethernet MAC working as kernel building gives an error while building.

 So without including MAC support I've UART lite with 9600 baud and with bootargs as /dev/ttyUL0 and root=/dev/ram 

 

 I created a very simple program and put it in initramfs.cpio

 However my serial terminal shows as attached in file (with kernel panic)

 [7508096.622674] Kernel panic - not syncing: Attempted to kill init!

 

Can anyone please explain me what is it that I'm doing wrong and I would really appreciate if anyone can give me a pointer about building rootfs

And should I jump over testing initramfs/initrd and start with rootfs directly?

 

Thanks

 

 

zImage starting: loaded at 0x00800000 (sp: 0x00b4bfa0)
Allocating 0x76f5fc bytes for kernel ...
gunzipping (0x00000000 <- 0x0080d000:0x00b4afad)...done 0x6fb000 bytes
Linux/PowerPC load: console=ttyUL0 root=/dev/ram
Finalizing device tree... flat tree at 0xb58300
[    0.000000] Using Xilinx Virtex machine description
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 2.6.33 (protik-test@protik-test-laptop) (gcc version 4.4.3 (crosstool-NG-1.7.0) ) #2 Sun May 16 22:52:22 PDT 2010
[    0.000000] Zone PFN ranges:
[    0.000000]   DMA      0x00000000 -> 0x00010000
[    0.000000]   Normal   0x00010000 -> 0x00010000
[    0.000000]   HighMem  0x00010000 -> 0x00010000
[    0.000000] Movable zone start PFN for each node
[    0.000000] early_node_map[1] active PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00010000
[    0.000000] MMU: Allocated 1088 bytes of context maps for 255 contexts
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
[    0.000000] Kernel command line: console=ttyUL0 root=/dev/ram
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] allocated 1310720 bytes of page_cgroup
[    0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
[    0.000000] Memory: 250624k/262144k available (6916k kernel code, 11176k reserved, 232k data, 465k bss, 948k init)
[    0.000000] Kernel virtual memory layout:
[    0.000000]   * 0xfffd0000..0xfffff000  : fixmap
[    0.000000]   * 0xff800000..0xffc00000  : highmem PTEs
[    0.000000]   * 0xff600000..0xff800000  : consistent mem
[    0.000000]   * 0xff600000..0xff600000  : early ioremap
[    0.000000]   * 0xd1000000..0xff600000  : vmalloc & ioremap
[    0.000000] SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:512 nr_irqs:512
[    0.000000] clocksource: timebase mult[d55555] shift[22] registered
[    0.000000] Console: colour dummy device 80x25
[7508089.597105] Security Framework initialized
[7508089.597212] SELinux:  Disabled at boot.
[7508089.597344] Mount-cache hash table entries: 512
[7508089.599073] Initializing cgroup subsys ns
[7508089.599151] Initializing cgroup subsys cpuacct
[7508089.599187] Initializing cgroup subsys memory
[7508089.599325] Initializing cgroup subsys devices
[7508089.599369] Initializing cgroup subsys freezer
[7508089.599405] Initializing cgroup subsys net_cls
[7508089.610439] regulator: core version 0.5
[7508089.611415] NET: Registered protocol family 16
[7508089.631395] bio: create slab <bio-0> at 0
[7508089.633745] XGpio: /plb@0/gpio@81420000: registered
[7508089.634276] XGpio: /plb@0/gpio@81400000: registered
[7508089.634884] XGpio: /plb@0/gpio@81440000: registered
[7508089.638358] SCSI subsystem initialized
[7508089.645642] Bluetooth: Core ver 2.15
[7508089.646918] NET: Registered protocol family 31
[7508089.646965] Bluetooth: HCI device and connection manager initialized
[7508089.647001] Bluetooth: HCI socket layer initialized
[7508089.647043] NetLabel: Initializing
[7508089.647065] NetLabel:  domain hash size = 128
[7508089.647085] NetLabel:  protocols = UNLABELED CIPSOv4
[7508089.647345] NetLabel:  unlabeled traffic allowed by default
[7508089.648011] Switching to clocksource timebase
[7508089.689554] NET: Registered protocol family 2
[7508089.690403] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
[7508089.693352] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[7508089.694666] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
[7508089.695363] TCP: Hash tables configured (established 8192 bind 8192)
[7508089.695402] TCP reno registered
[7508089.695456] UDP hash table entries: 256 (order: 0, 4096 bytes)
[7508089.695589] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[7508089.696940] NET: Registered protocol family 1
[7508089.727388] audit: initializing netlink socket (disabled)
[7508089.727584] type=2000 audit(0.124:1): initialized
[7508090.065380] VFS: Disk quotas dquot_6.5.2
[7508090.066634] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[7508090.086454] fuse init (API version 7.13)
[7508090.089485] msgmni has been set to 490
[7508090.094722] alg: No test for stdrng (krng)
[7508090.095153] io scheduler noop registered
[7508090.095210] io scheduler deadline registered
[7508090.097863] io scheduler cfq registered (default)
[7508090.135075] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[7508090.139717] 84000000.serial: ttyUL0 at MMIO 0x84000003 (irq = 16) is a uartlite
[7508094.947240] console [ttyUL0] enabled
[7508095.017228] brd: module loaded
[7508095.053343] loop: module loaded
[7508095.082370] input: Macintosh mouse button emulation as /devices/virtual/input/input0
[7508095.185095] Fixed MDIO Bus: probed
[7508095.218747] PPP generic driver version 2.4.2
[7508095.273592] mice: PS/2 mouse device common for all mice
[7508095.340258] device-mapper: uevent: version 1.0.3
[7508095.395615] device-mapper: ioctl: 4.16.0-ioctl (2009-11-05) initialised: dm-devel@redhat.com
[7508095.497633] device-mapper: multipath: version 1.1.1 loaded
[7508095.563386] device-mapper: multipath round-robin: version 1.0.0 loaded
[7508095.654073] TCP cubic registered
[7508095.689792] NET: Registered protocol family 10
[7508095.745502] lo: Disabled Privacy Extensions
[7508095.794805] NET: Registered protocol family 17
[7508095.847162] Bluetooth: L2CAP ver 2.14
[7508095.892397] Bluetooth: L2CAP socket layer initialized
[7508095.954954] Bluetooth: SCO (Voice Link) ver 0.6
[7508096.011123] Bluetooth: SCO socket layer initialized
[7508096.072357] Bluetooth: RFCOMM TTY layer initialized
[7508096.132368] Bluetooth: RFCOMM socket layer initialized
[7508096.195512] Bluetooth: RFCOMM ver 1.11
[7508096.244588] registered taskstats version 1
[7508096.293786] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[7508096.370687] Freeing unused kernel memor
[7508096.622674] Kernel panic - not syncing: Attempted to kill init!
[7508096.680185] Call Trace:
[7508096.711453] [cf831d40] [c0008ad0] show_stack+0x78/0x1a8 (unreliable)
[7508096.789511] [cf831d70] [c0486be8] panic+0x98/0x184
[7508096.848878] [cf831dc0] [c0031058] do_exit+0x5a8/0x6ac
[7508096.911229] [cf831e10] [c00311a0] do_group_exit+0x44/0xa4
[7508096.977932] [cf831e20] [c00445f8] get_signal_to_deliver+0x22c/0x424
[7508097.054978] [cf831e70] [c0009e5c] T.396+0x5c/0x278
[7508097.114343] [cf831f30] [c000a0cc] do_signal+0x54/0x5c
[7508097.177014] [cf831f40] [c00115e0] do_user_signal+0x74/0xc4
[7508097.244677] Rebooting in 180 seconds..

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Anonymous
Not applicable
9,077 Views

Are you using the initramfs image from the wiki or trying to build your own? You should use the one from the wiki first, then, once that is working, modify it to add your application.

 

Terry

 

View solution in original post

0 Kudos
8 Replies
Highlighted
Anonymous
Not applicable
9,078 Views

Are you using the initramfs image from the wiki or trying to build your own? You should use the one from the wiki first, then, once that is working, modify it to add your application.

 

Terry

 

View solution in original post

0 Kudos
Highlighted
7,268 Views
Registered: ‎04-02-2010

Hi Terry thanks a lot,

 Can you please point me to wiki link, as I said its my first time using xilinx FPGA development tree.

 I will look by myself as well, and keep posted over here

 

Regards

0 Kudos
Highlighted
Anonymous
Not applicable
7,266 Views

http://xilinx.wikidot.com/

 

Now that I re-read your post  I realize you're using ppc - hopefully arch=powerpc..  The initramfs flow is used by default for microblaze, while initrd is used for arch=powerpc..

 

Terry

 

0 Kudos
Highlighted
7,263 Views
Registered: ‎04-02-2010

ohh ok,

 I got same results for initrd as well but I didn't try it more than once (I might have missed something), I'll give it a try again

 And if you are referring to http://xilinx.wikidot.com/powerpc-linux. Does is support V2P without any changes?

 I've downloaded ramdisk from http://xilinx.wikidot.com/local--files/powerpc-linux/ramdisk.image.gz but never tried it as its for ML405

 

Thanks

0 Kudos
Highlighted
7,260 Views
Registered: ‎04-02-2010

Hey Terry thanks again

 Just tried with initrd provided through xilinx wiki and it seems to be working fine:

 

 

[1133371548.628921] RAMDISK: gzip image found at block 0
[1133371549.605923] VFS: Mounted root (ext2 filesystem) readonly on device 1:0.
[1133371549.675061] Freeing unused kernel memory/etc/mtab: cannot create
root:~> ### Application running ...
root:~>

 

[1133371548.628921] RAMDISK: gzip image found at block 0

[1133371549.605923] VFS: Mounted root (ext2 filesystem) readonly on device 1:0.

[1133371549.675061] Freeing unused kernel memory/etc/mtab: cannot create

root:~> ### Application running ...
root:~> 

 

I assume I was doing something wrong

Can you please point me to a tutorial/steps to follow to create initrd (application) and finally rootfs for CF

 

Thanks I've attached output of console if you want to have a look

0 Kudos
Highlighted
7,259 Views
Registered: ‎04-02-2010

I assume just creating binaries for ppc (through cross compiling) and putting them in ramdisk would be good enough.

right?

 

And can I just extract content of ramdisk on CF (3rd partition) and use it as RW rootfs?

 

Regards

0 Kudos
Highlighted
7,253 Views
Registered: ‎04-02-2010

My bad I was getting ahead of myself. I can't just extract ramdisk :smileyindifferent:

Waiting for reply Thanks

0 Kudos
Highlighted
Anonymous
Not applicable
7,245 Views

Take a look here and see if it helps:

 

http://xilinx.wikidot.com/expanding-file-system

0 Kudos