Quantcast
Channel: Linux Device Hacking
Viewing all articles
Browse latest Browse all 3178

Change bootargs in uboot (2 replies)

$
0
0
Hi Bodhi, Hi @All,

I recently updated my Thecus N2350 to Debian Bullseye as well as the newest kernel 5.14.9. Working fine as always, thanks!
I do now have some problems with Docker and cgroups v2 and wanted to change the init system (init=/bin/systemd) or even set a custom systemd config (systemd.unified_cgroup_hierarchy=0) as kernel parameters.

I did set my set_bootargs parameter in uboot:
bootdelay=5
baudrate=115200
boot_config=setenv devices "usb scsi"; setenv bootdev usb; setenv device 0:1; setenv disks "0 1 2 3 4 5 6 7";
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_scsi "scsi reset"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if ext2load $dev $disknum:1 $load_image_addr /boot/zImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
kernel_config=setenv load_dtb_addr 0x1000000; setenv load_initrd_addr 0x3000000; setenv load_image_addr 0x02000000; setenv dtb_file /boot/dts/armada-385-thecus-n2350.dtb
load_image=echo loading uImage ...; ext2load $bootdev $device $load_image_addr /boot/uImage
load_dtb=echo loading DTB $dtb_file ...; ext2load $bootdev $device $load_dtb_addr $dtb_file
load_initrd=echo loading uInitrd ...; ext2load $bootdev $device $load_initrd_addr /boot/uInitrd
set_bootargs_stock=setenv bootargs "root=/dev/ram0 rw max_loop=210 console=ttyS0,115200 init=sbin/init rootdelay=3 ubi.mtd=0 mtdparts=armada-nand:-(ubifs);spi_flash:0x00400000(uboot),0x00010000@0x00100000(uboot_env)"
bootcmd_exec=echo Booting from $bootdev $device …; setenv fdt_skip_update yes; setenv initrd_high 0xffffffff; if run load_image; then if run load_initrd; then bootm $load_image_addr $load_initrd_addr; else bootm $load_image_addr; fi; fi
bootcmd_custom=run boot_config; run kernel_config; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd=echo Booting Debian ...; run bootcmd_custom; echo Booting stock ...; run set_bootargs_stock; usb reset; if fatload usb 0:1 0x2000000 rescue_fw/rescue_fw.img;then imi 0x2000000;source 0x2000000; fi; ubi part ubifs;ubifsmount boot;ubifsload 0x2000000 boot/bzImage;ubifsload 0x3000000 boot/ramdisk;bootm 0x2000000 0x3000000
set_bootargs=setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=armada-nand:-(ubifs);spi1.0:0x00400000(uboot),0x00010000@0x00100000(uboot_env),0x00010000@0x00300000(uboot_scr) earlyprintk=serial init=/bin/systemd"

to activate systemd, but it seems, that my parameters are ignored.
mjung@vega:~$ cat /proc/cmdline                                                                                                                                                                                     console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=pxa3xx_nand-0:-(ubifs);spi1.0:0x00400000(uboot),0x00010000@0x00100000(uboot_env),0x00010000@0x00300000(uboot_scr) earlyprintk=serial

Systemd is of course installed
mjung@vega:~$ ls -lh /bin/systemd                                                                                                                                                                                   lrwxrwxrwx 1 root root 20 Jul 13 19:29 /bin/systemd -> /lib/systemd/systemd

Thanks!

Viewing all articles
Browse latest Browse all 3178

Trending Articles