How to build and install linux-headers and lib-modules on flex-builder?
I tried following procedure and installed imagefiles to SD-card on X86-PC.
On LS1012ARDB, linux boot successfully, however, there are no linux-source
and linux-lib-modules.
I also tried latest LSDK2012, however, it fails on step (2-f).
< Procedure on X86-PC >
(1-a) download flexbuild_1903.tgz
(1-b) $> tar zxvf flexbuild_1903.tgz
(1-c) $> cd flexbuild_1903
(1-d) $> source setup.env
(2-a) $> flex-builder -i mkrfs -r ubuntu:devel -a arm32 -m ls1012ardb
(2-b) $> flex-builder -c linux -a arm32 -m ls1012ardb
(2-c) $> flex-builder -c uboot -b sd -a arm32 -m ls1012ardb
(2-d) $> flex-builder -i merge-component -a arm32 -m ls1012ardb
(2-e) $> flex-builder -i packrfs -a arm32 -m ls1012ardb
(2-f) $> flex-builder -i mkbootpartition -b sd -a arm32 -m ls1012ardb
(3-a) $> flex-installer -b ./build/images/bootpartition_XXXX.tgz -r ./build/images/rootfs_YYYY.tgz -m ls1012ardb -d /dev/mmcblk0
< Procedure on LS1012ARDB >
(4-a) install SD-card & Reboot
(4-b) result
----
NXP LSDK 19.03 devel
localhost login: root
Password:
Welcome to NXP LSDK 19.03 devel (GNU/Linux 4.19.26 armv7l)
* Support: https://www.nxp.com/lsdk
* Documentation: https://lsdk.github.io
The programs included with the NXP LSDK are free software, the exact distribution
terms for each program are described in the individual files in /usr/share/doc.
NXP LSDK comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
setting 24 rows and 80 columns
root@localhost:~# uname -a
Linux localhost 4.19.26 #1 SMP Wed Apr 7 11:38:49 JST 2021 armv7l armv7l armv7l GNU/Linux
root@localhost:~#
root@localhost:~#
root@localhost:~# ls /usr/src/
root@localhost:~#
root@localhost:~#
root@localhost:~# ll /lib/modules/4.19.26/
total 676
drwxr-xr-x 4 root root 4096 Apr 7 2021 ./
drwxr-xr-x 3 root root 4096 Apr 7 2021 ../
lrwxrwxrwx 1 root root 95 Apr 7 2021 build -> /home/guest/LSDK1903__/flexbuild_lsdk1903/build/linux/linux/arm32/LS/output/LSDK-19.03-V4.19/v8
drwxr-xr-x 2 root root 4096 Apr 7 2021 extra/
drwxr-xr-x 9 root root 4096 Apr 7 2021 kernel/
-rw-r--r-- 1 root root 116641 Apr 7 2021 modules.alias
-rw-r--r-- 1 root root 119268 Apr 7 2021 modules.alias.bin
-rw-r--r-- 1 root root 32681 Apr 7 2021 modules.builtin
-rw-r--r-- 1 root root 38676 Apr 7 2021 modules.builtin.bin
-rw-r--r-- 1 root root 48705 Apr 7 2021 modules.dep
-rw-r--r-- 1 root root 68347 Apr 7 2021 modules.dep.bin
-rw-r--r-- 1 root root 80 Apr 7 2021 modules.devname
-rw-r--r-- 1 root root 17307 Apr 7 2021 modules.order
-rw-r--r-- 1 root root 55 Apr 7 2021 modules.softdep
-rw-r--r-- 1 root root 93678 Apr 7 2021 modules.symbols
-rw-r--r-- 1 root root 108505 Apr 7 2021 modules.symbols.bin
lrwxrwxrwx 1 root root 62 Apr 7 2021 source -> /home/guest/LSDK1903__/flexbuild_lsdk1903/packages/linux/linux
root@localhost:~#
----
(a) There are no linux-source on /usr/src
(b) /lib/modules/4.19.26/build and /lib/modules/4.19.26/source are incorrectly linked to invalid files,
these are what cross-compiling environment on X86-PC