Skip to content

Commit 47b0323

Browse files
committed
uml config fix
1 parent 19d8b7b commit 47b0323

File tree

6 files changed

+12
-8
lines changed

6 files changed

+12
-8
lines changed

.github/workflows/rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
if: always()
8989
run: |
9090
mkdir /tmp/logs
91-
cp ./strace* uml-ci/slirp* /tmp/logs || true
91+
cp ./strace* /tmp/logs
9292
- uses: actions/upload-artifact@v1
9393
if: always()
9494
with:

ci/linux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if [[ $CI_CGROUPS == "cgroup-v2" ]] && [ -z "${CI_VM+set}" ]; then
1313
sudo apt install sshpass strace
1414
wget http://ftp.debian.org/debian/pool/main/s/slirp/slirp_1.0.17-8_amd64.deb -O slirp.deb && sudo dpkg -i slirp.deb
1515
( cd uml-ci; ./main.sh; )
16-
sudo sshpass -p user ssh -p 2224 user@127.0.0.1 "cat /vagrant/logs.zip | base64" | base64 --decode > logs.zip
16+
#sudo sshpass -p user ssh -p 2224 user@127.0.0.1 "cat logs.zip | base64" | base64 --decode > logs.zip ## WTF IS THIS??
1717
sudo sshpass -p user ssh -p 2224 user@127.0.0.1 sudo poweroff
1818
rm stracez-dummy
1919
unzip logs.zip

uml-ci/main.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,14 @@ tar -xJf linux-5.4.93.tar.xz
1010
cd linux-5.4.93
1111
export ARCH=um
1212
make defconfig
13+
cat >> .config << EOF
14+
CONFIG_CGROUP_PIDS=y
15+
CONFIG_MEMCG=y
16+
CONFIG_MEMCG_SWAP=y
17+
CONFIG_MEMCG_SWAP_ENABLED=y
18+
EOF
1319
make -j3
1420
)
1521
linux-5.4.93/linux mem=4096M ubda=img rootfstype=hostfs init="$PWD"/uml-setup.sh
16-
linux-5.4.93/linux mem=4096M ubda=img root=/dev/ubda1 rootfstype=ext4 hostfs=.. eth0=slirp,,./uml-slirp.sh &
22+
linux-5.4.93/linux mem=4096M ubda=img root=/dev/ubda1 rootfstype=ext4 hostfs=.. eth0=slirp,,./uml-slirp.sh
1723
./uml-ssh.sh

uml-ci/payload.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ export CI_OS=fedora
55
export CI_CGROUPS=cgroup-v2
66
export CI_TARGET=x86_64-unknown-linux-musl
77
export CI_VM=1
8-
bash ci/linux.sh
8+
exec ci/linux.sh

uml-ci/uml-setup.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ echo root:root | chpasswd
1414
ifconfig eth0 10.0.2.15 netmask 255.255.255.0
1515
route add default dev eth0
1616
echo nameserver 10.0.2.3 > /etc/resolv.conf
17-
ifconfig -a > /dev/console
18-
route > /dev/console
1917
exit 0
2018
' > /dev/mnt/etc/rc.d/rc.local
2119
chmod +x /dev/mnt/etc/rc.d/rc.local

uml-ci/uml-ssh.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ while ! echo incompatible | nc 127.0.0.1 2224; do sleep 1; done
66
set -e
77

88
sleep 10
9-
sshpass -p root ssh -v -o 'StrictHostKeyChecking no' -p 2224 root@127.0.0.1 'sed -i '"'"'s/.*wheel.*/#\0/'"'"' /etc/sudoers; sed -i '"'"'s/#*\(.*wheel.*NOPASSWD.*\)/\1/'"'"' /etc/sudoers; adduser -g wheel --uid '"$(id -u)"' user; echo user:user | chpasswd'
10-
sshpass -p user ssh -v -o 'StrictHostKeyChecking no' -p 2224 user@127.0.0.1 'sudo mount -t hostfs hostfs ~; cd; exec uml-ci/payload.sh'
9+
sshpass -p root ssh -o 'StrictHostKeyChecking no' -p 2224 root@127.0.0.1 'sed -i '"'"'s/.*wheel.*/#\0/'"'"' /etc/sudoers; sed -i '"'"'s/#*\(.*wheel.*NOPASSWD.*\)/\1/'"'"' /etc/sudoers; adduser -g wheel --uid '"$(id -u)"' user; echo user:user | chpasswd'
10+
sshpass -p user ssh -o 'StrictHostKeyChecking no' -p 2224 user@127.0.0.1 'sudo mount -t hostfs hostfs ~; cd; exec uml-ci/payload.sh'

0 commit comments

Comments
 (0)