I am trying to build a kernel for the SABRE iMX6 Quad board and am running into some issues. This is the first time I build a kernel and I am following the provided guide "SABRE_SD_User_Guide_L3.0.35_1.1.0.pdf". The selected kernel version is the default "kernel-3.0.35".
My host is Ubuntu 9.04 (on VirtualBox on Win 7 Pro). I managed to build LTIB without issues.
However, when I start building the kernel (./ltib) I get several errors:
1) ############
net/core/pktgen.c: In function 'pktgen_if_show':
net/core/pktgen.c:682:2775: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
net/core/pktgen.c:682:3153: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
net/core/pktgen.c:682:2775: error: 'asm' operand has impossible constraints
net/core/pktgen.c:682:3153: error: 'asm' operand has impossible constraints
make[2]: *** [net/core/pktgen.o] Error 1
Line 682 in the file pktgen.c states....I have not gone further than that:
do_div(idle, NSEC_PER_USEC);
2) ############
CC [M] net/dccp/ipv4.o
drivers/scsi/advansys.c:72:2: warning: #warning this driver is still not properly converted to the DMA API [-Wcpp]
drivers/scsi/advansys.c: In function 'advansys_get_sense_buffer_dma':
drivers/scsi/advansys.c:8376:2: error: implicit declaration of function 'dma_cache_sync' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[2]: *** [drivers/scsi/advansys.o] Error 1
make[1]: *** [drivers/scsi] Error 2
make[1]: *** Waiting for unfinished jobs....
Additionally this message showed up at the beginning of the build:
Warning: cannot find a config file for the kernel
This while I did execute the kernel config..... could this be the issue? The script seems to be looking for the file : imx6_defconfig which does not exist.... These are the *defconfig I found:
dirk@dirk-desktop:~/projects/dcns/sabre/src/ltib$
ls ~/projects/dcns/sabre/src/ltib/rpm/BUILD/linux-3.0.35/arch/arm/configs/ | grep mx
mx1_defconfig
mx21_defconfig
mx27_defconfig
mx3_defconfig
mx51_defconfig
mxs_defconfig
As instructed I entered platform type: "imx6q" and "min profile" (the default). I am trying various things now (build different kernel versions, ), but haven't gotten any success yet....
Here's a link to someone who had a similar issue, but it never seems to have gotten resolved...
What can be the issue?
Dirk
dirk@dirk-desktop:~/projects/dcns/sabre/src/ltib$
######################
Processing: fake-provides
===========================
Processing: u-boot
====================
Processing: kernel-3.0.35
===========================
Build path taken because: build key set, no prebuilt rpm,
rpmbuild --dbpath /home/dirk/projects/dcns/sabre/src/ltib/rootfs//var/lib/rpm --target arm --define '_unpackaged_files_terminate_build 0' --define '_target_cpu arm' --define '__strip strip' --define '_topdir /home/dirk/projects/dcns/sabre/src/ltib/rpm' --define '_prefix /usr' --define '_tmppath /home/dirk/projects/dcns/sabre/src/ltib/tmp' --define '_rpmdir /home/dirk/projects/dcns/sabre/src/ltib/rpm/RPMS' --define '_mandir /usr/share/man' --define '_sysconfdir /etc' --define '_localstatedir /var' -bb /home/dirk/projects/dcns/sabre/src/ltib/tmp/kernel-3.0.35.spec
Building target platforms: arm
Building for target arm
Executing(%prep): /bin/sh -e /home/dirk/projects/dcns/sabre/src/ltib/tmp/rpm-tmp.41639
+ umask 022
+ cd /home/dirk/projects/dcns/sabre/src/ltib/rpm/BUILD
+ echo imx_1.1.0
+ cut -d_ -f2
+ rel_ver=1.1.0
+ echo imx_1.1.0
+ cut -d. -f3
+ cut -c2
+ zz=
+ git_tag=rel_imx_3.0.35_1.1.0
+ [ != 0 ]
+ git_br=imx_3.0.35_1.1.0
+ KSRC_DIR=/home/dirk/projects/dcns/sabre/src/ltib/rpm/BUILD/linux-3.0.35
+ [ -z y ]
+ [ ! -d /home/dirk/projects/dcns/sabre/src/ltib/rpm/BUILD/linux-3.0.35 ]
+ exit 0
Executing(%build): /bin/sh -e /home/dirk/projects/dcns/sabre/src/ltib/tmp/rpm-tmp.41639
+ umask 022
+ cd /home/dirk/projects/dcns/sabre/src/ltib/rpm/BUILD
+ cd linux-3.0.35
+ eval echo
+ echo
+ PKG_KERNEL_PATH_PRECONFIG=
+ eval echo
+ echo
+ PKG_KERNEL_KBUILD_PRECONFIG=
+ eval echo imx6_defconfig
+ echo imx6_defconfig
+ PKG_KERNEL_PRECONFIG=imx6_defconfig
+ KSRC_DIR=/home/dirk/projects/dcns/sabre/src/ltib/rpm/BUILD/linux-3.0.35
+ : arm
+ : ccache /usr/bin/gcc -B/usr/bin/
+ : imx6_defconfig
+ : /home/dirk/projects/dcns/sabre/src/ltib/config/platform/imx
+ : /home/dirk/projects/dcns/sabre/src/ltib/rpm/BUILD/linux-3.0.35
+ rm -f /home/dirk/projects/dcns/sabre/src/ltib/rpm/BUILD/linux
+ ln -s /home/dirk/projects/dcns/sabre/src/ltib/rpm/BUILD/linux-3.0.35 /home/dirk/projects/dcns/sabre/src/ltib/rpm/BUILD/linux
+ cd /home/dirk/projects/dcns/sabre/src/ltib/rpm/BUILD/linux-3.0.35
+ KBOUT=
+ [ -n -a != . ]
+ KBOUT=.
+ KTARG=zImage
+ SYSCFG_KTARG=uImage
+ [ imx6_defconfig = defconfig ]
+ [ -f /home/dirk/projects/dcns/sabre/src/ltib/config/platform/imx/imx6_defconfig.dev ]
+ [ -f /home/dirk/projects/dcns/sabre/src/ltib/config/platform/imx/imx6_defconfig ]
+ [ -z ]
+ [ -d arch/arm/configs/ ]
+ find arch/arm/configs/ -name imx6_defconfig
+ CFG=
+ [ -n ]
+ [ -d arch/arm/configs/ ]
+ find arch/arm/configs/ -name imx6_defconfig
+ CFG=
+ [ -n ]
+ [ arm = ppc -a -f arch/powerpc/Kconfig ]
+ [ -n ]
+ [ -n ]
+ echo Warning: cannot find a config file for the kernel
Warning: cannot find a config file for the kernel
+ [ -z -a -n y -o -n ]
+ make ARCH=arm CROSS_COMPILE= HOSTCC=ccache /usr/bin/gcc -B/usr/bin/ menuconfig
scripts/kconfig/mconf Kconfig
*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.
+ [ -f ]
+ [ -n ]
+ grep -q VERSION = 2 Makefile
+ [ %{kernel_series} = 2.4 ]
+ make ARCH=arm CROSS_COMPILE= HOSTCC=ccache /usr/bin/gcc -B/usr/bin/ uImage
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
Kernel: arch/arm/boot/Image is ready
SHIPPED arch/arm/boot/compressed/lib1funcs.S
AS arch/arm/boot/compressed/lib1funcs.o
LD arch/arm/boot/compressed/vmlinux
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
UIMAGE arch/arm/boot/uImage
Image Name: Linux-3.0.35+
Created: Thu Jan 24 17:22:38 2013
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3190904 Bytes = 3116.12 kB = 3.04 MB
Load Address: 0x00008000
Entry Point: 0x00008000
Image arch/arm/boot/uImage is ready
+ grep -q ^CONFIG_MODULES= ./.config
+ make ARCH=arm CROSS_COMPILE= HOSTCC=ccache /usr/bin/gcc -B/usr/bin/ modules
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CC [M] net/dccp/ccid.o
CC [M] net/core/pktgen.o
CC [M] net/decnet/af_decnet.o
CC [M] net/dccp/feat.o
CC [M] net/dccp/input.o
CC [M] net/dccp/minisocks.o
net/core/pktgen.c: In function 'pktgen_if_show':
net/core/pktgen.c:682:2775: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
net/core/pktgen.c:682:3153: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
net/core/pktgen.c:682:2775: error: 'asm' operand has impossible constraints
net/core/pktgen.c:682:3153: error: 'asm' operand has impossible constraints
make[2]: *** [net/core/pktgen.o] Error 1
make[1]: *** [net/core] Error 2
make[1]: *** Waiting for unfinished jobs....
CC [M] net/decnet/dn_nsp_in.o
CC [M] net/dccp/options.o
CC [M] net/dccp/output.o
CC [M] net/decnet/dn_nsp_out.o
CC [M] net/dccp/proto.o
CC [M] net/decnet/dn_route.o
CC [M] net/decnet/dn_dev.o
CC [M] net/decnet/dn_neigh.o
CC [M] net/decnet/dn_timer.o
CC [M] net/dccp/timer.o
CC [M] net/dccp/qpolicy.o
CC [M] net/decnet/sysctl_net_decnet.o
CC [M] net/decnet/netfilter/dn_rtmsg.o
CC [M] net/dccp/ccids/ccid2.o
CC [M] net/dccp/ackvec.o
CC [M] net/dccp/ccids/ccid3.o
CC [M] net/dccp/ccids/lib/tfrc.o
CC [M] net/dccp/ccids/lib/tfrc_equation.o
CC [M] net/dccp/ccids/lib/packet_history.o
LD [M] net/decnet/decnet.o
LD [M] drivers/scsi/scsi_tgt.o
CC [M] drivers/scsi/advansys.o
CC [M] net/dccp/ccids/lib/loss_interval.o
CC [M] net/dccp/sysctl.o
CC [M] net/dccp/diag.o
CC [M] net/dccp/ipv4.o
drivers/scsi/advansys.c:72:2: warning: #warning this driver is still not properly converted to the DMA API [-Wcpp]
drivers/scsi/advansys.c: In function 'advansys_get_sense_buffer_dma':
drivers/scsi/advansys.c:8376:2: error: implicit declaration of function 'dma_cache_sync' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[2]: *** [drivers/scsi/advansys.o] Error 1
make[1]: *** [drivers/scsi] Error 2
make[1]: *** Waiting for unfinished jobs....
CC [M] net/dccp/ipv6.o
CC [M] net/dccp/probe.o
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
net/dccp/probe.c: In function 'dccpprobe_init':
net/dccp/probe.c:166:53: warning: the omitted middle operand in ?: will always be 'true', suggest explicit middle operand [-Wparentheses]
LD [M] net/dccp/dccp.o
LD [M] net/dccp/dccp_ipv4.o
LD [M] net/dccp/dccp_ipv6.o
LD [M] net/dccp/dccp_diag.o
LD [M] net/dccp/dccp_probe.o
make: *** [net] Error 2
error: Bad exit status from /home/dirk/projects/dcns/sabre/src/ltib/tmp/rpm-tmp.41639 (%build)
RPM build errors:
Bad exit status from /home/dirk/projects/dcns/sabre/src/ltib/tmp/rpm-tmp.41639 (%build)
Build time for kernel-3.0.35: 205 seconds
Failed building kernel-3.0.35
f_buildrpms() returned an error, exiting
traceback:
main:572
Started: Thu Jan 24 17:21:10 2013
Ended: Thu Jan 24 17:24:36 2013
Elapsed: 206 seconds
These packages failed to build:
kernel-3.0.35
Build Failed
Exiting on error or interrupt
dirk@dirk-desktop:~/projects/dcns/sabre/src/ltib$
Every time I need to rebuild a kernel, I configure and build it manually.
export ARCH=arm
export CROSS_COMPILE=/opt/freescale/usr/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
Pay attention ar arm-eabi version you have on your machine. Look for arm-eabi under /opt/freecale/usr and find your path
Then, enter your kernel dir:
$cd kernel_dir
$ ls arch/arm/config | grep -irn mx
here you will see *every* config file. Choose the right one for your board
$ make mx6config
$ make menuconfig
if you want to change any configuration
$make uImage
Please, make sure to use the right commands.
Thanks for your reply. This is the listing I get with def configs: there does not seem to be a imx6 default config....
dirk@dirk-desktop:~/projects/dcns/sabre/src/ltib$
ls rpm/BUILD/linux-3.0.35/arch/arm/configs/ | grep mx
mx1_defconfig
mx21_defconfig
mx27_defconfig
mx3_defconfig
mx51_defconfig
mxs_defconfig
Did I get the wrong source?
The source (L3.0.35_1.1.0_121218_source.tar.gz) was downloaded from https://www.freescale.com/webapp/Download?colCode=L3.0.35_1.1.0_SOURCE&appType=license&location=null...
Thanks,
Dirk
sorry for my delay.
I´m sure you have the right source code. But I´m not sure how your LTIB is configured.
Double check if you chose imx6 as your platform. If you need to reset every configuration, please, ./ltib -m selectype
You can also take the kernel source code from git repository:
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/log/?h=imx_3.0.35_1.1.0
by
git clone git://git.freescale.com/imx/linux-2.6-imx.git -b imx_3.0.35_1.1.0