Comments (9)
Mainline-uboot prepared for bpi-r2 is here: https://github.com/frank-w/u-boot
Currently without saveenv and ethernet-support
from bpi-router-linux.
i only know official uboot...newer versions did not include drivers/config for bpi-r2
from bpi-router-linux.
less an issue more an enhancement... I forked your u-boot and adjusted it to my needs... The full bootmenu is removed (IMO useless) and only for SD-Card (yet). It tries to boot with a bootscript sitting in mmc 1:1 /boot/boot.scr and has some fallbacks in case there is no bootscript (or execution fails). Since I don't use 'appended device tree' and uImages anymore. You might adjust some variables and bootcommands for your usage (or, you change to flattened devicetree too.. ;) it works reliable and IMO more flexible in case you start to play with devicetree too).
https://github.com/chwe17/u-boot-mt
Edit: In case you want to use it, let me know, I can give you a basic bootscript too, so that you only have to adjust to the Kernel you're testing...
Could help you for this one here: :)
http://forum.banana-pi.org/t/how-to-extend-the-uboot-menu/5415/24
from bpi-router-linux.
Hi,
i dont want to change uImage itself (remove appended dtb)...is your bootmenu dynamic (configurable via uenv.txt)?
what do i have to change to use existing uImages?
from bpi-router-linux.
there is no bootmenu anymore... :P I don't like it, I don't use it. This part here is more or less relevant for you: https://github.com/chwe17/u-boot-mt/blob/f5916a4c6d0ad8acf0e9b8fe3f649425272f5e6a/include/configs/mt7623-bpi-r2.h#L361-L413
First it tries to boot with a boot script sitting on mmc 1:1 /boot/boot.scr and in case this doesn't work it falls back to some defaults. Which you have to adjust due to Sinovoips buildscript expect different bootparameters than (e.g. I don't use FAT and rootfs is in root=/dev/mmcblk0p). But this is only for the fallbacks in case something goes wrong with the bootscript where you can define whatever you want for your boot. e.g.
setenv root "/dev/mmcblk0p1"
setenv rootfs "ext4"
setenv verbosity "1"
setenv bootargs initcall_debug console=ttyS0,115200n1 root=${root} rw rootfstype=${rootfs} rootwait audit=0 loglevel=${verbosity}
ext4load mmc ${mmcnum}:${mmcpart} ${fdtaddr} ${mmcfdtfile}
ext4load mmc ${mmcnum}:${mmcpart} ${rdaddr} ${mmcinitrdfile}
ext4load mmc ${mmcnum}:${mmcpart} ${kernel_addr_r} ${mmckernfile}
echo "Booting ${mmckernfile} ${mmcinitrdfile} ${mmcfdtfile} from: mmc ${mmcnum}:${mmcpart} using bootargs=${bootargs}"
bootz ${kernel_addr_r} ${rdaddr} ${fdtaddr}
# Recompile with:
# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
That's the current bootscript I use. So you can easy adjust it to a different kernel without recompile the whole u-boot. You would need to adjust the fallbacks to a known working kernel (and it's location) and for testings you can adjust the bootscript (can be done on your R2 as long as u-boot-tools are installed or you mount the SD card on your normal computer and 'recompile' boot.cmd with the parameters in the end of the bootscript. uImages with 'appended devicetree' should still work but zImages need flattened devicetree as long as #define CONFIG_OF_LIBFDT is set (https://github.com/chwe17/u-boot-mt/blob/f5916a4c6d0ad8acf0e9b8fe3f649425272f5e6a/include/configs/mt7623-bpi-r2.h#L296)
The bootscript is normally used things like network boot but it's IMO very useful for everything else. A small comparison:
https://stackoverflow.com/questions/28891221/uenv-txt-vs-boot-scr
Edit: despite the description, it doesn't try to boot uImages at the moment, but if you adjust the bootcommands, e.g replace all bootz with bootm commands, and the directories (I've no clue where Sinovoip places the default kernel etc. this should work without major issues).
from bpi-router-linux.
i want the bootmenu for quick selection of kernel (compare issues between them) and simply configuring via uenv.txt (no recompile if only kernel-version changes)...
currently i try to tidy up the menuentries and try to implement a updatemenu-entry since i found no way yet to load menu before it is displayed
have you found a way to use newer uboot (2018-xx) and/or activate hdmi in uboot (currently only purple screen)
from bpi-router-linux.
chances are rather low that someone port to 'mainline u-boot' soon (I didn't see any attempts on mailinglist). I'm sure that you can load a uenv with a bootscript.. :P Just look through various bootscripts in armbians project: https://github.com/armbian/build/tree/master/config/bootscripts
Cause, actually both is used. I would look into those where a bit older bootloaders are used. E.g. odroid c2, uses at the moment a 2015 version (switch to upstream u-boot is in testing).
and/or activate hdmi in uboot (currently only purple screen)
No, I only 'fixed' u-boot to a point where it works 'reliable' with bootscripts ('recompilation' of a bootscript means only adding a valid header - done in seconds). This (https://github.com/wtolkien/meta-mediatek/tree/master/recipes-bsp/u-boot) might also give you some inspiration, cause Wolfgang uses uEnv.txt files too. Since there's no HDMI driver, or at least, none I can see in MT7623 related files, this will probably be something which isn't solve that fast (there are a few boards with supported HDMI with u-boot 2014.4 but for sure over my skills to implement such a driver, and also of minor interest yet, cause the R2 will run headless anyway for my purposes).
For debug the Kernel (some enhancements which are not/wrong set by your defconfig):
- earlyprintk (not set by default in your kernelconfigs with defconfig)
- CONFIG_DEBUG_UART_PHYS=0x11004000 CONFIG_DEBUG_UART_VIRT=0xf1004000 whereas your defconfig sets it to 0x11002000 (UART0)
- CONFIG_REGULATOR_FIXED_VOLTAGE=y is not set, and therefore USB spies you some errors in dmesg (xhci-mtk 1a1c0000.usb: fail to get vbus)
In case you're interested you can follow my progress here (network performance is horrible at the moment, probably due to wrong settings).
from bpi-router-linux.
great work! I'll probably use some of your commits in patchform as well. Cause BPi Images have some different needs compared to Armbians needs I'll keep it on top of mainline. But your uEnv.txt may give me some inspiration. :)
from bpi-router-linux.
just to make an update...
bpi-r2 is now supported by upstream uboot and ethernet-patches are out too
i merged both to my uboot-repo:
https://github.com/frank-w/u-boot/
(currently https://github.com/frank-w/u-boot/tree/bpi-r2_eth_cve has all actual patches)
from bpi-router-linux.
Related Issues (20)
- mt7530 doesn't work on bpi-r3 if mtk_eth is built as module HOT 6
- bpi-r3 branch 6.3-rc missing SFP support / transmit queue timeout HOT 38
- BPI-r3 expose pps HOT 8
- adding CONFIG_NTP_PPS module not 6.2-main brach HOT 1
- build.sh Deb Pack Gen debarch if statement backwards HOT 2
- Wireguard support BPI-R3 HOT 2
- WiFi doesn't work on kernel 5.15 HOT 9
- bpi-r2, kernel 5.15.129 - compilation errors (mediatek) - arm-linux-gnueabihf-gcc (Debian 13.2.0-2) HOT 4
- [bpi-r2pro/linux 6.1] how to populate spi devices in /dev HOT 1
- bpi-r3 will it be able to support armbian? HOT 1
- i2c rtcs HOT 2
- [BPI-R3][Kernel 6.1] LVM issue HOT 2
- BPI-R3 Mini HOT 8
- 6.9-rc kernel wifi not working - here is the fix HOT 5
- SFP interface does not work on you 6.9-rc branch HOT 36
- Wifi advanced features do not work on your 6.9-rc HOT 4
- [BPI-R4] File missing: ./arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-sd.dtso etc. HOT 2
- mt7615 wifi doesn't work properly on kernel 5.15 HOT 2
- arm64 linux-headers-6.6.25-bpi-r3-main package ships with x86-64 files HOT 5
- Buidl Fail , dt-bindings not found HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bpi-router-linux.