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
I tried these procedure (2-a)~(2-f) on LSDK2012, need to modify as
(2-f) $> flex-builder -i mkbootpartition -a arm32
This result shows successfully building linux header and lib-modules.
However, by not specifying machine type(-m ls1012ardb) on step (2-f),
bootpartition_xxxx.tgz has only ls1021 related files(*dtb and *scr), instead of "ls1012ardb"
Show me the procedure
(a) how to build "fsl_ls1012a-rdb.dtb" and "ls1012ardb_boot.scr"
and
('b) how to merge these files into bootpartition_xxxx.tgz file
I tried "flex-builder -i mkbootpartition -a arm32", but it fails as follow,
----
Building UEFI ...
Cloning into 'qoriq-uefi-binary'...
fatal: unable to access 'https://github.com/nxp/qoriq-uefi-binary.git/': Could n
ot resolve host: github.com
Makefile:127: recipe for target 'uefi' failed
make[1]: *** [uefi] Error 128
make[1]: Leaving directory '/home/guest/LSDK1903__/flexbuild_lsdk1903/packages/f
irmware'
Makefile:23: recipe for target 'uefi' failed
make: *** [uefi] Error 2
make: Leaving directory '/home/guest/LSDK1903__/flexbuild_lsdk1903'
----
I also found there are no headers and lib-modules in ./build/image/rootfs_XXXX.tgz
So I give-up to use LSDK1903, and try latest LSDK2012
Use the "flex-builder -i mkbootpartition -a arm32" command instead of the "flex-builder -i mkbootpartition -b sd -a arm32 -m ls1012ardb".
Sorry, I think this should be posted to "QorIQ" - "Layerscale", not to "iMX"
Is there problem for using the "flex-builder -i mkbootpartition -a arm32" command?
> Is there problem for using the "flex-builder -i mkbootpartition -a arm32" command?
As desctibed on last Thursday, there are no *ls1012ardb_boot.scr" on /boot directory, so can not boot.
Use the following command sequence:
1. flex-builder -c linux -a arm32
2. flex-builder -i mkbootpartition -a arm32
> 2. flex-builder -i mkbootpartition -a arm32
As describe on last Thursday,
this command creates the profiles(*dtb, *.scr) only for "ls1021a(-qds, -twr)".
There is the following information in LSDK2012 User Guide about LSDK 1906:
No formal support of 32-bit kernel space on 64-bit devices
It looks like this information is correct also for LSDK 2012.
On LSDK1903, I can create ls1012_ardb_boot.scr and fsl_ls1012a-rdb.dtb files,
but can not create linux source by "-c linux".
On the other hand, on LSDK2012, I can not create above *.scr and *.dtb files,
but can create linux source by "-c linux".
In Summary,
LSDK
1903 2012
---------------------------------------------------------- + ---- + ----
$> flex-builder -c linux -a arm32 No Yes
$> flex-builder -i mkbootpartition -a arm32 -m ls1012ardb Yes Fail
$> flex-builder -i mkbootpartition -a arm32 No*1 No*1
*1: create only for ls1021
No longer, does flex-builder support "-m XXXX" machine-type option for "-i mkbootpartirion" command?
NXP offers for similar problem NXP ProSupport / ProService:
and
Perhaps this service will be helpful for you.
If the are no solution on this forum, then this is closed
See the following document: