We are using jetson tk1 board.
I want to build cross toolchain for arm cortex a15. So can you please guide us.?
And also want to know the steps for how to flash cross compiled kernel for tegra tk1 board.
So can any help me on both this.?
Why do you want to build a cross toolchain? There’s a plenty of those available already (e.g. in Ubuntu: sudo apt-get install gcc-arm-linux-gnueabihf). If you want to do something specific when compiling the cross toolchain itself, you should provide more details about your goals.
The latest Linux for Tegra releases use U-Boot and with that you don’t need to “flash” the kernel. You can just copy it with e.g. scp to the /boot -directory. I do recommend that you name the files e.g. based on your version number and add a U-Boot menu entry (/bot/extlinux/extlinux.conf) for them. That allows you to choose which one to boot and if the latest one is broken and panics, you can just press the reset button and boot up with a previous working kernel and update again the latest one.
If your host is Ubuntu just use the information kulve gave. If your host is not Ubuntu it may have packages already available for cross compile with a different package name. Pre-built tools are usually the best way to go.
We have successfully installed cross toolchain as you told above and also run sample application cross compiled by toolchain which run successfully on tegra jetson board.
But now question is we have created zImage for jetson tk1 board compiled with cross toolchain. So how to load cross compiled kernel on board with taking backup of existing one.?
I doesn’t matter if you cross compiled it or not, this is how you run it:
Use e.g. scp to copy the new zImage to the Jetson with a new file name, e.g. /boot/zImage-my01
Then edit /boot/extlinux/extlinux.conf. Copy the existing menu entry and change the name and the kernel image file name.
Connect the serial cable to Jetson if you don’t have it already. In practice do always do need the serial cable when modifying the bootloader or the kernel.
When Jetson is booting up you can see bootloader showing the kernels listed in extlinux.conf. Select your new kernel and the bootloader will boot that. If your kernel fails to boot, just hit the reset button and let the bootloader boot the default kernel.
After you have verified that your kernel works fine, you can change the default kernel from extlinux.conf and the bootloader will then boot that by default.
We have modified “jetson-tk1_extlinux.conf.emmc”. We added zImage and DTB file name in this .conf file and also added LABEL as secondary but how to stop bootloader for asking option for added kernel.
Currently it is not asking which kernel to boot at boot time. How to select different kernel option at boot time.?
I edited just the “extlinux.conf” and that worked for me. I think the other files are something that you can copy over the extlinux.conf if you want to choose one of them.
This is from my boot:
Scanning mmc 0...
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
1528 bytes read in 90 ms (15.6 KiB/s)
Jetson-TK1 eMMC boot options
1: primary kernel
2: 21r3 kernel
Enter choice: 2: 21r3 kernel
Retrieving file: /boot/zImage-21r3
We are not able to see any log related to extlinux.conf.
Below are the UART logs for the tegra tk1 board.
[ 5429.423849] Restarting system.
[ 5429.459078] Restarting Linux version 3.10.24-grinch-19.3.8 (root@tegra-ubuntu) (gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-19ubuntu1) ) #1 SMP PREEMPT Fri Dec 19 00:07:11 UTC 2014
[ 5429.459078]
Bootloader-AVP Init at: 478657 us
Dummy read for TPS65913
Board Id = 0x177
NVRM Initialized shmoo database
NVRM CLOCKS: PLLX0: 696000 Khz
NVRM CLOCKS: PLLM0: 924000 Khz
NVRM CLOCKS: PLLC0: 0 Khz
NVRM CLOCKS: PLLP0: 408000 Khz
NVRM CLOCKS: PLLA0: 11289 Khz
NVRM CLOCKS: CPU: 696000 Khz
NVRM CLOCKS: AVP: 48000 Khz
NVRM CLOCKS: System Bus: 48000 Khz
NVRM CLOCKS: Memory Controller: 924000
NVRM CLOCKS: External Memory Controller: 924000
0x06 BoardInfo: 0x0001:0x0007:0x0177:0x0000:0x03:0x45:0x00:0xff:0xff:0xff:0xff:0xff:0xff
ADJUSTED CLOCKS:
MC clock is set to 924000 KHz
EMC clock is set to 924000 KHz (DDR clock is at 924000 KHz)
PLLX0 clock is set to 696000 KHz
PLLC0 clock is set to 0 KHz
CPU clock is set to 696000 KHz
System and AVP clock is set to 48000 KHz
GraphicsHost clock is set to 163200 KHz
MSENC clock is set to 92400 KHz
Vde clock is set to 204000 KHz
Bootloader-Cpu Init at (time stamp): 500806 us
Pinmux changes applied in kernel way
[bootloader] (version UNDEF_BUILD)
Platform Pre Boot configuration...
NvDdkUsbhBlockDevInit..
The proc BoardInfo: 0x0177:0x0000:0x03:0x45:0x00
Initializing Display
This Pmu Module is not present.
DSI PAD calibration done
DSI PAD calibration done
DSI PAD calibration done
DSI PAD calibration done
TSEC OTF key generation process started
Checking for android ota recovery
(FastbootBMPRead) Unsuccesful attempt to read BMP image
Could not render BMP on screen
Cold-booting Linux
Platform Pre OS Boot configuration...
FastbootAddAtag: setting ATAG (1413545985)
mmcblk0p1
OTF key is successfully generated and Unencrypted key is written to VDE
NvTsecKeyEncryption: entry
NvInitKeyEncryption: entry
TsecInit: entry: MemSize=1700
KeyEncryption: entry
KeyEncryption: exit
NvInitKeyEncryption: exit
NvTsecKeyEncryption: exit
The proc BoardInfo: 0x0177:0x0000:0x03:0x45:0x00
FastbootAddAtag: setting ATAG (0)
Board Id Read Time: 0 us
Power Rail enable Time: 6925 us
Miscellaneous avp time: 15224 us
Bootloader (AosInit) time: 2422 us
Bootloader Main Init time: 201974 us
BlockDevMgrInit time: 3501 us
PartMgrInit time: 1 us
StorMgrInit time: 4 us
FsMgrInit time: 0 us
Partition Table load: 79513 us
Display init time: 565357 us
Kernel read time: 126 msec
Load Kernel Size: 5668864 Bytes
Bl Kernel ReadSpeed: 44990000 Bytes/sec
Pre-Kernel Jump time: 89879 us
Jumping to kernel at (time stamp): 1673125 us
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 3.10.24-grinch-19.3.8 (root@tegra-ubuntu) (gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-19ubuntu1) ) #1 SMP PREEMPT Fri Dec 19 00:07:11 UTC 2014
[ 0.000000] CPU: ARMv7 Processor [413fc0f3] revision 3 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[ 0.000000] Machine: jetson-tk1, model: NVIDIA Tegra124 PM375, serial: 0
[ 0.000000] Truncating memory at 0x80000000 to fit in 32-bit physical address space
[ 0.000000] Found vpr, start=0xf6900000 size=9700000
[ 0.000000] Found tsec, start=0xf4900000 size=2000000[ 0.000000] Found tegra_fbmem: 01f60000@ad012000
[ 0.000000] Tegra reserved memory:
You seem to be using fastboot and an old release. Newer Linux for Tegra releases use U-Boot by default. If you want to continue using fastboot you need to use the flash.sh scrip the flash the kernel over USB.
But I strongly recommend upgrading to the 21.3 release with U-Boot.
I have taken latest file system for tegra tk1, package version R21.3. After extracting it into host PC i found that /usr directory has size of around 1.8 GB in which it contain library and much more thing which is not required for our goal.
I want to flash file system for embedded application in which such this things are not required in /usr.
So can any one guide me on this, how to optimize this or how to delete things which are not required for embedded application.?