add r311 c1 evb target && add init driver for r311 c1 evb
This commit is contained in:
parent
8293db48fc
commit
d0f3858646
|
@ -38,6 +38,11 @@ menu "Hardward Version"
|
|||
help
|
||||
This will set hardware version to r311 pv2.
|
||||
|
||||
config BOARD_HARDWARE_VERSION_R311_C1_EVB
|
||||
bool "Build for R311 C1 EVB board"
|
||||
help
|
||||
This will set hardware version to r311 c1 evb.
|
||||
|
||||
endchoice
|
||||
|
||||
endmenu
|
||||
|
|
|
@ -0,0 +1,150 @@
|
|||
/*
|
||||
* Allwinner Technology CO., Ltd. sun8iw12p1 fpga board.
|
||||
*
|
||||
* fpga board support.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "sun8iw15p1.dtsi"
|
||||
|
||||
/{
|
||||
opp_dvfs_table:opp_dvfs_table {
|
||||
cluster_num = <1>;
|
||||
opp_table_count = <1>;
|
||||
|
||||
cpu_opp_l_table0: opp_l_table0 {
|
||||
/* compatible = "operating-points-v2"; */
|
||||
compatible = "allwinner,opp_l_table0";
|
||||
opp_count = <5>;
|
||||
opp-shared;
|
||||
|
||||
opp00 {
|
||||
opp-hz = /bits/ 64 <480000000>;
|
||||
opp-microvolt = <880000>;
|
||||
axi-bus-divide-ratio = <3>;
|
||||
clock-latency-ns = <2000000>;
|
||||
};
|
||||
|
||||
opp01 {
|
||||
opp-hz = /bits/ 64 <720000000>;
|
||||
opp-microvolt = <880000>;
|
||||
axi-bus-divide-ratio = <3>;
|
||||
clock-latency-ns = <2000000>;
|
||||
};
|
||||
|
||||
opp02 {
|
||||
opp-hz = /bits/ 64 <816000000>;
|
||||
opp-microvolt = <880000>;
|
||||
axi-bus-divide-ratio = <3>;
|
||||
clock-latency-ns = <2000000>;
|
||||
};
|
||||
|
||||
opp03 {
|
||||
opp-hz = /bits/ 64 <1008000000>;
|
||||
opp-microvolt = <880000>;
|
||||
axi-bus-divide-ratio = <3>;
|
||||
clock-latency-ns = <2000000>;
|
||||
};
|
||||
|
||||
opp04 {
|
||||
opp-hz = /bits/ 64 <1200000000>;
|
||||
opp-microvolt = <940000>;
|
||||
axi-bus-divide-ratio = <3>;
|
||||
clock-latency-ns = <2000000>;
|
||||
};
|
||||
opp05 {
|
||||
opp-hz = /bits/ 64 <1416000000>;
|
||||
opp-microvolt = <1000000>;
|
||||
axi-bus-divide-ratio = <3>;
|
||||
clock-latency-ns = <2000000>;
|
||||
};
|
||||
|
||||
opp06 {
|
||||
opp-hz = /bits/ 64 <1512000000>;
|
||||
opp-microvolt = <1040000>;
|
||||
axi-bus-divide-ratio = <3>;
|
||||
clock-latency-ns = <2000000>;
|
||||
};
|
||||
|
||||
opp07 {
|
||||
opp-hz = /bits/ 64 <1608000000>;
|
||||
opp-microvolt = <1160000>;
|
||||
axi-bus-divide-ratio = <3>;
|
||||
clock-latency-ns = <2000000>;
|
||||
};
|
||||
|
||||
opp08 {
|
||||
opp-hz = /bits/ 64 <1800000000>;
|
||||
opp-microvolt = <1160000>;
|
||||
axi-bus-divide-ratio = <3>;
|
||||
clock-latency-ns = <2000000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
soc@03000000 {
|
||||
wlan:wlan {
|
||||
compatible = "allwinner,sunxi-wlan";
|
||||
clocks = <&clk_losc_out>;
|
||||
wlan_power = "vcc-wifi";
|
||||
wlan_io_regulator = "vcc-wifi-io";
|
||||
wlan_busnum = <1>;
|
||||
wlan_regon = <&r_pio PL 5 1 1 1 0>;
|
||||
wlan_hostwake = <&r_pio PL 6 6 0 0 0>;
|
||||
status = "okay";
|
||||
};
|
||||
bt:bt {
|
||||
compatible = "allwinner,sunxi-bt";
|
||||
clocks = <&clk_losc_out>;
|
||||
bt_power = "vcc-wifi";
|
||||
bt_io_regulator = "vcc-wifi-io";
|
||||
bt_rst_n = <&r_pio PL 2 1 1 1 0>;
|
||||
status = "okay";
|
||||
};
|
||||
btlpm:btlpm {
|
||||
compatible = "allwinner,sunxi-btlpm";
|
||||
uart_index = <1>;
|
||||
bt_wake = <&r_pio PL 7 1 1 1 1>;
|
||||
bt_hostwake = <&r_pio PL 4 6 0 0 0>;
|
||||
status = "okay";
|
||||
};
|
||||
pmu0: pmu0@0{
|
||||
interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
|
||||
status = "okay";
|
||||
|
||||
powerkey0: powerkey@0{
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
regulator0: regulator@0{
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
axp_gpio0: axp_gpio@0{
|
||||
gpio-controller;
|
||||
#size-cells = <0>;
|
||||
#gpio-cells = <6>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
pmu1: pmu1@0{
|
||||
interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
|
||||
status = "okay";
|
||||
device_type = "pmu1";
|
||||
|
||||
charger0: charger@0{
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
oases_pmem {
|
||||
compatible = "oases_pmem";
|
||||
status = "okay";
|
||||
oases,pmem_phys = <0x48166000>;
|
||||
oases,pmem_size = <0x1000>;
|
||||
};
|
||||
};
|
||||
};
|
|
@ -825,4 +825,6 @@ source "drivers/misc/cxl/Kconfig"
|
|||
source "drivers/misc/sunxi-rf/Kconfig"
|
||||
source "drivers/misc/leds/Kconfig"
|
||||
source "drivers/misc/xunfei/Kconfig"
|
||||
source "drivers/misc/netease/Kconfig"
|
||||
|
||||
endmenu
|
||||
|
|
|
@ -82,3 +82,4 @@ obj-$(CONFIG_ADAU1761_ES2) += adau1761-es2.o
|
|||
obj-$(CONFIG_ADAU1761_R311_PV1) += adau1761-r311-pv1.o
|
||||
obj-y += xunfei/
|
||||
obj-y += leds/
|
||||
obj-y += netease/
|
|
@ -0,0 +1,7 @@
|
|||
menu "Netease Driver For Every Board Init Config!"
|
||||
config INIT_C1_EVB
|
||||
tristate "C1_EVB Init Driver"
|
||||
help
|
||||
INIT R311 C1 EVB created on 2019.1.8
|
||||
|
||||
endmenu
|
|
@ -0,0 +1 @@
|
|||
obj-$(CONFIG_INIT_C1_EVB) += r311_c1_evb/
|
|
@ -0,0 +1 @@
|
|||
obj-y += r311_c1_evb_main.o
|
|
@ -0,0 +1,146 @@
|
|||
#include <asm/io.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/jiffies.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/sunxi-gpio.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
|
||||
|
||||
static int __init r311_probe(struct platform_device *pdev) {
|
||||
printk("have begun! \n");
|
||||
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
struct device *dev = &pdev->dev;
|
||||
struct gpio_config cfg;
|
||||
int gpionum;
|
||||
const char *io_name = '\0';
|
||||
struct regulator *reg = NULL;
|
||||
|
||||
if (of_property_read_string(np, "aldo4", &io_name)) {
|
||||
printk("Wzj: can not get aldo4 name!!\n");
|
||||
} else {
|
||||
printk("Wzj: get regulator name:%s\n", io_name);
|
||||
reg = regulator_get(dev, io_name);
|
||||
if (reg) {
|
||||
regulator_enable(reg);
|
||||
printk("Get regulator ok, vol:%d\n", regulator_get_voltage(reg));
|
||||
regulator_put(reg);
|
||||
} else {
|
||||
printk("Can not get regulator!!\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (of_property_read_string(np, "bldo2", &io_name)) {
|
||||
printk("Wzj: can not get bldo2 name!!\n");
|
||||
} else {
|
||||
printk("Wzj: get regulator name:%s\n", io_name);
|
||||
reg = regulator_get(dev, io_name);
|
||||
if (reg) {
|
||||
regulator_enable(reg);
|
||||
printk("Get regulator ok, vol:%d\n", regulator_get_voltage(reg));
|
||||
regulator_put(reg);
|
||||
} else {
|
||||
printk("Can not get regulator!!\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (of_property_read_string(np, "bldo3", &io_name)) {
|
||||
printk("Wzj: can not get bldo2 name!!\n");
|
||||
} else {
|
||||
printk("Wzj: get regulator name:%s\n", io_name);
|
||||
reg = regulator_get(dev, io_name);
|
||||
if (reg) {
|
||||
regulator_enable(reg);
|
||||
printk("Get regulator ok, vol:%d\n", regulator_get_voltage(reg));
|
||||
regulator_put(reg);
|
||||
} else {
|
||||
printk("Can not get regulator!!\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (of_property_read_string(np, "bldo4", &io_name)) {
|
||||
printk("Wzj: can not get bldo4 name!!\n");
|
||||
} else {
|
||||
printk("Wzj: get regulator name:%s\n", io_name);
|
||||
reg = regulator_get(dev, io_name);
|
||||
if (reg) {
|
||||
regulator_enable(reg);
|
||||
printk("Get regulator ok, vol:%d\n", regulator_get_voltage(reg));
|
||||
regulator_put(reg);
|
||||
} else {
|
||||
printk("Can not get regulator!!\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (of_property_read_string(np, "cldo1", &io_name)) {
|
||||
printk("Wzj: can not get cldo1 name!!\n");
|
||||
} else {
|
||||
printk("Wzj: get regulator name:%s\n", io_name);
|
||||
reg = regulator_get(dev, io_name);
|
||||
if (reg) {
|
||||
regulator_enable(reg);
|
||||
printk("Get regulator ok, vol:%d\n", regulator_get_voltage(reg));
|
||||
regulator_put(reg);
|
||||
} else {
|
||||
printk("Can not get regulator!!\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (of_property_read_string(np, "swout", &io_name)) {
|
||||
printk("Wzj: can not get swout name!!\n");
|
||||
} else {
|
||||
printk("Wzj: get regulator name:%s\n", io_name);
|
||||
reg = regulator_get(dev, io_name);
|
||||
if (reg) {
|
||||
regulator_enable(reg);
|
||||
printk("Get regulator ok, vol:%d\n", regulator_get_voltage(reg));
|
||||
regulator_put(reg);
|
||||
} else {
|
||||
printk("Can not get regulator!!\n");
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id r311_ids[] = {
|
||||
{.compatible = "allwinner,netease_ihw_module"}, {/* Sentinel */}};
|
||||
|
||||
static struct platform_driver r311_driver = {
|
||||
.driver =
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.name = "netease_ihw",
|
||||
.of_match_table = r311_ids,
|
||||
},
|
||||
};
|
||||
|
||||
static int __init r311_init(void) {
|
||||
int ret = 0;
|
||||
printk("Begin to init r311 driver for c1_evb board!!\n");
|
||||
ret = platform_driver_probe(&r311_driver, r311_probe);
|
||||
printk("platform_driver_probe:%d!\n", ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void __exit r311_deinit(void) {}
|
||||
|
||||
fs_initcall_sync(r311_init);
|
||||
module_exit(r311_deinit);
|
||||
|
||||
MODULE_AUTHOR("Netease ihw");
|
||||
MODULE_DESCRIPTION("Board init driver!");
|
||||
MODULE_LICENSE("GPL");
|
|
@ -1 +1 @@
|
|||
Subproject commit 8d682c33b55577fcbf96f413b3088654fbbb9591
|
||||
Subproject commit 0bb64ed8e24026e3a0a1822646398778f7e6f0ae
|
|
@ -0,0 +1,24 @@
|
|||
-include target/allwinner/mandolin-common/BoardConfigCommon.mk
|
||||
|
||||
TARGET_ROOTFS_IMAGES_USE_EXT4 := true
|
||||
TARGET_NORROOTFS_IMAGES_USE_SQUASHFS := true
|
||||
BOARD_ROOTFS_IMAGE_PARTITION_SIZE := 524288
|
||||
BOARD_ROOTFS_FLASH_BLOCK_SIZE := 4096
|
||||
|
||||
TARGET_OVERLAYFS_IMAGE_USE_EXT4 :=true
|
||||
TARGET_OVERLAYFS_IMAGE_USE_SQUASHFS :=true
|
||||
BOARD_OVERLAYFS_IMAGE_PARTITION_SIZE := 524288
|
||||
BOARD_OVERLAYFS_FLASH_BLOCK_SIZE := 4096
|
||||
|
||||
TARGET_DATAFS_IMAGE_USE_EXT4 :=true
|
||||
TARGET_DATAFS_IMAGE_USE_SQUASHFS :=true
|
||||
TARGET_DATAFS_IMAGE_USE_VFAT :=true
|
||||
BOARD_DATAFS_IMAGE_PARTITION_SIZE := 524288
|
||||
BOARD_DATAFS_FLASH_BLOCK_SIZE := 4096
|
||||
|
||||
TARGET_VERSION_MANUFACTURER_URL := www.allwinnertech.com
|
||||
TARGET_VERSION_MANUFACTURER := allwinnertech
|
||||
TARGET_VERSION_PRODUCT := v1.0
|
||||
TARGET_VERSION_HWREV := ver-a
|
||||
|
||||
BOARD_CHARGER_ENABLE_SUSPEND := true
|
|
@ -0,0 +1,33 @@
|
|||
#
|
||||
# Copyright (C) 2014 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
ARCH:=arm
|
||||
BOARD:=mandolin-c1evb
|
||||
BOARDNAME:=mandolin-c1evb
|
||||
FEATURES:=fpu usb ext4 display rtc
|
||||
MAINTAINER:=Huangshr
|
||||
CPU_TYPE:=cortex-a7
|
||||
CPU_SUBTYPE:=neon
|
||||
|
||||
KERNEL_PATCHVER:=4.9
|
||||
|
||||
DEVICE_TYPE:=developerboard
|
||||
|
||||
include $(BUILD_DIR)/target.mk
|
||||
|
||||
define Target/Description
|
||||
Build multi-platform images for the ARMv7 instruction set architecture
|
||||
endef
|
||||
|
||||
KERNELNAME:=zImage dtbs
|
||||
|
||||
ifneq ($(CONFIG_KERNEL_KERNEL_LZO),)
|
||||
KERNELNAME:=Image.lzo dtbs
|
||||
endif
|
||||
|
||||
$(eval $(call BuildTarget))
|
|
@ -0,0 +1,14 @@
|
|||
This multi-platform ARMv8 target can be used either with ARM Ltd.'s Foundation_V8
|
||||
fast-model doing the following:
|
||||
|
||||
Foundation_v8 --image bin/arm64-eglibc/openwrt-arm64-vexpress-foundation.axf
|
||||
|
||||
or you can also use QEMU:
|
||||
|
||||
qemu-system-aarch64 -machine virt -cpu cortex-a57 -machine type=virt -nographic \
|
||||
-smp 1 -m 2048 \
|
||||
-kernel bin/arm64-eglibc/openwrt-arm64-qemu-virt-initramfs.Image \
|
||||
--append "console=ttyAMA0"
|
||||
|
||||
|
||||
and enjoy the system booting.
|
|
@ -0,0 +1,18 @@
|
|||
#
|
||||
# Copyright (C) 2013 The Android Open-Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
PRODUCT_MAKEFILES := \
|
||||
$(LOCAL_DIR)/mandolin_c1evb.mk
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2013-2015 OpenWrt.org
|
||||
#
|
||||
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
board_config_update
|
||||
|
||||
ucidef_set_interface_lan 'wlan0'
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,2 @@
|
|||
config params 'bsa'
|
||||
option device '/dev/ttyS1'
|
|
@ -0,0 +1,49 @@
|
|||
config 'global'
|
||||
option anon_swap '0'
|
||||
option anon_mount '0'
|
||||
option auto_swap '1'
|
||||
option auto_mount '1'
|
||||
option delay_root '5'
|
||||
option check_fs '1'
|
||||
|
||||
config 'mount'
|
||||
option target '/boot-res'
|
||||
option device '/dev/by-name/boot-res'
|
||||
option options 'ro,sync'
|
||||
option enabled '1'
|
||||
|
||||
config 'mount'
|
||||
option target '/mnt/UDISK'
|
||||
option device '/dev/by-name/UDISK'
|
||||
option options 'rw,async'
|
||||
option enabled '1'
|
||||
|
||||
config 'mount'
|
||||
option target '/overlay'
|
||||
option device '/dev/by-name/rootfs_data'
|
||||
option options 'rw,sync'
|
||||
option enabled '1'
|
||||
|
||||
config 'mount'
|
||||
option target '/mnt/SDCARD'
|
||||
option device '/dev/mmcblk1'
|
||||
option options 'rw,async'
|
||||
option enabled '1'
|
||||
|
||||
config 'mount'
|
||||
option target '/mnt/SDCARD'
|
||||
option device '/dev/mmcblk1p1'
|
||||
option options 'rw,async'
|
||||
option enabled '1'
|
||||
|
||||
config 'mount'
|
||||
option target '/mnt/exUDISK'
|
||||
option device '/dev/sda1'
|
||||
option options 'rw,async'
|
||||
option enabled '1'
|
||||
|
||||
config 'mount'
|
||||
option target '/mnt/exUDISK'
|
||||
option device '/dev/sda'
|
||||
option options 'rw,async'
|
||||
option enabled '1'
|
|
@ -0,0 +1,9 @@
|
|||
config interface 'loopback'
|
||||
option ifname 'lo'
|
||||
option proto 'static'
|
||||
option ipaddr '127.0.0.1'
|
||||
option netmask '255.0.0.0'
|
||||
|
||||
config interface 'lan'
|
||||
option ifname 'eth0'
|
||||
option proto 'dhcp'
|
|
@ -0,0 +1,3 @@
|
|||
::sysinit:/etc/init.d/rcS S boot
|
||||
::shutdown:/etc/init.d/rcS K shutdown
|
||||
::askconsole:/bin/ash --login
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1 @@
|
|||
arisc
|
|
@ -0,0 +1,40 @@
|
|||
bootdelay=3
|
||||
#default bootcmd, will change at runtime according to key press
|
||||
bootcmd=run setargs_nand ota_setup boot_normal#default nand boot
|
||||
#kernel command arguments
|
||||
console=ttyS0,115200
|
||||
nor_root=/dev/mtdblock4
|
||||
nand_root=/dev/nandd
|
||||
mmc_root=/dev/mmcblk0p7
|
||||
root_partition=rootfs
|
||||
init=/sbin/init
|
||||
loglevel=15
|
||||
boot_partition=boot
|
||||
cma=64M
|
||||
|
||||
#set kernel cmdline if boot.img or recovery.img has no cmdline we will use this
|
||||
setargs_nor=setenv bootargs console=${console} root=${nor_root} rootwait init=${init} loglevel=${loglevel} partitions=${partitions} cma=${cma}
|
||||
setargs_nand=setenv bootargs console=${console} root=${nand_root} rootwait init=${init} loglevel=${loglevel} partitions=${partitions} cma=${cma}
|
||||
setargs_mmc=setenv bootargs console=${console} root=${mmc_root} rootwait init=${init} loglevel=${loglevel} partitions=${partitions} cma=${cma}
|
||||
#nand command syntax: sunxi_flash read address partition_name read_bytes
|
||||
#0x40007fc0 = 0x40008000(kernel entry) - 0x40(uImage header 64Bytes)
|
||||
# boot_normal=fatload sunxi_flash ${boot_partition} 40007fc0 uImage;bootm 40007fc0
|
||||
# boot_recovery=fatload sunxi_flash recovery 43800000 uImage;bootm 43800000
|
||||
|
||||
#boot.img/raw same as sunxi-dev
|
||||
boot_normal=sunxi_flash read 40007800 ${boot_partition};boota 40007800 ${boot_partition}
|
||||
boot_recovery=sunxi_flash read 43800000 recovery;boota 43800000 recovery
|
||||
ota_setup=ota_setup
|
||||
boot_fastboot=fastboot
|
||||
#recovery key
|
||||
recovery_key_value_max=0x13
|
||||
recovery_key_value_min=0x10
|
||||
#fastboot key
|
||||
fastboot_key_value_max=0x8
|
||||
fastboot_key_value_min=0x2
|
||||
#ota cmd
|
||||
boot_cache=0x40007800
|
||||
rootfs_cache=0x40407800
|
||||
loadkernel=ext4load sunxi_flash 0:0 ${boot_cache} ota/boot.img
|
||||
loadrootfs=ext4load sunxi_flash 0:0 ${rootfs_cache} ota/rootfs.img
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,91 @@
|
|||
;---------------------------------------------------------------------------------------------------
|
||||
; 说明: 脚本中的字符串区分大小写,用户可以修改"="后面的数值,但是不要修改前面的字符串
|
||||
;---------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
;---------------------------------------------------------------------------------------------------
|
||||
; 固件下载参数配置
|
||||
;---------------------------------------------------------------------------------------------------
|
||||
;***************************************************************************************************
|
||||
; mbr的大小, 以Kbyte为单位
|
||||
;***************************************************************************************************
|
||||
[mbr]
|
||||
size = 512
|
||||
|
||||
;***************************************************************************************************
|
||||
; 分区配置
|
||||
;
|
||||
;
|
||||
; partition 定义范例:
|
||||
; [partition] ; //表示是一个分区
|
||||
; name = USERFS2 ; //分区名称
|
||||
; size = 16384 ; //分区大小 单位: 扇区.分区表示个数最多2^31 * 512 = 2T
|
||||
; downloadfile = "123.fex" ; //下载文件的路径和名称,可以使用相对路径,相对是指相对于image.cfg文件所在分区。也可以使用绝对路径
|
||||
; keydata = 1 ; //私有数据分区,重新量产数据将不丢失
|
||||
; encrypt = 1 ; //采用加密方式烧录,将提供数据加密,但损失烧录速度
|
||||
; = ? ; //私有用法
|
||||
; verify = 1 ; //要求量产完成后校验是否正确
|
||||
;
|
||||
; 注:1、name唯一, 不允许同名
|
||||
; 2、name最大12个字符
|
||||
; 3、size = 0, 将创建一个无大小的空分区
|
||||
; 4、为了安全和效率考虑,分区大小最好保证为16M字节的整数倍
|
||||
;***************************************************************************************************
|
||||
[partition_start]
|
||||
|
||||
[partition]
|
||||
name = boot-res
|
||||
size = 512
|
||||
downloadfile = "boot-resource.fex"
|
||||
user_type = 0x8000
|
||||
|
||||
[partition]
|
||||
name = env
|
||||
size = 1024
|
||||
downloadfile = "env.fex"
|
||||
user_type = 0x8000
|
||||
|
||||
[partition]
|
||||
name = boot
|
||||
size = 8192
|
||||
downloadfile = "boot.fex"
|
||||
user_type = 0x8000
|
||||
|
||||
[partition]
|
||||
name = rootfs
|
||||
size = 105536
|
||||
downloadfile = "rootfs.fex"
|
||||
user_type = 0x8000
|
||||
|
||||
[partition]
|
||||
name = rootfs_data
|
||||
size = 8192
|
||||
user_type = 0x8000
|
||||
|
||||
[partition]
|
||||
name = ota_info
|
||||
size = 512
|
||||
user_type = 0x8000
|
||||
|
||||
; recovery分区说明
|
||||
; 如果启用了OTA升级,默认以boot_initramfs.img作为recovery.fex,否则recovery.fex为空
|
||||
|
||||
;[partition]
|
||||
; name = recovery
|
||||
; size = 32768
|
||||
; downloadfile="recovery.fex"
|
||||
; user_type = 0x8000
|
||||
|
||||
[partition]
|
||||
name = misc
|
||||
size = 1024
|
||||
user_type = 0x8000
|
||||
|
||||
[partition]
|
||||
name = private
|
||||
size = 1024
|
||||
user_type = 0x8000
|
||||
|
||||
[partition]
|
||||
name = UDISK
|
||||
user_type = 0x8100
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,47 @@
|
|||
#
|
||||
# Copyright (C) 2013-2016 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(BUILD_DIR)/image.mk
|
||||
include $(BUILD_DIR)/host.mk
|
||||
|
||||
FAT32_BLOCK_SIZE=1024
|
||||
FAT32_BLOCKS=$(shell echo $$(($(CONFIG_SUNXI_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE))))
|
||||
|
||||
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
|
||||
define Image/BuildKernel
|
||||
mkimage -A arm -O linux -T kernel -C none \
|
||||
-a 0x41000000 -e 0x41000000 \
|
||||
-n 'AW Tina Linux-$(LINUX_VERSION)' \
|
||||
-d $(KDIR)/Image.gz $(TARGET_OUT_DIR)/$(IMG_PREFIX)-uImage
|
||||
|
||||
rm -f $(TARGET_OUT_DIR)/boot.img
|
||||
mkdosfs $(TARGET_OUT_DIR)/boot.img -C $(FAT32_BLOCKS)
|
||||
|
||||
mcopy -i $(TARGET_OUT_DIR)/boot.img $(TARGET_OUT_DIR)/$(IMG_PREFIX)-uImage ::uImage
|
||||
|
||||
endef
|
||||
else
|
||||
define Image/BuildKernel
|
||||
$(CP) $(KDIR)/Image.gz-initramfs $(TARGET_OUT_DIR)/$(IMG_PREFIX)-Image.gz-initramfs
|
||||
echo -ne '\x00\x00\x00\x00' >> $(TARGET_OUT_DIR)/$(IMG_PREFIX)-Image.gz-initramfs
|
||||
mkimage -A arm64 -O linux -T kernel -C none \
|
||||
-a 0x41000000 -e 0x41000000 \
|
||||
-n 'AW Tina Linux-$(LINUX_VERSION)' \
|
||||
-d $(TARGET_OUT_DIR)/$(IMG_PREFIX)-Image.gz-initramfs $(TARGET_OUT_DIR)/$(IMG_PREFIX)-uImage-initramfs
|
||||
rm -f $(TARGET_OUT_DIR)/boot.img
|
||||
mkdosfs $(TARGET_OUT_DIR)/boot.img -C $(FAT32_BLOCKS)
|
||||
|
||||
mcopy -i $(TARGET_OUT_DIR)/boot.img $(TARGET_OUT_DIR)/$(IMG_PREFIX)-uImage-initramfs ::uImage
|
||||
endef
|
||||
endif
|
||||
|
||||
define Image/Build
|
||||
$(call Image/Build/$(1),$(1))
|
||||
dd if=$(KDIR)/root.$(1) of=$(TARGET_OUT_DIR)/rootfs.img bs=128k conv=sync
|
||||
endef
|
||||
|
||||
$(eval $(call BuildImage))
|
|
@ -0,0 +1,38 @@
|
|||
#
|
||||
# Copyright (C) 2013 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=aarch64-boot-wrapper
|
||||
PKG_VERSION:=2013-01-10
|
||||
PKG_RELEASE:=$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/boot-wrapper-aarch64.git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=c51dde817b5ed5b8f741b67ac51bd67bd87b4a2a
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MAINTAINER:=Florian Fainelli <florian@openwrt.org>
|
||||
|
||||
include $(BUILD_DIR)/kernel.mk
|
||||
include $(BUILD_DIR)/package.mk
|
||||
include $(BUILD_DIR)/image.mk
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
KERNEL="../Image" \
|
||||
DTC="$(LINUX_DIR)/scripts/dtc/dtc" \
|
||||
FDT_SRC="$(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts/arm/foundation-v8.dts" \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
BOOTARGS="console=ttyAMA0 earlyprintk"
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(CP) $(PKG_BUILD_DIR)/linux-system.axf $(KDIR)/linux-system.axf
|
||||
endef
|
||||
|
||||
$(eval $(call Build/DefaultTargets))
|
|
@ -0,0 +1,14 @@
|
|||
$(call inherit-product-if-exists, target/allwinner/mandolin-common/mandolin-common.mk)
|
||||
|
||||
PRODUCT_PACKAGES +=
|
||||
|
||||
PRODUCT_COPY_FILES +=
|
||||
|
||||
PRODUCT_AAPT_CONFIG := large xlarge hdpi xhdpi
|
||||
PRODUCT_AAPT_PERF_CONFIG := xhdpi
|
||||
PRODUCT_CHARACTERISTICS := musicbox
|
||||
|
||||
PRODUCT_BRAND := netease
|
||||
PRODUCT_NAME := mandolin_c1evb
|
||||
PRODUCT_DEVICE := mandolin-c1evb
|
||||
PRODUCT_MODEL := c1
|
|
@ -0,0 +1,18 @@
|
|||
#
|
||||
# Copyright (C) 2015-2016 Allwinner
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /build/LICENSE for more information.
|
||||
define KernelPackage/net-broadcom
|
||||
SUBMENU:=$(WIRELESS_MENU)
|
||||
TITLE:=broadcom(ap6212/ap6335/ap6255...) support
|
||||
FILES:=$(LINUX_DIR)/drivers/net/wireless/bcmdhd/bcmdhd.ko
|
||||
AUTOLOAD:=$(call AutoProbe,bcmdhd,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/net-broadcom/description
|
||||
Kernel modules for Broadcom AP6212/AP6335/AP6255... support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,net-broadcom))
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
#
|
||||
# Copyright (C) 2012 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# This file is executed by build/envsetup.sh, and can use anything
|
||||
# defined in envsetup.sh.
|
||||
#
|
||||
# In particular, you can add lunch options with the add_lunch_combo
|
||||
# function: add_lunch_combo generic-eng
|
||||
|
||||
add_lunch_combo mandolin_c1evb-tina
|
Loading…
Reference in New Issue