Debian/Ubuntu image creation

Good news :tada:

First is no error,just ignore it :slight_smile: Second depends on root-var defined in uboot…you can change it in uEnv.txt. as mmcblk1 is sd and you have removed sd it stops here.

create a uEnv.txt in boot-partition (bananapi/bpi-r64/linux/) and set root like it is done in builtin environment but with mmcblk0p2

Do not forget /etc/fstab on emmc when booting sdcard again

Thank You Frank !!!

i have wrote only one string )

and can boot root from sata :partying_face:

root@bpi-r64:/# cat /boot/bananapi/bpi-r64/linux/uEnv.txt                    
#
## uEnv.txt
#
root=/dev/sda1 rootfstype=ext4 rootwait

root@bpi-r64:/# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        30G  957M   27G   4% /
tmpfs           496M     0  496M   0% /dev/shm
tmpfs           199M  644K  198M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
/dev/mmcblk0p4  100M   21M   80M  21% /boot
/dev/sda2        88G   16G   68G  19% /shara
tmpfs           100M     0  100M   0% /run/user/0
tmpfs           100M     0  100M   0% /run/user/1000
root@bpi-r64:/# 

final question:

how can i add a driver module to the kernel ?

i need an additional usb wifi-5g card

You can clone my kernel repo, switch to branch you want (x.y-main),change board in build.conf to bpi-r64,and run the build.sh steps described in readme to add your driver to menuconfig,build and pack

thanks Frank, i’ll try )

After building/packing you get a tar.gz file where you have 2 folders BPI-BOOT (kernel) and BPI-ROOT (modules) which contain content you need to unpack to the right partition

In my uboot-repo readme i described how you can do this

Beware that r64 uses subfolder bananapi/bpi-r64/linux for itb and uEnv.txt,rest is same

Hello Frank

i have assemble kernel 6.6.14, but there is no sata driver

can you tell me which driver module needs to be enabled?

[    2.546775] Waiting for root device /dev/sda1...

you had 6.1 before and there it was working? defconfig for r64 is same in both branches…

CONFIG_AHCI_MTK=y

and it is set in 6.6-main too…

i missed a patch in 6.6 (asm-sel is different and sata nodes were disabled) due to missing time, sorry

added it and pushed current state…please pull the changes and compile again

Hi Frank

i managed to install everything well, Thank you !

may i advise you to add the option to the kernel

(Networking support > Networking options > Network packet filtering framework (Netfilter) >REDIRECT target support)

image

a router must still be able to redirect packets )

I guess there are more options missing (like iptables,nftables) for r64 as i have never configured as router.

Wouldn’t it be easier to maintain 1 kernel config for all bpi mediatek routers? The difference in kernel Image size is not so much.

I’m not sure if i can combine defconfigs for r64,r3 and r4 (and the right options were taken based on dts). Already thought about similar system as openwrt (using a device specific defconfig and adding general options on top, yes,openwrt has generic as base and adds specific ). But some specific drivers are not used on other boards so i left it by separate defconfigs

Works fine here… Just need to remember that some options in R4 kernel are not available in other kernels. That makes saving the defconfig a bit tricky.

Gentlemens

the vendor declares all three products as routers and if you have masquerading enabled in the kernel, it should be also the option redirect ) there are no conflicts in all three products with this option

i only listed 3 products…my kernel supports now R2,R3,R4,R3Mini and R2Pro :stuck_out_tongue:

for a router a bunch of options make sense which may not enabled at the moment…i guess for r64 i also miss some iptables/nftables options, thats why i’m thinking of defining a device-specific defconfig and one for “router options” which are merged before import, but this is much more work and i have limited time :stuck_out_tongue:

i tried to enable only options needed to make kernels as small as possible to save time for compiling (also in CI) and space on my cards for testing (where i need to have multiple kernels installed when testing e.g. wifi which needs modules installed so cannot use tftp here)…for some tests i needs to reinstall kernels very often which harms my cards with (in first place) unused stuff. of course i can enable the redirect and some others in first step, but target should be maintaing these options only once and in a way i can disable these for testing (when not used)…this needs a good concept to not break any usecase :slight_smile: