[yocto] Loading a Yocto kernel on Hyper-V hangs

2019-08-05 Thread Yair Itzhaki
Hi ,
I'm using Poky (Warrior).
Built a Plain Vanilla system for bare-metal x64, and put it on a hard-drive.
The system boots well on an Intel MB.

Then, added a WIC image target, and converted the disk iamge (using qemu-img) 
into a VMDK.
The image boots well (Grub prompt, followed by kernel loading) on a Windows 
VmWare (though I had to add some kernel features to make the root FS available).

Next, I converted the same image to VHDX using qemu-img.
Configured a HyperV Gen2 machine (to use UEFI). Security is turned off.
Grub2 loads well:
I get a Grub prompt, select the kernel – but once selected - the system hangs.
Tried on different Windows machine (Win10, Server 2016)

When replacing the kernel with a stock Ubuntu kernel – the kernel loads well.
Tried other (pre-built) kernels from 
http://downloads.yoctoproject.org/releases/yocto/yocto-x.y/ – same odd 
behavior: Grub loads, kernel does not load.
Tried a different compression (other than gzip) – same.

Any idea?

Thanks,
Yair


-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Loading a Yocto kernel on Hyper-V hangs

2019-08-06 Thread Yair Itzhaki
Great tip!
Found this list to work for me (though I'm not sure it's all needed):

CONFIG_HYPERVISOR_GUEST=y
CONFIG_PARAVIRT=y
CONFIG_PARAVIRT_SPINLOCKS=y
CONFIG_CONNECTOR=y
CONFIG_SCSI_FC_ATTRS=y
CONFIG_HYPERV=y
CONFIG_HYPERV_UTILS=y
CONFIG_HYPERV_BALLOON=y
CONFIG_HYPERV_STORAGE=y
CONFIG_HYPERV_NET=y
CONFIG_HYPERV_KEYBOARD=y
CONFIG_FB_HYPERV=y
CONFIG_HID_HYPERV_MOUSE=y
CONFIG_PCI_HYPERV=y
CONFIG_VSOCKETS=y
CONFIG_HYPERV_VSOCKETS=y


Thanks!
Yair


From: Ang, Chin Huat 
Sent: Tuesday, August 6, 2019 12:07
To: Yair Itzhaki ; yocto@yoctoproject.org
Subject: RE: Loading a Yocto kernel on Hyper-V hangs

On master, using genericx86-64 machine with linux-yocto kernel I also see grub 
booted into a blank screen when none of the Hyper-V kernel configs are enabled.

I couldn’t find any Hyper-V kernel config fragments in yocto-kernel-cache or 
meta-virtualization, so I googled for “hyper-v kernel config” and used a trick 
[1] to apply the necessary kernel configs to get both core-image-minimal and 
core-image-sato boot up properly.

[1] https://wiki.yoctoproject.org/wiki/TipsAndTricks/QuickAndDirtyKernelConfig

--Chin Huat

From: yocto-boun...@yoctoproject.org<mailto:yocto-boun...@yoctoproject.org> 
mailto:yocto-boun...@yoctoproject.org>> On 
Behalf Of Yair Itzhaki
Sent: Monday, August 5, 2019 11:41 PM
To: yocto@yoctoproject.org<mailto:yocto@yoctoproject.org>
Subject: [yocto] Loading a Yocto kernel on Hyper-V hangs

Hi ,
I'm using Poky (Warrior).
Built a Plain Vanilla system for bare-metal x64, and put it on a hard-drive.
The system boots well on an Intel MB.

Then, added a WIC image target, and converted the disk iamge (using qemu-img) 
into a VMDK.
The image boots well (Grub prompt, followed by kernel loading) on a Windows 
VmWare (though I had to add some kernel features to make the root FS available).

Next, I converted the same image to VHDX using qemu-img.
Configured a HyperV Gen2 machine (to use UEFI). Security is turned off.
Grub2 loads well:
I get a Grub prompt, select the kernel – but once selected - the system hangs.
Tried on different Windows machine (Win10, Server 2016)

When replacing the kernel with a stock Ubuntu kernel – the kernel loads well.
Tried other (pre-built) kernels from 
http://downloads.yoctoproject.org/releases/yocto/yocto-x.y/ – same odd 
behavior: Grub loads, kernel does not load.
Tried a different compression (other than gzip) – same.

Any idea?

Thanks,
Yair


-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] busybox + SELinux (warrior) - reboot issue

2019-11-13 Thread Yair Itzhaki
Hi ,
I'm using Poky (Warrior), with busybox (aiming at a lightweight system).
Recently, added SELinux to my project (by adding "packagegroup-core-selinux" to 
my local.conf, with mls policy).

Booted with "selinux=1 enforing=0".
The auto-relabeling reported an error, since the root is mounted RO.
So, patched slelinux-autorelabel script to mount "/" RW before relabeling.

Booted again.
This time, selinux-init had the same issue ( / mounted RO).
Patched this one as well, but the system keeps rebooting:
It seems that the init process keeps it's kernel_t context, which forces 
re-labeling, reboot and so on…. (per the selinux-init script)

Q1: Is SELinux+busybox a valid combination, or should I switch to systemd?
Q2: Which context should the init process end up as?

BTW – the build of "core-image-selinux" fails, with the following error
   Copying files into the device: set_inode_xattr: No data available while 
reading attribute "security.selinux" of "network"
Any idea?

Thanks,
Yair


-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] busybox + SELinux (warrior) - reboot issue

2019-11-21 Thread Yair Itzhaki
Anybody?

Thanks,
Yair


-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto