[BPI-M3] how to use fatload uEnv.txt & script.bin & kernel uImage


(bpi team) #1

[BPI-M3] how to use fatload uEnv.txt & script.bin & kernel uImage

linux-bananapi-bpi-m3-kernel3_1.2.6_armhf.deb: https://drive.google.com/file/d/0B6FbwMfcqfFZUVJzWG1xYmZZcW8/view

step 1: dpkg -i linux-bananapi-bpi-m3-kernel3_1.2.6_armhf.deb step 2: bpi-bootsel /usr/lib/u-boot/bananapi/bpi-m3/BPI_M3_720P.img.gz step 3: cd /media/pi/BPI-BOOT ; tar xvf BPI-BOOT-bpi-m3.tgz step 4: cd bananapi/bpi-m3/linux ; vi uEnv.txt (if you want to change) step 5: reboot

check files:

root@bananapi:/media/bpi/BPI-BOOT/bananapi/bpi-m3/linux# ls -l                  
total 5648                                                                      
-rw-r--r-- 1 bpi bpi   55408  2月 23 14:27 script.bin                           
-rw-r--r-- 1 bpi bpi    2013  2月 25 08:39 uEnv.txt                             
-rw-r--r-- 1 bpi bpi 5718480  2月 24 10:53 uImage

# cat uEnv.txt 
bpi=bananapi
board=bpi-m3
chip=a83t
service=linux
#kernel=kernel_bpi-m3_aufs.img
#kernel=boot.fex
kernel=uImage
scrip=script.bin

ahello=echo Banaan Pi ${board} chip: $chip Service: $service

aboot=if fatload $device $partition 0x43100000 ${bpi}/berryboot.img; then bootm 0x48000000 0x43100000; else bootm 0x48000000; fi
aload_script=fatload $device $partition 0x43000000 ${bpi}/${board}/${service}/${script}
aload_kernel=fatload $device $partition 0x48000000 ${bpi}/${board}/${service}/${kernel}

uenvcmd=run ahello aload_script aload_kernel aboot

#
# from sys_config.fex
#
#;output_type  (0:none; 1:lcd; 2:tv; 3:hdmi; 4:vga)
#;output_mode  (used for tv/hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50 5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60 11:pal 14:ntsc)
#

# ref. sys_config.fex, use default script.bin
bootargs=enforcing=1 console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p2 rootwait init=/init vmalloc=384M ion_cma_list="120m,176m,512m" loglevel=8 bootmenutimeout=10 datadev=mmcblk0p2

# output HDMI 1080P (type:3 mode:10)
#bootargs=enforcing=1 console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p2 rootwait init=/init vmalloc=384M ion_cma_list="120m,176m,512m" loglevel=8 bootmenutimeout=10 datadev=mmcblk0p2 disp.screen0_output_type=3 disp.screen0_output_mode=10 disp.screen1_output_type=3 disp.screen1_output_mode=10

# output HDMI 720P (type:3 mode:5)
#bootargs=enforcing=1 console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p2 rootwait init=/init vmalloc=384M ion_cma_list="120m,176m,512m" loglevel=8 bootmenutimeout=10 datadev=mmcblk0p2 disp.screen0_output_type=3 disp.screen0_output_mode=5 disp.screen1_output_type=3 disp.screen1_output_mode=5

# output HDMI 480P (type:3 mode:2)
#bootargs=enforcing=1 console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p2 rootwait init=/init vmalloc=384M ion_cma_list="120m,176m,512m" loglevel=8 bootmenutimeout=10 datadev=mmcblk0p2 disp.screen0_output_type=3 disp.screen0_output_mode=2 disp.screen1_output_type=3 disp.screen1_output_mode=2

how to check output video mode:

root@bananapi:~# dmesg | grep DISP                                              
[    0.670049] [DISP]disp_module_init                                           
[    0.670431] [DISP]parser_disp_init_para: screen0_output_type(3)              
[    0.670472] [DISP]parser_disp_init_para: screen0_output_mode(10) value(10)   
[    0.670503] [DISP]parser_disp_init_para: screen1_output_type(3)              
[    0.670533] [DISP]parser_disp_init_para: screen1_output_mode(10) value(10)   
[    0.731031] [DISP] Fb_map_kernel_logo,line:895:Fb_map_kernel_logo failed!    
[    0.797416] [DISP]disp_module_init finish                                    
[    7.840077] [DISP] disp_device_attached_and_enable,line:159:attched ok, mgr0<
-->device1, type=4, mode=10                                                     
[   31.112875] [DISP] disp_ioctl,line:1480:para err in disp_ioctl, cmd = 0x0,scr
een id = 65536

how to boot with SATA rootfs:

# vi uEnv.txt
# ref. sys_config.fex, use default script.bin
bootargs=enforcing=1 console=ttyS0,115200 console=tty1 root=/dev/sda2 rootwait init=/init vmalloc=384M ion_cma_list="120m,176m,512m" loglevel=8 bootmenutimeout=10 datadev=sda2

how to boot with USB DISK rootfs:
# vi uEnv.txt
# ref. sys_config.fex, use default script.bin
bootargs=enforcing=1 console=ttyS0,115200 console=tty1 root=/dev/sdb2 rootwait init=/init vmalloc=384M ion_cma_list="120m,176m,512m" loglevel=8 bootmenutimeout=10 datadev=sdb2

for berryboot env. use only: bootmenutimeout=XXX datadev=XXX

how to check bananapi’s packages:

root@bananapi:~# dpkg -l | grep bananapi                                        
ii  bananapi-bpi-tools                    1.0.1                                 
     armhf        Banaan Pi:  tools                                             
ii  linux-bananapi-bpi-m2-kernel3         1.2                                   
     armhf        Banaan Pi BPI-M2:  linux kernel 3.3 image & modules           
ii  linux-bananapi-bpi-m3-kernel3         1.2.6                                 
     armhf        Banaan Pi BPI-M3:  linux kernel 3.4 image & modules           
ii  linux-firmware-bananapi-bpi-wifi      1.0                                   
     armhf        Banaan Pi: linux kernel firmware for wifi ap6181 & ap6212

BPI-M3 new image:bpi-m3 Ubuntu 16.04 Beta Mate
Wich image works better
BPI-M3 compile Opencv 3.1.0 source code
Disable Scale down CPU clock speed
One Step nearer to the 1-Wire support. 3 of 4 Modules work
#2
scrip=script.bin
aload_script=fatload $device $partition 0x43000000 ${bpi}/${board}/${service}/${script}

Interesting: Defining $scrip and trying to load $script

Did you already thought about testing the stuff you release at least once?


BPI-M3 new image:bpi-m3 Ubuntu 16.04 Beta Mate
Debian Wheezy for M3?
(bpi team) #3

yes, we will update a new image use this way, and will keep update it.


#4

@sinovoip @BPI_Justin speaking english, we never challenge you - but reading carefully !!! He (Dragan) makes a point here !

scrip script

can you see the difference ??

Wake up, update the github NOW, yes now. Don’t wait it will not take long.


#6

Hi, i think that there is something missing between step 2 and 3.

step 1: dpkg -i linux-bananapi-bpi-m3-kernel3_1.2.6_armhf.deb step 2: bpi-bootsel /usr/lib/u-boot/bananapi/bpi-m3/BPI_M3_720P.img.gz i think that /media/… need to be mounted first i´m not able to find BPI-BOOT-bpi-m3.tgz step 3: cd /media/pi/BPI-BOOT ; tar xvf BPI-BOOT-bpi-m3.tgz

just installing the new kernel in step 2 fixed my “killed” issue. but i would really like to use script.bin & uEnv.txt.

may i ask you to provide BPI-BOOT-bpi-m3.tgz and all required steps? i know a little bit about unix but i´m not a pro.

regards


(bpi team) #7

sorry , i have share it on google drive:

https://drive.google.com/file/d/0B4PAo2nW2KfnbldaUm96S3UyeWM/view?usp=sharing


[BPI-M2+] how to use BPI-M3 SD card image to boot BPI-M2+(H3 version), use bpi-bootsel 
(bpi team) #8

you also can see this video:


#9

Why do you always choose the most moronic way possible?!

I took you nearly a year to figure out how to load simple files from within u-boot (script.bin/uEnv.txt). Of course you have to implement it in a way no one figures out how to use it (read the questions above?! Do you suffer from autism or why don’t you get it that the paths where your u-boot code looks into are neither explained by you nor self-explanatory?!)

Now you that you figured out how to load different files from within u-boot why do you still rely on this moronic bpi-bootsel crap? If you want to provide one crappy OS image for all boards why not doing it right and detect the hardware in u-boot and load the correct environment/kernel for the board in questions?

Did you ever try to look at your work from a customer’s perspective?


#10

This is still wrong. Unbelievable. You provide instructions that can not work due to syntax errors and even if you’re notified you do not update it. Why?