To test NetConsole you can just plug/re/plug eth and expect this line appear too :

mv643xx_eth_port mv643xx_eth_port.0: eth0: link up, 10 Mb/s, half duplex, flow control disabled

TODO : INITRD / NETCONSOLE

sudo aptitude install uboot-mkimage uboot-envtools initramfs-tools

grep -i conso boot/config-3.1.0-1-orion5x 
CONFIG_NETCONSOLE=m
CONFIG_NETCONSOLE_DYNAMIC=y
f=./lib/modules/3.1.0-1-orion5x/kernel/drivers/net/netconsole.ko
insmod $f netconsole=@/,@192.168.11.1/
#| netconsole: Unknown symbol config_group_init (err 0)
depmod -aev
modprobe -v netconsole netconsole=@/,@192.168.11.1/
insmod /lib/modules/3.1.0-1-orion5x/kernel/fs/configfs/configfs.ko 
insmod /lib/modules/3.1.0-1-orion5x/kernel/drivers/net/netconsole.ko 
grep -H netconsole  /etc/modules 
#| /etc/modules:netconsole netconsole=@/,@192.168.11.1/
/etc/initramfs-tools/module
update-initramfs -u
dmesg
[ 3011.339827] console [netcon0] enabled
[ 3011.339852] netconsole: network logging started
[ 3114.611002] netconsole: local port 6665
[ 3114.611033] netconsole: local IP 0.0.0.0
[ 3114.611055] netconsole: interface 'eth0'
[ 3114.611078] netconsole: remote port 6666
[ 3114.611102] netconsole: remote IP 192.168.11.1
[ 3114.611128] netconsole: remote ethernet address ff:ff:ff:ff:ff:ff
[ 3114.611162] netconsole: local IP 192.168.11.150
[ 3114.611458] console [netcon0] enabled
[ 3114.611480] netconsole: network logging started
sudo ifconfig eth0:0 192.168.11.1 up
nc -u  -l 6666 #@Host
[ 4014.946921] fuse exit
[ 4017.495396] fuse init (API version 7.17)
modprobe -r fuse ; modprobe -v fuse
f=/etc/fw_env.config ; grep '/dev/' $f || echo "/dev/mtd0 0x3f000 0x01000 0x01000" > $f
aptitude install u-boot-tools # /usr/bin/fw_setenv
fw_printenv  | grep console # rootpath=/nfs/arm
#| bootargs_base=console=ttyS0,115200
fw_printenv  | wc
#|   33      72    1038
fw_setenv  bootargs_base_orig console=ttyS0,115200
fw_setenv  bootargs_base_mine 'console=ttyS0,115200 netconsole=6666@192.168.11.150/,@192.168.11.149/'
# fw_setenv  bootargs_base '$(bootargs_base_mine)'
# fw_setenv  bootargs_base '$(bootargs_base_orig)'
# fw_setenv  bootargs_base console=ttyS0,115200
# rzr@lap:initrd.img.dir/ # [0] # rgrep netconsole .
Binary file ./lib/modules/3.1.0-1-orion5x/kernel/drivers/net/netconsole.ko matches
Binary file ./lib/modules/3.1.0-1-orion5x/modules.dep.bin matches
./lib/modules/3.1.0-1-orion5x/modules.dep:kernel/drivers/net/netconsole.ko: kernel/fs/configfs/configfs.ko
./lib/modules/3.1.0-1-orion5x/modules.order:kernel/drivers/net/netconsole.ko
./conf/modules:netconsole netconsole=@/,@192.168.11.1/
./init:	netconsole=*)
./init:		netconsole=${x#netconsole=}
./init:[ -n "${netconsole}" ] && modprobe netconsole netconsole="${netconsole}"
Binary file ./initrd.img matches
socat STDIO UDP-LISTEN:6666 
nc -lu 6666 &
nc -u 192.168.1.100 6666

D-I Images : If not curious skip this :

# rdev uImage.buffalo  # Root device 0x0080 # rdev uImage.buffalo 0,128
# initrd.buffalo:     u-boot legacy uImage, debian-installer ramdisk, Linux/ARM, RAMDisk Image (gzip), 4754956 bytes, Sat Nov 26 07:30:19 2011, Load Address: 0x02000000, Entry Point: 0x02000000, Header CRC: 0x58D84007, Data CRC: 0x67CE1144
# uImage.buffalo:     u-boot legacy uImage, Debian kernel, Linux/ARM, OS Kernel Image (Not compressed), 1471048 bytes, Sat Nov 26 07:30:18 2011, Load Address: 0x00008000, Entry Point: 0x00008000, Header CRC: 0xB8BA1103, Data CRC: 0x23D5F4BC
mkimage -l initrd.buffalo
#| Image Name:   debian-installer ramdisk
#| Created:      Fri Nov 25 07:31:40 2011
#| Image Type:   ARM Linux RAMDisk Image (gzip compressed)
#| Data Size:    4754898 Bytes = 4643.46 kB = 4.53 MB
#| Load Address: 02000000
#| Entry Point:  02000000
wc -c initrd.buffalo
#| 4754962 initrd.buffalo
expr 4754962 - 4754898
#| 64
dd if=initrd.buffalo of=initrd.buffalo.cpio.gz skip=64 bs=1 # unp # unp
dd if=uImage.buffalo of=uImage.buffalo.arm skip=64 bs=1 # 
#todo: tftp with installed images
 diff -u init.orig  init
--- init.orig	2011-11-27 01:54:04.766644915 +0100
+++ init	2011-11-27 01:55:01.418642533 +0100
@@ -63,7 +63,9 @@
 . /scripts/functions
 
 # Parse command line options
-for x in $(cat /proc/cmdline); do
+l="root=/dev/sda2 $(cat /proc/cmdline)"
+
+for x in $l; do
 	case $x in
 	init=*)
 		init=${x#init=}
#
find . | cpio -o -H newc | gzip -9 - > ../initrd-cmdline.cpio.gz

@tag: armv5 raid nas debian

zcat  /proc/config.gz | grep netconsole
CONFIG_CMDLINE="netconsole=@/,@192.168.11.1/"
tcpdump -vv  'udp port 6666'

[[InitRD]]

ed2k://|file|linux-2.6.10.tar.bz2|36533484|b0d567843b33d09894465eecc0f62730|

After “porting” the Debian way a working kernel to use initrd, FileSystem can not be mounted :

VFS:  Kernel Panic : VFS : Unable to mount root fs on unknown block (3,5)
mount  | grep hda5
# /dev/hda5 on / type ext3 (rw,noatime,errors=remount-ro)
rdev /boot/vmlinuz-2.6.10-k7-amiloa
# Root device /dev/hda5
# mount -o loop  /boot/initrd.img-2.6.10-k7-amiloa  /mnt/loop
cd /usr/src/linux-2.6.10/
#rzr@nrv:amiloa/$ grep EXT .config
CONFIG_EXT2_FS=y
CONFIG_EXT3_FS=y
#rzr@nrv:amiloa/$ grep INIT /usr/src/linux-2.6.10/.config
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
#rzr@nrv:amiloa/$ grep IDE /usr/src/linux-2.6.10/.config
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
CONFIG_BLK_DEV_HD_IDE=y
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDEDISK_MULTI_MODE=n  # worked when set n
CONFIG_IDE_GENERIC=y
CONFIG_BLK_DEV_IDEPNP=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_BLK_DEV_IDEDMA_FORCED=n # worked when set n
CONFIG_IDEDMA_PCI_AUTO=y
CONFIG_IDEDMA_ONLYDISK=y
CONFIG_IDE_CHIPSETS=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_IDEDMA_IVB=y
CONFIG_IDEDMA_AUTO=y
grep PART .config
CONFIG_PM_STD_PARTITION=""
CONFIG_PARTITION_ADVANCED=y
CONFIG_MSDOS_PARTITION=y
diff ./.config /boot/config-2.6.9-1-k7
grep "=y"  /boot/config-2.6.9-1-k7  > linux-2.6.9-1-k7-debian.txt
grep "=y"  /usr/src/linux-2.6.10/.config  > linux-2.6.10-k7-amiloa.txt
diff linux-2.6.9-1-k7.txt linux-2.6.10-k7-amiloa.txt | grep "^<" | grep FS
#rzr@nrv:AmiloA/$ rgrep pci_enable /usr/src/linux-2.6.10/ | grep printk
/usr/src/linux-2.6.10/arch/i386/pci/acpi.c:
printk(KERN_INFO "** driver failed to call pci_enable_device().  As a temporary\n")
XFS: bad magic number
XFS: SB validate failed

http://kerneltrap.org/node/970

I finally Fixed it in my AmiloA config file

Debian

dpkg -S /usr/sbin/mkinitrd

initrd-tools: /usr/sbin/mkinitrd

/etc/mkinitrd/DSDT # [[DSDT]]

If this file exists, it will be appended to the initrd in a way that causes it to be loaded by ACPI.

MORE

initrd.txt · Last modified: 2015/11/01 20:16 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki