[i.mx8mn] Applying kernel changes I modifed

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[i.mx8mn] Applying kernel changes I modifed

Jump to solution
1,528 Views
bryan_hong
Senior Contributor I

dear nxp

When I modifed setup.c on `tmp/work-shared/imx8mn-lpddr4-evk/kernel-sourcearch/arm64/kernel/setup.c` as below.

pr_info("BBBooting Linux on physical CPU 0x%010lx [0x%08x]\n",
 (unsigned long)mpidr, read_cpuid_id());

then, I have executed below command.

$ bitbake -c compile -f linux-imx && bitbake -c deploy linux-imx

$ bitbake core-image-base

 

then I have flash the image as below.

tmp\deploy\images\imx8mn-lpddr4-evk> uuu -b emmc_all imx-boot-imx8mn-lpddr4-evk-sd.bin-flash_evk imx-image-core-imx8mn-lpddr4-evk.wic.zst

 

BUT, It still present not `BBBooting ` but `Booting`.

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 6.1.36+g04b05c5527e9 (oe-user@oe-host) (aarch64-poky-linux-gcc (GCC) 12.3.0, GNU ld (GNU Binutils) 2.40.0.20230620) #1 SMP PREEMPT Mon Sep 4 21:11:15 UTC 2023

How to apply changes in setup.c to the kernel.

Thanks,
Bryan

Tags (1)
0 Kudos
Reply
1 Solution
971 Views
bryan_hong
Senior Contributor I

dear Zhiming

I have checked the boot using kernel I modifed with below command on uboot mode.

setenv ipaddr 192.168.1.162

setenv serverip 192.168.1.143

tftpboot ${loadaddr} Image

tftpboot ${fdt_addr_r} imx8mn-evk-imx8mn-lpddr4-evk.dtb

booti ${loadaddr} - ${fdt_addr_r}

 

Thanks for your support. 

View solution in original post

Tags (1)
0 Kudos
Reply
5 Replies
1,408 Views
bryan_hong
Senior Contributor I

dear  Zhiming_Liu

I'm looking for the way to flash kernel image to the i.mx8mn EVK without toggling dip switch download mode(SW1101).

Alike `fastboot flash boot boot.img` on android.

Thanks,
Bryan

0 Kudos
Reply
1,381 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @bryan_hong 

You can run fastboot usb 0 in uboot, try to use fastboot to flash.

platform-tools> .\fastboot.exe getvar version-bootloader
version-bootloader: U-Boot 2025.04-g44898b9f3cfe
Finished. Total time: 0.005s

u-boot/doc/android/fastboot.rst at master · u-boot/u-boot



Best Regards,
Zhiming

0 Kudos
Reply
972 Views
bryan_hong
Senior Contributor I

dear Zhiming

I have checked the boot using kernel I modifed with below command on uboot mode.

setenv ipaddr 192.168.1.162

setenv serverip 192.168.1.143

tftpboot ${loadaddr} Image

tftpboot ${fdt_addr_r} imx8mn-evk-imx8mn-lpddr4-evk.dtb

booti ${loadaddr} - ${fdt_addr_r}

 

Thanks for your support. 

Tags (1)
0 Kudos
Reply
1,073 Views
bryan_hong
Senior Contributor I

dear Zhiming

As you know, ADB, fastboot did not work because I use linux OS.

Thanks,
Bryan

0 Kudos
Reply
1,499 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @bryan_hong 

Please use 'devtool modify linux-imx' to unpack linux-imx into build-xxx/workspace/source/, then recompile it.

Best Regards,
Zhiming

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2268255%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%5Bi.mx8mn%5D%20Applying%20kernel%20changes%20I%20modifed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2268255%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Edear%20nxp%3C%2FP%3E%3CP%3EWhen%20I%20modifed%20setup.c%20on%20%60tmp%2Fwork-shared%2Fimx8mn-lpddr4-evk%2Fkernel-sourcearch%2Farm64%2Fkernel%2Fsetup.c%60%20as%20below.%3C%2FP%3E%3CP%3Epr_info(%22%3CSTRONG%3EBBBooting%3C%2FSTRONG%3E%20Linux%20on%20physical%20CPU%200x%25010lx%20%5B0x%2508x%5D%5Cn%22%2C%3CBR%20%2F%3E%26nbsp%3B(unsigned%20long)mpidr%2C%20read_cpuid_id())%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3Ethen%2C%20I%20have%20executed%20below%20command.%3C%2FP%3E%3CP%3E%24%20bitbake%20-c%20compile%20-f%20linux-imx%20%26amp%3B%26amp%3B%20bitbake%20-c%20deploy%20linux-imx%3C%2FP%3E%3CP%3E%24%20bitbake%20core-image-base%3C%2FP%3E%3CBR%20%2F%3E%3CP%3Ethen%20I%20have%20flash%20the%20image%20as%20below.%3C%2FP%3E%3CP%3Etmp%5Cdeploy%5Cimages%5Cimx8mn-lpddr4-evk%26gt%3B%20uuu%20-b%20emmc_all%20imx-boot-imx8mn-lpddr4-evk-sd.bin-flash_evk%20imx-image-core-imx8mn-lpddr4-evk.wic.zst%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EBUT%2C%20It%20still%20present%20not%20%60%3CSTRONG%3EBBBooting%3C%2FSTRONG%3E%20%60%20but%20%60%3CSTRONG%3EBooting%3C%2FSTRONG%3E%60.%3C%2FP%3E%3CP%3EStarting%20kernel%20...%3C%2FP%3E%3CP%3E%5B%200.000000%5D%20%3CSTRONG%3EBooting%3C%2FSTRONG%3E%20Linux%20on%20physical%20CPU%200x0000000000%20%5B0x410fd034%5D%3CBR%20%2F%3E%5B%200.000000%5D%20Linux%20version%206.1.36%2Bg04b05c5527e9%20(oe-user%40oe-host)%20(aarch64-poky-linux-gcc%20(GCC)%2012.3.0%2C%20GNU%20ld%20(GNU%20Binutils)%202.40.0.20230620)%20%231%20SMP%20PREEMPT%20Mon%20Sep%204%2021%3A11%3A15%20UTC%202023%3C%2FP%3E%3CP%3EHow%20to%20apply%20changes%20in%20setup.c%20to%20the%20kernel.%3C%2FP%3E%3CP%3EThanks%2C%3CBR%20%2F%3EBryan%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2268375%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20%5Bi.mx8mn%5D%20Applying%20kernel%20changes%20I%20modifed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2268375%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F107445%22%20target%3D%22_blank%22%3E%40bryan_hong%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EPlease%20use%20'%3CSTRONG%3Edevtool%20modify%20linux-imx%3C%2FSTRONG%3E'%20to%20unpack%20linux-imx%20into%20build-xxx%2Fworkspace%2Fsource%2F%2C%20then%20recompile%20it.%3CBR%20%2F%3E%3CBR%20%2F%3EBest%20Regards%2C%3CBR%20%2F%3EZhiming%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2269563%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20%5Bi.mx8mn%5D%20Applying%20kernel%20changes%20I%20modifed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2269563%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Edear%26nbsp%3B%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F151788%22%20target%3D%22_self%22%3E%3CSPAN%20class%3D%22%22%3EZhiming_Liu%3C%2FSPAN%3E%3C%2FA%3E%3C%2FP%3E%3CP%3EI'm%20looking%20for%20the%20way%20to%20flash%20kernel%20image%20to%20the%20i.mx8mn%20EVK%20without%20toggling%20dip%20switch%20download%20mode(SW1101).%3C%2FP%3E%3CP%3EAlike%20%60fastboot%20flash%20boot%20boot.img%60%20on%20android.%3C%2FP%3E%3CP%3EThanks%2C%3CBR%20%2F%3EBryan%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2269720%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20%5Bi.mx8mn%5D%20Applying%20kernel%20changes%20I%20modifed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2269720%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F107445%22%20target%3D%22_blank%22%3E%40bryan_hong%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EYou%20can%20run%20%3CSTRONG%3Efastboot%20usb%200%3C%2FSTRONG%3E%20in%20uboot%2C%20try%20to%20use%20fastboot%20to%20flash.%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Eplatform-tools%26gt%3B%20.%5Cfastboot.exe%20getvar%20version-bootloader%0Aversion-bootloader%3A%20U-Boot%202025.04-g44898b9f3cfe%0AFinished.%20Total%20time%3A%200.005s%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fu-boot%2Fu-boot%2Fblob%2Fmaster%2Fdoc%2Fandroid%2Ffastboot.rst%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Eu-boot%2Fdoc%2Fandroid%2Ffastboot.rst%20at%20master%20%C2%B7%20u-boot%2Fu-boot%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3EBest%20Regards%2C%3CBR%20%2F%3EZhiming%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2289963%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20%5Bi.mx8mn%5D%20Applying%20kernel%20changes%20I%20modifed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2289963%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Edear%26nbsp%3B%3CSPAN%3EZhiming%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EAs%20you%20know%2C%20ADB%2C%20fastboot%20did%20not%20work%20because%20I%20use%20linux%20OS.%3C%2FP%3E%3CP%3EThanks%2C%3CBR%20%2F%3EBryan%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2291537%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20%5Bi.mx8mn%5D%20Applying%20kernel%20changes%20I%20modifed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2291537%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Edear%26nbsp%3B%3CSPAN%3EZhiming%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EI%20have%20checked%20the%20boot%20using%20kernel%20I%20modifed%20with%20below%20command%20on%20uboot%20mode.%3C%2FP%3E%3CP%3Esetenv%20ipaddr%20192.168.1.162%3C%2FP%3E%3CP%3Esetenv%20serverip%20192.168.1.143%3C%2FP%3E%3CP%3Etftpboot%20%24%7Bloadaddr%7D%20Image%3C%2FP%3E%3CP%3Etftpboot%20%24%7Bfdt_addr_r%7D%20imx8mn-evk-imx8mn-lpddr4-evk.dtb%3C%2FP%3E%3CP%3Ebooti%20%24%7Bloadaddr%7D%20-%20%24%7Bfdt_addr_r%7D%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThanks%20for%20your%20support.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E