I built a poky-tiny image following instructions at https://wiki.yoctoproject.org/wiki/Poky-Tiny using yocto 1.6. All attempts to boot the image following the instructions given produce no output. I also attempted to run the image with the command runqemu qemux86 ramfs with the the same result. I did try the same thing with yocto 1.5 and it at least attempts to boot but gets stuck running init because setsid is not included in busybox. [ 3.379021] Freeing unused kernel memory: 284k freed /init: line 26: setsid: not found Console sh exited with 127, respawning... /init: line 26: setsid: not found Console sh exited with 127, respawning... A patch to fix this was submitted back in 2013 but it doesn't look like it was ever accepted, some alternatives were suggested but I don't think they were acted on. https://lists.yoctoproject.org/pipermail/poky/2013-November/009379.html
Can you please attach the resulting .config from your linux-yocto build directory? tmp/work/MACHINE/linux-yocto*/*/linux*build/.config You'd want to check for things like serial console, 8250 support, etc. I'd try adding kernel arguments like "debug" and "earlyprintk=..." and "initcalldebug" and see if that helps get anything out before it hangs.
Darren, just to be clear, I am working on fixing the core issue, but can't get tiny to boot at all, slight different issue than what Matt reported. Using the following command line yeilds nothing, I have to kill the qemu process. qemu-system-i386 -kernel tmp/deploy/images/qemux86/bzImage-qemux86.bin -initrd tmp/deploy/images/qemux86/core-image-minimal-qemux86.cpio.gz -nographic -append "console=ttyS0 root=dev/ram0 debug"
Created attachment 1977 [details] linux-yocto-tiny kernel config
So I immediately notice there is not 8250 nor any serial console, nor any VGA console support in that .config, so I wouldn't expect any output at all. At some point, the tiny kernel config has broken. Next step is to examine the kernel config logs (linux-yocto/<version>/linux/.meta/...) (we need a symlink to here from the logs directory or something)
Thanks Saul, my .config file matches yours. Darren, I new to yocto and openembedded so I'm not sure what you mean by needing a link to the logs. Is there something you would like me to do, or were you just thinking out loud?
Ok, so I posted the patch for busybox. Matt, you seem to have gotten further then me then with it booting into the init, I am not even booting right now!
Saul, no I don't think I got any further than you. With Yocot 1.6 I can't boot at all, which I think is the same as you. With Yocto 1.5 it boots to init but then gets stuck as I described, that problem appears to be that busybox isn't configured correctly as pointed out in the link I provided, but there was some argument as to the correct way to get it configured. I don't understand the various options so I can't comment on what to do there.
Mark, yeah - just thinking out loud - context for Saul, Tom, and I as we work to improve usability here. :-)
I don't see any output at all with 1.5 either. So we need a starting point that does work in order to determine what doesn't work.
Hello, I am working with 1.6_M1 tag. I used the following command to get to the init nosuid issue: tmp/sysroots/x86_64-linux/usr/bin/qemu-system-i386 -kernel tmp/deploy/images/qemux86/bzImage-qemux86.bin -initrd tmp/deploy/images/qemux86/core-image-minimal-qemux86-20140528193249.rootfs.cpio.gz -nographic -append "console=ttyS0 root=/dev/ram0" I took the steps from here: https://wiki.yoctoproject.org/wiki/Poky-Tiny
I mean setsid issue: Console sh exited with 127, respawning... /init: line 26: setsid: not found
Just to add some additional information, if you remove the "_poky" from the meta-yocto/recipes/core/busybox*.bbappend file and rebuild your image (you may need to cleansstate busybox) that will correct the setsid issue. I was able to reproduce the non-booting kernel issue with 1.6, if I just swap out the kernel from 1.6 -> 1.5, it boots into the user space just fine (assuming you have the above fix). I will open another bug against the non-booting kernel since it's different thank the orignal issue here, which has a fix posted in poky@yoctoproject.org.
Check poky-tiny.conf, it seems that it is still using 3.8% for the kernel version, I tested with 3.14 and it seems to boot, this might be the problem, but I discovered a different issue with busybox in 1.6 and master.
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=e7114046be6e71fb326477dc882adb814ef6a751
Hello Saul, Tried poky-tiny with your commit but still does not work. It freezes the terminal.
Still not working on latest master (1dcdd877c7946be4c0b1203deb14e2f842f9d0c2). Any news on this?
Lucian Musat 2014-07-16 11:41:17 UTC Still not working on latest master (1dcdd877c7946be4c0b1203deb14e2f842f9d0c2). Any news on this?
Does this happen with 1.7 M2 as well?
Yes, this reproduces on 1.7.M2 (2d1660112e54653f7bb763939d0416472c49fe01)
Can you please re-verify this in 1.5.3. I do think we have a kernel config issue since it was mentioned no console or vga support, so at a minimum we need an updated configuation that support output.
Re-verified on 1.5.3 and setsid issue happens: Console sh exited with 127, respawning... /init: line 26: setsid: not found
(In reply to comment #21) > Re-verified on 1.5.3 and setsid issue happens: > > Console sh exited with 127, respawning... > /init: line 26: setsid: not found OK, this was supposed to have been fixed by Saul's patch: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=e7114046be6e71fb326477dc882adb814ef6a751 but it seems that isn't actually the case according to this result. Which is also not a kernel bug, but a busybox bug. So noting that there are apparently two bugs here, the setsid bug and the kernel bug?
I have confirmed that I can booth a 3.8 Kernel taken from Dora with a rootfs build from Daisy. If I try to build the Daisy based 3.10 kernel it fails to boot correctly, in this case it hangs in qemu with no output on the screen at all. I run qemu as follows: tmp/sysroots/x86_64-linux/usr/bin/qemu-system-i386 -kernel tmp/deploy/images/qemux86/bzImage-qemux86.bin -initrd tmp/deploy/images/qemux86/core-image-minimal-qemux86.cpio.gz -nographic -append "console=ttyS0 root=/dev/ram0" I can swap the -kernel option between a 3.8 and 3.10 kernel an observe the breakage. Sau!
So the problem is that the 8250.cfg kernel options aren't getting enabled, and therefore nothing shows up on the console and it looks like a hung machine. And the reason the 8250 options aren't getting enabled is that CONFIG_TTY isn't getting enabled. CONFIG_TTY isn't explicitly mentioned in any config fragment, but it defaults to 'y', so you'd expect it to be turned on if not mentioned (and it's not an 'is not set' item either.). On the other hand, if unset options are forced 'not set', that would explain why it doesn't get set. On the other hand again, a normal non-tiny core-image-minimal doesn't specify CONFIG_TTY either way, and it does get set to 'y'. Adding CONFIG_TTY=y to the common-pc-drivers.cfg fixes things, but I'm wondering why this didn't show up as a problem before. Adding Bruce to the cc: - he may possibly see an obvious explanation.
iirc, tiny should be starting off with an allnoconfig as opposed to using defaults. I don't recall where that's specified though...
perhaps CONFIG_TTY belongs where CONFIG_SERIAL_8250_CONSOLE is specified, like in 8250.cfg? There are many others specifying that which should probably just include 8250.cfg instead.
Yeah, my patches for this add CONFIG_TTY to both cfg/8250.cfg and common-pc-drivers.cfg (which I also wondered why it wouldn't just be including 8250.cfg itself), but I don't want to just fix the symptom - i.e. need to remember how TTY gets turned on in non-tiny but off in tiny (hoping it's not just a 'select' side-effect of the larger config, though I don't directly see any 'select TTY' anywhere so it's not direct)...
If it is default Y, it should be on in the standard ktypes, but off in the tiny ktypes unless explicitly requested. That is one of the ways by which tiny is kept small - you only get what you explicitly ask for. Makes it a lot more susceptible to incomplete meta-data like this.
Yes, that makes sense, but I'm looking for the mechanism by which that happens, slipping by me at the moment..
See linux-yocto-3.14/meta/tiny/tiny.scc: include ktypes/standard/standard.scc nocfg inherit Should be the nocfg part iirc
There's two things at play: - the "nocfg" inherit that Darren points out - CONFIG_MODE = "--allnoconfig" in the -tiny recipe The CONFIG_MODE = "--allnoconfig" is doing what Darren mentioned before, it starts the configuration by changing the default of every option to =n, and we then start applying the fragments. So we do need to be explicit and enable all the options to get a feature fragment functional .. which is always a good policy regardless :)
Patches submitted to linux-yocto
http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-3.14/commit/?h=meta&id=b85e4cb574d66a12e736b2600d953a862070fa3f
Verified in latest master (1894522f357fdf0b6adb2dcc14f12817628596bd) and it's still not working
(In reply to comment #34) > Verified in latest master (1894522f357fdf0b6adb2dcc14f12817628596bd) and > it's still not working Yeah, it's because the SRCREV's haven't been updated. The meta branch is at: ccad961c4cb6be245ed198bd2c17c27ab33cfcd7 which is before the tty config fragments.
Looks like you need to update your poky/master to at least: commit 56e93f5292932e49ee10f90ada14011b6a328791 Author: Bruce Ashfield <bruce.ashfield@windriver.com> Date: Mon Sep 8 15:33:33 2014 -0400 linux-yocto/3.14: configuration updates and feature merges. Updating the 3.14 meta and machine SRCREVs to pick up the following changes: meta/config: a94680bfeb0e drm-gma500: build GMA500 DRM driver as kernel module 21783e2e6be2 intel-common: intel-core-32: use tunnelcreek.scc 0b46240ac3b3 soc: tunnelcreek: create tunnelcreek scc c7207d9c0e6a qemuppc64: create bsp config 8f553f77e0ad meta: Create kernel config and scc for CRIU dacb1c1ab011 meta: common-pc: add support for booting via EFI b85e4cb574d6 meta: Add CONFIG_TTY to common-pc-drivers.cfg 33f2c8d2ba33 meta: Add CONFIG_TTY to 8250.cfg e6f31e4894d5 GRE: enable gre feature.
change from notabug
It really is fixed, the change finally made master in the commit mentioned above: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=56e93f5292932e49ee10f90ada14011b6a328791
Verified this on commit bd1a3ab8a63d6b2c109d595c67fcca99817e1daa