Forgot to add the files from the previous commit.

There are few helper .sh files for "qemu".
This commit is contained in:
Ivan Davidov 2015-04-18 14:24:49 +03:00
parent 72bd42fd25
commit f39e38b46a
5 changed files with 33 additions and 9 deletions

View File

@ -2,11 +2,11 @@
# #
# http://kernel.org # http://kernel.org
# #
KERNEL_SOURCE_URL=https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.18.6.tar.xz KERNEL_SOURCE_URL=https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.0.tar.xz
# You can find the latest BusyBox source bundles here: # You can find the latest BusyBox source bundles here:
# #
# http://busybox.net # http://busybox.net
# #
BUSYBOX_SOURCE_URL=http://busybox.net/downloads/busybox-1.23.1.tar.bz2 BUSYBOX_SOURCE_URL=http://busybox.net/downloads/busybox-1.23.2.tar.bz2

View File

@ -14,11 +14,10 @@ make defconfig
# Changes the name of the system # Changes the name of the system
sed -i "s/.*CONFIG_DEFAULT_HOSTNAME.*/CONFIG_DEFAULT_HOSTNAME=\"minimal\"/" .config sed -i "s/.*CONFIG_DEFAULT_HOSTNAME.*/CONFIG_DEFAULT_HOSTNAME=\"minimal\"/" .config
# Compile the kernel # Compile the kernel with optimization for "parallel jobs" = "number of processors"
# Good explanation of the different kernels # Good explanation of the different kernels
# http://unix.stackexchange.com/questions/5518/what-is-the-difference-between-the-following-kernel-makefile-terms-vmlinux-vmlinux # http://unix.stackexchange.com/questions/5518/what-is-the-difference-between-the-following-kernel-makefile-terms-vmlinux-vmlinux
# TODO - Suggested by Ronny Kalusniok - test this for parallel compilation: "make bzImage -j $(grep ^processor /proc/cpuinfo)". make bzImage -j $(grep ^processor /proc/cpuinfo | wc -l)
make bzImage
cd ../../.. cd ../../..

View File

@ -15,9 +15,15 @@ make defconfig
# You could do this manually with 'make menuconfig' # You could do this manually with 'make menuconfig'
sed -i "s/.*CONFIG_STATIC.*/CONFIG_STATIC=y/" .config sed -i "s/.*CONFIG_STATIC.*/CONFIG_STATIC=y/" .config
# Compile busybox # Busybox has "RPC networking" enabled in default configuration file.
# TODO - Suggested by Ronny Kalusniok - test this for parallel compilation: "make busybox -j $(grep ^processor /proc/cpuinfo)". # In glibc > 2.14 such support was removed by default.
make busybox # http://lists.busybox.net/pipermail/buildroot/2012-June/055173.html
# It causes failures on glibc toolchains without RPC support.
sed -e 's/.*CONFIG_FEATURE_HAVE_RPC.*/CONFIG_FEATURE_HAVE_RPC=n/' -i .config
sed -e 's/.*CONFIG_FEATURE_INETD_RPC.*/CONFIG_FEATURE_INETD_RPC=n/' -i .config
# Compile busybox with optimization for "parallel jobs" = "number of processors"
make busybox -j $(grep ^processor /proc/cpuinfo | wc -l)
# Create the symlinks for busybox # Create the symlinks for busybox
# It uses the file 'busybox.links' for this # It uses the file 'busybox.links' for this

View File

@ -31,10 +31,27 @@ mount -t devtmpfs none /dev
mount -t proc none /proc mount -t proc none /proc
mount -t sysfs none /sys mount -t sysfs none /sys
ip link set lo up
ip link set eth0 up
udhcpc -b -i eth0 -s /etc/rc.dhcp
EOF EOF
chmod +x bootscript.sh chmod +x bootscript.sh
cat > rc.dhcp << EOF
#!/bin/sh
ip addr add \$ip/\$mask dev \$interface
if [ -n "$router"]; then
ip route add default via \$router dev \$interface
fi
EOF
chmod +x rc.dhcp
cat > welcome.txt << EOF cat > welcome.txt << EOF
##################################### #####################################

View File

@ -8,7 +8,9 @@ cd $(ls -d *)
# Edit Makefile to look for genisoimage instead of mkisofs # Edit Makefile to look for genisoimage instead of mkisofs
sed -i 's/mkisofs/genisoimage/g' arch/x86/boot/Makefile sed -i 's/mkisofs/genisoimage/g' arch/x86/boot/Makefile
make isoimage FDINITRD=../../rootfs.cpio.gz # Generate the ISO image with optimization for "parallel jobs" = "number of processors"
make isoimage FDINITRD=../../rootfs.cpio.gz -j $(grep ^processor /proc/cpuinfo | wc -l)
cp arch/x86/boot/image.iso ../../../minimal_linux_live.iso cp arch/x86/boot/image.iso ../../../minimal_linux_live.iso
cd ../../.. cd ../../..