Hi
I finally got a running kernel compiled, flashed it successfully and got it to boot halfway. The only thing being missing is the console coming up. Here is the boot sequenz, and I think the kernel lacks a driver, but I do not understand which one is missing from that output.
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977 CPU: VIVT data cache, VIVT instruction cache Machine: Marvell GuruPlug Reference Board Memory policy: ECC disabled, Data cache writeback Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048 Kernel command line: console=ttyS0,115200 ubi.mtd=2 root=ubi0:rootfs PID hash table entries: 2048 (order: 1, 8192 bytes) Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) Memory: 256MB 256MB = 512MB total Memory: 512304k/512304k available, 11984k reserved, 0K highmem Virtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) DMA : 0xffc00000 - 0xffe00000 ( 2 MB) vmalloc : 0xe0800000 - 0xfe800000 ( 480 MB) lowmem : 0xc0000000 - 0xe0000000 ( 512 MB) modules : 0xbf000000 - 0xc0000000 ( 16 MB) .init : 0xc0008000 - 0xc0028000 ( 128 kB) .text : 0xc0028000 - 0xc0657000 (6332 kB) .data : 0xc0680000 - 0xc06b2ca0 ( 204 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:114 Console: colour dummy device 80x30 Calibrating delay loop... 1192.75 BogoMIPS (lpj=5963776) pid_max: default: 32768 minimum: 301 Security Framework initialized Mount-cache hash table entries: 512 CPU: Testing write buffer coherency: ok NET: Registered protocol family 16 Kirkwood: MV88F6281-A1, TCLK=200000000. Feroceon L2: Cache support initialised. bio: create slab <bio-0> at 0 vgaarb: loaded SCSI subsystem initialized usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb cfg80211: Calling CRDA to update world regulatory domain Switching to clocksource orion_clocksource NET: Registered protocol family 2 IP route cache hash table entries: 4096 (order: 2, 16384 bytes) TCP established hash table entries: 16384 (order: 5, 131072 bytes) TCP bind hash table entries: 16384 (order: 4, 65536 bytes) TCP: Hash tables configured (established 16384 bind 16384) 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. NTFS driver 2.1.29 [Flags: R/W]. JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, Inc. JFS: nTxBlock = 4002, nTxLock = 32019 SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, no debug enabled Btrfs loaded msgmni has been set to 1000 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 = 33) 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 1 scsi0 : sata_mv ata1: SATA max UDMA/133 irq 21 GPIO NAND driver, �© 2004 Simtec Electronics NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND 512MiB 3,3V 8-bit) Scanning device for bad blocks Bad eraseblock 132 at 0x000001080000 Bad eraseblock 3241 at 0x000019520000 Bad eraseblock 3494 at 0x00001b4c0000 Bad eraseblock 3850 at 0x00001e140000 Bad eraseblock 3884 at 0x00001e580000 Creating 3 MTD partitions on "orion_nand": 0x000000000000-0x000000100000 : "u-boot" ftl_cs: FTL header not found. 0x000000100000-0x000000500000 : "uImage" ftl_cs: FTL header not found. 0x000000500000-0x000020000000 : "root" ftl_cs: FTL header not found. MV-643xx 10/100/1000 ethernet driver version 1.4 mv643xx_eth smi: probed net eth0: port 0 with MAC address 00:50:43:67:64:06 net eth1: port 0 with MAC address 00:50:43:67:64:07 libertas_sdio: Libertas SDIO driver libertas_sdio: Copyright Pierre Ossman 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 19, 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 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 mice: PS/2 mouse device common for all mice rtc-mv rtc-mv: rtc core: registered rtc-mv as rtc0 i2c /dev entries driver cpuidle: using governor ladder cpuidle: using governor menu sdhci: Secure Digital Host Controller Interface driver sdhci: Copyright(c) Pierre Ossman mmc0: mvsdio driver initialized, lacking card detect (fall back to polling) via_sdmmc: VIA SD/MMC Card Reader driver (C) 2008 VIA Technologies, Inc. MV-CESA:Fallback driver 'hmac(sha1)' could not be loaded! alg: hash: Failed to load transform for mv-hmac-sha1: -2 mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver mv_xor mv_xor.0: Marvell XOR: ( xor cpy ) mmc0: new high speed SDIO card at address 0001 mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy ) ata1: SATA link down (SStatus 0 SControl F300) mv_xor mv_xor.2: Marvell XOR: ( xor cpy ) mv_xor mv_xor.3: Marvell XOR: ( xor fill cpy ) 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 lib80211: common routines for IEEE802.11 drivers VFP support v0.3: not present rtc-mv rtc-mv: setting system clock to 2010-07-20 07:56:52 UTC (1279612612) usb 1-1: new high speed USB device using orion-ehci and address 2 hub 1-1:1.0: USB hub found hub 1-1:1.0: 4 ports detected usb 1-1.1: new high speed USB device using orion-ehci and address 3 scsi1 : usb-storage 1-1.1:1.0 scsi 1:0:0:0: Direct-Access Generic STORAGE DEVICE 9909 PQ: 0 ANSI: 0 sd 1:0:0:0: [sda] Attached SCSI removable disk libertas: can't load helper firmware libertas: failed to load helper firmware libertas_sdio: probe of mmc0:0001:1 failed with error -2 VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0) Please append a correct "root=" boot option; here are the available partitions: 1f00 1024 mtdblock0 (driver?) 1f01 4096 mtdblock1 (driver?) 1f02 519168 mtdblock2 (driver?) Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) [<c002d64c>] (unwind_backtrace+0x0/0xe4) from [<c003e048>] (panic+0x68/0xf8) [<c003e048>] (panic+0x68/0xf8) from [<c0008fbc>] (mount_block_root+0x1c4/0x20c) [<c0008fbc>] (mount_block_root+0x1c4/0x20c) from [<c0009194>] (prepare_namespace+0x8c/0x184) [<c0009194>] (prepare_namespace+0x8c/0x184) from [<c0008918>] (kernel_init+0x118/0x160) [<c0008918>] (kernel_init+0x118/0x160) from [<c00293dc>] (kernel_thread_exit+0x0/0x8)
Any tipps?
Regards
Bernhard
Appendix: Atm I don't care where the rootfs will be located, I just want to get it to work somehow.
Regards
Bernhard
Hi Bernhard,
Try adding "rootfstype=ubifs" to command line - Kernel command line: console=ttyS0,115200 ubi.mtd=2 root=ubi0:rootfs
Thanks, Rahul
On Tue, Jul 20, 2010 at 5:28 PM, Bernhard Schuster < schuster.bernhard@googlemail.com> wrote:
Hi
I finally got a running kernel compiled, flashed it successfully and got it to boot halfway. The only thing being missing is the console coming up. Here is the boot sequenz, and I think the kernel lacks a driver, but I do not understand which one is missing from that output.
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977 CPU: VIVT data cache, VIVT instruction cache Machine: Marvell GuruPlug Reference Board Memory policy: ECC disabled, Data cache writeback Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048 Kernel command line: console=ttyS0,115200 ubi.mtd=2 root=ubi0:rootfs PID hash table entries: 2048 (order: 1, 8192 bytes) Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) Memory: 256MB 256MB = 512MB total Memory: 512304k/512304k available, 11984k reserved, 0K highmem Virtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) DMA : 0xffc00000 - 0xffe00000 ( 2 MB) vmalloc : 0xe0800000 - 0xfe800000 ( 480 MB) lowmem : 0xc0000000 - 0xe0000000 ( 512 MB) modules : 0xbf000000 - 0xc0000000 ( 16 MB) .init : 0xc0008000 - 0xc0028000 ( 128 kB) .text : 0xc0028000 - 0xc0657000 (6332 kB) .data : 0xc0680000 - 0xc06b2ca0 ( 204 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:114 Console: colour dummy device 80x30 Calibrating delay loop... 1192.75 BogoMIPS (lpj=5963776) pid_max: default: 32768 minimum: 301 Security Framework initialized Mount-cache hash table entries: 512 CPU: Testing write buffer coherency: ok NET: Registered protocol family 16 Kirkwood: MV88F6281-A1, TCLK=200000000. Feroceon L2: Cache support initialised. bio: create slab <bio-0> at 0 vgaarb: loaded SCSI subsystem initialized usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb cfg80211: Calling CRDA to update world regulatory domain Switching to clocksource orion_clocksource NET: Registered protocol family 2 IP route cache hash table entries: 4096 (order: 2, 16384 bytes) TCP established hash table entries: 16384 (order: 5, 131072 bytes) TCP bind hash table entries: 16384 (order: 4, 65536 bytes) TCP: Hash tables configured (established 16384 bind 16384) 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. NTFS driver 2.1.29 [Flags: R/W]. JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, Inc. JFS: nTxBlock = 4002, nTxLock = 32019 SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, no debug enabled Btrfs loaded msgmni has been set to 1000 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 = 33) 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 1 scsi0 : sata_mv ata1: SATA max UDMA/133 irq 21 GPIO NAND driver, �© 2004 Simtec Electronics NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND 512MiB 3,3V 8-bit) Scanning device for bad blocks Bad eraseblock 132 at 0x000001080000 Bad eraseblock 3241 at 0x000019520000 Bad eraseblock 3494 at 0x00001b4c0000 Bad eraseblock 3850 at 0x00001e140000 Bad eraseblock 3884 at 0x00001e580000 Creating 3 MTD partitions on "orion_nand": 0x000000000000-0x000000100000 : "u-boot" ftl_cs: FTL header not found. 0x000000100000-0x000000500000 : "uImage" ftl_cs: FTL header not found. 0x000000500000-0x000020000000 : "root" ftl_cs: FTL header not found. MV-643xx 10/100/1000 ethernet driver version 1.4 mv643xx_eth smi: probed net eth0: port 0 with MAC address 00:50:43:67:64:06 net eth1: port 0 with MAC address 00:50:43:67:64:07 libertas_sdio: Libertas SDIO driver libertas_sdio: Copyright Pierre Ossman 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 19, 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 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 mice: PS/2 mouse device common for all mice rtc-mv rtc-mv: rtc core: registered rtc-mv as rtc0 i2c /dev entries driver cpuidle: using governor ladder cpuidle: using governor menu sdhci: Secure Digital Host Controller Interface driver sdhci: Copyright(c) Pierre Ossman mmc0: mvsdio driver initialized, lacking card detect (fall back to polling) via_sdmmc: VIA SD/MMC Card Reader driver (C) 2008 VIA Technologies, Inc. MV-CESA:Fallback driver 'hmac(sha1)' could not be loaded! alg: hash: Failed to load transform for mv-hmac-sha1: -2 mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver mv_xor mv_xor.0: Marvell XOR: ( xor cpy ) mmc0: new high speed SDIO card at address 0001 mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy ) ata1: SATA link down (SStatus 0 SControl F300) mv_xor mv_xor.2: Marvell XOR: ( xor cpy ) mv_xor mv_xor.3: Marvell XOR: ( xor fill cpy ) 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 lib80211: common routines for IEEE802.11 drivers VFP support v0.3: not present rtc-mv rtc-mv: setting system clock to 2010-07-20 07:56:52 UTC (1279612612) usb 1-1: new high speed USB device using orion-ehci and address 2 hub 1-1:1.0: USB hub found hub 1-1:1.0: 4 ports detected usb 1-1.1: new high speed USB device using orion-ehci and address 3 scsi1 : usb-storage 1-1.1:1.0 scsi 1:0:0:0: Direct-Access Generic STORAGE DEVICE 9909 PQ: 0 ANSI: 0 sd 1:0:0:0: [sda] Attached SCSI removable disk libertas: can't load helper firmware libertas: failed to load helper firmware libertas_sdio: probe of mmc0:0001:1 failed with error -2 VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0) Please append a correct "root=" boot option; here are the available partitions: 1f00 1024 mtdblock0 (driver?) 1f01 4096 mtdblock1 (driver?) 1f02 519168 mtdblock2 (driver?) Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) [<c002d64c>] (unwind_backtrace+0x0/0xe4) from [<c003e048>] (panic+0x68/0xf8) [<c003e048>] (panic+0x68/0xf8) from [<c0008fbc>] (mount_block_root+0x1c4/0x20c) [<c0008fbc>] (mount_block_root+0x1c4/0x20c) from [<c0009194>] (prepare_namespace+0x8c/0x184) [<c0009194>] (prepare_namespace+0x8c/0x184) from [<c0008918>] (kernel_init+0x118/0x160) [<c0008918>] (kernel_init+0x118/0x160) from [<c00293dc>] (kernel_thread_exit+0x0/0x8)
Any tipps?
Regards
Bernhard
arm mailing list arm@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/arm
2010/7/20 Rahul Gundecha rahul.gundecha@gmail.com
Hi Bernhard,
Try adding "rootfstype=ubifs" to command line -
Kernel command line: console=ttyS0,115200 ubi.mtd=2 root=ubi0:rootfs
Did not change anything
As I found out there is in fact something fishy (see red, which is supposed to be there, but my kernel does not show):
VFS: Cannot open root device “sdc2″ or unknown-block(8,34) Please append a correct “root=” boot option; here are the available partitions: 1f00 1024 mtdblock0 (driver?) 1f01 4096 mtdblock1 (driver?) 1f02 519168 mtdblock2 (driver?) 0800 195360984 sda driver: sd 0801 9999983 sda1 0802 10000976 sda2 Kernel panic – not syncing: VFS: Unable to mount root fs on unknown-block(8,34) [] (unwind_backtrace+0×0/0xd4) from [] (panic+0×48/0×134) [] (panic+0×48/0×134) from [] (mount_block_root+0×1c4/0×20c) [] (mount_block_root+0×1c4/0×20c) from [] (prepare_namespace+0×168/0×1cc) [] (prepare_namespace+0×168/0×1cc) from [] (kernel_init+0xd4/0×108) [] (kernel_init+0xd4/0×108) from [] (kernel_thread_exit+0×0/0×8)
so what to do? I got this information from http://www.errr-online.com/index.php/tag/guruplug/
Regards
Bernhard
In the end it was (again) a messy u-boot config. Just in case anybody gets ever again a similar problem, I just add my current enviroment:
baudrate=115200
ethaddr=...
eth1addr=... ethact=egiga0
x_bootcmd_kernel=nand read.e 0x6400000 0x100000 0x400000
x_bootcmd_ethernet1=set ethact egiga1
x_bootcmd_ethernet=ping 192.168.2.1
bootcmd=run x_bootcmd
bootdelay=5
arcNumber=0xa29
mainlineLinux=yes
filesize=348858
fileaddr=6400000
gatewayip=E.F.G.H
ipaddr=A.B.C.D
serverip=E.F.G.H bootargs=rootwait
x_bootargs=console=ttyS0,115200
x_bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs
x_bootcmd_usb=usb start
x_bootcmd=$(x_bootcmd_usb); $(x_bootcmd_kernel); setenv bootargs $(x_bootargs) $(x_bootargs_root) ;bootm 0x6400000;
stdin=serial
stdout=serial
stderr=serial
Environment size: 693/131068 bytes
Finally I got the SDHC card to mount as rootfs.. again it was a f***ed u-boot thingy. As it seems it is important that rootdelay=10 is set *after *root=0811. rootfstype does not matter at all
Regards
Bernhard
On 07/21/10 11:58, Somebody in the thread at some point said:
Finally I got the SDHC card to mount as rootfs.. again it was a f***ed u-boot thingy. As it seems it is important that rootdelay=10 is set *after *root=0811. rootfstype does not matter at all
Hi -
U-Boot's environment concept sucks really badly.
However instead of rootdelay for a fixed time the kernel offers rootwait, which causes it to just hold off for long enough for the boot device to be created. That's typically a second or so.
-Andy
I tried that aswell, but.. yeah... it has to be put after root=.... aswell, at least it did not work when I put it before it.
On 07/21/10 12:11, Somebody in the thread at some point said:
I tried that aswell, but.. yeah... it has to be put after root=.... aswell, at least it did not work when I put it before it.
This sequence works OK for me with SD boot on iMX31 -->
rootwait rootfstype=ext4 root=/dev/mmcblk0p3
-Andy
2010/7/21 Andy Green andy@warmcat.com
On 07/21/10 12:11, Somebody in the thread at some point said:
I tried that aswell, but.. yeah... it has to be put after root=....
aswell, at least it did not work when I put it before it.
This sequence works OK for me with SD boot on iMX31 -->
rootwait rootfstype=ext4 root=/dev/mmcblk0p3
-Andy
*rootwait* has no functionality on the marvell hacked uboot (latest git). This is wicked sick...
So... now I am stuck @ this:
*....* *EXT2-fs (sdb1): warning: mounting unchecked fs, running e2fsck is recommended
* *VFS: Mounted root (ext2 filesystem) on device 8:17.
* *Freeing init memory: 148K* * * I rechecked the device, but it is just fine. I allready did a googlesearch, but the result only told me about vague debugging symbols or debuggers itself which treat kernel memory alloc as fail and lock the boot process (or so). But nothing howto effectivly fix it. Any idea?
Note: I can boot into the debian envornment on NAND just fine. As soon as I try to boot from SD(hc) card into the F12-rootfs it freezes at that point. I can do no more input via minicom at that point of time.
Any ideas? Help appreciated.
Regards
Bernhard Schuster
On 07/21/10 13:54, Somebody in the thread at some point said:
So... now I am stuck @ this:
*....* *EXT2-fs (sdb1): warning: mounting unchecked fs, running e2fsck is recommended * *VFS: Mounted root (ext2 filesystem) on device 8:17. * *Freeing init memory: 148K*
I rechecked the device, but it is just fine. I allready did a googlesearch, but the result only told me about vague debugging symbols or debuggers itself which treat kernel memory alloc as fail and lock the boot process (or so). But nothing howto effectivly fix it. Any idea?
Note: I can boot into the debian envornment on NAND just fine. As soon as I try to boot from SD(hc) card into the F12-rootfs it freezes at that point. I can do no more input via minicom at that point of time.
Any ideas? Help appreciated.
It looks like you are running, there's no error there.
I would add "init=/bin/bash" to the kernel commandline and eliminate problems with init / upstart or whatever then. You should get a bash prompt immediately.
You need a fair amount of goodies in /dev, including things like /dev/console and so on.
-Andy
It looks like you are running, there's no error there.
I would add "init=/bin/bash" to the kernel commandline and eliminate problems with init / upstart or whatever then. You should get a bash prompt immediately.
You need a fair amount of goodies in /dev, including things like /dev/console and so on.
-Andy
Awesome!
How can I achiev the behavior of the default debian system to show me a log in prompt? I know the basics about vinit system. Thanks for any help
Regards
Bernhard
On 07/21/10 14:23, Somebody in the thread at some point said:
How can I achiev the behavior of the default debian system to show me a log in prompt? I know the basics about vinit system. Thanks for any help
If /bin/bash is working you're mostly there.
You can run the default /sbin/init as "init" which runs the standard init sequence. However, this is really inefficient for typical embedded device, it can be 30s or more before it's done on an otherwise fast system.
I did a lot of work on the txtr device init scripts based on Fedora to finish boot into its GUI in ~7s from power on.
In there, I run agetty directly like this (you will need to adjust the serial device to match your serial console device ) -->
agetty /dev/ttymxc0 115200 vt100-nav
You can so this by making "init" a shell script, mount goodies like proc / sys / dev/pts and so on in there and then spawn agetty.
It's enough to just have
#!/bin/sh
at the start (and chmod the script +x !) and the kernel can understand it's a shell script for init. If you made that shell script as /sbin/myinit, you would need init=/sbin/myinit on the kernel commandline to get it working.
Once you have your init "script" you can pile all the boot tasks in there until / unless you're ready to migrate them to systemd or whatever.
-Andy
2010/7/21 Andy Green andy@warmcat.com
On 07/21/10 14:23, Somebody in the thread at some point said:
How can I achiev the behavior of the default debian system to show me a
log in prompt? I know the basics about vinit system. Thanks for any help
If /bin/bash is working you're mostly there.
You can run the default /sbin/init as "init" which runs the standard init sequence. However, this is really inefficient for typical embedded device, it can be 30s or more before it's done on an otherwise fast system.
I did a lot of work on the txtr device init scripts based on Fedora to finish boot into its GUI in ~7s from power on.
In there, I run agetty directly like this (you will need to adjust the serial device to match your serial console device ) -->
agetty /dev/ttymxc0 115200 vt100-nav
You can so this by making "init" a shell script, mount goodies like proc / sys / dev/pts and so on in there and then spawn agetty.
It's enough to just have
#!/bin/sh
at the start (and chmod the script +x !) and the kernel can understand it's a shell script for init. If you made that shell script as /sbin/myinit, you would need init=/sbin/myinit on the kernel commandline to get it working.
Once you have your init "script" you can pile all the boot tasks in there until / unless you're ready to migrate them to systemd or whatever.
-Andy
Some weeks ago I allready used the fedora rootfs in combination with the factory kernel / uboot, which did not use the init boot option. How did they achiev it to get a login prompt? What did they do, I am really curious and would like to recreate that behaviour
Regards
Bernhard
On 07/22/10 14:18, Somebody in the thread at some point said:
agetty /dev/ttymxc0 115200 vt100-nav
Some weeks ago I allready used the fedora rootfs in combination with the factory kernel / uboot, which did not use the init boot option. How did
Yeah without init= it defaults to the distro /sbin/init, which fires up all the initscripts accordingly. It's really slow.
they achiev it to get a login prompt? What did they do, I am really curious and would like to recreate that behaviour
I also did this a while back, it needed meddling in /etc/securetty and at that time /etc/inittab, nowadays it seems you have to meddle with upstart stuff somehow.
Or, cut out all the slow init stuff and run it by hand on your serial console as shown in the previous mail.
-Andy
2010/7/22 Andy Green andy@warmcat.com
On 07/22/10 14:18, Somebody in the thread at some point said:
agetty /dev/ttymxc0 115200 vt100-nav
Some weeks ago I allready used the fedora rootfs in combination with the
factory kernel / uboot, which did not use the init boot option. How did
Yeah without init= it defaults to the distro /sbin/init, which fires up all the initscripts accordingly. It's really slow.
they achiev it to get a login prompt? What did they do, I am really
curious and would like to recreate that behaviour
I also did this a while back, it needed meddling in /etc/securetty and at that time /etc/inittab, nowadays it seems you have to meddle with upstart stuff somehow.
Or, cut out all the slow init stuff and run it by hand on your serial console as shown in the previous mail.
-Andy
Without that init thingy _nothing_ happened and my guruplug frooze after freeing kernel memory. Maybe init fails? The bash I get from init=/bin/bash only spits a error at when trying to init/telinit by hand.
Any ideas? Anybody flashed a custom kernel and got init working?
Regards
Bernhard
To be specific the error msg is *init: Unable to send message: Connection refused same for reboot, shutdown, telinit* * * *Regards* * * *Bernhard*
On 07/22/10 16:22, Somebody in the thread at some point said:
I also did this a while back, it needed meddling in /etc/securetty and at that time /etc/inittab, nowadays it seems you have to meddle with upstart stuff somehow.
Without that init thingy _nothing_ happened and my guruplug frooze after
The "init= thingy" isn't doing anything itself, you mean with "stock distro /sbin/init" you don't get anything coming on your serial console.
freeing kernel memory. Maybe init fails? The bash I get from init=/bin/bash only spits a error at when trying to init/telinit by hand.
Any ideas? Anybody flashed a custom kernel and got init working?
On my F12 setup the default init does work fine, just makes the boot four times slower than my custom init and scripts.
Why don't you hack some
echo "hello" > /dev/ttyxyz0
into
/etc/rc.d/rc.sysinit
and see if it gets that far.
To be specific the error msg is init: Unable to send message: Connection refused same for reboot, shutdown, telinit
It's normal, init running as pid 1 is meant to be listening for commands those guys send to it. Since you never ran init as pid 1, but /bin/bash, it ain't there listening.
-Andy
freeing kernel memory. Maybe init fails? The bash I get from
init=/bin/bash only spits a error at when trying to init/telinit by hand.
Any ideas? Anybody flashed a custom kernel and got init working?
On my F12 setup the default init does work fine, just makes the boot four times slower than my custom init and scripts.
if possible, can you post your custom script?
Why don't you hack some
echo "hello" > /dev/ttyxyz0
into
/etc/rc.d/rc.sysinit
and see if it gets that far.
It reaches not even line #2, line #1 is #!/bin/bash
To be specific the error msg is init: Unable to send message: Connection refused same for reboot, shutdown, telinit
It's normal, init running as pid 1 is meant to be listening for commands those guys send to it. Since you never ran init as pid 1, but /bin/bash, it ain't there listening.
Thanks for clearing that up
Bernhard
On 07/22/10 17:09, Somebody in the thread at some point said:
freeing kernel memory. Maybe init fails? The bash I get from init=/bin/bash only spits a error at when trying to init/telinit by hand. Any ideas? Anybody flashed a custom kernel and got init working? On my F12 setup the default init does work fine, just makes the boot four times slower than my custom init and scripts.
if possible, can you post your custom script?
I have a custom init executable (actually to save boot time my main GUI executable serves as init) which later spawns the scripts, unfortunately that doesn't have a Free license.
Why don't you hack some echo "hello" > /dev/ttyxyz0
It reaches not even line #2, line #1 is #!/bin/bash
Just in case I should explain ttyxyz0 was just a placeholder for whatever your serial console device is. In my case, ttymxc0 for imx31 SoC.
If that was obvious then I guess init is choking somewhere, possibly it lacks some pieces in /dev?
Anyway you can just hack up a script as your init, something along these lines:
#!/bin/bash # # PATH=/bin:/usr/bin:/sbin:/usr/sbin
mount -n -t proc /proc /proc mount -n -t sysfs /sys /sys mount -n -t devpts devpts /dev/pts
rsyslogd & echo "fsck on ro rootfs" time fsck -y /dev/mmcblk0p1 if [ $? -gt 2 ] ; then echo "Attempting reboot on fsck error" reboot fi
echo "remounting rootfs rw" mount -n -o remount,rw / echo "mounting other filesystems" mount -a echo "mount done"
ifconfig lo 127.0.0.1 & hostname xyz
# kill temp database rm -f /var/lib/rpm/__*
/bin/bash
echo "rc.sysinit done"
while [ 1 ] ; do sleep 5s ; done
(It's a good idea to start the rootfs from the kernel with "ro" so you can fsck it before anything from the current boot session has its hooks into it).
There's a huge value in Fedora basis for arm rootfs without running stock init. Even without /sbin/init as pid 1, all of the /etc/init.d/blah start / stop / restart stuff works fine. You just need to start them in your startup script explicitly (and with ... & usually since you don't want to delay boot flow while sshd starts for example).
I guess you already experienced how fast it is coming to /bin/bash prompt if that is init, there's no reason it should be much slower than that.
-Andy
Jul 22 11:32:11 fedora-arm /sbin/mingetty[1457]: tty2: No such file or directory
Jul 22 11:32:11 fedora-arm /sbin/mingetty[1458]: tty3: No such file or directory
Jul 22 11:32:11 fedora-arm /sbin/mingetty[1459]: tty1: No such file or directory
Jul 22 11:32:11 fedora-arm /sbin/mingetty[1460]: tty6: No such file or directory
Jul 22 11:32:11 fedora-arm /sbin/mingetty[1455]: tty4: No such file or directory
Jul 22 11:32:11 fedora-arm /sbin/mingetty[1456]: tty5: No such file or directory
Jul 22 11:32:16 fedora-arm init: tty4 main process (1455) terminated with status 1
Jul 22 11:32:16 fedora-arm init: tty4 main process ended, respawning
Jul 22 11:32:16 fedora-arm init: tty2 main process (1457) terminated with status 1
Jul 22 11:32:16 fedora-arm init: tty2 main process ended, respawning
Jul 22 11:32:16 fedora-arm init: tty3 main process (1458) terminated with status 1
Jul 22 11:32:16 fedora-arm init: tty3 main process ended, respawning
Jul 22 11:32:16 fedora-arm init: tty1 main process (1459) terminated with status 1
Jul 22 11:32:16 fedora-arm init: tty1 main process ended, respawning
Jul 22 11:32:16 fedora-arm init: tty6 main process (1460) terminated with status 1
Jul 22 11:32:16 fedora-arm init: tty6 main process ended, respawning
Jul 22 11:32:16 fedora-arm init: tty5 main process (1456) terminated with status 1
Jul 22 11:32:16 fedora-arm init: tty5 main process ended, respawning
It doesn't work either. The output above is created when starting with *init=/bin/bash *.
When starting with your given code put into /bin/init_try4.sh I just get a */bin/init_try4.sh failed*
I think something is wrong with the rootfs I am going to wipe that tonight. See what happens. This makes no more sense to me.
Regards
Bernhard
Solved.... rootfs was messy. Kepp in mind: GUI uncompression tool is pure ebil!
Regards
Bernhard
Know as all works... hurray, the plug died "-.- byte #2 on the plug is dead, and therefore I can not use uboot anymore nor flash a new one via jtag.
Regards
Bernhard
In the end it again was just wacky wacky uboot. The third attempt succeded to write byte #2. I start disliking the plug.
Btw. does anybody have updated sources list handy? The one from the rootfs is outdated.
2010/7/24 Bernhard Schuster schuster.bernhard@googlemail.com
In the end it again was just wacky wacky uboot. The third attempt succeded to write byte #2. I start disliking the plug.
Btw. does anybody have updated sources list handy? The one from the rootfs is outdated.
Sry, my university "accidently" discarded one of my registered mac adresses... so repos are fine.
Has anyone uaputl handy and can mail it to me or provide a donwload link? I accidently erased my whole NAND and the rootfs from plugcomputer.org does not contain it (used find path -iname "*uaputl*", but no results).
Regards
Bernhard