Reputation: 363
I am not familiar with a Android kernel compile process. But I encountered a problem recently, and it troubled me so much.
Here is the problem descrition: Based on Android, I build customed images including boot.img, system.img and so on. Then I need to flash those images to physical device in order to boot to Android Home Screen. Before compiling those images files, I have set a new kernel command line:
CONFIG_CMDLINE="root=/dev/mtdblock2 rw init=/init console=ttyS0, 115200 mem=128M uard_dma android"
After compiling those images, I opened boot.img in vim and saw the following string in it:
"root=/dev/mtdblock2 rw init=/init console=ttyS0, 115200 mem=128M uard_dma android"
But when I flashed the boot.img into device, I got the different output like this:
**Kernel command line: console=ttyO2,115200n8 earlyprintk**
In other word, I set the kernel command line value, and it was wrote into boot.img, but when flash boot.img into device, I got a different kernel command line value.
Has anybody ever encountered this problem and got it fixed?
Really appreciating your help.
Thanks advanced!
Upvotes: 1
Views: 5266
Reputation: 22487
The bootloader will be passing a command line to the kernel.
For example if u-boot bootloader is used,
it will be contained in the u-boot variable bootargs
This can be verified at the bootloader prompt.
For example if the device is using u-boot bootloader.
Connect the device to your PC over a serial prompt.
Launch a serial emulator on your PC (minicom, teraterm, hyper-terminal).
Power-on the device.
Press any key to halt the device boot at the bootloader stage itself.
Now on the u-boot prompt enter the following command:
u-boot# printenv
This will list all the uboot-variables. Note the value of variable bootargs.
This can be modified by using the following command:
u-boot# setenv bootargs ''
To save this value across reboots use the following commmand:
u-boot# saveenv
Similar functionality is available in other bootloaders as well.
Upvotes: 1