Author Topic: How to pass a cmd line to kernel ?  (Read 3567 times)

cam1965

  • Sr. Member
  • ****
  • Posts: 422
    • View Profile
    • http://
How to pass a cmd line to kernel ?
« on: June 10, 2021, 08:52:44 pm »
Hi.
How to pass a comand line to kernel ?
I would like to pass apparmor=1 security=apparmor to my kernel.
For example :

mkbootimg --kernel cosmo/arch/arm64/boot/Image.gz-dtb --ramdisk initramfs-4.4.146 --base 0x40078000 --second_offset 0x00e88000 --cmdline "bootopt=64S3,32N2,64N2 log_buf_len=4M" --kernel_offset 0x00008000 --ramdisk_offset 0x14f88000 --tags_offset 0x13f88000 --pagesize 2048 -o linux-boot.img.

I have tried to put something like this  --cmdline  "bootopt=64S3,32N2,64N2 log_buf_len=4M" apparmor=1 security=apparmor.
But the kernel didn´t boot correctly.
Any help ?
Thanks.

lokomoko

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: How to pass a cmd line to kernel ?
« Reply #1 on: June 11, 2021, 04:09:24 am »
Just for curiousity: Does it help to put the quot to the end of the command line like below?
Code: [Select]
--cmdline  "bootopt=64S3,32N2,64N2 log_buf_len=4M apparmor=1 security=apparmor"

cam1965

  • Sr. Member
  • ****
  • Posts: 422
    • View Profile
    • http://
Re: How to pass a cmd line to kernel ?
« Reply #2 on: June 11, 2021, 06:12:27 am »
Just for curiousity: Does it help to put the quot to the end of the command line like below?
Code: [Select]
--cmdline  "bootopt=64S3,32N2,64N2 log_buf_len=4M apparmor=1 security=apparmor"

I did this also in my previous tests
But the kernel still doesn´t boot correctly.  In both, it stops at the debian logo.
Thank you.