Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lscpu doesn't work #240

Closed
petkar opened this issue Jul 24, 2020 · 4 comments
Closed

lscpu doesn't work #240

petkar opened this issue Jul 24, 2020 · 4 comments

Comments

@petkar
Copy link

petkar commented Jul 24, 2020

lscpu command doesn't work. Adding the string -b /sys/devices/system/cpu/:/sys/devices/system/cpu/ to proot or just binding sys should fix it. Any particular reason it wasn't bound by default?

@SDRausty
Copy link
Owner

This commit TermuxArch/TermuxArch@5a07639 fixes it. startarch s user lscpu can be used to test it. Thank you for sharing @petkar.

@petkar
Copy link
Author

petkar commented Jul 25, 2020

I'm thankful, but doing setupTermuxArch.sh r breaks my display by locking x. This happened twice until now and I wasn't able to determine the cause.
This should give some insight. I'll be sure to test it on another device.

@SDRausty
Copy link
Owner

We can open the gens folder once more for development if we think it will assist; What is the output of the startarch that works best?

[08:38TermuxArch]$ grep exec\ proot ~/arch/startarch
exec proot --kill-on-exit --link2symlink -0 -r /data/data/com.termux/files/home/arch -b /apex:/apex -b /dev/ashmem:/dev/ashmem -b /storage/:/storage/ -b /data/data/com.termux/files/home:/data/data/com.termux/files/home -b /sdcard:/sdcard -b /data/data/com.termux/files/usr:/data/data/com.termux/files/usr -b /proc/:/proc/ -b /vendor/:/vendor/ -b /system/:/system/ -b /data/data/com.termux/files/home/arch/tmp:/dev/shm -b /data/data/com.termux/files/home/arch/var/binds/fbindprocstat:/proc/stat -b /sys/:/sys/ -b /dev/:/dev/ -w "$PWD" /usr/bin/env -i HOME=/root TERM="$TERM" ANDROID_DATA=/data  /bin/bash -l ||:
exec proot --kill-on-exit --link2symlink -0 -r /data/data/com.termux/files/home/arch -b /apex:/apex -b /dev/ashmem:/dev/ashmem -b /storage/:/storage/ -b /data/data/com.termux/files/home:/data/data/com.termux/files/home -b /sdcard:/sdcard -b /data/data/com.termux/files/usr:/data/data/com.termux/files/usr -b /proc/:/proc/ -b /vendor/:/vendor/ -b /system/:/system/ -b /data/data/com.termux/files/home/arch/tmp:/dev/shm -b /data/data/com.termux/files/home/arch/var/binds/fbindprocstat:/proc/stat -b /sys/:/sys/ -b /dev/:/dev/ -w "$PWD" /usr/bin/env -i HOME=/root TERM="$TERM" ANDROID_DATA=/data  /bin/bash -lc "$ar2ar" ||:
exec proot --kill-on-exit -0 -r /data/data/com.termux/files/home/arch -b /apex:/apex -b /dev/ashmem:/dev/ashmem -b /storage/:/storage/ -b /data/data/com.termux/files/home:/data/data/com.termux/files/home -b /sdcard:/sdcard -b /data/data/com.termux/files/usr:/data/data/com.termux/files/usr -b /proc/:/proc/ -b /vendor/:/vendor/ -b /system/:/system/ -b /data/data/com.termux/files/home/arch/tmp:/dev/shm -b /data/data/com.termux/files/home/arch/var/binds/fbindprocstat:/proc/stat -b /sys/:/sys/ -b /dev/:/dev/ -w "$PWD" /usr/bin/env -i HOME=/root TERM="$TERM" ANDROID_DATA=/data  /bin/su - "$ar2ar" ||:
exec proot --kill-on-exit --link2symlink -0 -r /data/data/com.termux/files/home/arch -b /apex:/apex -b /dev/ashmem:/dev/ashmem -b /storage/:/storage/ -b /data/data/com.termux/files/home:/data/data/com.termux/files/home -b /sdcard:/sdcard -b /data/data/com.termux/files/usr:/data/data/com.termux/files/usr -b /proc/:/proc/ -b /vendor/:/vendor/ -b /system/:/system/ -b /data/data/com.termux/files/home/arch/tmp:/dev/shm -b /data/data/com.termux/files/home/arch/var/binds/fbindprocstat:/proc/stat -b /sys/:/sys/ -b /dev/:/dev/ -w "$PWD" /usr/bin/env -i HOME=/root TERM="$TERM" ANDROID_DATA=/data  /bin/"$ar2ar" ||:
exec proot --kill-on-exit -0 -r /data/data/com.termux/files/home/arch -b /apex:/apex -b /dev/ashmem:/dev/ashmem -b /storage/:/storage/ -b /data/data/com.termux/files/home:/data/data/com.termux/files/home -b /sdcard:/sdcard -b /data/data/com.termux/files/usr:/data/data/com.termux/files/usr -b /proc/:/proc/ -b /vendor/:/vendor/ -b /system/:/system/ -b /data/data/com.termux/files/home/arch/tmp:/dev/shm -b /data/data/com.termux/files/home/arch/var/binds/fbindprocstat:/proc/stat -b /sys/:/sys/ -b /dev/:/dev/ -w "$PWD" /usr/bin/env -i HOME=/root TERM="$TERM" ANDROID_DATA=/data  /bin/su - "$2" -c "$ar3ar" ||:

Is the option:

[08:41TermuxArch]$ bash setupTermuxArch.bash h|grep loom
 [b[loom]] Create and run a local copy of TermuxArch in TermuxArchBloom. Useful for running a customized setupTermuxArch.bash locally, for developing and hacking TermuxArch.

helping in development of the PRoot init statement?

@petkar
Copy link
Author

petkar commented Jul 25, 2020

After trying to reproduce the issue on another device, I realized this wasn't an issue with proot statement, but entirely my fault. The error was caused because I had installed zsh, and the .bashrc and .profile (which happens to be important) wasn't exported. As a result the locales got messed, the bin got unlinked, path and gpgtty removed, and effectively broke xauth. The solution was to load .profile by adding [[ -e ~/.profile ]] && emulate sh -c 'source ~/.profile' in .zshrc
Edit : It works perfectly now.

Edit 2 : This is not the case. This only fixed the missing bin like pci and keys. xauth remains locked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants