[LEDE-DEV] Running init in a chroot LEDE Image
Hello everyone, Thanks a lot for an amazing project! I'm trying to run a rootfs chroot on my desktop computer to easen the development of userspace applications, but as I'm using ubus I need a complete LEDE environment. Using chroot also reduces the turnaround time for code/test cause I can just write code and it instantly is loaded on the image. I donwloaded the image from here: http://ci.libremesh.org/196/x86/generic/Generic/lime_default/lede-17.01 .2-lime-default-x86-generic-generic-rootfs.tar.gz Mounted all devices, did chroot... but I somehow need to call init to get ubus running (and all of the other supporting systems). Any suggestion on how to manually call init? just calling /sbin/init says the following: tmp# chroot lime /sbin/init WARNING: Variable 'led' does not exist or is not an array/object Press the [f] key and hit [enter] to enter failsafe mode Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level WARNING: Variable 'led' does not exist or is not an array/object But nothing else. Thanks! signature.asc Description: This is a digitally signed message part ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] Running init in a chroot LEDE Image
Thanks for replying! On Wed, 2017-08-09 at 10:09 +0800, Yousong Zhou wrote: > On 9 August 2017 at 08:01, Mirko Parthey > wrote: > > On Tue, Aug 08, 2017 at 11:32:23PM +0300, Nicolas Pace wrote: > > > I'm trying to run a rootfs chroot on my desktop computer to easen > > > the > > > development of userspace applications, but as I'm using ubus I > > > need a > > > complete LEDE environment. > > > [snip] > > > but I somehow need to call init to > > > get ubus running (and all of the other supporting systems). > > > > > > Any suggestion on how to manually call init? > > > > init must be started by the Linux kernel as the first userspace > > process > > to ensure it is asssigned pid 1 and gets special privileges for > > supervising other processes. Does it need to run as pid 1 or just as the parent of all the processes it needs to oversee? > > To start another init from a running system, you need some kind of > > virtualization. I am using qemu/kvm here, managed by virt-manager > > and > > libvirtd. This has the advantage of running the LEDE userspace on > > top > > of the LEDE kernel instead of the host kernel, which may be missing > ./script/qemustart can also be used to quickly start QEMU > arm/mips/x86 > instances. I've used qemu before... this time I wanted to run it from a chroot because: * want to access a wireless device I'm not being able to access from qemu... a usb wireless adaptor ath9k_htc * i want to run an LEDE-based system (LibreMesh) on top of already running systems like Raspbian on a Raspberry-pi or ARMBian on a Banana- pi. I did the chroot and throught it I can access the ath9k_htc device... so the only pending thing is to run init somehow... or to startup the essential services manually. Regards, signature.asc Description: This is a digitally signed message part ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] Running init in a chroot LEDE Image
On Wed, 2017-08-09 at 14:29 +0800, Yousong Zhou wrote: > On 9 August 2017 at 13:44, Nicolas Pace wrote: > > Thanks for replying! > > > > On Wed, 2017-08-09 at 10:09 +0800, Yousong Zhou wrote: > > > On 9 August 2017 at 08:01, Mirko Parthey > > > wrote: > > > > On Tue, Aug 08, 2017 at 11:32:23PM +0300, Nicolas Pace wrote: > > > > > I'm trying to run a rootfs chroot on my desktop computer to > > > > > easen > > > > > the > > > > > development of userspace applications, but as I'm using ubus > > > > > I > > > > > need a > > > > > complete LEDE environment. > > > > > > > > > [snip] > > > > > > > but I somehow need to call init to > > > > > get ubus running (and all of the other supporting systems). > > > > > > > > > > Any suggestion on how to manually call init? > > > > > > > > init must be started by the Linux kernel as the first userspace > > > > process > > > > to ensure it is asssigned pid 1 and gets special privileges for > > > > supervising other processes. > > > > Does it need to run as pid 1 or just as the parent of all the > > processes > > it needs to oversee? > > > > > > To start another init from a running system, you need some kind > > > > of > > > > virtualization. I am using qemu/kvm here, managed by virt- > > > > manager > > > > and > > > > libvirtd. This has the advantage of running the LEDE userspace > > > > on > > > > top > > > > of the LEDE kernel instead of the host kernel, which may be > > > > missing > > > ./script/qemustart can also be used to quickly start QEMU > > > arm/mips/x86 > > > instances. > > > > I've used qemu before... this time I wanted to run it from a chroot > > because: > > * want to access a wireless device I'm not being able to access > > from > > qemu... a usb wireless adaptor ath9k_htc > > * i want to run an LEDE-based system (LibreMesh) on top of already > > running systems like Raspbian on a Raspberry-pi or ARMBian on a > > Banana- > > pi. > > > > I did the chroot and throught it I can access the ath9k_htc > > device... > > so the only pending thing is to run init somehow... or to startup > > the > > essential services manually. > > > > Regards, > > Have you tried passing through the USB wireless device to guest > machine? Have tried. > Or making an image and run it insider docker? No... just thought first on chroot... but also LXC or Docker could work... any pointer? signature.asc Description: This is a digitally signed message part ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] kmod-eeprom-sunxi missing while compiling for Banana-pi Router v1
Hi all, I'm having a missing package when I compile for the bananapi router v1 board. make -C 17.01.2/sunxi/generic/ib image PROFILE=sun7i-a20-lamobo-r1 'PACKAGES= lime-full -dnsmasq' EXTRA_IMAGE_NAME=lime_default BIN_DIR=/home/nicopace/projects/redlibre/altermundi/librestack/lime- sdk-backup/output/sunxi/generic/sun7i-a20-lamobo-r1/lime_default /home/nicopace/projects/redlibre/altermundi/librestack/lime-sdk- backup/tmp/files ... echo 'Building images for sunxi - Lamobo R1' Building images for sunxi - Lamobo R1 ... Installing kmod-ata-ahci-platform (4.4.71-1) to root... Downloading file:packages/kmod-ata-ahci-platform_4.4.71-1_arm_cortex- a8_vfpv3.ipk Unknown package 'kmod-eeprom-sunxi'. Installing kmod-rtl8192cu (4.4.71+2017-01-31-2) to root... Downloading file:packages/kmod-rtl8192cu_4.4.71+2017-01-31- 2_arm_cortex-a8_vfpv3.ipk ... Collected errors: * opkg_install_cmd: Cannot install package kmod-eeprom-sunxi. The issue is also mentioned in the OpenWRT ticket system: https://dev.openwrt.org/ticket/22675 Any idea? Regards, signature.asc Description: This is a digitally signed message part ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] kmod-eeprom-sunxi missing while compiling for Banana-pi Router v1
On Sun, 2017-10-01 at 09:58 +0300, Nicolas Pace wrote: > Hi all, > I'm having a missing package when I compile for the bananapi router > v1 > board. > > make -C 17.01.2/sunxi/generic/ib image PROFILE=sun7i-a20-lamobo-r1 > 'PACKAGES= lime-full -dnsmasq' EXTRA_IMAGE_NAME=lime_default > BIN_DIR=/home/nicopace/projects/redlibre/altermundi/librestack/lime- > sdk-backup/output/sunxi/generic/sun7i-a20-lamobo-r1/lime_default > /home/nicopace/projects/redlibre/altermundi/librestack/lime-sdk- > backup/tmp/files > ... > echo 'Building images for sunxi - Lamobo R1' > Building images for sunxi - Lamobo R1 > ... > Installing kmod-ata-ahci-platform (4.4.71-1) to root... > Downloading file:packages/kmod-ata-ahci-platform_4.4.71-1_arm_cortex- > a8_vfpv3.ipk > Unknown package 'kmod-eeprom-sunxi'. > Installing kmod-rtl8192cu (4.4.71+2017-01-31-2) to root... > Downloading file:packages/kmod-rtl8192cu_4.4.71+2017-01-31- > 2_arm_cortex-a8_vfpv3.ipk > ... > Collected errors: > * opkg_install_cmd: Cannot install package kmod-eeprom-sunxi. > > The issue is also mentioned in the OpenWRT ticket system: > https://dev.openwrt.org/ticket/22675 > > Any idea? An additional comment, there seems to be a commit on trunk regarding this, https://github.com/lede-project/source/commit/be40d0a144937a788fa8902e3 335a25586acaa95 The commit is not merged on the last release. Will try that, but if you have experienced it, would be good to know! Regards, signature.asc Description: This is a digitally signed message part ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev