Chapter 144 Years Ago
Chapter 144 Years Ago
Chapter 144 Years Ago
1 month 12 day.
In the lab, Zhang Mingyuan was running data, Zhou Chengyu was debugging algorithms, and everyone else was busy with their own things.
Lin Dong didn't disturb them. He went into his office, closed the door, and turned on his computer.
The screen shows the system framework he wrote yesterday.
The Liu kernel has been cut in half, driver adaptation has been mostly written, process management has been partially written, and memory management has just begun.
The remaining parts of the kernel after trimming are power management and interrupt control.
These two parts cannot be cut, but they can be streamlined.
He removed unnecessary interrupt sources and simplified the power state machine to three modes: run, standby, and...
Shut down. The code is small, but the logic is convoluted.
He spent two hours writing, compiling, running, and there were no errors. Then he continued.
The remaining driver adaptations are for audio and sensors.
He's familiar with audio drivers, but sensor drivers are a bit more complicated; you need to adjust the 2C bus and configure register addresses.
He flipped through the datasheet, writing line by line, testing each one as he finished. When he got to the third test, the I12C communication just wouldn't work.
He spent half an hour checking and found that the address was wrong. The manual said 068, but it should actually be 069.
It's fixed now.
He leaned back in his chair and cursed under his breath.
This kind of basic mistake shouldn't be made.
But if you write a system yourself, there's no one to review it or test it; if there are mistakes, you have to find them yourself. He rubbed his eyes and continued.
On January 15th, the kernel trimming was completed and it started running.
Several lines of startup information pop up on the screen, the last line of which reads "Kernel alive".
The last driver adaptation is for one-touch screens.
This is the most crucial part; Zhou Chengyu's algorithm is waiting to be used.
He turned to the interrupted chapter in the data manual and began writing.
The touch screen driver consists of three parts: I2C communication, interrupt handling, and coordinate reporting.
He's already written the I2C communication code, so it can be reused directly. Interrupt handling requires configuring GPIO and writing interrupt service routines. Coordinate reporting needs to be converted to screen coordinates, and filtering and debouncing are necessary.
He spent two hours writing, compiling, and burning it, but the screen didn't respond.
Checking the Iog and I2C communication, it appears to be working normally, but the interrupt was not triggered.
He flipped through the datasheet, turned to the page on pin definitions, and discovered that the interrupt pin was misconfigured.
Change it, recompile, and flash it. Press your finger on it, and a series of coordinates will appear on the screen.
pass.
carry on.
On January 20th, the driver adaptation was completed, and the hardware recognized it.
The screen is lit up, the touchscreen works, the battery can be charged, and the antenna has a signal.
He connected the phone's motherboard, and the screen displayed the logo of Dongfang Technology (1©g0). The small sun, with a bright edge, glowed faintly against the dark background.
Keep writing.
Process management.
Multitasking scheduling, priority, and interrupt handling – this part is the most complex and crucial. He wrote it very slowly, carefully considering every line. It wasn't that he didn't know how, but that he couldn't afford to make mistakes. A mistake would cause everything to crash.
He first wrote the task control block.
A structure is used to store task D, priority, stack pointer, and state. After writing and compiling, there are no problems. Next, the task scheduler is written. A doubly linked list is used, with insertions based on priority, and the first task is retrieved for each scheduling operation.
After two hours of writing, compiling, and running it, there were no problems. Next, I wrote about task switching: saving the current task context and restoring the next task context. This part required writing compilation, which he wasn't very familiar with, so he wrote it in fits and starts, referring to the reference manual several times.
On the third day of writing, the task switching was finally successful.
He ran three test programs simultaneously, and the CU scheduling was normal; there were no crashes or freezes.
He leaned back in his chair and rubbed his eyes.
It's January 25th.
And then there's memory management. That's the last part.
Once the process is complete, the system will be able to boot up.
Once you're done writing, the phone will be ready to run.
However, memory management is also the most difficult part. It would take at least two weeks for one person to write memory allocation, reclamation, defragmentation, and virtual address mapping.
He gritted his teeth and continued.
First, write the physical memory allocator.
Bitmap management, 4KB per page, total memory 256MB, bitmap size 8KB.
I wrote it for an hour, compiled it, and it ran without any problems.
Next, we'll write about virtual memory mapping. The page table, page directory, and address translation part is the most convoluted.
He spent two hours writing, compiling, and running it without any errors.
But the test program crashed as soon as I ran it. Checking 10g, I found the page table wasn't initialized. I added the initialization code, ran it again, but it still crashed. After two hours of troubleshooting, I found it was an address alignment issue. I fixed it, ran it again, and it worked.
He leaned back in his chair and let out a long sigh.
On January 27th, after completing most of the memory management, the system was able to boot.
The screen lit up, Iogo appeared, but the desktop didn't run.
It's not written yet. But the system is alive. The kernel is running, the drivers are running, the task scheduler is running, and the memory is running.
He stared at the startup information on the screen for a long time.
almost.
Just a little bit closer.
He glanced at the time; it was 2 PM.
The last meeting before the new year started at 3 PM.
He saved the code, closed the editor, and stood up.
At 3 p.m., the conference room was full of people.
Zhang Mingyuan, Zhou Chengyu, Su Xiaowen, Cheng Chuan, Cheng Yu, Ding Xiao, Li Guohui, Wang Mei, Uncle Cai, and Zheng Hao. Ten people sat around a table.
Lin Dong sat in the main seat and glanced around: "This is the last meeting before the new year. Each module should report on its progress."
Zhang Mingyuan spoke first.
He opened his laptop and read out a series of data: "Motherboard power consumption 398mA, heat generation 39.5 degrees Celsius, ran continuously for ten days without crashing. A little better than the target before the new year, but still far from the final goal."
Lin Dong nodded: "Keep running. The goal after the New Year is 350 kWh power consumption, 38 kWh heat generation, and 30 days of operation."
Zhang Mingyuan nodded and wrote it down.
As he wrote, the pen paused on the paper for a moment, then he looked up: "President Lin, 30 consecutive days of continuous travel, no breaks allowed. If any problems arise..."
"We'll solve the problems as they arise," Lin Dong said. "We still have time."
Zhang Mingyuan nodded and didn't ask any more questions.
Zhou Chengyu adjusted his glasses: "Touch latency 11.8 milliseconds. The pre-New Year target achieved."
"10 milliseconds after the new year".
"Okay," Zhou Chengyu said. He didn't say much more, but he adjusted his glasses a little more frequently than usual. 10 milliseconds, almost 2 milliseconds faster than now. He knew he could do it, but it would take time.
Cheng Chuan said the antenna signal had returned to normal, and the goal before the new year had been achieved. Cheng Yu said the heat dissipation was kept below 08 degrees Celsius, even better than the target. Ding Xiao said the driver and algorithm were running smoothly, and there were no problems.
Su Xiaowen said, "All 50 sets of outer shells have been inspected and found to be flawless."
She placed the frame she was holding on the table; the silvery-white metal gleamed coldly under the light. Several people gathered around to look, and Cheng Chuan reached out to touch it, earning a glare from Cheng Yu.
Li Guohui cleared his throat and said, "President Lin, there's something I need to tell you."
Lin Dong looked at him.
"We're almost out of materials," Li Guohui said. "Most of that batch of aerospace aluminum was sold before, with only a small portion kept for research and development. With 50 sets of casings and losses from prototyping, our inventory is running low."
At the current yield rate, we can only produce a maximum of around 500 sets.
The meeting room fell silent for a moment.
Lin Dong nodded.
Of course he remembers.
Most of the goods from Rijinshan were sold, with a small portion kept for samples and R&D. 500 sets are enough until mid-year. After mid-year, a new supply will be needed.
"500 sets should be enough for a while," Lin Dong said. "I will resolve the material issue before the middle of the year."
Li Guohui nodded and didn't ask any more questions.
Wang Mei made a note, looked up at Lin Dong, seemed about to say something, but then swallowed her words.
Lin Dong stood up, walked to the whiteboard, and wrote down his goals for the new year:
The motherboard has a power consumption of 350mA, a heat output of 38℃, and runs for 30 days.
Touch response - 10 milliseconds.
Antenna 1 is 1 dB higher than normal.
Heat dissipation: within 0.5 degrees Celsius.
The driver, in conjunction with the algorithm, reduces the time to 10 milliseconds.
The yield rate of the outer casing is over 98% for 500 sets.
He put down his pen and turned around: "We'll continue after the New Year. Everyone go home and have a good New Year."
The crowd gradually dispersed.
As Zhang Mingyuan left, he glanced at Lin Dong, wanting to say something, but then swallowed his words. He knew Lin Dong was writing the system alone, and he knew how difficult it was to create one.
Zhou Chengyu walked to the door, stopped, and glanced back at Lin Dong: "President Lin, how much more is needed for the system?"
"Memory management is halfway done, and the desktop application isn't even finished yet," Lin Dong said. "It'll be done soon."
Zhou Chengyu nodded, asked no more questions, and went out.
When he reached the door, he paused, looked back, seemed about to say something, but then swallowed his words.
Su Xiaowen walked last, holding a phone frame in her hand. She glanced at Lin Dong and said, "Don't worry about the casing. I'll keep a close eye on 500 sets."
Lin Dong nodded: "Thank you for your hard work."
She didn't say anything more, turned around and left.
When she reached the door, she stopped, glanced back, her gaze lingering on Lin Dong's face for a moment, before pushing the door open and leaving.
Cheng Chuan walked beside Cheng Yu and whispered, "Can President Lin write the system all by himself?"
Cheng Yu didn't answer, but pushed him: "Let's go."
The meeting room was empty except for Lin Dong and Uncle Cai.
Lin Dong leaned back in his chair, looking at the numbers on the whiteboard.
Power consumption, latency, yield, production capacity—every single one of these is being monitored.
Only the "System" section was empty. He was monitoring it himself. But one person can't keep track of everything.
"Uncle Cai".
"Why."
"How's the search for the system's people going?"
Uncle Cai took a list out of his briefcase and handed it over.
The document lists the resumes, backgrounds, and contact information of three people, each accompanied by handwritten notes from Uncle Cai.
"The first one is a system engineer at a major domestic company with five years of experience and has participated in two embedded projects."
Uncle Cai pointed to the first one and tapped the note line, "The skills are fine, but the person is currently employed and may not be willing to come out."
Lin Dong glanced at it but didn't say anything.
"The second one is someone who came back from overseas and worked on the underlying system of a chip company."
Uncle Cai pointed to the second one, "His technical skills are better than the first one, but his salary demands are higher. And they might not even be interested in our small company."
Lin Dong glanced at him.
Uncle Cai chuckled awkwardly, "I was referring to other people's opinions, not mine."
Lin Dong didn't respond, and looked at the third one.
"Thirdly, I work as a freelancer. I've done system porting for several companies and have a good reputation in the industry."
Uncle Cai said, "I've talked to him twice. He's competent and willing to talk. He used to work in a small company, so he knows what startups are like. He's not picky about platforms; he just wants to do something interesting."
Lin Dong looked at the third person's information for a while.
My resume isn't particularly impressive; it lacks the prestige of working for a major company and doesn't have a prestigious university background.
But they have solid project experience.
I have done two complete system portings, covering everything from the underlying layer to the application layer.
Such a person may not be able to build the framework, but at least knows how the system works.
"Let's choose him. He can come for the interview after the New Year."
Uncle Cai nodded: "Then I'll make the arrangements. The seventh or the eighth?"
"The eighth day of the month."
"Okay. I'll ask him to come over on the eighth day of the month."
Lin Dong put down the list and leaned back in his chair.
Outside the window, Shenzhen is brightly lit.
He glanced at the time; it was almost six o'clock. It was already dark.
"Uncle Cai, you've worked hard this year."
Uncle Cai paused for a moment, then put the list back into his bag, zipped it up, and stood up. "Mr. Lin, you're being too polite. It's my good fortune to work for you. Back in Huaqiangbei, if it weren't for your help, I'd still be dealing in spare parts at a stall."
Lin Dong didn't respond.
Uncle Cai looked at him, wanting to say something, but then swallowed his words.
He walked to the door, stopped, and looked back: "President Lin, take a good rest during the New Year. We can talk about the system after the New Year."
Lin Dong nodded.
Uncle Cai pushed open the door and went out.
His footsteps echoed down the corridor, growing fainter and fainter.
Lin Dong sat alone in the conference room.
The numbers on the whiteboard are still there.
功耗398mA、触控11.8ms、天线正常、散热0.8度、外壳50套0瑕疵、良率96%。
Every line represents the hard work and dedication of each individual.
Zhang Mingyuan stayed up countless nights, Zhou Chengyu ran through the data hundreds of times, Su Xiaowen revised the drawings more than a hundred times, and Li Guohui made countless trips between Dongguan and Shenzhen.
It's all done.
All that's missing is the system.
He stood up and erased the words on the whiteboard.
I'll rewrite it after the New Year.
When Lin Dong drove home, it was already completely dark.
There are red lanterns hanging at the entrance of the courtyard; Mom bought them a few days ago.
As you push open the door, the aroma of braised goose wafts out from the kitchen.
"You're back?" Li Xiuzhen poked her head out from the kitchen. "Wash your hands and eat."
Lin Guodong was watching TV in the living room when he saw him come in and nodded.
A table was set up for the New Year's Eve dinner.
Braised goose, steamed fish, stir-fried kale, and pork rib soup.
Mom placed a piece of goose leg into Lin Dong's bowl: "You've lost weight."
"no."
"You've lost weight," Li Xiuzhen insisted. "Have you been eating poorly at work and school?"
Lin Dong didn't say anything, but lowered his head and took a bite.
Lin Guodong poured a glass of wine and pushed it in front of Lin Dong: "Want some?"
Lin Dong picked up the glass and took a sip.
The alcohol was strong, burning from my throat to my stomach.
Outside the window, Shenzhen is brightly lit, and the sound of firecrackers can be heard in the distance, though not very loud.
"Next year," Li Xiuzhen said, "will we be able to make good mobile phones?"
Lin Dong glanced at her: "Yes."
Li Xiuzhen nodded and didn't ask any more questions. She put another piece of goose meat on Lin Dong's plate, and then put one on her own plate as well.
Lin Guodong held his wine glass, looking out the window, lost in thought.
We ate our New Year's Eve dinner very slowly.
Mom kept putting food on his plate, Dad would say a few words now and then, and Lin Dong listened. The Spring Festival Gala was playing on TV, it was lively and bustling, but their table was very quiet.
Halfway through the meal, Li Xiuzhen suddenly said, "Adong, Mom is so proud of you."
Lin Dong was stunned for a moment.
"It's not because of how much money you make," Li Xiuzhen said, "it's because of what you do. The company, the cell phones—Mom may not understand them, but Mom knows you're doing great things."
Lin Guodong nodded in agreement.
Lin Dong looked at them.
He recalled a year ago when creditors came to the door, his father standing hunched over at the entrance, his mother standing beside him in an apron. A year later, they sat in their Shenzhen home, eating New Year's Eve dinner, and said, "We are so proud of you."
He picked up the cup and took a sip.
"Mom, Dad," he said, "you'll know when the phone is made next year."
Li Xiuzhen smiled, her eyes a little red: "Okay, Mom will wait."
Lin Guodong's lips curved into a smile.
He picked up his glass, took a sip, and then looked out the window. Shenzhen, outside, was brightly lit. In the distance, fireworks were going off, bursting open one by one before falling to the ground.
Lin Dong also looked out the window.
He thought that by this time next year, the phone should already be made.
Back then, he could give one to his mother so she could use the phone her son made. He could give one to his father so he could show it off to his old colleagues.
He looked away and picked up another piece of goose meat.
Li Xiuzhen watched him eat and smiled, "Eat more, it's almost New Year's."
"Um."
The sound of firecrackers outside the window has faded into the distance.
This year has finally come to an end.
>
MMB