This document describes one way to create the initrd directory hierarchy in order to allow an initrd to be built into your kernel. The trick here is to steal the initrd file used on your Linux laptop, Ubuntu in this case. There are probably much better ways of doing this. That said, here are the commands: ------------------------------------------------------------------------ cd tools/testing/selftests/rcutorture zcat /initrd.img > /tmp/initrd.img.zcat mkdir initrd cd initrd cpio -id < /tmp/initrd.img.zcat ------------------------------------------------------------------------ Another way to create an initramfs image is using "dracut"[1], which is available on many distros, however the initramfs dracut generates is a cpio archive with another cpio archive in it, so an extra step is needed to create the initrd directory hierarchy. Here are the commands to create a initrd directory for rcutorture using dracut: ------------------------------------------------------------------------ dracut --no-hostonly --no-hostonly-cmdline --module "base bash shutdown" /tmp/initramfs.img cd tools/testing/selftests/rcutorture mkdir initrd cd initrd /usr/lib/dracut/skipcpio /tmp/initramfs.img | zcat | cpio -id < /tmp/initramfs.img ------------------------------------------------------------------------ Interestingly enough, if you are running rcutorture, you don't really need userspace in many cases. Running without userspace has the advantage of allowing you to test your kernel independently of the distro in place, the root-filesystem layout, and so on. To make this happen, put the following script in the initrd's tree's "/init" file, with 0755 mode. ------------------------------------------------------------------------ #!/bin/sh [ -d /dev ] || mkdir -m 0755 /dev [ -d /root ] || mkdir -m 0700 /root [ -d /sys ] || mkdir /sys [ -d /proc ] || mkdir /proc [ -d /tmp ] || mkdir /tmp mkdir -p /var/lock mount -t sysfs -o nodev,noexec,nosuid sysfs /sys mount -t proc -o nodev,noexec,nosuid proc /proc # Some things don't work properly without /etc/mtab. ln -sf /proc/mounts /etc/mtab # Note that this only becomes /dev on the real filesystem if udev's scripts # are used; which they will be, but it's worth pointing out if ! mount -t devtmpfs -o mode=0755 udev /dev; then echo "W: devtmpfs not available, falling back to tmpfs for /dev" mount -t tmpfs -o mode=0755 udev /dev [ -e /dev/console ] || mknod --mode=600 /dev/console c 5 1 [ -e /dev/kmsg ] || mknod --mode=644 /dev/kmsg c 1 11 [ -e /dev/null ] || mknod --mode=666 /dev/null c 1 3 fi mkdir /dev/pts mount -t devpts -o noexec,nosuid,gid=5,mode=0620 devpts /dev/pts || true mount -t tmpfs -o "nosuid,size=20%,mode=0755" tmpfs /run mkdir /run/initramfs # compatibility symlink for the pre-oneiric locations ln -s /run/initramfs /dev/.initramfs # Export relevant variables export ROOT= export ROOTDELAY= export ROOTFLAGS= export ROOTFSTYPE= export IP= export BOOT= export BOOTIF= export UBIMTD= export break= export init=/sbin/init export quiet=n export readonly=y export rootmnt=/root export debug= export panic= export blacklist= export resume= export resume_offset= export recovery= for i in /sys/devices/system/cpu/cpu*/online do case $i in '/sys/devices/system/cpu/cpu0/online') ;; '/sys/devices/system/cpu/cpu*/online') ;; *) echo 1 > $i ;; esac done while : do sleep 10 done ------------------------------------------------------------------------ References: [1]: https://dracut.wiki.kernel.org/index.php/Main_Page [2]: http://blog.elastocloud.org/2015/06/rapid-linux-kernel-devtest-with-qemu.html [3]: https://www.centos.org/forums/viewtopic.php?t=51621 nel'>diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2017-01-31 23:58:38 +0100
committerIngo Molnar <mingo@kernel.org>2017-02-01 08:37:27 +0100
commitdd86e373e09fb16b83e8adf5c48c421a4ca76468 (patch)
tree55703c2ea8584e303e342090614e0aab3509ab21 /sound/aoa/soundbus/Makefile
parent0b3589be9b98994ce3d5aeca52445d1f5627c4ba (diff)
perf/x86/intel/rapl: Make package handling more robust
The package management code in RAPL relies on package mapping being available before a CPU is started. This changed with: 9d85eb9119f4 ("x86/smpboot: Make logical package management more robust") because the ACPI/BIOS information turned out to be unreliable, but that left RAPL in broken state. This was not noticed because on a regular boot all CPUs are online before RAPL is initialized. A possible fix would be to reintroduce the mess which allocates a package data structure in CPU prepare and when it turns out to already exist in starting throw it away later in the CPU online callback. But that's a horrible hack and not required at all because RAPL becomes functional for perf only in the CPU online callback. That's correct because user space is not yet informed about the CPU being onlined, so nothing caan rely on RAPL being available on that particular CPU. Move the allocation to the CPU online callback and simplify the hotplug handling. At this point the package mapping is established and correct. This also adds a missing check for available package data in the event_init() function. Reported-by: Yasuaki Ishimatsu <yasu.isimatu@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sebastian Siewior <bigeasy@linutronix.de> Cc: Stephane Eranian <eranian@google.com> Cc: Vince Weaver <vincent.weaver@maine.edu> Fixes: 9d85eb9119f4 ("x86/smpboot: Make logical package management more robust") Link: http://lkml.kernel.org/r/20170131230141.212593966@linutronix.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'sound/aoa/soundbus/Makefile')