lichee nano 荔枝派入门——linux内核

获取源代码

《lichee nano 荔枝派入门——搭建环境》
个人建议使用如下命令克隆内核代码:

# 下载默认带480*272LCD的版本
git clone --depth=1 -b f1c100s-480272lcd-test https://github.com/Icenowy/linux.git
## 或者下载不带LCD驱动的版本
git clone --depth=1 -b f1c100s https://github.com/Icenowy/linux.git

切换分支

如果是使用下列命令直接克隆整个仓库:

git clone https://github.com/Icenowy/linux.git

则在下载完代码之后,需要进入内核目录,使用如下命令将分支切换到f1c100s-480272lcd-test或者f1c100s

# 切换到 f1c100s-480272lcd-test
git checkout -f f1c100s-480272lcd-test
# 或者切换到f1c100s
git checkout -f f1c100s

linux内核修改

dts文件

修改内核源码目录下的 ./arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts

&spi0 {
   
    pinctrl-names = "default";
    pinctrl-0 = <&spi0_pins_a>;
    status = "okay";
    spi-max-frequency = <50000000>;
    flash: xt25f128b@0 {
   
        #address-cells = <1>;
        #size-cells = <1>;
        compatible = "winbond,xt25f128b", "jedec,spi-nor";
        reg = <0>;
        spi-max-frequency = <50000000>;
        partitions {
   
            compatible = "fixed-partitions";
            #address-cells = <1>;
            #size-cells = <1>;

            partition@0 {
   
                label = "u-boot";
                reg = <0x000000 0x100000>;
                read-only;
            };

            partition@100000 {
   
                label = "dtb";
                reg = <0x100000 0x10000>;
                read-only;
            };

            partition@110000 {
   
                label = "kernel";
                reg = <0x110000 0x400000>;
                read-only;
            }
  • 1
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值