Banana Pi R2: Boot partiton, uboot

I downloaded image for my board from here, 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

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?

Maybe I'll rephrase the question.
I think that uboot and kernel are located on /dev/mmcblk0boot0 and 1.
/dev/mmcblk1 should be my SD card. This indicates that uboot is on eMMC.

If I change CONFIG_CMDLINE in kernel_menuconfig and do sysupgrade, will it also change uboot configuration or should I flash uboot? How to do that?

please post the output of

printenv ( from within uboot )

most likely uboot resides within Pi flash. BACK IT UP!

i would not recommend writing uboot...... most ( OEM ) uboots vary slightly in what they have to offer so we'll need to experiment a bit ( unless a knowledgable soul / more research leads us to the answers first )

in my case, the limiting factor was that the OEM uboot did not recognise the external sdcard on my device..... so it was not possible for me to experiment non destructively with that.... and compiling another uboot to flash was ambiguous, intensive, a potentially destructive.... your kind of lucky in the fact that the Pi is REALLY well documented / tested / utilised......

so i switched to external usb.....

i would be asking myself;

-can i verify that the bootloader will read from mmc
-what filesystem / etc. other limitations reside within the built in uboot.

basically two or thress commands are ( usually ) needed to mess around.....

-a device init command ( usb start / mmc init or whatever )
-device select ( usb dev 0:1 / mmc dev 0:2 ) or whatever
-device read ( ext2ls usb 0:1 / ext4ls / fatls ) or whatever

once you nail down what these commands are in your circumstances, all will be clear(er) :slight_smile:

EDIT: probably enough above to cobble something for you to test.....

beware though..... sysupgrade might overwrite stuff if it ends up working

mmc rescan
mmc dev 0:1
fatload mmc 0:1 ${loadaddr} /path/to/kernel/on/fatpart1

or something like that.... fatls or similar would be helpful

Thank you for feedback, but I found that there is an option in kernel_menuconfig (CONFIG_CMDLINE_EXTEND) that leads to appending my command line arguments to the bootloader's. I'll stick to that for now.