Qemu-ARM user emulation. Error when using Go - linux

I want to customize an image I created for an ARM device (Odroid C1+). Especially I want to checkout some git repositories and install their dependencies.
But when installing go libraries, this bug is happening: https://github.com/golang/go/issues/13024
Is there a workaround? Or do you know another user emulator (or similar) to do this?

A workaround would be to use full system emulation in QEMU - just find an ARM kernel that boots in qemu-system-arm and instead of chrooting into the file system from the host, do it from within QEMU.

Related

xcodebuild issues when linux is mounted on mac (Since /var/root comes into picture when using this way)

Use case is something like this. We need to use the Bluez BT stack on linux. There is also dependency of an iOS app that controls BT testing on iOS (On mac). The execution flow triggers mounting of the file system from linux onto mac and tries to build the xcode project and use the .app file that gets generated after the build is successful
If the xcode build command is run manually on Mac directly, there is no problem
xcodebuild test-without-building -project ios_bluetooth/ios_bluetooth.xcodeproj/ -scheme
ios_bluetooth -destination id=uuid -only-
testing:ios_bluetoothUITests CONFIGURATION_BUILD_DIR=./Build/Products/Debug-iphoneos -
derivedDataPath ./ios_bluetooth/DerivedData/ arguments=TESTS_STA_BLUETOOTH_ON
From Linux, after the mount, by default it mounts to /var/root/ProjectFolder/Dependencies. Running the xcodebuild command results in issues in terms of permission. Issue can be see even if logged in as root on mac. Is there a way to circumvent this issue and get the xcode project to build? Any help in this regard is appreciated.

Surface book keyboard won't work in scientific Linux

I installed scientific linux 7.4(based on redhat 7.4) in my surface book. My touch pad is working correctly but the problem is the keyboard won't work in this OS. I also found that an external usb keyboard works correctly with it. I have Ubuntu and Windows beside this OS, but I don't have any problem with them. How can I fix this problem?
According to https://www.reddit.com/r/linux/comments/6ca920/ms_surface_keyboard_does_it_play_nice_with_linux/
you would need at least 4.10 kernel for the surface to work properly.
The kernel version in your system can be obtained by uname -rv in the terminal.
The easiest solution is to update the kernel / linux-firmware package from your distro package manager.
If this does not work, probably you would need to reconfigure or update and reconfigure the kernel (e.g. to the latest stable mainline from https://www.kernel.org/)
A nice guide for configuration can be found here https://www.dotslashlinux.com/2017/09/11/the-linux-kernel-configuration-guide-part-11/

Patching and compiling kernel, in which directory

I'm trying to apply a patch to my kernel source with limited success. The target machine is really some ARM device, but I haven't compiled a kernel before so I thought I'd start with an x86_64 kernel. This has been only marginally easier :)
Now, according to some tutorials, it seemed like we should use the source in /usr/src/linux-something. But when I tried to patch there I got
File Documentation/sysrq.txt is read-only; trying to patch anyway
patch: **** Can't create temporary file Documentation/sysrq.txt.oG1oiZW : Permission denied
even under sudo. So I tried just copying the patch and the linux source folder to my home directory and patched it from there. This worked. Why is this and will this have any weird side effects when compiling?
It seems you have no permission to /usr/src/linux-something. Download kernel source, put it anywere you could, then patch & compile it.
Build a x86_64 arch kernel from source which downloaded from kernel.org is well, if you wanna build an arm arch kernel for a special board, use buildroot or openwrt is better.
The package manager for some distributions installs the kernel source in /usr/src and distribution-specific build scripts may assume that the source is in that directory.
However, if you download vanilla kernel source from kernel.org, you should be able to build it anywhere.

Install rpm or dpkg with no package manager in embedded Linux

I need to add new functionality to a chinese Linux-based time attendance clock. More specifically I need to make It SNMP capable, which is not available by factory default.
After some research I found a login:password which worked for the TelNet login and managed to get inside the system with root privileges.
The first thing I did was to figure out which Linux distro was It running:
cat /etc/issue throws this:
"PXA Linux Preview Kit
Kernel 2.6.29 on armv5tejl"
I did a quick google search and found that
"PXA Linux is a port of the Linux kernel for PXA based processor based devices and machines."
I dont understand why It's running a PXA Linux Preview Kit on an armv5tejl.
I gave no importance to this fact, and got to the next step: finding which package manager has this system:
I tried several commands:
apt-get, aptitude, rpm, dpkg, yum, slapt-get, ipkg, and several others. None of them worked.
I found that the system had Busybox installed. More specifically BusyBox 1.15.3. In this BusyBox I couldnt find any of those commands. I found that BusyBox does implement rpm and dpkg but this version doesnt have them.
The only command which seems to be "software installation related" I found was the command "install". From BusyBox docs:
"install [-cdDsp] [-o USER] [-g GRP] [-m MODE] [source] dest|directory
Copy files and set attributes"
But probably it doesnt replace the package manager tool. I think that I need to get a way to install dpkg or rpm, and then use them to install the SNMP packages I want. As I read, the lowest level package installation tool is dpkg so I don't have a clue on where to begin.
Can someone give me some advice on how to approach this issue? How can I install a package with no package manager possiblities at all?
You won't be able to install additional software to that system via a package manager. Such devices aren't designed like that. The firmware that was shipped with the device is all there is. What would be the incentive of the device manufacturer to maintain a package repository with general purpose linux software?
But not all hope is lost. You can of course try to compile the needed software yourself (and by that extend the firmware). For that to work you will need a suitable ARM cross compiler (GCC). Via static linking your SNMP package won't have any dependencies to the library versions already on the device (so you don't need a sysroot matching the libraries on the device).

Kernel Code : where can I find and how to debug the kernel

Recently I have installed Ubuntu 12.04 LTS ISO image in my desktop. Below is the output of the kernel version I have installed:
# uname -r
3.5.0-41-generic
I am trying to develop a VFS and want the kernel source code version '3.5.0-41-generic' for reference purpose - where can I find the same?
What are the excellent kernel debugging options looking at logs and mapping them to kernel code?
How and which debugger I can use to debug a live kernel flow execution?
Are there ways I can add more printk methods and re-modify the modules? Say I want to know how a FS mount method works - I can modify the required FS code (adding more printk functions) re-compile and reload the modules. Now with aid of my new printk functions I can understand the flow
Why don't you install vanilla 3.5 kernel and try to develop on it?
As a kernel debugger you can use kGDB or just printk.
But... I suggest you to test your vfs on linux running on qemu. Qemu is able to debug the running linux - so you can connect gdb to it and debug the whole emulating system.

Resources