1. Compilation error correction
1. Added in linux-2.6.35-rc3\arch\arm\mach-s3c2416\kconfig:
config MACH_SMDK2416
bool "SMDK2416"
select CPU_S3C2416
select S3C_DEV_FB
select S3C_DEV_NAND #add by ltls
select S3C_DEV_USB_HOST #add by ltls
select S3C_DEV_SMDK #add by ltls
select S3C_DEV_HSMMC
select S3C_DEV_HSMMC1
help
Say Y here if you are using an SMDK2416
Purpose:linux-2.6.35-rc3\arch\arm\mach-s3c2416\makefile File:
obj-$(CONFIG_S3C_DEV_USB_HOST) += dev-usb.o
Wait for the corresponding macro to open
2. Added in linux-2.6.35-rc3\arch\arm\plat-s3c24xx\kconfig:
config MACH_SMDK
bool
default y #add by ltls
help
Common machine code for SMDK2410 and SMDK2440
Purpose: Open linux-2.6.35-rc3\arch\arm\plat-s3c24xx\makefile File: CONFIG_MACH_SMDK macro open
obj-$(CONFIG_MACH_SMDK) += common-smdk.o
This is to make corresponding changes to the Makefile file red control:
2. Kernel startup problem
1. The kernel machine code arch/arm/tools/mach-types file smdk2416 is 1685
Uboot in borad/Samsung/smdk2416/smdk2416.c
gd->bd->bi_arch_number = MACH_TYPE;
In uboot, you can also use the bdinfo command to find arch_number = 0x00000695 (1685)
These two must be consistent
2. uImage production:
a. Change the makefile under linux-2.6.35-rc3/:
export KBUILD_BUILDHOST := $(SUBARCH)
#ARCH ?= arm #delete by ltls
#CROSS_COMPILE ?= arm-linux- #delete by ltls
ARCH = arm #add by ltls
CROSS_COMPILE =/usr/local/arm/4.2.2-eabi/usr/bin/arm-linux- #add by ltls
b. #cp config_mini2440_a70 .config
c. #make menuconfig Enter the interface
d.#make zImage
e.#cd arch/arm/boot
f. # mkimage –A arm –O linux –T kerenel –C none –a 0x30008000 –e 30008000 –n linux-2.6.35 –d zImage uImage
Notes:
The mkimage command is generated by uboot. Just copy the mkimage file under /tools to the bin file; 0x30008000 is very critical.
3. An error occurred when starting uImage. Change the local value from c0008000 to 32000000 to make it work.
Eg:
Tftp 0x32000000 uImage
Bootm 0x32000000
make menuconfig
Kernel hacking --->
[*] Kernel debugging
[*] Kernel low-level debugging functions
[*] Kernel low-level debugging messages via S3C UART
4. NFS startup dm9000 driver error:
a. Looking up port of RPC 100003/2 on 192.168.1.90
------------[ cut here ]------------
WARNING: at net/sched/sch_generic.c:258 dev_watchdog+0x270/0x294()
NETDEV WATCHDOG: eth0 (dm9000): transmit queue 0 timed out
Modules linked in:
B. dm9000 Ethernet Driver, V1.31
dm9000 dm9000: eth2090025647: Invalid ethernet
MAC address. Please set using ifconfig
eth0: dm9000a at c480c300,c4810304 IRQ 48
MAC: 00:00:00:00:00:00 (chip)
Solution: In the dm9000.C file
memcpy(ndev->dev_addr, "\x08\x90\x90\x90\x90\x90", 6);// add ltls for dm9000
if (!is_valid_ether_addr(ndev->dev_addr))
dev_warn(db->dev, "%s: Invalid ethernet MAC address. Please "
"set using ifconfig\n", ndev->name);
5. Add dm9000:
//---start---add by ltls for dm9000 ----------------------------
//---author:fj_ltls
//---date:2001.6.18
//------start--------------------------------------------
/* DM9000AEP 10/100 ethernet controller */
static struct resource smdk2416_dm9k_resource [ ] = {
[0] = {
.start = MACH_smdk2416_DM9K_BASE,
.end = MACH_smdk2416_DM9K_BASE + 3,
.flags = IORESOURCE_MEM
},
[1] = {
.start = MACH_smdk2416_DM9K_BASE + 4,
.end = MACH_smdk2416_DM9K_BASE + 7,
.flags = IORESOURCE_MEM
},
[2] = {
.start = IRQ_EINT4,//ltls Port :GPF4 EINT4
.end = IRQ_EINT4,//ltls
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
}
};
/*
* The DM9000 has no eeprom, and it's MAC address is set by
* the bootloader before starting the kernel.
*/
static struct dm9000_plat_data smdk2416_dm9k_pdata = {
.flags = (DM9000_PLATF_16BITONLY | DM9000_PLATF_NO_EEPROM),
};
static struct platform_device smdk2416_device_eth = {
.name = "dm9000",
.id = -1,
.num_resources = ARRAY_SIZE(smdk2416_dm9k_resource),
.resource = smdk2416_dm9k_resource,
.dev = {
.platform_data = &smdk2416_dm9k_pdata,
},
};
//---end---add by ltls for dm9000 --------------------------------------
6. Add nand mtdpart:
A. In the arch/arm/mach-2416/s3c2416.c file:
void __init s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no)
{
s3c24xx_init_uartdevs("s3c2440-uart", s3c2410_uart_resources, cfg, no);
s3c_device_nand.name = "s3c2416-nand"; This should be changed to "s3c2440-nand" corresponding to the following
}
B.In Driver/mtd/nand/s3c2410.c file:
static struct platform_device_id s3c24xx_driver_ids[] = {
{
.name = "s3c2410-nand",
.driver_data = TYPE_S3C2410,
}, {
.name = "s3c2440-nand",
.driver_data = TYPE_S3C2440,
}, {
.name = "s3c2412-nand",
.driver_data = TYPE_S3C2412,
}, {
.name = "s3c6400-nand",
.driver_data = TYPE_S3C2412, /* compatible with 2412 */
},
{ }
};
C. In the arch/arm/plat-s3c24xx/common-smdk.c file: nandflash partition:
static struct mtd_partition smdk_default_nand_part[] = {
[0] = {
.name = "Boot Agent",
.size = SZ_16K,
.offset = 0,
},
[1] = {
.name = "S3C2410 flash partition 1",
.offset = 0,
.size = SZ_2M,
},
[2] = {
.name = "S3C2410 flash partition 2",
.offset = SZ_4M,
.size = SZ_4M,
},
[3] = {
.name = "S3C2410 flash partition 3",
.offset = SZ_8M,
.size = SZ_2M,
},
[4] = {
.name = "S3C2410 flash partition 4",
.offset = SZ_1M * 10,
.size = SZ_4M,
},
[5] = {
.name = "S3C2410 flash partition 5",
.offset = SZ_1M * 14,
.size = SZ_1M * 10,
},
[6] = {
.name = "S3C2410 flash partition 6",
.offset = SZ_1M * 24,
.size = SZ_1M * 24,
},
[7] = {
.name = "S3C2410 flash partition 7",
.offset = SZ_1M * 48,
.size = SZ_16M,
}
};
7. Add kernel file system yaffs2:
A.linux-2.6.35-rc3\fs\ add yaffs2 folder copied from 2.6.32
B.linux-2.6.35-rc3\fs\kconfig: add
# Patched by YAFFS
source "fs/yaffs2/Kconfig"
C. linux-2.6.35-rc3\fs\makfile adds:
obj-$(CONFIG_MINIX_FS) += minix/
obj-$(CONFIG_YAFFS_FS) += yaffs2/
obj-$(CONFIG_FAT_FS) += fat/
D.nand write.yaffs c0008000 6a0000 3b22c00 3b22c00 must be a multiple of 2048+64=2112
No error:
Input block length is not page aligned
Data did not fit into device, due to bad blocks
127270912 bytes written: ERROR
8. Kernel start and stop
Uncompressing Linux...................... done, booting the kernel.
1. Enter Kernel hacking in the configuration, turn on Kernel debugging and Kernel low-level debugging functions, as well as Kernel low-level debugging messages via S3C UART. Kernel hacking -> Kernel low-level debugging functions and Kernel hacking -> Kernel low-level debugging via EmbeddedICE DCC channel are also turned on. Save and then compile and run
2、
In Device Drivers->Character devices->Serial drivers, select to load Samsung SoC serial support. After selecting static compilation, Support for console on Samsung SoC serial port will appear. Select it as well.
3. root (root file)
1. Create a cramfs file system:
mkcramfs root_qitoal l.cramfs
Nand write c0008000 6a0000 $(filezise) Burn
4. Driver changes:
1. LCD driver changes:
drivers\video\kconfig file
Increase the red part
config FB_S3C2410_DEBUG
bool "S3C2410 lcd debug messages"
depends on FB_S3C2410
help
Turn on debugging messages. Note that you can set/unset at run time
through sysfs
choice
prompt "LCD select"
depends on FB_S3C2410
help
S3C24x0 LCD size select
config FB_S3C2410_T240320
boolean "3.5 inch 240X320 Toppoly LCD"
depends on FB_S3C2410
help
3.5 inch 240X320 Toppoly LCD
config FB_S3C2410_N240320
boolean "3.5 inch 240X320 NEC LCD"
depends on FB_S3C2410
help
3.5 inch 240x320 NEC LCD
config FB_S3C2410_TFT640480
boolean "8 inch 640X480 L80 LCD"
depends on FB_S3C2410
help
8 inch 640X480 LCD
config FB_S3C2410_TFT800480
boolean "7 inch 800x480 TFT LCD"
depends on FB_S3C2410
help
7 inch 800x480 TFT LCD
config FB_S3C2410_VGA1024768
boolean "VGA 1024x768"
depends on FB_S3C2410
help
VGA 1024x768
endchoice
config BACKLIGHT_MINI2440
2.linux-2.6.35-rc3\arch\arm\mach-s3c2416\mach-s3c2416.c
Add red part: Apply for resources
static struct platform_device *smdk2416_devices[] __initdata = {
&s3c_device_fb,
&s3c_device_wdt,
&s3c_device_ohci,
&s3c_device_i2c0,
&s3c_device_hsmmc0,
&s3c_device_hsmmc1,
&s3c_device_rtc, //add by ltls
&s3c_device_lcd,
&smdk2416_device_eth,//add by ltls for dm9000
//&s3c_device_nand,
};
3.linux-2.6.35-rc3\arch\arm\plat-s3c24xx\devs.c
/* LCD Controller */
static struct resource s3c_lcd_resource[] = {
[0] = {
.start = S3C24XX_PA_LCD,
.end = S3C24XX_PA_LCD + S3C24XX_SZ_LCD - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_S3C2443_LCD3,//IRQ_LCD,ltls
.end = IRQ_S3C2443_LCD3,//IRQ_LCD,ltls
.flags = IORESOURCE_IRQ,
}
};
Due to: Interrupt replacement failed:
linux-2.6.35-rc3\arch\arm\mach-s3c2416\irq.c
static int __init s3c2416_irq_add(struct sys_device *sysdev)
{
printk(KERN_INFO "S3C2416: IRQ Support\n");
s3c2416_add_sub(IRQ_LCD, s3c2416_irq_demux_lcd, &s3c2416_irq_lcd,
IRQ_S3C2443_LCD2, IRQ_S3C2443_LCD4);
printk("IRQ_LCD=%d,IRQ_S3C2443_LCD2=%d\n",IRQ_LCD,IRQ_S3C2443_LCD3);//ltls
//==================================================\\
//====== Interrupt replacement failed ============\\
//======Result:IRQ_LCD=32, IRQ_S3C2443_LCD3=86 ===========\\
//================================================\\
4.S3c_fb.c
linux-2.6.35-rc3\drivers\video\kconfig
config FB_S3C
tristate "Samsung S3C framebuffer support"
depends on FB && ARCH_S3C64XX //改为depends on FB
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
Previous article:s3c2440 arm-linux cross-compilation tool
Next article:S3C6410 Chinese datasheet
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- 【Renovation of old things】 Finished product of graffiti desk lamp
- Prototyped a PCB expansion board
- [Practical sharing] Sharing of analog circuit diagrams commonly used by electronic engineers
- MSP432 MCU realizes speech recognition technology
- [Evaluation of EC-01F-Kit, an NB-IoT development board] - Temperature, humidity and atmospheric pressure equipment based on GD32F350 (completed)
- Dear experts, please help me, I can't figure out what's wrong
- Digital IC Power Supply Noise Suppression and Decoupling Application Note
- Are there any recommendations for cost-effective and stable GPS or Beidou chips?
- [micropython] BLE function is officially added to ESP32
- [RVB2601 Creative Application Development] 3. RGB three-color breathing light of RVB2601