u-boot-2012.04.01 (toolchain: 4.3.2) linux-4.19 (toolchain: gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi) tslib-1.4.tar.gz (toolchain: 4.3.2) fs使用韦东山视频教程:fs_mini_mdev_new.jffs2 tftp工具
链接:https://pan.baidu.com/s/1RmFznkuIjoNnBoVhqdNWUA 提取码:uhyl 复制这段内容后打开百度网盘手机App,操作更方便哦sudo apt-get autoremove open-vm-tools sudo apt-get install open-vm-tools sudo apt-get install open-vm-tools-desktop
1.安装 sudo apt-get install nfs-kernel-server 2.创建samba账户,win才可以访问 3.linux(ubuntu)下的64位编译器编译32位程序 https://blog.csdn.net/yingjie79613/article/details/79068005
https://www.cnblogs.com/hicjiajia/archive/2012/07/09/2583632.html sudo apt-get install nfs-common sudo apt-get install nfs-kernel-server vim /etc/exports /work/share/ *(rw,sync,no_subtree_check) /etc/init.d/nfs-kernel-server restart mount -t nfs -o nolock 192.168.1.21:/work/share /mnt umount /mnt
apt-get install bison apt-get install flex sudo apt-get install libncurses5-dev
#LDFLAGS_u-boot += -pie // 取消相对位置编译
https://blog.csdn.net/oqqHuTu12345678/article/details/71172672
配置工具链
ARCH ?= arm CROSS_COMPILE ?= /work/compiler/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-配置分区
static struct mtd_partition smdk_default_nand_part[] = { [0] = { .name = "u-boot", .offset = 0, .size = SZ_256K, }, [1] = { .name = "params", .offset = SZ_256K, .size = SZ_128K, }, [2] = { .name = "dts", .offset = SZ_256K+SZ_128K, .size = SZ_128K, }, [3] = { .name = "logo", .offset = SZ_256K+SZ_128K+SZ_128K, .size = SZ_256K, }, [4] = { .name = "kernel", .offset = SZ_256K+SZ_128K+SZ_128K+SZ_256K, .size = SZ_4M, }, [5] = { .name = "rootfs", .offset = SZ_256K+SZ_128K+SZ_128K+SZ_256K+SZ_4M, .size = MTDPART_SIZ_FULL, }, };配置系统时钟
static void __init smdk2440_init_time(void) { s3c2440_init_clocks(/*16934400*/12000000); samsung_timer_init(); }lcd参数
static struct s3c2410fb_display smdk2440_lcd_cfg __initdata = { .type = S3C2410_LCDCON1_TFT, .width = 320, .height = 240, .xres = 320, .yres = 240, .bpp = 16, .pixclock = 80000, /* HCLK 100 MHz, divisor 3 */ #if 1 .left_margin = 28, /* for HFPD*/ .right_margin = 24, /* for HBPD*/ .hsync_len = 42, /* for HSPW*/ .upper_margin = 6, /* for VBPD*/ .lower_margin = 2, /* for VFPD*/ .vsync_len = 12, /* for VSPW*/ #else .left_margin = 32, /* for HFPD*/ .right_margin = 22, /* for HBPD*/ .hsync_len = 45, /* for HSPW*/ .upper_margin = 13, /* for VBPD*/ .lower_margin = 5, /* for VFPD*/ .vsync_len = 6, /* for VSPW*/ #endif .lcdcon5 = S3C2410_LCDCON5_FRM565 \ | S3C2410_LCDCON5_INVVLINE \ | S3C2410_LCDCON5_INVVFRAME \ | S3C2410_LCDCON5_PWREN \ | S3C2410_LCDCON5_HWSWP, };bug
static int s3c24xx_dma_probe(struct platform_device *pdev) { ... s3cdma->slave.filter.map = pdata->slave_map; s3cdma->slave.filter.mapcnt = pdata->slavecnt; s3cdma->slave.filter.fn = s3c24xx_dma_filter; s3cdma->slave.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); ... }bug
static int s3c_rtc_probe(struct platform_device *pdev) { ... info->dev = &pdev->dev; //info->data = s3c_rtc_get_data(pdev); info->data = platform_get_device_id(pdev)->driver_data; if (!info->data) { dev_err(&pdev->dev, "failed getting s3c_rtc_data\n"); return -EINVAL; } }CONFIG_BLK_DEV_RAM_COUNT=8 CONFIG_LEGACY_PTY_COUNT=8 #define MAX_NR_CONSOLES 7
环境:
sudo apt-get install autoconf sudo apt-get install automake sudo apt-get install libtool编译:
tar xzf tslib-1.4.tar.gz cd tslib ./autogen.sh mkdir tmp echo "ac_cv_func_malloc_0_nonnull=yes" >arm-linux.cache ./configure --host=arm-linux --cache-file=arm-linux.cache --prefix=$(pwd)/tmp make make install安装:
cd tmp cp * -rf /nfsrootcat /etc/profile
export TSLIB_TSDEVICE=/dev/event0 export TSLIB_CALIBFILE=/etc/pointercal export TSLIB_CONFFILE=/etc/ts.conf export TSLIB_PLUGINDIR=/lib/ts export TSLIB_CONSOLEDEVICE=none export TSLIB_FBDEVICE=/dev/fb0执行:
ts_calibrate ts_test static int ts_input_read(struct tslib_module_info *inf, struct ts_sample *samp, int nr) { ... #if 0 if (i->sane_fd == 0) i->sane_fd = check_fd(i); if (i->sane_fd == -1) return 0; #else i->using_syn = 1; #endif if (i->using_syn) { switch (ev.type) { case EV_KEY: switch (ev.code) { case BTN_TOUCH: if (ev.value == 0) { } else { i->current_p = ev.value; } break; } break; } } } }