iMX6 Sabre board: Ubuntu 16.04 build & kernal module issue


#1

Hi,

  1. Followed the instructions to build a Boot-able Ubuntu 16.04 SDcard image. The build goes fine & I choose a Ubuntu 16.04 file system. The build scripts tell me I have a kernel_version=4.9.92-armv7-rt-x6. I flash the A SDcard with the image and boot up my iMX6 Sabre Smart card. Login and type “uname -v” to ask for the kernel version and get this response: 4.9.39-armv7-rt-x4. What’s up with this ?

  2. I also built a Broadcom 4359 wifi driver using the same compiler and setup as the 16.04 image. All goes well and I get the a bcmdhd.ko file. Copy the file to the Sabre Board file system. When I try to load it on the Sabre board it fails.
    Load command: “sudo insmod /pathToFile/bcmdhd.ko”
    Response: “insmod ERROR: could not insert module /pathToFile/bcmdhd.ko: Invalid module format”
    A search of the net reveals that this ERROR usually means that the module was built with a different kernel source package than the system that is running.
    So what’s going on with this ?
    Is it related to the 4.9.92 vs 4.9.32 kernel version issue or something else?

Thanks,
Jim


#2

Hi Jim,

After copying the newer kernel version, did you update the uname_r variable in /boot/uEnv.txt to point to your newer kernel?

Correct, retry insmod with the newer kernel version booted.

Regards,


#3

I followed the instructions to build a Boot-able Ubuntu 16.04 SDcard image. But no work. Any hint? Thanks.

export DISK=/dev/sdc    
sudo dd if=/dev/zero of=${DISK} bs=1M count=10    
sudo dd if=~/imx6q/u-boot/SPL of=${DISK} seek=1 bs=1k   
sudo dd if=~/imx6q/u-boot/u-boot.img of=${DISK} seek=69 bs=1k

#4

@marvintien that’s just the boot-loader instructions.

Starting from the beginning, what is the exact board you are using? What kernel did you install? What do you see over the serial port?

Regards,


#5

I am using Imx6Q sabre-sd board bought from DigiKey.So far, I only install SPL and u-boot.img to SD card follow the instructions but it has no message output in serial console.

I wonder something or step is missing, do you have prebuilt u-boot image and related files? I'd like to try it. Thanks!

#6

@marvintien, which board? Freescale has released a few revisions, in my case I’m using an older “MCIMX6Q-SDB”.

Make sure you have the BOOT switches setup for booting from SD3:

https://eewiki.net/display/linuxonarm/i.MX6q+SABRE+Board+for+Smart+Devices#i.MX6qSABREBoardforSmartDevices-Notes

boot_switch

Next, double check that you are using the correct usb port for serial debug:

imx6q

Over serial you should see:

U-Boot SPL 2017.07-rc1-dirty (Jun 19 2018 - 13:15:26)
Trying to boot from MMC1


U-Boot 2017.07-rc1-dirty (Jun 19 2018 - 13:15:26 -0500)

CPU:   Freescale i.MX6Q rev1.2 996 MHz (running at 792 MHz)
CPU:   Automotive temperature grade (-40C to 125C) at 26C
Reset cause: POR
Board: MX6-SabreSD
I2C:   ready
DRAM:  1 GiB
PMIC:  PFUZE100 ID=0x10
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
*** Warning - bad CRC, using default environment

PCI:   pcie phy link never came up
No panel detected: default to Hannstar-XGA
Display: Hannstar-XGA (1024x768)
In:    serial
Out:   serial
Err:   serial
Net:   FEC [PRIME]
Press SPACE to abort autoboot in 2 seconds
MMC: no card present
mmc_init: -123, time 2
MMC: no card present
mmc_init: -123, time 2
switch to partitions #0, OK
mmc1 is current device
SD/MMC found on device 1
Checking for: /uEnv.txt ...

Regards,


#7

I am also using “MCIMX6Q-SDB”, but its version is C6.

All are correct as you said, but my u-boot which is built followed the instructions can’t work.

Thanks.


#8

There is a attached SD card inside my i.MX6Q Sabre-SD board, it run as Android-8.0.0, this is its boot message, as follows.

I try to copy the 8Mbytes image(u-boot+Linux kernel) from the beginning of this SD card(/dev/sdc), but still failed, does it has the protection of secure boot?

Is it possible to copy the u-boot image from this SD card? Thanks.

U-Boot 2017.03 (Jan 20 2018 - 10:42:40 +0800)
CPU:   Freescale i.MX6Q rev1.5 996 MHz (running at 792 MHz)
CPU:   Automotive temperature grade (-40C to 125C) at 36C
Reset cause: POR
Model: Freescale i.MX6 Quad SABRE Smart Device Board
Board: MX6-SabreSD
DRAM:  1 GiB
PMIC: PFUZE100! DEV_ID=0x10 REV_ID=0x21
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
*** Warning - bad CRC, using default environment
No panel detected: default to Hannstar-XGA
Display: Hannstar-XGA (1024x768)
In:    serial
Out:   serial
Err:   serial
flash target is MMC:1
Net:
Warning: ethernet@02188000 using MAC address from ROM
eth0: ethernet@02188000 [PRIME]
Fastboot: Normal
Hit any key to stop autoboot:  0
=>
=>

#9

@marvintien, secure boot should not be enabled by default on these boards.

I’ve updated our directions here for u-boot v2018.07-rc2, encase the previous version was too old.

https://eewiki.net/display/linuxonarm/i.MX6q+SABRE+Board+for+Smart+Devices

Side note, how are you dd’ing the files to the microSD? Are you using a native linux machine, or are you running Windows/MacOSX with some sorta virtual machine setup?

U-Boot SPL 2018.07-rc2-dirty (Jun 20 2018 - 16:17:27 -0500)
Trying to boot from MMC1


U-Boot 2018.07-rc2-dirty (Jun 20 2018 - 16:17:27 -0500)

CPU:   Freescale i.MX6Q rev1.2 996 MHz (running at 792 MHz)
CPU:   Automotive temperature grade (-40C to 125C) at 27C
Reset cause: POR
Board: MX6-SabreSD
I2C:   ready
DRAM:  1 GiB
PMIC:  PFUZE100 ID=0x10
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... *** Warning - bad CRC, using default environment

Failed (-5)
PCI:   pcie phy link never came up
No panel detected: default to Hannstar-XGA
Display: Hannstar-XGA (1024x768)
In:    serial
Out:   serial
Err:   serial
Net:   FEC [PRIME]
Press SPACE to abort autoboot in 2 seconds
MMC: no card present
MMC: no card present
switch to partitions #0, OK
mmc1 is current device
SD/MMC found on device 1
Checking for: /uEnv.txt ...

Regards,


#10

i.mx6Qsabre-sd C6 board
is the newest i.mx6Qsabre-sd board, it is sold in DigiKey website.

Maybe you can get one from DigiKey and try it. Thanks.


#11

​My ex-e-mail is rejected, because it said I am new user cannot attached file.

I build and install u-boot v2018.07-rc2, the result is the same, no output from serial debug port.

Do you have i.mx6Qsabre-sd C6 board?


#12

The u-boot.bin, uImage are already installed in NXP Andorid 8.0.0 SD card.

I type following “dd” commands to retrieve u-boot.bin, uImage

from
Andorid 8.0.0 SD card, then copy them to my microSD card, all of these commands are running in Ubuntu 16.04 Desktop PC.

I compare them by “hexdump -n 128”, they are the same, but my microSD can’t boot. Thanks.

  1. copy u-boot.bin, uImage from Andorid 8.0 SD card:

sudo dd if=/dev/sdc of=u-boot.bin bs=1k skip=1 conv=fsync count=1023

sudo dd if=/dev/sdc of=uImage bs=1M skip=1 conv=fsync count=7

  1. copy u-boot.bin, uImage to my microSD card:

sudo dd if=u-boot.bin of=/dev/sdc bs=1k seek=1 skip=1 conv=fsync count=1023

sudo dd if=uImage of=/dev/sdc bs=1M seek=1 skip=1 conv=fsync count=7