Received: from mail.regrow.earth (mail.regrow.earth [IPv6:2a00:f48:1003:1::964:b26d]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id 0F69A2236F4 for <~alpine/users@lists.alpinelinux.org>; Tue, 17 Jan 2023 16:42:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=regrow.earth; s=2021-03-15_regrow.earth; t=1673973740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EBxjWsMvSQVf+18OmXGjebDc36uKx2i6k/SInyD2044=; b=XUJVO+2/i5B5YHJ9LuWudtoewAkjgbpoQaPdzOZoVC4dkn9Z6BIMFsZm1li2gMvlRtHa+O 8LKU6ldFeL01h8GjLt+87jgdlwPk4C8mzsFfXA+qyE99XoiyvIb/AKx2C4WXx3EPdsKfYG w0baCf6HDUFP2cRPN9sapQ4WxOuFn1IyOP2jZ/cd8+Z3Xwk43NA26zEFeQ1ZIufTxKysJ1 fK4DaB71EYHIJw0HM/sNyidDidJMz1aEKw1b4qKdhye9bhtF8HFhZZGw4iMu+IWyFr/Qaw C9aw8uhuBygwFnYhi2OHJ6EKaxKV3AjdbmwEwWGLX3mlrwjq69Q+GEDBP2rpvQ== Received: by mail.regrow.earth (OpenSMTPD) with ESMTPSA id 167d87d4 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 17 Jan 2023 17:42:20 +0100 (CET) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 17 Jan 2023 17:42:19 +0100 Message-Id: Cc: <~alpine/users@lists.alpinelinux.org> Subject: Re: loading an apkovl from an external USB stick From: "Unicorn" To: "Konstantin Kulikov" X-Mailer: aerc 0.14.0 References: In-Reply-To: Unfortunately no luck with this, tried with all kinds of different apkovl-strings again. Is it possible that the type of USB stick makes a difference here? It is a USB 3.0 stick. Alpine recognizes it when it is fully booted, but perhaps in this earlier stage of boot not all the drivers are loaded? Or could it have something to do with U-Boot or the dtb perhaps? Best, Edin On Tue Jan 17, 2023 at 3:23 PM CET, Konstantin Kulikov wrote: > nlplug-findfs: found apkovl /media/mmcblk0p1/alpine.apkovl.tar.gz > nlplug-findfs: FOUND! setting timeout to 0 > ... > nlplug-findfs: exit due to timeout (0) > > Try removing apkovl from mmc and increasing timeout "usbdelay=3D10" > > On Tue, Jan 17, 2023 at 1:40 PM Unicorn wrote: > > > > Thank you Konstantin for these pointers! > > > > The code is indeed too hard for me to understand at a glance, so I > > examined the debug output first. The first thing that I noticed is that > > there is absolutely no mention of the sda or sda1 device in the entire > > process, so I assume that the device either does not get recognized or > > it gets ignored for some reason. > > > > I looked for anything related to USB and found that nlplug-findfs does > > look for USB devices in /sys/bus/usb/devices: > > > > "nlplug-findfs: trigger_thread: scanning /sys/bus/usb/devices" > > > > However while other things like the microSD card mmcblk0, the internal > > eMMC mmcblk1 and the SPI flash are found, the sda device never appears. > > Could this be a driver issue perhaps? > > > > Here is the full boot output for anybody interested to help: > > https://paste.debian.net/hidden/04716725/ > > > > Best, > > Edin > > > > On Tue Jan 17, 2023 at 6:44 AM CET, Konstantin Kulikov wrote: > > > initramfs-init calls nlplugfs[0] which finds apkovls on disks. Its > > > code[1] is a bit hard to understand, but it has many debug statements > > > so try to add "debug_init=3D1" to kernel cmdline and continue from > > > there. > > > > > > [0]: https://git.alpinelinux.org/mkinitfs/tree/initramfs-init.in#n581 > > > [1]: https://git.alpinelinux.org/mkinitfs/tree/nlplug-findfs/nlplug-f= indfs.c > > > > > > On Sun, Jan 15, 2023 at 11:21 PM Unicorn wrote= : > > > > > > > > Hello, > > > > > > > > I am trying to learn to make proper use of the power of lbu and apk= ovl with my ARM SBC, but I am confused by a few things here. > > > > Firstly, the "apkovl" kernel cmdline option is quite poorly documen= ted, at least I could only find one somewhat complete documentation in the = wiki, in the PXE boot article [0]. However I do not seem to be able to get = one of the mentioned formats to work. > > > > > > > > A bit of background: I have the generic ARM archive extracted to mm= cblk0p1, so it boots from that partition. I then tried to save/load the apk= ovl file from the second partition, mmcblk0p2. I was able to achieve this w= ith the following kernel cmdline option: > > > > apkovl=3D/media/mmcblk0p2/myhostname.apkovl.tar.gz > > > > > > > > I assume that this only works because the partition is automaticall= y mounted there at boot. If somebody can also explain what determines which= partitions get automatically mounted, please enlighten me, because this is= already quite confusing to me. :) > > > > > > > > Now I tried to save/load the apkovl from an external USB stick on t= he sda1 partition. I noticed that this partition does NOT get automatically= mounted in /media/, so the previous solution does not work. However the ot= her formats that are mentioned in the abovementioned article [0] also do no= t work. I tried the following: > > > > apkovl=3Dsda1 > > > > apkovl=3Dsda1:vfat:/myhostname.apkovl.tar.gz > > > > apkovl=3Dsda1:vfat:myhostname.apkovl.tar.gz > > > > apkovl=3Dsda1:myhostname.apkovl.tar.gz > > > > > > > > These should work according to the explanation on that page, but do= not. > > > > > > > > I asked on IRC and ikke linked the code of the initramfs-init.in fi= le of mkinitfs to me [1], however I do not see support for this syntax in t= hat file. So either the wiki is wrong here, or this is already handled by s= omething else before the $KOPT_apkovl variable gets used by the script. > > > > > > > > I would really appreciate advice on how the automatic mounting of p= artitions in /media/ actually works and how the apkovl option is correctly = used. I'll happily contribute my learnings back to the wiki. :) > > > > > > > > Thanks, > > > > Edin > > > > > > > > [0] https://wiki.alpinelinux.org/wiki/PXE_boot > > > > [1] https://gitlab.alpinelinux.org/alpine/mkinitfs/-/blob/master/in= itramfs-init.in#L42 > >