Comments (9)
Now, in order to improve compatibility, I was wondering whether it would make sense to add support for the /proc/hardware pseudo file to qemu-user as well? Of course, this would apply to qemu-user on Linux only.
Yes, it's easy to add.
We need the same thing for sparc glibc(?) installer that checks /proc/cpuinfo to know if the system is sun4v or sun4u.
from qemu-m68k.
I have pushed a patch in my branch linux-user-proc.
The model that is reported is "qemu-m68k", let me know if there is any problem with that.
# uname -a
Linux Quad 4.17.9-200.fc28.x86_64 #1 SMP Mon Jul 23 21:41:29 UTC 2018 m68k GNU/Linux
# cat /proc/hardware
Model: qemu-m68k
from qemu-m68k.
Have you tried whether this allows installing the console-setup
package?
from qemu-m68k.
Yes, it works but it asks to "select the model of the keyboard of this machine", I don't know if it could be a problem or not.
from qemu-m68k.
Most likely not since the package will be installed with debconf
in non-interactive mode during package builds. I'll test that tomorrow.
from qemu-m68k.
I should finally test this.
from qemu-m68k.
Without the patch:
(sid-m68k-sbuild)root@nofan:/# export DEBIAN_FRONTEND=noninteractive ; apt install keyboard-configuration
Reading package lists... Done
Building dependency tree
Reading state information... Done
(...)
Selecting previously unselected package keyboard-configuration.
(Reading database ... 19725 files and directories currently installed.)
Preparing to unpack .../keyboard-configuration_1.187_all.deb ...
Unpacking keyboard-configuration (1.187) ...
Setting up keyboard-configuration (1.187) ...
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
/bin/sed: can't read /proc/hardware: No such file or directory
dpkg: error processing package keyboard-configuration (--configure):
installed keyboard-configuration package post-installation script subprocess returned error exit status 2
Processing triggers for man-db (2.8.4-3) ...
Not building database; man-db/auto-update is not 'true'.
Errors were encountered while processing:
keyboard-configuration
E: Sub-process /usr/bin/dpkg returned an error code (1)
(sid-m68k-sbuild)root@nofan:/#
With the (rebased) patch applied:
(sid-m68k-sbuild)root@nofan:/# export DEBIAN_FRONTEND=noninteractive ; apt install keyboard-configuration
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
keyboard-configuration
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/397 kB of archives.
After this operation, 2575 kB of additional disk space will be used.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:en",
LC_ALL = "en_US.UTF-8",
LC_CTYPE = "en_US.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
debconf: delaying package configuration, since apt-utils is not installed
E: Can not write log (Is /dev/pts mounted?) - posix_openpt (19: No such device)
Selecting previously unselected package keyboard-configuration.
(Reading database ... 14921 files and directories currently installed.)
Preparing to unpack .../keyboard-configuration_1.187_all.deb ...
Unpacking keyboard-configuration (1.187) ...
Setting up keyboard-configuration (1.187) ...
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Processing triggers for man-db (2.8.4-3) ...
Not building database; man-db/auto-update is not 'true'.
(sid-m68k-sbuild)root@nofan:/#
So, it fixes the issue for me. Can we get it upstreamed?
from qemu-m68k.
I have used this rebased version:
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 280137da8c..4042b75942 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6694,7 +6694,7 @@ static int is_proc_myself(const char *filename, const char *entry)
return 0;
}
-#if defined(HOST_WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)
+#if defined(HOST_WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN) || defined(TARGET_M68K)
static int is_proc(const char *filename, const char *entry)
{
return strcmp(filename, entry) == 0;
@@ -6738,6 +6738,14 @@ static int open_net_route(void *cpu_env, int fd)
}
#endif
+#if defined(TARGET_M68K)
+static int open_hardware(void *cpu_env, int fd)
+{
+ dprintf(fd, "Model:\t\tqemu-m68k\n");
+ return 0;
+}
+#endif
+
static int do_openat(void *cpu_env, int dirfd, const char *pathname, int flags, mode_t mode)
{
struct fake_open {
@@ -6754,6 +6762,9 @@ static int do_openat(void *cpu_env, int dirfd, const char *pathname, int flags,
#if defined(HOST_WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)
{ "/proc/net/route", open_net_route, is_proc },
#endif
+#if defined(TARGET_M68K)
+ { "/proc/hardware", open_hardware, is_proc },
+#endif
{ NULL, NULL, NULL }
};
from qemu-m68k.
added by 4ab6713 ("linux-user: add pseudo /proc/hardware for m68k")
from qemu-m68k.
Related Issues (20)
- cmake 3.11.x lockups qemu-m68k and qemu-sh4 HOT 4
- R does not work properly with upstream, works with qemu-m68k HOT 2
- Firebird3.0 crashes with 'mutex pthread_mutex_init error, status = 95'
- gedit crashes with 'qemu:handle_cpu_signal received signal outside vCPU context' HOT 8
- piglit fails to build on qemu-m68k, python crashing with 'Illegal Instruction'
- util/memfd.c:40:12: error: static declaration of ‘memfd_create’ follows non-static declaration HOT 1
- ERROR: sizeof(size_t) doesn't match GLIB_SIZEOF_SIZE_T. You probably need to set PKG_CONFIG_LIBDIR to point to the right pkg-config files for your build target HOT 2
- aptitude crashes with 'qemu:handle_cpu_signal received signal outside vCPU context' HOT 10
- Missing libraries for static build of m68k-linux-user HOT 4
- Serial console no longer works with Quadra 800 emulation HOT 14
- Linux kernel boot fails when trying to use more than 1000MB of memory (i.e. 1024MB) HOT 4
- qemu_system_reset_request declaration missmatch when compiling with -flto HOT 2
- When trying to copy paste big amount of text into qemu, Linux pmz drivers freaks out
- SONIC interrupt mapping
- Guest memory corrupted by incoming network packets HOT 10
- dp83932 stops working after a short while HOT 3
- meson 0.55.3 HOT 1
- trapcs instruction causes the non-execution of the following 2 instructions HOT 2
- Screen does not update properly when playing 'Prince of Persia' in 256 color on qemu-m68k
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qemu-m68k.