Sorry for my bad english.
I am trying to compile kernel source code of raspberry and jetson tx2 on a NTFS disk.
compile kernel source code of jetson ok, no error.
compile kernel source code of raspberry fail with bellow error message:
*** Error during update of the configuration.
make[3]: *** [/media/u2004/LINUX_SHARED/rasp/linux/scripts/kconfig/Makefile:39: silentoldconfig] Error 1
make[2]: *** [/media/u2004/LINUX_SHARED/rasp/linux/Makefile:541: silentoldconfig] Error 2
make[1]: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/kernel.release'. Stop.
make[1]: Leaving directory '/media/u2004/LINUX_SHARED/rasp/build_output'
make: *** [Makefile:150: sub-make] Error 2
no error when compile raspberry kernel source code in Ext4 disk.
edit: add compile environment and script
cross compile in Ubuntu 20.04 64bit. compile aarch32 with bellow script (compile ok in Ext4 partition).
ROOT_DIR=/home/u2004/Desktop/dm
KERNEL_BUILD_DIR=${ROOT_DIR}/linux/
CROSS_COMPILE=${ROOT_DIR}/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-
BUILD_OUTPUT=${ROOT_DIR}/build_output
INSTALL_MOD_PATH_EXT4=${ROOT_DIR}/copy_to_sdcard/ext4
INSTALL_MOD_PATH_FAT32=${ROOT_DIR}/copy_to_sdcard/fat32
ARCH=arm
DEF_CONFIG=bcm2709_defconfig
TARGET=kernel7
git clone --depth=1 -b rpi-4.9.y https://github.com/raspberrypi/linux
git clone https://github.com/raspberrypi/tools
export CROSS_COMPILE=${CROSS_COMPILE}
cd ${KERNEL_BUILD_DIR}
make mrproper
make ARCH=${ARCH} O=${BUILD_OUTPUT} ${DEF_CONFIG}
make ARCH=${ARCH} O=${BUILD_OUTPUT} -j4 zImage modules dtbs
make ARCH=${ARCH} INSTALL_MOD_PATH=${INSTALL_MOD_PATH_EXT4} modules_install
please help.
thank you
Ultimately, I would advise not to clone/build the linux kernel directly on an NTFS partition, since, from my own past experiences, this is probably a recipe for trouble.
The safest approach, if you want to clone/build it on a Windows 10 computer, would therefore be, IMHO, to either:
install/use WSL2 on your Windows system (free,fastest),
install VirtualBox (free) on your Windows 10 system and use a virtual drive formatted in EXT4 (You could import a ready-to-use (free) Linux development virtual Machine retrieved from Turnkey Linux in a breeze).
The following procedure worked flawlessly using WSL2:
start bash.ex, and, in the WSL2 bash session, enter the following commands:
user#kleronomas:/tmp$ mkdir so
user#kleronomas:/tmp$ cd so
user#kleronomas:/tmp/so$ ROOT_DIR=$(pwd)
user#kleronomas:/tmp/so$ KERNEL_BUILD_DIR=${ROOT_DIR}/linux/
user#kleronomas:/tmp/so$ CROSS_COMPILE=${ROOT_DIR}/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-
user#kleronomas:/tmp/so$ BUILD_OUTPUT=${ROOT_DIR}/build_output
user#kleronomas:/tmp/so$ INSTALL_MOD_PATH_EXT4=${ROOT_DIR}/copy_to_sdcard/ext4
user#kleronomas:/tmp/so$ INSTALL_MOD_PATH_FAT32=${ROOT_DIR}/copy_to_sdcard/fat32
user#kleronomas:/tmp/so$ ARCH=arm
user#kleronomas:/tmp/so$ DEF_CONFIG=bcm2709_defconfig
user#kleronomas:/tmp/so$ TARGET=kernel7
user#kleronomas:/tmp/so$ export CROSS_COMPILE=${CROSS_COMPILE}
user#kleronomas:/tmp/so$ cd ${KERNEL_BUILD_DIR}
user#kleronomas:/tmp/so$ git clone --depth=1 -b rpi-4.9.y https://github.com/raspberrypi/linux
user#kleronomas:/tmp/so$ git clone https://github.com/raspberrypi/tools
user#kleronomas:/tmp/so$ make O=${BUILD_OUTPUT} mrproper
user#kleronomas:/tmp/so$ make ARCH=${ARCH} O=${BUILD_OUTPUT} ${DEF_CONFIG}
user#kleronomas:/tmp/so$ make ARCH=${ARCH} O=${BUILD_OUTPUT} -j4 zImage modules dtbs
user#kleronomas:/tmp/so$ make ARCH=${ARCH} O=${BUILD_OUTPUT} INSTALL_MOD_PATH=${INSTALL_MOD_PATH_EXT4} modules_install
user#kleronomas:/tmp/so$ ls -l ${BUILD_OUTPUT}
total 45445
-rw-r--r-- 1 user user 586 Mar 2 10:43 Makefile
-rw-r--r-- 1 user user 730037 Mar 2 11:05 Module.symvers
-rw-r--r-- 1 user user 2244428 Mar 2 11:04 System.map
drwxr-xr-x 1 user user 512 Mar 2 10:43 arch
drwxr-xr-x 1 user user 512 Mar 2 10:46 block
drwxr-xr-x 1 user user 512 Mar 2 10:44 certs
drwxr-xr-x 1 user user 512 Mar 2 11:07 crypto
drwxr-xr-x 1 user user 512 Mar 2 11:04 drivers
drwxr-xr-x 1 user user 512 Mar 2 11:07 firmware
drwxr-xr-x 1 user user 512 Mar 2 11:07 fs
drwxr-xr-x 1 user user 512 Mar 2 10:43 include
drwxr-xr-x 1 user user 512 Mar 2 11:04 init
drwxr-xr-x 1 user user 512 Mar 2 10:45 ipc
drwxr-xr-x 1 user user 512 Mar 2 11:07 kernel
drwxr-xr-x 1 user user 512 Mar 2 11:07 lib
drwxr-xr-x 1 user user 512 Mar 2 11:07 mm
-rw-r--r-- 1 user user 4840 Mar 2 10:44 modules.builtin
-rw-r--r-- 1 user user 61793 Mar 2 11:04 modules.order
drwxr-xr-x 1 user user 512 Mar 2 11:04 net
drwxr-xr-x 1 user user 512 Mar 2 10:44 scripts
drwxr-xr-x 1 user user 512 Mar 2 10:45 security
drwxr-xr-x 1 user user 512 Mar 2 11:07 sound
lrwxrwxrwx 1 user user 13 Mar 2 10:43 source -> /tmp/so/linux
drwxr-xr-x 1 user user 512 Mar 2 10:44 usr
drwxr-xr-x 1 user user 512 Mar 2 10:50 virt
-rwxr-xr-x 1 user user 14295892 Mar 2 11:04 vmlinux
-rw-r--r-- 1 user user 17819862 Mar 2 11:04 vmlinux.o
user#kleronomas:/tmp/so$ ls -ail ${INSTALL_MOD_PATH_EXT4}/lib/modules
total 0
844424931148038 drwxr-xr-x 1 user user 512 Mar 2 11:19 .
844424931148037 drwxr-xr-x 1 user user 512 Mar 2 12:12 ..
17732923533530216 drwxr-xr-x 1 user user 512 Mar 2 12:12 4.9.80-v7+
844424931148041 lrwxrwxrwx 1 user user 13 Mar 2 11:14 build -> /tmp/so/linux
1125899907858695 drwxr-xr-x 1 user user 512 Mar 2 11:17 kernel
1125899907858696 lrwxrwxrwx 1 user user 13 Mar 2 11:17 source -> /tmp/so/linux
You would then have to copy the build artifacts into your NTFS partition, which will be accessible from WSL2 in /mnt/c for C:, /mnt/d for D:, ...
Related
I'm running an executable and trying to save terminal output to a file:
# ll
total 132
-rw-r--r--. 1 root root 496 Jun 14 11:41 mpx-debug.h
-rw-r--r--. 1 root root 12775 Jun 14 11:41 mpx-dig.c
-rw-r--r--. 1 root root 3526 Jun 14 11:41 mpx-hw.h
-rwxr-xr-x. 1 root root 65176 Jun 14 14:28 mpx-mini-test
-rw-r--r--. 1 root root 40480 Jun 14 11:41 mpx-mini-test.c
-rw-r--r--. 1 root root 205 Jun 14 11:41 mpx-mm.h
# ./mpx-mini-test
XSAVE is supported by HW & OS
XSAVE processor supported state mask: 0x1f
XSAVE OS supported state mask: 0x1f
BNDREGS: size: 64 user: 1 supervisor: 0 aligned: 0
BNDCSR: size: 64 user: 1 supervisor: 0 aligned: 0
no MPX support
Aborted (core dumped)
#
# ./mpx-mini-test | tee -a mpx-mini-test.log
#
# cat mpx-mini-test.log
#
As you can see, there're some prints in terminal without "| tee -a **.log".
But with "| tee -a **.log", nothing is saved to file.
I suspect it has something to do with the "Abort (core dumped)", did some googling but can't figure out exactly why. Is there anyone knows why? And how could I save all terminal outputs(including the "Abort (core dumped)") to file? Thanks in advance.
Has anyone tried using the bitbake-env utility lately?
I do not see it installed:
[user#localhost build]$ which bitbake
~/YOCTO/oe_core_embedded/poky/bitbake/bin/bitbake
[user#localhost build]$ which bitbake-env
/usr/bin/which: no bitbake-env in (/home/user/YOCTO/oe_core_embedded/poky/scripts:/home/user/YOCTO/oe_core_embedded/poky/bitbake/bin:/usr/libexec/python2-sphinx:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/user/.local/bin:/home/user/bin)
[user#localhost build]$
As well I do not see it in the bitbake command listing:
[user#localhost poky]$ cd bitbake/bin
[user#localhost bin]$ ls -al
total 100
drwxrwxr-x. 2 user user 4096 Oct 18 12:49 .
drwxrwxr-x. 6 user user 4096 Oct 18 12:49 ..
-rwxrwxr-x. 1 user user 2072 Nov 18 11:51 bitbake
-rwxrwxr-x. 1 user user 7228 Oct 18 12:49 bitbake-diffsigs
-rwxrwxr-x. 1 user user 2894 Oct 18 12:49 bitbake-dumpsig
-rwxrwxr-x. 1 user user 4069 Oct 18 12:49 bitbake-layers
-rwxrwxr-x. 1 user user 2109 Oct 18 12:49 bitbake-prserv
-rwxrwxr-x. 1 user user 2128 Oct 18 12:49 bitbake-selftest
-rwxrwxr-x. 1 user user 17866 Oct 18 12:49 bitbake-worker
-rwxrwxr-x. 1 user user 13951 Oct 18 12:49 bitdoc
-rwxrwxr-x. 1 user user 5813 Oct 18 12:49 git-make-shallow
-rwxrwxr-x. 1 user user 8805 Oct 18 12:49 toaster
-rwxrwxr-x. 1 user user 4177 Oct 18 12:49 toaster-eventreplay
[user#localhost bin]$
It still exists/is listed in https://elinux.org/Bitbake_Cheat_Sheet from July 2016.
bitbake-env is a third party utility, and not actually a part of the OpenEmbedded Core hence why you will not see it unless you specifically install it. It is actually an 'improved' version of the bitbake -e flag for bitbake.
bash-4.3$ bitbake --help
Usage: bitbake [options] [recipename/target recipe:do_task ...]
Executes the specified task (default is 'build') for a given set of target recipes (.bb files).
It is assumed there is a conf/bblayers.conf available in cwd or in BBPATH which
will provide the layer, BBFILES and other configuration information.
Options:
...
-e, --environment Show the global or per-recipe environment complete
with information about where variables were
set/changed.
After configuring a standalone Concourse 2.4.0 per the instructions, everything seems to be up and running. However, when trying to run the "hello world" example, I can see the following error in the Concourse UI:
runc create: exit status 1: rootfs ("/volumes/live/a72f9a0d-3506-489b-5b9b-168744b892c1/volume") does not exist
"web" start command:
./concourse web \
--basic-auth-username admin \
--basic-auth-password admin \
--session-signing-key session_signing_key \
--tsa-host-key host_key \
--tsa-authorized-keys authorized_worker_keys \
--external-url http://myconcoursedomain:8080 \
--postgres-data-source postgres://user:pass#mydbserver/concourse
"worker" start command:
./concourse worker \
--work-dir worker \
--tsa-host 127.0.0.1 \
--tsa-public-key host_key.pub \
--tsa-worker-private-key worker_key
I'm wondering if the problem occurs since the "missing" directory is created in the directory specified in the "start worker" command, instead of at the actual root directory:
~/concourse# ls -la worker
total 145740
drwxr-xr-x 5 root root 4096 Nov 15 23:07 .
drwxr-xr-x 3 root root 4096 Nov 15 23:07 ..
drwxr-xr-x 3 root root 4096 Nov 15 23:07 2.4.0
drwxr-xr-x 2 root root 4096 Nov 15 23:09 depot
drwxr-xr-x 1 root root 24 Nov 15 23:07 volumes
-rw-r--r-- 1 root root 42142052352 Nov 15 23:15 volumes.img
Concourse is installed on Ubuntu 14.04:
uname -r
4.4.0-47-generic
uname -a
Linux ubuntu-2gb-nyc3-01 4.4.0-47-generic #68~14.04.1-Ubuntu SMP Wed Oct 26 19:42:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
For reasons that I still do not understand, it appears that if you specify the --work-dir value to be /opt/concourse/worker, then the worker will work with this kernel version without issue.
I was using a relative path to a worker directory within a dir in my user folder as my --work-dir value.
I have a yum repository I've set up where I store custom rpms.
I have no problem finding information about other packages that were built and stored in this custom repo.
#yum --disablerepo=rhui-us-east-rhel-server-1y,epel,epel-testing --enablerepo=customrepo install php53-pecl-xdebug
php53-pecl-xdebug x86_64 2.2.1-2 customrepo 132 k
No problem.
Now I drop somerpm.rpm in centos/repo/5/noarch, run createrepo --update . in this directory and try the same command, and yet it shows no results.
I tried running createrepo --update in the root of the repo as well, but that did not work either (I'm actually not sure where to run it and if it needs a repodata directory in each subdir).
[root#reposerver mnt]# ls -l /var/www/repo/
total 12
-rw-r--r-- 1 root root 203 Jun 8 00:13 REPO_README
drwxr-xr-x 3 root root 4096 Jun 10 2011 centos
drwxr-xr-x 2 root root 4096 Oct 18 20:02 repodata
[root#reposerver mnt]# ls -l /var/www/repo/centos/5/
SRPMS/ i386/ noarch/ repodata/ x86_64/
[root#reposerver mnt]# ls -l /var/www/repo/centos/5/noarch/
total 7324
-rw-r--r-- 1 root root 1622 Jun 28 2011 compat-php-5.1.6-1.noarch.rpm
drwxr-xr-x 2 root root 4096 Oct 18 19:55 repodata
-rw-r--r-- 1 root root 1066928 Oct 18 19:54 salt-0.10.3-1.noarch.rpm
-rw-r--r-- 1 root root 6363197 Oct 18 19:54 salt-0.10.3-1.src.rpm
-rw-r--r-- 1 root root 21822 Oct 18 19:54 salt-master-0.10.3-1.noarch.rpm
-rw-r--r-- 1 root root 14294 Oct 18 19:54 salt-minion-0.10.3-1.noarch.rpm
I also tried adding the exactarch=0 flag to my repo config to ignore arch restrictions and this did not work either, it was a shot in the dark, since my rpm is noarch, it should show regardless.
# cat /etc/yum.repos.d/mycompany.repo
[mycompany]
name=mycompany custom repo
baseurl=http://config/repo/centos/5/$basearch
enabled=1
exactarch=0
I'm at a loss at this point. Usually createrepo --update does the trick, but for some reason it cannot find the new rpms.
repo]# find . -type f -name "*.gz" | xargs zcat | grep salt-minion
returns results as well, so it's definitely in the repo data.
yum clean all on the server I was trying to install on worked.
Also make sure to do createrepo --update on the specific subdir instead of the root of the repo.
I'm very (very) new to node.js, and also fairly green when it comes to server side configuration and coding. (I have a long history of client-side programming, most recently with Adobe Flex and ActionScript.)
Anyhow, I asked Rackspace (who manages a Linux server for me) to install node.js and node-postgres.
From the comments in the ticket, that installation went like this:
node.js
Running Transaction
Installing : nodejs-stable-release [1/1]
Installed: nodejs-stable-release.noarch 0:5-3
Complete!
and node-postgres
[root#237175-web2 src]# npm install pg
npm http GET https://registry.npmjs.org/pg
npm http 200 https://registry.npmjs.org/pg
npm http GET https://registry.npmjs.org/pg/-/pg-0.6.17.tgz
npm http GET https://registry.npmjs.org/generic-pool/1.0.9
npm http 200 https://registry.npmjs.org/generic-pool/1.0.9
npm http GET https://registry.npmjs.org/generic-pool/-/generic-pool-1.0.9.tgz
pg#0.6.17 install /usr/src/node_modules/pg
node-waf configure build || (exit 0)
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr
Checking for program pg_config : /usr/bin/pg_config
'configure' finished successfully (0.051s)
Waf: Entering directory `/usr/src/node_modules/pg/build'
[1/2] cxx: src/binding.cc -> build/Release/src/binding_1.o
[2/2] cxx_link: build/Release/src/binding_1.o -> build/Release/binding.node
Waf: Leaving directory `/usr/src/node_modules/pg/build'
'build' finished successfully (0.745s)
pg#0.6.17 ./node_modules/pg
+-- generic-pool#1.0.9
More info:
[root#237175-web2 ~]# ls -la /usr/src/node_modules/pg
total 68
drwxr-xr-x 9 root root 4096 Apr 26 22:34 .
drwxr-xr-x 3 root root 4096 Apr 26 22:34 ..
drwxr-xr-x 2 root root 4096 Apr 26 22:34 benchmark
drwxr-xr-x 4 root root 4096 Apr 26 22:34 build
drwxr-xr-x 3 root root 4096 Apr 26 22:34 lib
-rw-r--r-- 1 root root 5618 Apr 26 22:34 .lock-wscript
-rw-r--r-- 1 root root 1269 Feb 23 23:58 Makefile
drwxr-xr-x 3 root root 4096 Apr 26 22:34 node_modules
-rw-r--r-- 1 root root 21 Mar 3 15:19 .npmignore
-rw-r--r-- 1 root root 962 Apr 26 22:34 package.json
-rw-r--r-- 1 root root 6843 Mar 27 09:30 README.md
drwxr-xr-x 2 root root 4096 Apr 26 22:34 script
drwxr-xr-x 2 root root 4096 Mar 21 23:37 src
drwxr-xr-x 5 root root 4096 Apr 26 22:34 test
-rw-r--r-- 1 root root 990 Feb 23 23:58 wscript
[root#237175-web2 ~]#
A little “Hello world” node.js example works fine (hooray!), but a simple Postgres example fails on the require('pg') statement, saying that the module cannot be found. I've looked on the server and can't find a pg.js file anywhere.
Any clue as to why the node-postgres build failed?
Install it globally:
npm install -g pg
You may need to become root, e.g. with
sudo npm install -g pg