wok-next rev 20424

linux-dev: move creation to compile_rules(), keep genpkg_rules() for copying/splitting only
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Jan 12 17:02:57 2018 +0200 (2018-01-12)
parents 3ae7a9a4ea36
children c889fe7a9d54
files linux-dev/receipt
line diff
     1.1 --- a/linux-dev/receipt	Fri Jan 12 15:30:38 2018 +0200
     1.2 +++ b/linux-dev/receipt	Fri Jan 12 17:02:57 2018 +0200
     1.3 @@ -125,7 +125,30 @@
     1.4  CONFIG_TUN=y
     1.5  EOF
     1.6  	make ARCH=um allnoconfig KCONFIG_ALLCONFIG=mini.config &&
     1.7 -	make ARCH=um
     1.8 +	make ARCH=um || return 1
     1.9 +
    1.10 +	mkdir -p $install/boot
    1.11 +	cp $src/linux $install/boot/linux-uml-$VERSION
    1.12 +	cat > $install/boot/vm-uml <<EOT
    1.13 +#!/bin/sh
    1.14 +
    1.15 +# /etc/inittab: "tty21::respawn:/bin/su -c '/boot/vm-uml 1 /boot/guests/slitaz.img 2 512m' nobody"
    1.16 +n=\${1:-0}
    1.17 +tap=tap\$n
    1.18 +args="rw root=/dev/null"
    1.19 +dev="initrd=\$(ls -r /boot/rootfs*.gz | sed q)"
    1.20 +if [ -n "\$2" ]; then
    1.21 +	args="ro root=620\${3:-1} screen=text sound=noconf"
    1.22 +	dev="ubd0=\$2"
    1.23 +fi
    1.24 +
    1.25 +cd \$(dirname \$0)
    1.26 +ifconfig \$tap 192.168.\$n.1
    1.27 +./linux-uml-$VERSION \$dev mem=\${4:-512m} fakehd fake_ide ubd=3 con0=fd:0,fd:1 \\
    1.28 +	con=pts ssl=pts eth0=tuntap,\$tap,fe:f0:00:00:00:0\$n,192.168.\$n.1 \\
    1.29 +	\$args cpuinfo=\$(sed '/model name/!d;s/.*: //;s/ /_/g;q' /proc/cpuinfo)
    1.30 +EOT
    1.31 +	chmod 755 $install/boot/vm-uml
    1.32  }
    1.33  
    1.34  
    1.35 @@ -147,28 +170,7 @@
    1.36  		PROVIDE="linux-headers linux64-api-headers linux64-headers"
    1.37  		;;
    1.38  	linux-uml)
    1.39 -		mkdir -p $fs/boot
    1.40 -		cp $src/linux $fs/boot/linux-uml-$VERSION
    1.41 -		cat > $fs/boot/vm-uml <<EOT
    1.42 -#!/bin/sh
    1.43 -
    1.44 -# /etc/inittab: "tty21::respawn:/bin/su -c '/boot/vm-uml 1 /boot/guests/slitaz.img 2 512m' nobody"
    1.45 -n=\${1:-0}
    1.46 -tap=tap\$n
    1.47 -args="rw root=/dev/null"
    1.48 -dev="initrd=\$(ls -r /boot/rootfs*.gz | sed q)"
    1.49 -if [ -n "\$2" ]; then
    1.50 -	args="ro root=620\${3:-1} screen=text sound=noconf"
    1.51 -	dev="ubd0=\$2"
    1.52 -fi
    1.53 -
    1.54 -cd \$(dirname \$0)
    1.55 -ifconfig \$tap 192.168.\$n.1
    1.56 -./linux-uml-$VERSION \$dev mem=\${4:-512m} fakehd fake_ide ubd=3 con0=fd:0,fd:1 \\
    1.57 -	con=pts ssl=pts eth0=tuntap,\$tap,fe:f0:00:00:00:0\$n,192.168.\$n.1 \\
    1.58 -	\$args cpuinfo=\$(sed '/model name/!d;s/.*: //;s/ /_/g;q' /proc/cpuinfo)
    1.59 -EOT
    1.60 -		chmod 755 $fs/boot/vm-uml
    1.61 +		copy boot/
    1.62  		;;
    1.63  	esac
    1.64  }