friendlyarm / h3_lichee Goto Github PK
View Code? Open in Web Editor NEWBSP for FriendlyARM NanoPi H3
BSP for FriendlyARM NanoPi H3
The following works:
diff --git a/drivers/devfreq/dramfreq/sunxi-ddrfreq.c b/drivers/devfreq/dramfreq/sunxi-ddrfreq.c
index c7c20b7..7581087 100755
--- a/drivers/devfreq/dramfreq/sunxi-ddrfreq.c
+++ b/drivers/devfreq/dramfreq/sunxi-ddrfreq.c
@@ -1666,7 +1666,7 @@ static __devinit int sunxi_ddrfreq_probe(struct platform_device *pdev)
if (sunxi_ddrfreq_min < SUNXI_DDRFREQ_MINFREQ_MIN)
sunxi_ddrfreq_min = sunxi_ddrfreq_max / 3;
#elif defined(CONFIG_ARCH_SUN8IW7P1)
- sunxi_ddrfreq_min = 408000;
+ sunxi_ddrfreq_min = 132000;
#else
type = script_get_item("dram_para", "dram_tpr12", &val);
if (SCIRPT_ITEM_VALUE_TYPE_INT != type) {
Minimum DRAM clockspeed is then 132 MHz (applications requiring memory bandwidth get somewhat slow) but with 264 MHz DRAM clock and a single core running at 912 MHz a H3 device is still faster than a RPi Zero. Some details/ideas: http://forum.armbian.com/index.php/topic/1614-running-h3-boards-with-minimal-consumption/
My idea is to come up with settings that allow idle consumption as low as an RPi Zero while being able to jump to full performance if needed within moments. Pretty simple: adjust DRAM clockspeed in fex file back to 624 MHz, define first THS trip point a bit lower without real throttling so sunxi's budget cooling code will automatically adjust DRAM clockspeed set from userspace to the fex value when needed.
So NanoPi would idle with 4 CPU cores at 480 MHz and DRAM clocked down to 132 MHz (allowing to stay below the 100mA barrier), in case serious work has to be done the user can define whether H3 should be allowed to reach 1200 MHz (VDD_CPUX: 1.3V) or just 912 MHz (VDD_CPUX: 1.1V -- 2200mW consumption less when running heavy workloads like cpuburn-a7) and in case heavy load lasts longer the budget cooling code will automagically increase DRAM clockspeed from 132 MHz to 624 MHz (and a cronjob will set DRAM clockspeed back to 132 MHz when CPU utilization is low again later).
Do you ship developer samples? If yes I would be glad to implement this in Armbian so we could provide not only desktop and server images but also IoT images minimizing consumption intelligently (providing a tool for the user to adjust settings of course, eg. maximum clockspeed or disabled USB ports and so on)
i ran this code in terminal:
./fuse_uboot.sh NANO
NANO is the sd card name, then this error came up:
cat: /sys/block/NANO/size: No such file or directory
ERROR: Can't find device NANO
i am running ubuntu 14.04 and i can see the usb is connected!
nanopi-m1-debian-sd4g-20170204.img HDMI only 720dpi?
how cat to build HDMI 1080p?
I recently got a nanopi m1 and I am using the official documentation
I downloaded the lichee source code and this toolchain: gcc-linaro-arm.tar.xz
as the documentation said, but when I try to compile the source code, I got this error:
arm-linux-gnueabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
ERROR: build kernel Failed
i need to solve this,because i want to use the nanopi M1 in a specific application
I am running Ubuntu 17.04 and I am a beginner in both arm processor and Linux environment but I have a background in electronics
whole code:
./build.sh -p sun8iw7p1 -b nanopi-h3
INFO: ----------------------------------------
INFO: build lichee ...
INFO: chip: sun8iw7p1
INFO: platform: linux
INFO: business:
INFO: kernel: linux-3.4
INFO: board: nanopi-h3
INFO: output: out/sun8iw7p1/linux/nanopi-h3
INFO: ----------------------------------------
INFO: build kernel ...
INFO: prepare toolchain ...
INFO: skip kernel clean for nanopi-h3 Linux system.
Building kernel
/home/sami/lichee/linux-3.4/output/lib/modules/3.4.39-h3
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: 'include/generated/mach-types.h' is up to date.
CC kernel/bounds.s
arm-linux-gnueabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
/home/sami/lichee/linux-3.4/./Kbuild:35: recipe for target 'kernel/bounds.s' failed
make[1]: *** [kernel/bounds.s] Error 1
Makefile:986: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
make: *** Waiting for unfinished jobs....
CC scripts/mod/empty.o
arm-linux-gnueabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
scripts/Makefile.build:307: recipe for target 'scripts/mod/empty.o' failed
make[2]: *** [scripts/mod/empty.o] Error 1
scripts/Makefile.build:443: recipe for target 'scripts/mod' failed
make[1]: *** [scripts/mod] Error 2
Makefile:507: recipe for target 'scripts' failed
make: *** [scripts] Error 2
ERROR: build kernel Failed
INFO: use a fake rootfs.ext4.
1+0 records in
1+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00234644 s, 447 MB/s
mke2fs 1.43.4 (31-Jan-2017)
Filesystem too small for a journal
INFO: ----------------------------------------
INFO: build sun8iw7p1 linux lichee OK
INFO: ----------------------------------------
build.sh是否支持make menuconfig 进行配置内核 ,然后再编译?
Hello
I got following error every time on my NanoPi NEO when running apt-get command.
root@NanoPi-NEO:/home/pi# apt-get update
Hit:1 http://ports.ubuntu.com xenial InRelease
Hit:2 http://ports.ubuntu.com xenial-security InRelease
Hit:3 http://ports.ubuntu.com xenial-updates InRelease
Hit:4 http://ports.ubuntu.com xenial-backports InRelease
[ 1083.337086] Out of memory: Kill process 2204 (apt-get) score 117 or sacrifice child
[ 1083.345843] Killed process 2204 (apt-get) total-vm:42564kB, anon-rss:34092kB, file-rss:2160kB
Killed
This issue doesn't happen on the mainline Kernel. I opened another SSH session to check the free memory periodically, and I can see it should have enough memory for "LowFree”.
root@NanoPi-NEO:# egrep 'High|Low' /proc/meminfo# egrep 'High|Low' /proc/meminfo
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 246992 kB
LowFree: 140976 kB
root@NanoPi-NEO:
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 246992 kB
LowFree: 141576 kB
root@NanoPi-NEO:# egrep 'High|Low' /proc/meminfo# egrep 'High|Low' /proc/meminfo
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 246992 kB
LowFree: 140532 kB
root@NanoPi-NEO:
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 246992 kB
LowFree: 140664 kB
root@NanoPi-NEO:# egrep 'High|Low' /proc/meminfo#
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 246992 kB
LowFree: 139876 kB
root@NanoPi-NEO:
root@NanoPi-NEO:# egrep 'High|Low' /proc/meminfo# egrep 'High|Low' /proc/meminfo
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 246992 kB
LowFree: 138508 kB
root@NanoPi-NEO:
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 246992 kB
LowFree: 172348 kB
root@NanoPi-NEO:~# egrep 'High|Low' /proc/meminfo
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 246992 kB
LowFree: 171912 kB
Could help to check this ?
Thanks
I2C: able to transfer mutil-message
this commit will break i2c transfer spec, it must not send stop signal after write register address, when we read some register value.
#cd h3_lichee/fa_tools
#./build.sh -b nanopi-m1-plus -p linux -t all
以上按照文档编译完成后,out/sun8iw7p1/linux/common/buildroot/目录下为空,跟文档描述不一致,
是需要自己去下载buildroot么?
On the NanoPi Neo 2-specific distro of FriendlyCore, typing "ldconfig.real -i" generates a segmentation fault. This happens with the two different ‘Core’ images (one supports an OLED unit; one does not). It does not happen with the two Armbian images that I tested.
This may indicate a bug in the libc build. I'm not sure.
Ist their a documentation in english availible ?
I build android with source code from https://pan.baidu.com/s/1dF7HL0P#list/path=%2FNanoPi-M1%2Fsources%2Fnanopi-H3-bsp
I find that these three boot.fex system.fex recovery.fex files link to android/out/target/product/nanopi-h3/xxx arn't exist.
What should I do to generate these three files?
h3_lichee定制版中,生成的固件只有boot.img
我看到脚本中用以下命令生成
${MKBOOTIMG} --kernel ${BIMAGE}
--ramdisk ${RAMDISK}
--board ${CHIP}
--base ${BASE}
--ramdisk_offset ${OFFSET}
-o output/boot.img
然后拷贝到u盘的boot目录,期间并没有看到*.dtb的生成与拷贝
关于该定制版下的设备树文件,有相关的文档说明么?
One of our devs brought to my attention that your dvfs settings (I blindly copied) lead to wrong dvfs behaviour. The leading 0 has to be eliminated here.
Detailed explanation: armbian/build#284 (comment)
linux-3.4/sound/soc/sunxi/audiocodec/sun8iw7_sndcodec.c
The register address named AC_DAC_TXDATA is 0x0c.
But Ref: Allwinner_H3_datasheet_v1.0.pdf the register address is 0x020.
The code in sun8iw7_sndcodec.c.
#define DAC_TX_DATA 0x0c
Is need fix the address 0x0c to 0x20?
Compare to linux official github project, the wm8978.h is out of date.
You need to sync with the official project.
Hi, I'm trying to get my touchscreen to work in my Android
I've modified the line
CONFIG_INPUT_TOUCHSCREEN = y
in sun8iw7p1smp_android_defconfig
and run ./build.sh lunch
Everything compiled fine.
I was expecting to see a usbtouchscreen.ko in the output/lib/module/modules/3.4.39/ folder
But I can't find it, would anyone help me? Thanks!
Hi,
I wonder if there is a standard way for us to follow, so that we can build whatever Linux Kernel as we wish? instead of just kernel 3.4 ONLY?
Cheers
Pei
Seems like Allwinner's sun8i kernel sources allow everyone to become root easily:
tk@bananapim3:~$ id
uid=1000(tk) gid=1000(tk) groups=1000(tk),20(dialout),27(sudo),29(audio),44(video),46(plugdev),108(netdev)
tk@bananapim3:~$ echo "rootmydevice" > /proc/sunxi_debug/sunxi_debug
tk@bananapim3:~$ id
uid=0(root) gid=0(root) groups=0(root),20(dialout),27(sudo),29(audio),44(video),46(plugdev),108(netdev),1000(tk)
Please check and fix if you're affected too.
Hi,
I'm trying to rebuild kernel with rtl8188eu driver enabled (why it is not enabled by default ?) so i set CONFIG_RTL8188EU=m but i get undefined symbols errors:
ERROR: "wiphy_free" [drivers/net/wireless/rtl8188eu/8188eu.ko] undefined!
ERROR: "ieee80211_frequency_to_channel" [drivers/net/wireless/rtl8188eu/8188eu.ko] undefined!
ERROR: "cfg80211_inform_bss_frame" [drivers/net/wireless/rtl8188eu/8188eu.ko] undefined!
ERROR: "cfg80211_rx_mgmt" [drivers/net/wireless/rtl8188eu/8188eu.ko] undefined!
ERROR: "cfg80211_del_sta" [drivers/net/wireless/rtl8188eu/8188eu.ko] undefined!
ERROR: "cfg80211_mgmt_tx_status" [drivers/net/wireless/rtl8188eu/8188eu.ko] undefined!
ERROR: "__ieee80211_get_channel" [drivers/net/wireless/rtl8188eu/8188eu.ko] undefined!
ERROR: "cfg80211_get_bss" [drivers/net/wireless/rtl8188eu/8188eu.ko] undefined!
ERROR: "wiphy_unregister" [drivers/net/wireless/rtl8188eu/8188eu.ko] undefined!
ERROR: "cfg80211_connect_result" [drivers/net/wireless/rtl8188eu/8188eu.ko] undefined!
ERROR: "cfg80211_michael_mic_failure" [drivers/net/wireless/rtl8188eu/8188eu.ko] undefined!
ERROR: "wiphy_apply_custom_regulatory" [drivers/net/wireless/rtl8188eu/8188eu.ko] undefined!
ERROR: "cfg80211_ibss_joined" [drivers/net/wireless/rtl8188eu/8188eu.ko] undefined!
ERROR: "cfg80211_roamed" [drivers/net/wireless/rtl8188eu/8188eu.ko] undefined!
ERROR: "cfg80211_put_bss" [drivers/net/wireless/rtl8188eu/8188eu.ko] undefined!
ERROR: "wiphy_new" [drivers/net/wireless/rtl8188eu/8188eu.ko] undefined!
ERROR: "wiphy_register" [drivers/net/wireless/rtl8188eu/8188eu.ko] undefined!
ERROR: "cfg80211_ready_on_channel" [drivers/net/wireless/rtl8188eu/8188eu.ko] undefined!
ERROR: "cfg80211_disconnected" [drivers/net/wireless/rtl8188eu/8188eu.ko] undefined!
ERROR: "cfg80211_new_sta" [drivers/net/wireless/rtl8188eu/8188eu.ko] undefined!
ERROR: "cfg80211_remain_on_channel_expired" [drivers/net/wireless/rtl8188eu/8188eu.ko] undefined!
ERROR: "cfg80211_scan_done" [drivers/net/wireless/rtl8188eu/8188eu.ko] undefined!
in the debian image available for the nanopi m1 there is this driver so it must be supported, what i'm doing wrong ?
有可能在NanoPi NEO或NEO Air上跑Android吗?
Nanopi neo cann't debug by kgdb.
In linux code, the drivers sort error in serial MAKEFILE. kgdboc.o must be write at last line.
/fa_tools/fuse.sh does not changed its fuse device argument regarding the device name typed in using -d tag.
It just hardcoded dev name with /dev/sd everywhere, document about need to alter the fuse.sh script perhaps needed.
Besides, the sys_config.fex file is placed under /lichee/tools/pack/chips/$(ARCH)/configs/$(BOARD-NAME)/board/ , but not mentioned in the wiki website.
The wiki website is well outdated...
For some reason I could not find a way to initiate wlan0 device file.
Hi, I met another weird issue:
I tried to setup a static IP address for my NanoPi NEO, which should actually bundle the NanoPI NEO's GigE MAC address and the static IP. Whenever I reboot the NanoPI NEO, its GigE MAC address changes, and an random IP address is automatically allocated, via DHCP.
I mean, the previous MAC address did bundle to the static IP address that I allocated. However, there always exists a 2nd HOST name NanoPINEO which has a NEW MAC address and is allocated to a NEW IP address automatically.
I'm not sure if this is an issue of the latest kernel I've just built? Or it is an issue of the FriendlyARM BSP for AllWinner H3 ? I posted the question on armbian, FriendlyARM and AllWinner H3.
About the current NanoPiNEO (I'm still able to ssh into the random allocated IP address):
Welcome to ARMBIAN 5.38 stable Ubuntu 16.04.3 LTS 4.14.16-sunxi
System load: 0.10 0.03 0.01 Up time: 2:53 hours
Memory usage: 11 % of 240MB IP: 192.168.0.221
CPU temp: 40°C
Usage of /: 16% of 15G
Last login: Sat Feb 3 10:16:26 2018 from 192.168.0.10
jiapei@nanopineo:~$ uname -a
Linux nanopineo 4.14.16-sunxi #1 SMP Thu Feb 1 14:17:29 CST 2018 armv7l armv7l armv7l GNU/Linux
jiapei@nanopineo:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
jiapei@nanopineo:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 7e:f0:16:00:3c:a7 (**this MAC address changes**)
inet addr:192.168.0.221 (this IP address changes randomly as well) Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::ad9e:7328:d3ae:8681/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9133 errors:0 dropped:0 overruns:0 frame:0
TX packets:2356 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3621111 (3.6 MB) TX bytes:194164 (194.1 KB)
Interrupt:33
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:44 errors:0 dropped:0 overruns:0 frame:0
TX packets:44 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4043 (4.0 KB) TX bytes:4043 (4.0 KB)
jiapei@nanopineo:~$
编译驱动需要make oldconfig && make prepare。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.