X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from ncopa-laptop.res.nor.wtbts.net (3.203.202.84.customer.cdi.no [84.202.203.3]) (using SSLv3 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: nc@alpinelinux.org) by mail.alpinelinux.org (Postfix) with ESMTPSA id 28914DC011F; Tue, 26 Feb 2013 20:45:52 +0000 (UTC) Date: Tue, 26 Feb 2013 21:45:49 +0100 From: Natanael Copa To: =?UTF-8?Q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9?= 'Rush' =?UTF-8?Q?=D0=9D=D0=B5=D0=BF=D0=BE=D0=BC=D0=BD=D1=8F=D1=89=D0=B8=D0=B9?= Cc: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] mkinitfs initramfs-init questions Message-ID: <20130226214549.3e82b644@ncopa-laptop.res.nor.wtbts.net> In-Reply-To: References: X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.15; i686-pc-linux-gnu) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, 26 Feb 2013 12:51:29 +0400 =D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9 'Rush' =D0=9D=D0=B5=D0=BF=D0=BE= =D0=BC=D0=BD=D1=8F=D1=89=D0=B8=D0=B9 wrote: > There are some magic when parsing kernel command line (at the end of > message): >=20 > 1. Which reason for doing sed 's: :_:g' ? What command line will be > affected this for example? git blame pointed me to this commit: http://git.alpinelinux.org/cgit/mkinitfs/commit/?id=3Dbcc5a38b9849411a880d8= b65771b30042aa7ce62 I had an issue with parsning acpi_osi=3D"!Windows 2006". While there I probably added the sed 's: :_:g' out of paranoia, in case kernel or anything would have a param with spaces. somenewopt:"arg with space" I doubt there are anything current that actually needs it. It was more for future, unexpected things. > 2. Syslinux (5.x) pass kernel path as the first arg (twice in my > case). This code run with errors "/init: eval: line 1: > KOPT_/boot/datacom=3Dyes: not found". This a bug or feature? Bug/regression due to new syslinux behaviour. I have similar issue on my computer too. Just not had time to actually fix it. > 3. I've passed console=3Dtty0 console=3DttyS1,115200 for my Ubuntu kernels > on Dell servers with IPMI SOL to see kernel output both on IP KVM and > IPMI SOL (because not everywhere I have both). I think tty0 must not > be placed in inittab, because it is "current console". Seems like a > bug? Yeah. this sounds like bug. > 4. Code looks overcomplicated because there are > a) not many options to be parsed by initramfs-init > b) not all kernel options must be parsed by initramfs-init, unknown > options must be skipped (and errors as in #2 will not be raised in the > future) Agree. We should only fish out the options we actually use and don't bother about the rest. I have one more example where current code will break things: cirrus.modeset=3D0 >=20 > 8<-----------------------------------------------------------------------= -------------------->8 > # read the kernel options. We use eval set so we can handle things > like # acpi_osi=3D"!Windows 2006" > eval set -- `cat /proc/cmdline` >=20 > while [ $# -gt 0 ]; do > case "$1" in > s|single|1) > SINGLEMODE=3Dyes ;; > console=3D*) > CONSOLE=3D"$CONSOLE ${1#console=3D}";; > *=3D*) eval "KOPT_${1%%=3D*}=3D'${1#*=3D}'" ;; > no*) eval "KOPT_$(echo ${1#no} | sed > 's: :_:g')=3Dno" ;; *) eval "KOPT_$(echo $1 | sed > 's: :_:g')=3Dyes" ;; esac > shift > done > 8<-----------------------------------------------------------------------= -------------------->8 >=20 > / # cat /proc/cmdline > /boot/datacom /boot/datacom initrd=3D/boot/datacom.gz > alpine_dev=3Dusbdisk:vfat modules=3Dloop,squashfs,sd-mod,usb-storage > nomodeset console=3Dtty0 console=3DttyS1,115200 Thanks for your feedback, and sorry for the breakages due to syslinux-5. -nc --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---