General NAS-Central Forums

Welcome to the NAS community
It is currently Mon Nov 20, 2017 12:23 am

All times are UTC




Post new topic Reply to topic  [ 78 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
PostPosted: Thu Jun 03, 2010 3:41 am 
Offline

Joined: Thu May 08, 2008 11:23 am
Posts: 112
Location: near Toulouse, France
langerak wrote:
To use fully automate the boot of Debian i need to flash U-Boot you say?
Strictly I wouldn't say that you need to but it would certainly be much easier if you did.
The problem with the stock U-Boot is that you cannot save your changes permanently.
So you would have to make Debian boot with the existing boot arguments.

The snaps mechanism could help you.
You can leave the stock kernel in place and boot yours by default instead by using snaps.

For the rootfs things are more difficult and I resort to giving the boot arguments for Debian by hand.
Note that the stock boot sequence starts with a "ro" rootfs and probably does a pivot_root to another rootfs later.
I haven't tried to follow or understand it but it may be possible to work out a solution to boot Debian using snaps.

Anyway the short answer is that it would certainly be easier with Albert's U-Boot which enables you to permanently save your Linux boot arguments.


Top
 Profile  
 
PostPosted: Thu Jun 03, 2010 4:35 am 
Offline

Joined: Wed Apr 16, 2008 4:23 am
Posts: 14
FYI If you upgrade uboot and find out uboot is loading but somehow the kernel is not loading, refer to this thread, solution is at the end of it:
viewtopic.php?f=146&t=1891&start=0


Top
 Profile  
 
PostPosted: Thu Jun 03, 2010 8:45 am 
Offline

Joined: Sat May 29, 2010 6:37 pm
Posts: 160
flavoie wrote:
langerak wrote:
I can't get the netconsole function to work :(. When it works it should replace the serial connection right? How can i compile the netconsole function? can't find infos on that :(.

EDIT:
nvm on the netconsole, on my Ubuntu 10.04 box i only had to modprobe it. Found info here and gonna test it tonight :):
http://www.cyberciti.biz/tips/linux-net ... orial.html

I had it boot from TFTP yesterday, that was a foonas-em image and that booted ok, hence no kernelmessages etc due to the above not working...

To use fully automate the boot of Debian i need to flash U-Boot you say? I've read some infos and it seems that the U-Boot update can be read from TFTP so that's no problem, should i try that? I know the risks for sure now, but in order to have Debian i have to update :P.

BTW, the Flashrom i have is the following: 29LV400CBTC-70G. Will the U-Boot update work on my flash rom?

Sorry for all the questions, but i want to have all things sorted out before i start messing up things that would have not been neccessary by asking ;)!


Your flashrom is the same as mine, exactly the same number, you'll likely notice "MX" for Macronix on the chip. The uboot should work for you if you follow the instructions to the letter like I did:
http://tweaky.aribaud.net/?q=node/39


It's not all the same i guess. Yours at the end is CT and mine is TC or is that no problem?

Gonna fix DKU-5 cable tonight if all goes well, i thought i had one, but figured out that was a DKU-2 and that aint gonna work :D.


Top
 Profile  
 
PostPosted: Thu Jun 03, 2010 9:04 pm 
Offline

Joined: Thu May 08, 2008 11:23 am
Posts: 112
Location: near Toulouse, France
langerak wrote:
BTW, the Flashrom i have is the following: 29LV400CBTC-70G. Will the U-Boot update work on my flash rom?
Mine is also a 29LV400CBTC.
I *suspect* that Albert made a mistake when he read his as 29LV400CBCT.
I note that boomby also questioned Albert's reference in Albert's topic here.
However I haven't flashed my U-Boot so I cannot say for certain that it works :(


Top
 Profile  
 
PostPosted: Sat Jun 05, 2010 1:39 am 
Offline

Joined: Wed Apr 16, 2008 4:23 am
Posts: 14
rosbif wrote:
langerak wrote:
BTW, the Flashrom i have is the following: 29LV400CBTC-70G. Will the U-Boot update work on my flash rom?
Mine is also a 29LV400CBTC.
I *suspect* that Albert made a mistake when he read his as 29LV400CBCT.
I note that boomby also questioned Albert's reference in Albert's topic here.
However I haven't flashed my U-Boot so I cannot say for certain that it works :(


Albert made a mistake, OR both "TC" and "CT" work with the new uboot.
Mine also ends with "TC", and I've updated with Albert's new uboot and it works great.

EDIT: When i saw another person questioning the ending 2 digits in another thread, I just guessed it was Albert's mistake as these digit swaps are very rare in IC component names. So I took the risk but I was pretty confident.


Top
 Profile  
 
PostPosted: Sun Jun 06, 2010 8:21 am 
Offline

Joined: Sat May 29, 2010 6:37 pm
Posts: 160
flavoie wrote:
rosbif wrote:
langerak wrote:
BTW, the Flashrom i have is the following: 29LV400CBTC-70G. Will the U-Boot update work on my flash rom?
Mine is also a 29LV400CBTC.
I *suspect* that Albert made a mistake when he read his as 29LV400CBCT.
I note that boomby also questioned Albert's reference in Albert's topic here.
However I haven't flashed my U-Boot so I cannot say for certain that it works :(


Albert made a mistake, OR both "TC" and "CT" work with the new uboot.
Mine also ends with "TC", and I've updated with Albert's new uboot and it works great.

EDIT: When i saw another person questioning the ending 2 digits in another thread, I just guessed it was Albert's mistake as these digit swaps are very rare in IC component names. So I took the risk but I was pretty confident.


I also confirm it working on my "TC"! Flashed it yesterday with no problems!

Maybe a stupid question to ask, but does one of you have a precompiled kernel available for me? The foonas-lspro kernel boots correctly (very slow tho) but i miss S-ATA support :P. I am looking for a recent kernel compiled for the ED Mini V2. I assume that will be delivered in uImage format?

If someone would have a kernel available for me let me know! I really appreciate it!


Top
 Profile  
 
PostPosted: Sun Jun 06, 2010 10:53 am 
Offline

Joined: Thu May 08, 2008 11:23 am
Posts: 112
Location: near Toulouse, France
langerak wrote:
If someone would have a kernel available for me let me know! I really appreciate it!
See my post here.


Top
 Profile  
 
PostPosted: Sun Jun 06, 2010 10:55 am 
Offline

Joined: Sat May 29, 2010 6:37 pm
Posts: 160
Already posted back in the other topic ;).


Top
 Profile  
 
PostPosted: Sun Jun 06, 2010 2:48 pm 
Offline

Joined: Sat May 29, 2010 6:37 pm
Posts: 160
Just to continue the kernel talk in this topic.

I have compiled the 2.6.35-rc1 kernel and it somewhat boots successfully! Finally i managed to crosscompile my own kernel :D!

However i have some questions:

When fully booted it asks for which runlevel to enter, what should i enter because in no way it continues to boot (i tried 1 (Single User) and 3 (Multi-User)?

I first had a error when booting about VFS not being able to access /dev/ram0 for mounting it as root fs (which was hardcoded in u-boot), so changed that to /dev/sda1 where my harddisk is and the debootstrap of Debian resides.

Here is the kernel output, if any suggestions or tips, just shoot!

Code:
Marvell>> printenv
bootcmd=if lump 2; then ; else run disk_disk; fi
baudrate=115200
loads_echo=0
kernel_addr=0x400000
boot_disk=disk ${kernel_addr} 1:6
snap_disk=if snapboot 1:9 ${kernel_addr}; then; else run boot_disk; fi
disk_disk=ide reset; run snap_disk; bootm ${kernel_addr};
ethaddr=00:d0:4b:83:71:ff
stdin=serial
stdout=serial
stderr=serial
cpuName=926
CASset=min
enaMonExt=no
enaFlashBuf=yes
enaCpuStream=no
MALLOC_len=4
bootdelay=3
disaMvPnp=no
overEthAddr=no
usb0Mode=host
usb1Mode=device
bootargs=console=ttyS0,115200 root=/dev/sda1 rw
filesize=1f3374
fileaddr=800000
ipaddr=192.168.0.101
serverip=192.168.0.75
ethprime=eth0
ethact=eth0

Environment size: 629/8188 bytes
Marvell>> bootm 00800000
## Booting image at 00800000 ...
   Image Name:   linux
   Created:      2010-06-06  13:00:33 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2044724 Bytes =  2 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.35-rc1 (root@server) (gcc version 4.4.1 (Sourcery G++ Lite 2010q1-202) ) #1 PREEMPT Sun Jun 6 14:52:57 CEST 2010
CPU: Feroceon [41069260] revision 0 (ARMv5TEJ), cr=a0053177
CPU: VIVT data cache, VIVT instruction cache
Machine: LaCie Ethernet Disk mini V2
Clearing invalid memory bank 0KB@0xffffffff
Clearing invalid memory bank 0KB@0xffffffff
Clearing invalid memory bank 0KB@0xffffffff
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x41000403
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: console=ttyS0,115200 root=/dev/sda1 rw
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 60528k/60528k available, 5008k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    vmalloc : 0xc4800000 - 0xfd800000   ( 912 MB)
    lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .init : 0xc0008000 - 0xc0025000   ( 116 kB)
      .text : 0xc0025000 - 0xc03d0000   (3756 kB)
      .data : 0xc0414000 - 0xc0439360   ( 149 kB)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
        RCU-based detection of stalled CPUs is disabled.
        Verbose stalled-CPUs detection is disabled.
NR_IRQS:64
Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
Orion ID: MV88F5182-A2. TCLK=166666667.
edmini_v2: USB device port, flash write and power-off are not yet supported.
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
Switching to clocksource orion_clocksource
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
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 udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 118
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 3) is a 16550A
console [ttyS0] enabled
loop: module loaded
sata_mv sata_mv.0: version 1.28
sata_mv sata_mv.0: slots 32 ports 2
scsi0 : sata_mv
scsi1 : sata_mv
ata1: SATA max UDMA/133 irq 29
ata2: SATA max UDMA/133 irq 29
physmap platform flash device: 00080000 at fff80000
physmap-flash.0: Found 1 x16 devices at 0x0 in 8-bit bank
Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
RedBoot partition parsing not available
Using physmap partition information
Creating 1 MTD partitions on "physmap-flash.0":
0x000000000000-0x000000080000 : "Full512kb"
MV-643xx 10/100/1000 ethernet driver version 1.4
mv643xx_eth smi: probed
net eth0: port 0 with MAC address 00:d0:4b:83:71:ff
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
orion-ehci orion-ehci.0: Marvell Orion EHCI
orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
orion-ehci orion-ehci.0: irq 17, io mem 0xf1050000
orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
usbcore: registered new interface driver usblp
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver ums-datafab
usbcore: registered new interface driver ums-freecom
usbcore: registered new interface driver ums-jumpshot
usbcore: registered new interface driver ums-sddr09
usbcore: registered new interface driver ums-sddr55
input: gpio-keys as /class/input/input0
i2c /dev entries driver
rtc-rs5c372 0-0032: rs5c372a found, 24hr, driver version 0.6
rtc-rs5c372 0-0032: rtc core: registered rtc-rs5c372 as rtc0
MV-CESA:Fallback driver 'sha1' could not be loaded!
alg: hash: Failed to load transform for mv-sha1: -2
MV-CESA:Fallback driver 'hmac(sha1)' could not be loaded!
alg: hash: Failed to load transform for mv-hmac-sha1: -2
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
oprofile: hardware counters not available
oprofile: using timer interrupt.
TCP cubic registered
NET: Registered protocol family 17
VFP support v0.3: not present
rtc-rs5c372 0-0032: setting system clock to 2010-06-06 14:44:28 UTC (1275835468)
ata1: SATA link down (SStatus 0 SControl 300)
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata2.00: ATA-7: Maxtor 6V300F0, VA111630, max UDMA/133
ata2.00: 586114704 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata2.00: configured for UDMA/133
scsi 1:0:0:0: Direct-Access     ATA      Maxtor 6V300F0   VA11 PQ: 0 ANSI: 5
sd 1:0:0:0: [sda] 586114704 512-byte logical blocks: (300 GB/279 GiB)
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sda: sda1 sda2
sd 1:0:0:0: [sda] Attached SCSI disk
EXT3-fs: barriers not enabled
kjournald starting.  Commit interval 5 seconds
EXT3-fs (sda1): using internal journal
EXT3-fs (sda1): mounted filesystem with writeback data mode
VFS: Mounted root (ext3 filesystem) on device 8:1.
Freeing init memory: 116K
INIT: version 2.86 booting
INIT: No inittab file found

Enter runlevel:


Top
 Profile  
 
PostPosted: Sun Jun 06, 2010 3:17 pm 
Offline

Joined: Sat May 29, 2010 6:37 pm
Posts: 160
Runlevel solved for now :). the correct bootargs were:

Code:
bootargs=console=ttyS0,115200 root=/dev/sda1 rw init=/bin/sh


Currenttly the LaCie is doing the second stage of debootstrap :D.


Top
 Profile  
 
PostPosted: Sun Jun 06, 2010 5:28 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
langerak wrote:
Runlevel solved for now :). the correct bootargs were:

Code:
bootargs=console=ttyS0,115200 root=/dev/sda1 rw init=/bin/sh

I think that should be
Code:
bootargs=console=ttyS0,115200 root=/dev/sda1 rw init=/sbin/init

else it will start a shell, and nothing else.


Top
 Profile  
 
PostPosted: Sun Jun 06, 2010 5:40 pm 
Offline

Joined: Sat May 29, 2010 6:37 pm
Posts: 160
Thanks for the tip.

I assume that with init=/sbin/init it loads inittab etc?

BTW,

I use the 2.6.31-big (need to tweak my own first) for now on the LaCie (loads via tftp) but is there a way i can place that kernel image and rename it to uImage and place it on the harddisk, so it can boot from harddisk and if so, where should i place the file?


Top
 Profile  
 
PostPosted: Mon Jun 07, 2010 4:14 am 
Offline

Joined: Thu May 08, 2008 11:23 am
Posts: 112
Location: near Toulouse, France
langerak wrote:
is there a way i can place that kernel image and rename it to uImage and place it on the harddisk, so it can boot from harddisk and if so, where should i place the file?
Please read the forum before asking questions.
As I wrote before in the current topic:
rosbif wrote:
Put the new kernel in /snaps/00/boot/uImage on partition 9 and leave the stock LaCie kernel on partition 6.
By default U-Boot will boot the new one.
However I believe you can make it boot the stock one if, at startup, you keep the power button pressed for a long time (about 15s IIRC).
Warning: I have never actually had the need to try this ;-)
Actually I leave all my kernels in this directory and symlink the one I want to uImage.


Top
 Profile  
 
PostPosted: Mon Jun 07, 2010 8:41 am 
Offline

Joined: Sat May 29, 2010 6:37 pm
Posts: 160
Sorry, don't go angry on me, i misread that post for something else... :(. I thought that was if you wanted to boot stock LaCie kernel, but now i've read it again and again and now i get it :). Thanks.

But here i have another thing i can't get through with:

When using init=/sbin/init it boots almost perfectly, however after startin the Cron daemon i don't get any output from the terminal...

Been looking on the net and it seems that it's related to inittab (found some info about what to edit and should disable VGA terminals) and i changed it to the following:
Code:
# /etc/inittab: init(8) configuration.
# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $

# The default runlevel.
id:2:initdefault:

# Boot-time system configuration/initialization script.
# This is run first except when booting in emergency (-b) mode.
si::sysinit:/etc/init.d/rcS

# What to do in single-user mode.
~~:S:wait:/sbin/sulogin

# /etc/init.d executes the S and K scripts upon change
# of runlevel.
#
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevels 2-5 are multi-user.
# Runlevel 6 is reboot.

l0:0:wait:/etc/init.d/rc 0
l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6
# Normally not reached, but fallthrough in case of emergency.
z6:6:respawn:/sbin/sulogin

# What to do when CTRL-ALT-DEL is pressed.
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

# Action on special keypress (ALT-UpArrow).
#kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this work."

# What to do when the power fails/returns.
pf::powerwait:/etc/init.d/powerfail start
pn::powerfailnow:/etc/init.d/powerfail now
po::powerokwait:/etc/init.d/powerfail stop

# /sbin/getty invocations for the runlevels.
#
# The "id" field MUST be the same as the last
# characters of the device (after "tty").
#
# Format:
#  <id>:<runlevels>:<action>:<process>
#
# Note that on most Debian systems tty7 is used by the X Window System,
# so if you want to add more getty's go ahead but skip tty7 if you run X.
#
# 1:2345:respawn:/sbin/getty 38400 tty1
# 2:23:respawn:/sbin/getty 38400 tty2
# 3:23:respawn:/sbin/getty 38400 tty3
# 4:23:respawn:/sbin/getty 38400 tty4
# 5:23:respawn:/sbin/getty 38400 tty5
# 6:23:respawn:/sbin/getty 38400 tty6

# Example how to put a getty on a serial line (for a terminal)
#
T0:23:respawn:/sbin/getty -L ttyS0 115200 vt102
T1:23:respawn:/sbin/getty -L ttyS1 115200 vt102

# Example how to put a getty on a modem line.
#
#T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3


It should be this line:
T0:23:respawn:/sbin/getty -L ttyS0 115200 vt102

If i let it be for a while i get this message:
Code:
INIT: Id "T0" respawning too fast: disabled for 5 minutes
INIT: Id "T1" respawning too fast: disabled for 5 minutes
INIT: no more processes left in this runlevel


EDIT:

Never mind, got it solved! Strangely getty couldn't create the ttyS0 device, and with no ttyS0 device, there can be no output.
I used the following command to create the file myself and now i get the login prompt:
Code:
mknod -m 660 /dev/ttyS0 c 4 64


Top
 Profile  
 
PostPosted: Fri Jul 16, 2010 11:19 am 
Offline

Joined: Sat May 29, 2010 6:37 pm
Posts: 160
I've had success in compiling the 2.6.34 kernel for the EDMiniV2. If anyone's interested in it, let me know, it's a zImage, since my LaCie boots from TFTP. I also have the appropriate modules for the device :).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 78 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group