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 ='context' onchange='this.form.submit();'>space:mode:
authorAndi Shyti <andi.shyti@samsung.com>2016-07-12 19:02:11 +0900
committerMark Brown <broonie@kernel.org>2016-07-14 17:28:20 +0100
commit1ada32ede94fc91ff0f3236fcc70ae74dd0c2cb0 (patch)
treecdd3f7e535a32b1558c66875e38ee78a4254c0c8 /Documentation/devicetree
parentc068042bf0872c9121f4a6eab281dd63f61df5d3 (diff)
spi: s3c64xx: document the clocks and the clock-name property
These two properties were not documented but used in the spi dts. Add the related documentation. Suggested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Reviewed-by: Michael Turquette <mturquette@baylibre.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'Documentation/devicetree')