This is the function that works on the BPi M1
Bpiname(){
sudo mount /dev/mmcblk0p1 /mnt
grep '^BPINAME' /mnt/.config |grep -o '[^=]*$'
sudo umount /mnt
}
Outputting: MIKEY Banana Pi BPI v1.0
This is the function that works on the BPi M1
Bpiname(){
sudo mount /dev/mmcblk0p1 /mnt
grep '^BPINAME' /mnt/.config |grep -o '[^=]*$'
sudo umount /mnt
}
Outputting: MIKEY Banana Pi BPI v1.0
So after all directories are properly copied to the HDD, just change the file cmdline.txt
on /dev/mmcblk0p1
, and reboot?
if it is cmdline.txt on your setupâŚyesâŚmy boards have only uenv.txtâŚyour kernel has builtin-sata-support?
I tried checking for the SATA support, my /proc/config.gz has:
CONFIG_SATA_PMP=y
CONFIG_SW_SATA_AHCI_PLATFORM=y
So to me it seems the SATA support is builtin â right?
(My uEnv.txt
only has one line: ethaddr=aa:bb:cc:dd:ee:ff
âŚ)
in 5.x/4.x the main-option should be
CONFIG_SATA_AHCI=y
I have 3.4.112-sun7i
and that option is not present, but all options that have SATA are builtin. If it doesnât boot on SATA, I guess I could edit the kernel commandline in GRUB and still boot from /dev/mmcblk0
you can leave your sd-card for testing as it isâŚremember changing fstab on hdd-rootfs to mount right partition (not from sdcard again)
and then you can change back by editing uboot-config (i donât think you have grub)
Haha, of course, no GRUB (I never see it booting as itâs normally headless).
Thanks for the reminder about fstab on the HDD.
So by âediting uboot-configâ you mean (in my case) editing cmdline.txt
, right?
Is there any chance of booting off a LUKS encrypted partition? I guess that would involve rebuilding the uInitrd â if at all possible.
As i said my config is all in uenv.txt (bpi-r2/r64),i have no cmdline.txt. But if there is your /dev/mmcblkxpy root then try change it there. I guess your uboot is configured to use different files for config.
Hi pepa65,
if you running on an armbian-os there will be the file /etc/armbian-release generated with additional informations also about the board used. The two vairables BOARD and BOARD_NAME will be exported, so your shell can use it.
~ ~ ~ ~ ~
pi@bananapi:/etc$ cat /etc/armbian-release
BOARD=bananapi
BOARD_NAME="Banana Pi"
BOARDFAMILY=sun7i BUILD_REPOSITORY_URL=https://github.com/armbian/build BUILD_REPOSITORY_COMMIT=7223cca4 VERSION=5.90 LINUXFAMILY=sunxi BRANCH=next ARCH=arm IMAGE_TYPE=stable BOARD_TYPE=conf INITRD_ARCH=arm KERNEL_IMAGE_TYPE=zImage pi@bananapi:/etc$
pi@bananapi:/etc$ echo $BOARD_NAME
Banana Pi
pi@bananapi:/etc$
~ ~ ~ ~ ~
pi@bananapim2zero:~$ cat /etc/armbian-release
BOARD=bananapim2zero
BOARD_NAME="Banana Pi M2 Zero"
BOARDFAMILY=sun8i VERSION=5.41 LINUXFAMILY=sun8i BRANCH=default ARCH=arm IMAGE_TYPE=user-built BOARD_TYPE=conf INITRD_ARCH=arm KERNEL_IMAGE_TYPE=zImage pi@bananapim2zero:~$ pi@bananapim2zero:~$ echo $BOARD_NAME
Banana Pi M2 Zero
pi@bananapim2zero:~$
~ ~ ~ ~ ~
Regards WolliK
echo "$(tr -d '\0' 2>/dev/null </proc/device-tree/model)"