2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 11:44:01 +08:00
linux-next/usr
Sally, Gene 3b1ec9fb81 kbuild: gen_init_cpio expands shell variables in file names
Modify gen_init_cpio so that lines that specify files can contain
what looks like a shell variable that's expanded during processing.

For example:

   file /sbin/kinit ${RFS_BASE}/usr/src/klibc/kinit/kinit 0755 0 0

given RFS_BASE is "/some/directory" in the environment

would be expanded to

   file /sbin/kinit /some/directory/usr/src/klibc/kinit/kinit 0755 0 0

If several environment variables appear in a line, they are all expanded
with processing happening from left to right.
Undefined variables expand to a null string.
Syntax errors stop processing, letting the existing error handling
show the user offending line.

This patch helps embedded folks who frequently create several
RFS directories and then switch between them as they're tuning
an initramfs.

Signed-off-by: gene.sally@timesys.com
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-12-03 21:32:03 +01:00
..
.gitignore .gitignore update 2007-07-16 09:05:52 -07:00
gen_init_cpio.c kbuild: gen_init_cpio expands shell variables in file names 2008-12-03 21:32:03 +01:00
initramfs_data.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Kconfig usr/Kconfig: fix typo 2007-05-02 20:58:11 +02:00
Makefile [PATCH] disable init/initramfs.c 2007-02-11 10:51:25 -08:00