I downloaded image for my board from here http://forum.banana-pi.org/t/bpi-r2-new-image-bpi-r2-openwrt-lede-souce-code-2018-05-09/5646, because I want to work on SD card. I used dd command to flash the card and start the system from it.
Then I used sysugrade to install my kernel, but I noticed that cat /proc/cmdline doesn't show two options (
cgroup_enable=memory cgroup_memory=1) that I set in kernel_menuconfig.
I want to change the bootargs, but I don't have /boot/ partition or uEnv.txt file.
Compilation process for my device outputs sysupgrade archives only. This is why I searched for a complete image of a system.
Does OpenWrt use bootloader from eMMC to start from SD card? I don't know how this boot process works.
How can I pass those arguments to the kernel?
My one attempt was to get into uboot shell, change bootargs using setenv and boot the kernel, but boot command is not working there. For example I have boot_normal variable that should boot from SD.
boot_normal=if run checksd; then echo Boot from SD ; setenv partition 1:1; else echo Boot from eMMC ; mmc init 0 ; setenv partition 0:1 ; fi; if run loadbootenv; then echo Loaded environment from ${bootenv}; env import -t ${scriptaddr} ${filesize}; fi; run uenvcmd; fatload mmc 0:1 ${loadaddr} ${bpi}/${board}/${service}/${kernel}; bootm
It uses mmc init command, but this command is not available in the shell. There is mmc dev. Something is wrong here. It always tries to use eMMC.
Output of run boot_normal
** Bad device size - mmc 1 **
Boot from eMMC
mmc - MMC sub system
Usage:
mmc read addr blk# cnt
mmc write addr blk# cnt
mmc erase blk# cnt
mmc rescan
mmc part - lists available partition on current mmc device
mmc dev [dev] - show or set current mmc device
mmc list - lists available devices
mmc setdsr - set DSR register value
** Bad device size - mmc 0 **
** Bad device size - mmc 0 **
## Error: "uenvcmd" not defined
** Bad device size - mmc 0 **
bootm flag=0, states=70f
Wrong Image Format for bootm command
ERROR: can't get kernel image!
I also tried to set partition to 1:1 and run loadbootenv, but nothing changes.
I wonder if sysupgrade also updates uboot and boot scipts?