mirror of
https://github.com/ebrandi/FDD-book.git
synced 2026-12-06 08:33:30 +00:00
feat: Initial upload of FreeBSD Device Drivers Book structure
This commit establishes the complete foundation for the FreeBSD Device Drivers Book project. ## 📚 Book Structure - **7 Parts** covering the complete driver development journey - **38 Chapters** with detailed metadata and placeholders - **5 Appendices** for reference materials - **Portuguese (Brazil) translation** structure ready ## 🗂️ Directory Organization - - Main book content with chapters and appendices - - Source code examples with comprehensive README - - Utility scripts for content management - - Multi-language support structure ## 🛠️ Key Features Added - **Content Management Scripts**: - - Sync content to website directory - - Set up new language translations - **Examples Documentation** - Complete README with build instructions - **Translation Infrastructure** - Ready for multiple languages ## 📖 Content Overview - **Part 1**: Foundations (FreeBSD, C, Kernel basics) - **Part 2**: Basic Driver Development - **Part 3**: Concurrency and Synchronization - **Part 4**: Hardware and Platform Integration - **Part 5**: Debugging, Tools, and Real-World Practices - **Part 6**: Transport-Specific Drivers - **Part 7**: Mastery Topics and Edge Cases
This commit is contained in:
parent
d8a9d8ca09
commit
539ef021f8
90 changed files with 1886 additions and 2 deletions
136
README.md
136
README.md
|
|
@ -1,2 +1,134 @@
|
|||
# FDD-book
|
||||
FreeBSD Device Driver Book
|
||||
# FreeBSD Device Drivers: From First Steps to Kernel Mastery
|
||||
|
||||
## 🌐 Live Site
|
||||
|
||||
**Production URL**: https://freebsd.edsonbrandi.com
|
||||
**Repository**: https://github.com/ebrandi/FDD-book
|
||||
|
||||
## 📖 About the Book
|
||||
|
||||
"FreeBSD Device Drivers: From First Steps to Kernel Mastery" - is a comprehensive, community-driven guide to writing device drivers for FreeBSD. The book covers everything from basic concepts to advanced topics like interrupt handling, DMA, and performance optimization.
|
||||
|
||||
### What You'll Learn
|
||||
|
||||
- **Foundation & Environment**: UNIX fundamentals, C programming, and development setup
|
||||
- **Core Driver Development**: Building your first device driver and understanding kernel modules
|
||||
- **Advanced System Programming**: Concurrency, synchronization, and memory management
|
||||
- **Hardware Integration**: PCI drivers, interrupts, DMA, and power management
|
||||
- **Debugging & Optimization**: FreeBSD-specific debugging tools and performance tuning
|
||||
- **Professional Development**: Portable drivers, specialized hardware, and open-source contribution
|
||||
|
||||
### Project Structure
|
||||
|
||||
```
|
||||
FDD-book/
|
||||
├── content/ # Book content (Markdown files)
|
||||
│ ├── appendices/ # Appendix markdown files
|
||||
│ └── chapters/ # Chapter markdown files by part
|
||||
├── examples/ # Book Code Examples
|
||||
│ ├── appendices/ # Source Code from appendices
|
||||
│ └── chapters/ # Source Code from appendices
|
||||
├── translations/ # Book content translated
|
||||
│ └── pt_BR/ # Content in pt_BR
|
||||
│ ├── appendices/ #
|
||||
│ └── chapters/ #
|
||||
└── scripts/ # Utility scripts
|
||||
```
|
||||
|
||||
## 📝 Content Management
|
||||
|
||||
### Adding New Chapters
|
||||
|
||||
1. **Create a new markdown file** in the appropriate part directory:
|
||||
```bash
|
||||
content/chapters/part1/chapter-07.md
|
||||
```
|
||||
|
||||
2. **Add YAML frontmatter**:
|
||||
```yaml
|
||||
---
|
||||
title: "Chapter Title"
|
||||
description: "Chapter description"
|
||||
chapter: 7
|
||||
part: 1
|
||||
status: "draft" # planned, draft, revised, complete
|
||||
estimatedReadTime: 15
|
||||
lastUpdated: "2025-01-14"
|
||||
author: "Author Name"
|
||||
reviewer: "Reviewer Name"
|
||||
---
|
||||
```
|
||||
|
||||
3. **Write your content** in Markdown format
|
||||
|
||||
### Adding New Appendices
|
||||
|
||||
1. **Create a new markdown file** in the appendices directory:
|
||||
```bash
|
||||
content/appendices/appendix-f.md
|
||||
```
|
||||
|
||||
2. **Add YAML frontmatter**:
|
||||
```yaml
|
||||
---
|
||||
title: "Appendix Title"
|
||||
description: "Appendix description"
|
||||
status: "draft"
|
||||
estimatedReadTime: 10
|
||||
lastUpdated: "2025-01-14"
|
||||
author: "Author Name"
|
||||
reviewer: "Reviewer Name"
|
||||
---
|
||||
```
|
||||
|
||||
### Content Status Types
|
||||
|
||||
- **`planned`**: Content is planned but not yet started
|
||||
- **`draft`**: Initial content written, needs review
|
||||
- **`revised`**: Content reviewed and revised
|
||||
- **`complete`**: Content finalized and ready for publication
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
We welcome contributions! Please see our [Contributing Guide](https://freebsd.edsonbrandi.com/contribute) for detailed information.
|
||||
|
||||
### Ways to Contribute
|
||||
|
||||
- **Content**: Add new chapters, improve existing content
|
||||
- **Review**: Technical review and proofreading
|
||||
- **Translation**: Help translate the book to other languages
|
||||
- **Code**: Improve the website and add features
|
||||
- **Issues**: Report bugs and suggest improvements
|
||||
|
||||
### Development Workflow
|
||||
|
||||
1. Fork the repository
|
||||
2. Create a feature branch: `git checkout -b feature/your-feature`
|
||||
3. Make your changes
|
||||
4. Test your changes: `npm run build`
|
||||
5. Commit your changes: `git commit -m "Add your feature"`
|
||||
6. Push to your fork: `git push origin feature/your-feature`
|
||||
7. Create a Pull Request
|
||||
|
||||
## 📄 License
|
||||
|
||||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
||||
|
||||
## 🙏 Acknowledgments
|
||||
|
||||
- The FreeBSD development community
|
||||
- All contributors and reviewers
|
||||
- The open-source community for tools and inspiration
|
||||
|
||||
## 📞 Support
|
||||
|
||||
- **Website**: https://freebsd.edsonbrandi.com
|
||||
- **Repository**: https://github.com/ebrandi/FDD-book
|
||||
- **Issues**: [GitHub Issues](https://github.com/ebrandi/FDD-book/issues)
|
||||
- **Discussions**: [GitHub Discussions](https://github.com/ebrandi/FDD-book/discussions)
|
||||
|
||||
---
|
||||
|
||||
**Author**: Edson Brandi (ebrandi@FreeBSD.org)
|
||||
**Website**: https://freebsd.edsonbrandi.com
|
||||
**Repository**: https://github.com/ebrandi/FDD-book
|
||||
|
|
|
|||
12
content/appendices/appendix-a.md
Normal file
12
content/appendices/appendix-a.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
title: "FreeBSD Kernel API Reference"
|
||||
description: "Comprehensive reference for FreeBSD kernel APIs, system calls, and data structures used in device driver development."
|
||||
status: "planned"
|
||||
estimatedReadTime: 25
|
||||
date: "2024-01-15"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "FreeBSD Community"
|
||||
---
|
||||
|
||||
planned
|
||||
|
||||
13
content/appendices/appendix-b.md
Normal file
13
content/appendices/appendix-b.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: "Algorithms and Logic for Systems Programming"
|
||||
description: "Common algorithms and logical patterns used in systems programming and device drivers"
|
||||
appendix: "B"
|
||||
date: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 25
|
||||
---
|
||||
|
||||
planned
|
||||
13
content/appendices/appendix-c.md
Normal file
13
content/appendices/appendix-c.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: "Hardware Concepts for Driver Developers"
|
||||
description: "Essential hardware concepts and terminology for device driver development"
|
||||
appendix: "C"
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 30
|
||||
---
|
||||
|
||||
planned
|
||||
14
content/appendices/appendix-d.md
Normal file
14
content/appendices/appendix-d.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Operating System Concepts"
|
||||
description: "Core operating system concepts relevant to device driver development"
|
||||
appendix: "D"
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 25
|
||||
---
|
||||
|
||||
planned
|
||||
|
||||
13
content/appendices/appendix-e.md
Normal file
13
content/appendices/appendix-e.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: "FreeBSD Internals and Kernel Reference"
|
||||
description: "Comprehensive reference for FreeBSD kernel internals and APIs"
|
||||
appendix: "E"
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 35
|
||||
---
|
||||
|
||||
planned
|
||||
16
content/chapters/part1/chapter-01.md
Normal file
16
content/chapters/part1/chapter-01.md
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
title: "Introduction"
|
||||
description: "Introduction to FreeBSD device driver development and the journey ahead"
|
||||
partNumber: 1
|
||||
partName: "Foundations: FreeBSD, C, and the Kernel"
|
||||
chapter: 1
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
date: "2025-08-01"
|
||||
estimatedReadTime: 15
|
||||
---
|
||||
|
||||
planned
|
||||
13
content/chapters/part1/chapter-02.md
Normal file
13
content/chapters/part1/chapter-02.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: "Setting Up Your Lab"
|
||||
author: "Edson Brandi"
|
||||
date: "2025-08-01"
|
||||
status: "planned"
|
||||
part: 1
|
||||
chapter: 2
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 20
|
||||
---
|
||||
|
||||
planned
|
||||
14
content/chapters/part1/chapter-03.md
Normal file
14
content/chapters/part1/chapter-03.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "A Gentle Introduction to UNIX"
|
||||
author: "Edson Brandi"
|
||||
date: "2025-08-01"
|
||||
status: "planned"
|
||||
part: 1
|
||||
chapter: 3
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 18
|
||||
---
|
||||
|
||||
planned
|
||||
|
||||
13
content/chapters/part1/chapter-04.md
Normal file
13
content/chapters/part1/chapter-04.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: "A First Look at the C Programming Language"
|
||||
author: "Edson Brandi"
|
||||
date: "2025-08-01"
|
||||
status: "planned"
|
||||
part: 1
|
||||
chapter: 4
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 25
|
||||
---
|
||||
|
||||
planned
|
||||
13
content/chapters/part1/chapter-05.md
Normal file
13
content/chapters/part1/chapter-05.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: "Understanding C for Kernel Programming"
|
||||
author: "Edson Brandi"
|
||||
date: "2025-08-01"
|
||||
status: "planned"
|
||||
part: 1
|
||||
chapter: 5
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 30
|
||||
---
|
||||
|
||||
planned
|
||||
14
content/chapters/part1/chapter-06.md
Normal file
14
content/chapters/part1/chapter-06.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "The Anatomy of a FreeBSD Driver"
|
||||
author: "Edson Brandi"
|
||||
date: "2025-08-01"
|
||||
status: "planned"
|
||||
part: 1
|
||||
chapter: 6
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 22
|
||||
---
|
||||
|
||||
planned
|
||||
|
||||
14
content/chapters/part2/chapter-07.md
Normal file
14
content/chapters/part2/chapter-07.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Writing Your First Driver"
|
||||
author: "Edson Brandi"
|
||||
date: "2025-08-01"
|
||||
status: "planned"
|
||||
part: 2
|
||||
chapter: 7
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 28
|
||||
---
|
||||
|
||||
planned
|
||||
|
||||
13
content/chapters/part2/chapter-08.md
Normal file
13
content/chapters/part2/chapter-08.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: "Working with Device Files"
|
||||
author: "Edson Brandi"
|
||||
date: "2025-08-01"
|
||||
status: "planned"
|
||||
part: 2
|
||||
chapter: 8
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 20
|
||||
---
|
||||
|
||||
planned
|
||||
13
content/chapters/part2/chapter-09.md
Normal file
13
content/chapters/part2/chapter-09.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: "Reading and Writing to Devices"
|
||||
author: "Edson Brandi"
|
||||
date: "2025-08-01"
|
||||
status: "planned"
|
||||
part: 2
|
||||
chapter: 9
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 25
|
||||
---
|
||||
|
||||
planned
|
||||
13
content/chapters/part2/chapter-10.md
Normal file
13
content/chapters/part2/chapter-10.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: "Handling Input and Output Efficiently"
|
||||
author: "Edson Brandi"
|
||||
date: "2025-08-01"
|
||||
status: "planned"
|
||||
part: 2
|
||||
chapter: 10
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 23
|
||||
---
|
||||
|
||||
planned
|
||||
14
content/chapters/part3/chapter-11.md
Normal file
14
content/chapters/part3/chapter-11.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Concurrency in Drivers"
|
||||
description: "Understanding and managing concurrent operations in device drivers"
|
||||
partNumber: 3
|
||||
partName: "Concurrency and Synchronization"
|
||||
chapter: 11
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
15
content/chapters/part3/chapter-12.md
Normal file
15
content/chapters/part3/chapter-12.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: "Synchronization Mechanisms"
|
||||
description: "Implementing proper synchronization in FreeBSD device drivers"
|
||||
partNumber: 3
|
||||
partName: "Concurrency and Synchronization"
|
||||
chapter: 12
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
|
||||
14
content/chapters/part3/chapter-13.md
Normal file
14
content/chapters/part3/chapter-13.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Timers and Delayed Work"
|
||||
description: "Implementing time-based operations and delayed execution in drivers"
|
||||
partNumber: 3
|
||||
partName: "Concurrency and Synchronization"
|
||||
chapter: 13
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
content/chapters/part3/chapter-14.md
Normal file
14
content/chapters/part3/chapter-14.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Taskqueues and Deferred Work"
|
||||
description: "Using taskqueues for deferred processing in device drivers"
|
||||
partNumber: 3
|
||||
partName: "Concurrency and Synchronization"
|
||||
chapter: 14
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
content/chapters/part3/chapter-15.md
Normal file
14
content/chapters/part3/chapter-15.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "More Synchronization — Conditions, Semaphores, and Coordination"
|
||||
description: "Advanced synchronization techniques for complex driver scenarios"
|
||||
partNumber: 3
|
||||
partName: "Concurrency and Synchronization"
|
||||
chapter: 15
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
content/chapters/part4/chapter-16.md
Normal file
14
content/chapters/part4/chapter-16.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Accessing Hardware"
|
||||
description: "Direct hardware access techniques for device drivers"
|
||||
partNumber: 4
|
||||
partName: "Hardware and Platform-Level Integration"
|
||||
chapter: 16
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
content/chapters/part4/chapter-17.md
Normal file
14
content/chapters/part4/chapter-17.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Simulating Hardware"
|
||||
description: "Creating virtual hardware for testing and development purposes"
|
||||
partNumber: 4
|
||||
partName: "Hardware and Platform-Level Integration"
|
||||
chapter: 17
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
content/chapters/part4/chapter-18.md
Normal file
14
content/chapters/part4/chapter-18.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Writing a PCI Driver"
|
||||
description: "Developing drivers for PCI and PCIe devices"
|
||||
partNumber: 4
|
||||
partName: "Hardware and Platform-Level Integration"
|
||||
chapter: 18
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
content/chapters/part4/chapter-19.md
Normal file
14
content/chapters/part4/chapter-19.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Handling Interrupts"
|
||||
description: "Implementing interrupt handling in FreeBSD device drivers"
|
||||
partNumber: 4
|
||||
partName: "Hardware and Platform-Level Integration"
|
||||
chapter: 19
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
15
content/chapters/part4/chapter-20.md
Normal file
15
content/chapters/part4/chapter-20.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: "Advanced Interrupt Handling"
|
||||
description: "Sophisticated interrupt handling techniques and optimizations"
|
||||
partNumber: 4
|
||||
partName: "Hardware and Platform-Level Integration"
|
||||
chapter: 20
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
|
||||
15
content/chapters/part4/chapter-21.md
Normal file
15
content/chapters/part4/chapter-21.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: "DMA and High-Speed Data Transfer"
|
||||
description: "Implementing Direct Memory Access for efficient data transfer"
|
||||
partNumber: 4
|
||||
partName: "Hardware and Platform-Level Integration"
|
||||
chapter: 21
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
|
||||
14
content/chapters/part4/chapter-22.md
Normal file
14
content/chapters/part4/chapter-22.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Power Management"
|
||||
description: "Implementing power management features in device drivers"
|
||||
partNumber: 4
|
||||
partName: "Hardware and Platform-Level Integration"
|
||||
chapter: 22
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
15
content/chapters/part5/chapter-23.md
Normal file
15
content/chapters/part5/chapter-23.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: "Debugging and Tracing"
|
||||
description: "Tools and techniques for debugging FreeBSD device drivers"
|
||||
partNumber: 5
|
||||
partName: "Debugging, Tools, and Real-World Practices"
|
||||
chapter: 23
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
|
||||
15
content/chapters/part5/chapter-24.md
Normal file
15
content/chapters/part5/chapter-24.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: "Integrating with the Kernel"
|
||||
description: "Best practices for kernel integration and driver architecture"
|
||||
partNumber: 5
|
||||
partName: "Debugging, Tools, and Real-World Practices"
|
||||
chapter: 24
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
|
||||
14
content/chapters/part5/chapter-25.md
Normal file
14
content/chapters/part5/chapter-25.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Advanced Topics and Practical Tips"
|
||||
description: "Advanced techniques and practical advice for driver development"
|
||||
partNumber: 5
|
||||
partName: "Debugging, Tools, and Real-World Practices"
|
||||
chapter: 25
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
content/chapters/part6/chapter-26.md
Normal file
14
content/chapters/part6/chapter-26.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "USB and Serial Drivers"
|
||||
description: "Developing drivers for USB and serial communication devices"
|
||||
partNumber: 6
|
||||
partName: "Writing Transport-Specific Drivers"
|
||||
chapter: 26
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
content/chapters/part6/chapter-27.md
Normal file
14
content/chapters/part6/chapter-27.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Working with Storage Devices and the VFS Layer"
|
||||
description: "Developing storage device drivers and VFS integration"
|
||||
partNumber: 6
|
||||
partName: "Writing Transport-Specific Drivers"
|
||||
chapter: 27
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
content/chapters/part6/chapter-28.md
Normal file
14
content/chapters/part6/chapter-28.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Writing a Network Driver"
|
||||
description: "Developing network interface drivers for FreeBSD"
|
||||
partNumber: 6
|
||||
partName: "Writing Transport-Specific Drivers"
|
||||
chapter: 28
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
content/chapters/part7/chapter-29.md
Normal file
14
content/chapters/part7/chapter-29.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Portability and Driver Abstraction"
|
||||
description: "Creating portable drivers across different FreeBSD architectures"
|
||||
partNumber: 7
|
||||
partName: "Mastery Topics: Special Scenarios and Edge Cases"
|
||||
chapter: 29
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
content/chapters/part7/chapter-30.md
Normal file
14
content/chapters/part7/chapter-30.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Virtualisation and Containerization"
|
||||
description: "Driver development for virtualized and containerized environments"
|
||||
partNumber: 7
|
||||
partName: "Mastery Topics: Special Scenarios and Edge Cases"
|
||||
chapter: 30
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
15
content/chapters/part7/chapter-31.md
Normal file
15
content/chapters/part7/chapter-31.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: "Security Best Practices"
|
||||
description: "Implementing security measures in FreeBSD device drivers"
|
||||
partNumber: 7
|
||||
partName: "Mastery Topics: Special Scenarios and Edge Cases"
|
||||
chapter: 31
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
|
||||
14
content/chapters/part7/chapter-32.md
Normal file
14
content/chapters/part7/chapter-32.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Device Tree and Embedded Development"
|
||||
description: "Driver development for embedded systems using device tree"
|
||||
partNumber: 7
|
||||
partName: "Mastery Topics: Special Scenarios and Edge Cases"
|
||||
chapter: 32
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
content/chapters/part7/chapter-33.md
Normal file
14
content/chapters/part7/chapter-33.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Performance Tuning and Profiling"
|
||||
description: "Optimizing driver performance through profiling and tuning"
|
||||
partNumber: 7
|
||||
partName: "Mastery Topics: Special Scenarios and Edge Cases"
|
||||
chapter: 33
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
content/chapters/part7/chapter-34.md
Normal file
14
content/chapters/part7/chapter-34.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Advanced Debugging Techniques"
|
||||
description: "Sophisticated debugging methods for complex driver issues"
|
||||
partNumber: 7
|
||||
partName: "Mastery Topics: Special Scenarios and Edge Cases"
|
||||
chapter: 34
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
15
content/chapters/part7/chapter-35.md
Normal file
15
content/chapters/part7/chapter-35.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: "Asynchronous I/O and Event Handling"
|
||||
description: "Implementing asynchronous operations and event-driven architectures"
|
||||
partNumber: 7
|
||||
partName: "Mastery Topics: Special Scenarios and Edge Cases"
|
||||
chapter: 35
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
|
||||
14
content/chapters/part7/chapter-36.md
Normal file
14
content/chapters/part7/chapter-36.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Creating Drivers Without Documentation (Reverse Engineering)"
|
||||
description: "Techniques for developing drivers when documentation is unavailable"
|
||||
partNumber: 7
|
||||
partName: "Mastery Topics: Special Scenarios and Edge Cases"
|
||||
chapter: 36
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
content/chapters/part7/chapter-37.md
Normal file
14
content/chapters/part7/chapter-37.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Submitting Your Driver to the FreeBSD Project"
|
||||
description: "Process and guidelines for contributing drivers to FreeBSD"
|
||||
partNumber: 7
|
||||
partName: "Mastery Topics: Special Scenarios and Edge Cases"
|
||||
chapter: 37
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
content/chapters/part7/chapter-38.md
Normal file
14
content/chapters/part7/chapter-38.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Final Thoughts and Next Steps"
|
||||
description: "Concluding thoughts and guidance for continued learning"
|
||||
partNumber: 7
|
||||
partName: "Mastery Topics: Special Scenarios and Edge Cases"
|
||||
chapter: 38
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
167
examples/README.md
Normal file
167
examples/README.md
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
# Examples Directory
|
||||
|
||||
This directory contains the complete source code for all examples provided throughout the **FreeBSD Device Drivers Book**. These examples are designed to help readers understand and practice the concepts discussed in each chapter.
|
||||
|
||||
## Directory Structure
|
||||
|
||||
The examples are organized to mirror the book's structure:
|
||||
|
||||
```
|
||||
examples/
|
||||
├── README.md # This file
|
||||
├── chapters/ # Examples from main chapters
|
||||
│ ├── part1/ # Part 1: Fundamentals
|
||||
│ ├── part2/ # Part 2: Basic Drivers
|
||||
│ ├── part3/ # Part 3: Advanced Topics
|
||||
│ ├── part4/ # Part 4: Specialized Drivers
|
||||
│ ├── part5/ # Part 5: Performance & Optimization
|
||||
│ ├── part6/ # Part 6: Debugging & Testing
|
||||
│ └── part7/ # Part 7: Real-world Applications
|
||||
└── appendices/ # Examples from appendices
|
||||
├── appendix-a/ # Appendix A examples
|
||||
├── appendix-b/ # Appendix B examples
|
||||
├── appendix-c/ # Appendix C examples
|
||||
├── appendix-d/ # Appendix D examples
|
||||
└── appendix-e/ # Appendix E examples
|
||||
```
|
||||
|
||||
## Example Organization
|
||||
|
||||
Each example includes:
|
||||
|
||||
- **Source code files** (`.c`, `.h`, `.mk`, etc.)
|
||||
- **Makefile** for building the example
|
||||
- **README** with specific instructions for that example
|
||||
- **Documentation** explaining the example's purpose and usage
|
||||
|
||||
## Building Examples
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Before building any examples, ensure you have:
|
||||
|
||||
1. **FreeBSD development environment** set up
|
||||
2. **Kernel source code** available
|
||||
3. **Required tools** installed:
|
||||
- `gcc` or `clang`
|
||||
- `make`
|
||||
- `kldload`/`kldunload` (for kernel modules)
|
||||
|
||||
### Building a Specific Example
|
||||
|
||||
```bash
|
||||
# Navigate to the example directory
|
||||
cd examples/chapters/part1/example-01
|
||||
|
||||
# Build the example
|
||||
make
|
||||
|
||||
# Load the kernel module (if applicable)
|
||||
sudo kldload ./example_module.ko
|
||||
|
||||
# Unload the kernel module (if applicable)
|
||||
sudo kldunload example_module
|
||||
```
|
||||
|
||||
### Building All Examples
|
||||
|
||||
```bash
|
||||
# From the examples directory
|
||||
make all
|
||||
```
|
||||
|
||||
## Example Types
|
||||
|
||||
The examples cover various aspects of FreeBSD device driver development:
|
||||
|
||||
### Part 1: Foundations: FreeBSD, C, and the Kernel
|
||||
- **Introduction** - Getting started with FreeBSD device driver development
|
||||
- **Setting Up Your Lab** - Development environment setup and configuration
|
||||
- **A Gentle Introduction to UNIX** - UNIX fundamentals for driver development
|
||||
- **A First Look at the C Programming Language** - C programming basics
|
||||
- **Understanding C for Kernel Programming** - Advanced C concepts for kernel development
|
||||
- **The Anatomy of a FreeBSD Driver** - Basic driver structure and components
|
||||
|
||||
### Part 2: Basic Driver Development
|
||||
- **Writing Your First Driver** - Creating a simple kernel module
|
||||
- **Working with Device Files** - Device file creation and management
|
||||
- **Reading and Writing to Devices** - Implementing read/write operations
|
||||
- **Handling Input and Output Efficiently** - Optimizing I/O operations
|
||||
|
||||
### Part 3: Concurrency and Synchronization
|
||||
- **Concurrency in Drivers** - Managing concurrent operations
|
||||
- **Synchronization Mechanisms** - Implementing proper synchronization
|
||||
- **Timers and Delayed Work** - Time-based operations and delayed execution
|
||||
- **Taskqueues and Deferred Work** - Using taskqueues for deferred processing
|
||||
- **More Synchronization — Conditions, Semaphores, and Coordination** - Advanced synchronization techniques
|
||||
|
||||
### Part 4: Hardware and Platform-Level Integration
|
||||
- **Accessing Hardware** - Direct hardware access techniques
|
||||
- **Simulating Hardware** - Creating virtual hardware for testing
|
||||
- **Writing a PCI Driver** - Developing drivers for PCI and PCIe devices
|
||||
- **Handling Interrupts** - Basic interrupt handling implementation
|
||||
- **Advanced Interrupt Handling** - Sophisticated interrupt techniques
|
||||
- **DMA and High-Speed Data Transfer** - Direct Memory Access implementation
|
||||
- **Power Management** - Power management features in drivers
|
||||
|
||||
### Part 5: Debugging, Tools, and Real-World Practices
|
||||
- **Debugging and Tracing** - Tools and techniques for debugging drivers
|
||||
- **Integrating with the Kernel** - Best practices for kernel integration
|
||||
- **Advanced Topics and Practical Tips** - Advanced techniques and practical advice
|
||||
|
||||
### Part 6: Writing Transport-Specific Drivers
|
||||
- **USB and Serial Drivers** - Developing drivers for USB and serial devices
|
||||
- **Working with Storage Devices and the VFS Layer** - Storage device drivers and VFS integration
|
||||
- **Writing a Network Driver** - Network interface driver development
|
||||
|
||||
### Part 7: Mastery Topics: Special Scenarios and Edge Cases
|
||||
- **Portability and Driver Abstraction** - Creating portable drivers across architectures
|
||||
- **Virtualisation and Containerization** - Driver development for virtualized environments
|
||||
- **Security Best Practices** - Implementing security measures in drivers
|
||||
- **Device Tree and Embedded Development** - Driver development for embedded systems
|
||||
- **Performance Tuning and Profiling** - Optimizing driver performance
|
||||
- **Advanced Debugging Techniques** - Sophisticated debugging methods
|
||||
- **Asynchronous I/O and Event Handling** - Asynchronous operations and event-driven architectures
|
||||
- **Creating Drivers Without Documentation (Reverse Engineering)** - Developing drivers without documentation
|
||||
- **Submitting Your Driver to the FreeBSD Project** - Contributing drivers to FreeBSD
|
||||
- **Final Thoughts and Next Steps** - Concluding guidance and continued learning
|
||||
|
||||
## Contributing
|
||||
|
||||
If you find issues with any examples or want to contribute improvements:
|
||||
|
||||
1. **Test the example** on your FreeBSD system
|
||||
2. **Document any issues** you encounter
|
||||
3. **Submit improvements** via pull request
|
||||
4. **Follow the coding standards** used in the book
|
||||
|
||||
## Version Compatibility
|
||||
|
||||
These examples are designed for:
|
||||
- **FreeBSD 14.x** and later
|
||||
- **x86_64** and **ARM64** architectures
|
||||
- **GCC** and **Clang** compilers
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Common Issues
|
||||
|
||||
1. **Build errors**: Ensure you have the correct kernel headers installed
|
||||
2. **Module loading failures**: Check kernel messages with `dmesg`
|
||||
3. **Permission errors**: Use `sudo` for kernel module operations
|
||||
4. **Architecture mismatches**: Verify you're building for the correct architecture
|
||||
|
||||
### Getting Help
|
||||
|
||||
- Check the specific example's README for detailed instructions
|
||||
- Review the book chapter for theoretical background
|
||||
- Consult FreeBSD documentation and man pages
|
||||
- Check kernel messages: `dmesg | tail`
|
||||
|
||||
## License
|
||||
|
||||
These examples are provided under the same license as the FreeBSD Device Driver Book. See the main project LICENSE file for details.
|
||||
|
||||
---
|
||||
|
||||
**Note**: These examples are for educational purposes. Always test thoroughly before using in production environments.
|
||||
240
scripts/setup_translation.sh
Executable file
240
scripts/setup_translation.sh
Executable file
|
|
@ -0,0 +1,240 @@
|
|||
#!/bin/bash
|
||||
|
||||
# FDD Book Translation Setup Script
|
||||
# Creates a new language directory and populates it with content files for translation
|
||||
|
||||
set -e # Exit on any error
|
||||
|
||||
# Colors for output
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
# Configuration
|
||||
PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
CONTENT_DIR="$PROJECT_ROOT/content"
|
||||
TRANSLATIONS_DIR="$PROJECT_ROOT/translations"
|
||||
|
||||
# Function to print colored output
|
||||
print_status() {
|
||||
echo -e "${GREEN}[INFO]${NC} $1"
|
||||
}
|
||||
|
||||
print_warning() {
|
||||
echo -e "${YELLOW}[WARNING]${NC} $1"
|
||||
}
|
||||
|
||||
print_error() {
|
||||
echo -e "${RED}[ERROR]${NC} $1"
|
||||
}
|
||||
|
||||
print_header() {
|
||||
echo -e "${BLUE}[SETUP]${NC} $1"
|
||||
}
|
||||
|
||||
# Function to validate language code
|
||||
validate_language_code() {
|
||||
local lang_code="$1"
|
||||
|
||||
# Check if language code is provided
|
||||
if [ -z "$lang_code" ]; then
|
||||
print_error "Language code is required."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if language code follows ISO 639-1 format (2 letters) or ISO 639-1 with region (e.g., pt_BR)
|
||||
if [[ ! "$lang_code" =~ ^[a-z]{2}(_[A-Z]{2})?$ ]]; then
|
||||
print_error "Invalid language code format. Use ISO 639-1 format (e.g., 'en', 'pt', 'es') or with region (e.g., 'pt_BR', 'en_US')."
|
||||
return 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
# Function to check if content directory exists
|
||||
check_content_directory() {
|
||||
if [ ! -d "$CONTENT_DIR" ]; then
|
||||
print_error "Content directory does not exist: $CONTENT_DIR"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to create language directory
|
||||
create_language_directory() {
|
||||
local lang_code="$1"
|
||||
local lang_dir="$TRANSLATIONS_DIR/$lang_code"
|
||||
|
||||
if [ ! -d "$lang_dir" ]; then
|
||||
print_status "Creating language directory: $lang_dir"
|
||||
mkdir -p "$lang_dir"
|
||||
else
|
||||
print_warning "Language directory already exists: $lang_dir"
|
||||
fi
|
||||
}
|
||||
|
||||
# Global variables for tracking copy results
|
||||
COPY_COUNT=0
|
||||
SKIP_COUNT=0
|
||||
|
||||
# Function to copy directory structure and files
|
||||
copy_content_structure() {
|
||||
local source_dir="$1"
|
||||
local target_dir="$2"
|
||||
|
||||
# Reset counters
|
||||
COPY_COUNT=0
|
||||
SKIP_COUNT=0
|
||||
|
||||
# Create target directory if it doesn't exist
|
||||
mkdir -p "$target_dir"
|
||||
|
||||
# Find all .md files in source directory and copy them
|
||||
while IFS= read -r -d '' file; do
|
||||
# Get relative path from source directory
|
||||
local relative_path="${file#$source_dir/}"
|
||||
local target_file="$target_dir/$relative_path"
|
||||
local target_file_dir="$(dirname "$target_file")"
|
||||
|
||||
# Create target directory if it doesn't exist
|
||||
mkdir -p "$target_file_dir"
|
||||
|
||||
# Check if target file already exists
|
||||
if [ -f "$target_file" ]; then
|
||||
print_warning "Skipping existing file: $relative_path"
|
||||
((SKIP_COUNT++))
|
||||
else
|
||||
print_status "Copying: $relative_path"
|
||||
cp "$file" "$target_file"
|
||||
((COPY_COUNT++))
|
||||
fi
|
||||
done < <(find "$source_dir" -name "*.md" -type f -print0)
|
||||
}
|
||||
|
||||
# Function to show usage
|
||||
show_usage() {
|
||||
echo "Usage: $0 <language_code> [OPTIONS]"
|
||||
echo ""
|
||||
echo "Arguments:"
|
||||
echo " language_code ISO 639-1 language code (e.g., 'en', 'pt', 'es')"
|
||||
echo " or with region (e.g., 'pt_BR', 'en_US')"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " -h, --help Show this help message"
|
||||
echo " -f, --force Force copy even if files already exist"
|
||||
echo " -v, --verbose Show detailed output"
|
||||
echo ""
|
||||
echo "Examples:"
|
||||
echo " $0 fr # Set up French translation"
|
||||
echo " $0 de_DE # Set up German (Germany) translation"
|
||||
echo " $0 es_MX # Set up Spanish (Mexico) translation"
|
||||
echo ""
|
||||
echo "This script creates a new language directory under translations/"
|
||||
echo "and populates it with copies of content files for translation work."
|
||||
}
|
||||
|
||||
# Function to get language name from code
|
||||
get_language_name() {
|
||||
local lang_code="$1"
|
||||
case "$lang_code" in
|
||||
"en") echo "English" ;;
|
||||
"pt") echo "Portuguese" ;;
|
||||
"pt_BR") echo "Portuguese (Brazil)" ;;
|
||||
"es") echo "Spanish" ;;
|
||||
"es_MX") echo "Spanish (Mexico)" ;;
|
||||
"es_ES") echo "Spanish (Spain)" ;;
|
||||
"fr") echo "French" ;;
|
||||
"fr_FR") echo "French (France)" ;;
|
||||
"de") echo "German" ;;
|
||||
"de_DE") echo "German (Germany)" ;;
|
||||
"it") echo "Italian" ;;
|
||||
"it_IT") echo "Italian (Italy)" ;;
|
||||
"ru") echo "Russian" ;;
|
||||
"ru_RU") echo "Russian (Russia)" ;;
|
||||
"zh") echo "Chinese" ;;
|
||||
"zh_CN") echo "Chinese (Simplified)" ;;
|
||||
"zh_TW") echo "Chinese (Traditional)" ;;
|
||||
"ja") echo "Japanese" ;;
|
||||
"ja_JP") echo "Japanese (Japan)" ;;
|
||||
"ko") echo "Korean" ;;
|
||||
"ko_KR") echo "Korean (South Korea)" ;;
|
||||
*) echo "$lang_code" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Main script logic
|
||||
main() {
|
||||
local language_code=""
|
||||
local force_copy=false
|
||||
local verbose=false
|
||||
|
||||
# Parse command line arguments
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
-h|--help)
|
||||
show_usage
|
||||
exit 0
|
||||
;;
|
||||
-f|--force)
|
||||
force_copy=true
|
||||
shift
|
||||
;;
|
||||
-v|--verbose)
|
||||
verbose=true
|
||||
shift
|
||||
;;
|
||||
-*)
|
||||
print_error "Unknown option: $1"
|
||||
show_usage
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
if [ -z "$language_code" ]; then
|
||||
language_code="$1"
|
||||
else
|
||||
print_error "Multiple language codes provided. Only one is allowed."
|
||||
exit 1
|
||||
fi
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Validate language code
|
||||
if ! validate_language_code "$language_code"; then
|
||||
show_usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get language name
|
||||
local language_name=$(get_language_name "$language_code")
|
||||
|
||||
print_header "Setting up translation for $language_name ($language_code)"
|
||||
|
||||
# Check prerequisites
|
||||
check_content_directory
|
||||
|
||||
# Create language directory
|
||||
create_language_directory "$language_code"
|
||||
local lang_dir="$TRANSLATIONS_DIR/$language_code"
|
||||
|
||||
# Copy content structure
|
||||
print_status "Copying content files..."
|
||||
copy_content_structure "$CONTENT_DIR" "$lang_dir"
|
||||
|
||||
print_status "Translation setup completed!"
|
||||
print_status "Language directory: $lang_dir"
|
||||
print_status "Files copied: $COPY_COUNT"
|
||||
print_status "Files skipped (already exist): $SKIP_COUNT"
|
||||
|
||||
if [ "$SKIP_COUNT" -gt 0 ]; then
|
||||
print_warning "Some files already existed and were skipped."
|
||||
print_warning "Use --force option to overwrite existing files."
|
||||
fi
|
||||
|
||||
print_status "Translators can now start working on files in: $lang_dir"
|
||||
}
|
||||
|
||||
# Run main function with all arguments
|
||||
main "$@"
|
||||
145
scripts/sync_content.sh
Executable file
145
scripts/sync_content.sh
Executable file
|
|
@ -0,0 +1,145 @@
|
|||
#!/bin/bash
|
||||
|
||||
# FDD Book Content Sync Script
|
||||
# Syncs content from the current project to the website directory
|
||||
|
||||
set -e # Exit on any error
|
||||
|
||||
# Colors for output
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
# Configuration
|
||||
SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../content" && pwd)"
|
||||
TARGET_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../FDD-Book-website/content" && pwd)"
|
||||
|
||||
# Function to print colored output
|
||||
print_status() {
|
||||
echo -e "${GREEN}[INFO]${NC} $1"
|
||||
}
|
||||
|
||||
print_warning() {
|
||||
echo -e "${YELLOW}[WARNING]${NC} $1"
|
||||
}
|
||||
|
||||
print_error() {
|
||||
echo -e "${RED}[ERROR]${NC} $1"
|
||||
}
|
||||
|
||||
# Function to check if rsync is available
|
||||
check_rsync() {
|
||||
if ! command -v rsync &> /dev/null; then
|
||||
print_error "rsync is not installed. Please install rsync to use this script."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to check if source directory exists
|
||||
check_source() {
|
||||
if [ ! -d "$SOURCE_DIR" ]; then
|
||||
print_error "Source directory does not exist: $SOURCE_DIR"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to create target directory if it doesn't exist
|
||||
ensure_target() {
|
||||
if [ ! -d "$TARGET_DIR" ]; then
|
||||
print_warning "Target directory does not exist. Creating: $TARGET_DIR"
|
||||
mkdir -p "$TARGET_DIR"
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to perform the sync
|
||||
sync_content() {
|
||||
print_status "Starting content synchronization..."
|
||||
print_status "Source: $SOURCE_DIR"
|
||||
print_status "Target: $TARGET_DIR"
|
||||
|
||||
# Use rsync with the following options:
|
||||
# -a: archive mode (preserves permissions, timestamps, etc.)
|
||||
# -v: verbose output
|
||||
# -h: human-readable sizes
|
||||
# --delete: remove files in target that don't exist in source
|
||||
# --exclude: exclude common files that shouldn't be synced
|
||||
rsync -avh --delete \
|
||||
--exclude='*.tmp' \
|
||||
--exclude='*.swp' \
|
||||
--exclude='*.bak' \
|
||||
--exclude='.DS_Store' \
|
||||
--exclude='Thumbs.db' \
|
||||
"$SOURCE_DIR/" "$TARGET_DIR/"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
print_status "Content synchronization completed successfully!"
|
||||
else
|
||||
print_error "Content synchronization failed!"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to show usage
|
||||
show_usage() {
|
||||
echo "Usage: $0 [OPTIONS]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " -h, --help Show this help message"
|
||||
echo " -d, --dry-run Show what would be synced without actually doing it"
|
||||
echo ""
|
||||
echo "This script syncs content from the current project's content directory"
|
||||
echo "to the FDD-Book-website content directory."
|
||||
}
|
||||
|
||||
# Function to perform dry run
|
||||
dry_run() {
|
||||
print_status "Performing dry run (no files will be modified)..."
|
||||
print_status "Source: $SOURCE_DIR"
|
||||
print_status "Target: $TARGET_DIR"
|
||||
|
||||
rsync -avh --delete --dry-run \
|
||||
--exclude='*.tmp' \
|
||||
--exclude='*.swp' \
|
||||
--exclude='*.bak' \
|
||||
--exclude='.DS_Store' \
|
||||
--exclude='Thumbs.db' \
|
||||
"$SOURCE_DIR/" "$TARGET_DIR/"
|
||||
}
|
||||
|
||||
# Main script logic
|
||||
main() {
|
||||
# Parse command line arguments
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
-h|--help)
|
||||
show_usage
|
||||
exit 0
|
||||
;;
|
||||
-d|--dry-run)
|
||||
DRY_RUN=true
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
print_error "Unknown option: $1"
|
||||
show_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Check prerequisites
|
||||
check_rsync
|
||||
check_source
|
||||
ensure_target
|
||||
|
||||
# Perform sync or dry run
|
||||
if [ "$DRY_RUN" = true ]; then
|
||||
dry_run
|
||||
else
|
||||
sync_content
|
||||
fi
|
||||
}
|
||||
|
||||
# Run main function with all arguments
|
||||
main "$@"
|
||||
12
translations/pt_BR/appendices/appendix-a.md
Normal file
12
translations/pt_BR/appendices/appendix-a.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
title: "FreeBSD Kernel API Reference"
|
||||
description: "Comprehensive reference for FreeBSD kernel APIs, system calls, and data structures used in device driver development."
|
||||
status: "planned"
|
||||
estimatedReadTime: 25
|
||||
date: "2024-01-15"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "FreeBSD Community"
|
||||
---
|
||||
|
||||
planned
|
||||
|
||||
13
translations/pt_BR/appendices/appendix-b.md
Normal file
13
translations/pt_BR/appendices/appendix-b.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: "Algorithms and Logic for Systems Programming"
|
||||
description: "Common algorithms and logical patterns used in systems programming and device drivers"
|
||||
appendix: "B"
|
||||
date: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 25
|
||||
---
|
||||
|
||||
planned
|
||||
13
translations/pt_BR/appendices/appendix-c.md
Normal file
13
translations/pt_BR/appendices/appendix-c.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: "Hardware Concepts for Driver Developers"
|
||||
description: "Essential hardware concepts and terminology for device driver development"
|
||||
appendix: "C"
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 30
|
||||
---
|
||||
|
||||
planned
|
||||
14
translations/pt_BR/appendices/appendix-d.md
Normal file
14
translations/pt_BR/appendices/appendix-d.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Operating System Concepts"
|
||||
description: "Core operating system concepts relevant to device driver development"
|
||||
appendix: "D"
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 25
|
||||
---
|
||||
|
||||
planned
|
||||
|
||||
13
translations/pt_BR/appendices/appendix-e.md
Normal file
13
translations/pt_BR/appendices/appendix-e.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: "FreeBSD Internals and Kernel Reference"
|
||||
description: "Comprehensive reference for FreeBSD kernel internals and APIs"
|
||||
appendix: "E"
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 35
|
||||
---
|
||||
|
||||
planned
|
||||
16
translations/pt_BR/chapters/part1/chapter-01.md
Normal file
16
translations/pt_BR/chapters/part1/chapter-01.md
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
title: "Introduction"
|
||||
description: "Introduction to FreeBSD device driver development and the journey ahead"
|
||||
partNumber: 1
|
||||
partName: "Foundations: FreeBSD, C, and the Kernel"
|
||||
chapter: 1
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
date: "2025-08-01"
|
||||
estimatedReadTime: 15
|
||||
---
|
||||
|
||||
planned
|
||||
13
translations/pt_BR/chapters/part1/chapter-02.md
Normal file
13
translations/pt_BR/chapters/part1/chapter-02.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: "Setting Up Your Lab"
|
||||
author: "Edson Brandi"
|
||||
date: "2025-08-01"
|
||||
status: "planned"
|
||||
part: 1
|
||||
chapter: 2
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 20
|
||||
---
|
||||
|
||||
planned
|
||||
14
translations/pt_BR/chapters/part1/chapter-03.md
Normal file
14
translations/pt_BR/chapters/part1/chapter-03.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "A Gentle Introduction to UNIX"
|
||||
author: "Edson Brandi"
|
||||
date: "2025-08-01"
|
||||
status: "planned"
|
||||
part: 1
|
||||
chapter: 3
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 18
|
||||
---
|
||||
|
||||
planned
|
||||
|
||||
13
translations/pt_BR/chapters/part1/chapter-04.md
Normal file
13
translations/pt_BR/chapters/part1/chapter-04.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: "A First Look at the C Programming Language"
|
||||
author: "Edson Brandi"
|
||||
date: "2025-08-01"
|
||||
status: "planned"
|
||||
part: 1
|
||||
chapter: 4
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 25
|
||||
---
|
||||
|
||||
planned
|
||||
13
translations/pt_BR/chapters/part1/chapter-05.md
Normal file
13
translations/pt_BR/chapters/part1/chapter-05.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: "Understanding C for Kernel Programming"
|
||||
author: "Edson Brandi"
|
||||
date: "2025-08-01"
|
||||
status: "planned"
|
||||
part: 1
|
||||
chapter: 5
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 30
|
||||
---
|
||||
|
||||
planned
|
||||
14
translations/pt_BR/chapters/part1/chapter-06.md
Normal file
14
translations/pt_BR/chapters/part1/chapter-06.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "The Anatomy of a FreeBSD Driver"
|
||||
author: "Edson Brandi"
|
||||
date: "2025-08-01"
|
||||
status: "planned"
|
||||
part: 1
|
||||
chapter: 6
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 22
|
||||
---
|
||||
|
||||
planned
|
||||
|
||||
14
translations/pt_BR/chapters/part2/chapter-07.md
Normal file
14
translations/pt_BR/chapters/part2/chapter-07.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Writing Your First Driver"
|
||||
author: "Edson Brandi"
|
||||
date: "2025-08-01"
|
||||
status: "planned"
|
||||
part: 2
|
||||
chapter: 7
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 28
|
||||
---
|
||||
|
||||
planned
|
||||
|
||||
13
translations/pt_BR/chapters/part2/chapter-08.md
Normal file
13
translations/pt_BR/chapters/part2/chapter-08.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: "Working with Device Files"
|
||||
author: "Edson Brandi"
|
||||
date: "2025-08-01"
|
||||
status: "planned"
|
||||
part: 2
|
||||
chapter: 8
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 20
|
||||
---
|
||||
|
||||
planned
|
||||
13
translations/pt_BR/chapters/part2/chapter-09.md
Normal file
13
translations/pt_BR/chapters/part2/chapter-09.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: "Reading and Writing to Devices"
|
||||
author: "Edson Brandi"
|
||||
date: "2025-08-01"
|
||||
status: "planned"
|
||||
part: 2
|
||||
chapter: 9
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 25
|
||||
---
|
||||
|
||||
planned
|
||||
13
translations/pt_BR/chapters/part2/chapter-10.md
Normal file
13
translations/pt_BR/chapters/part2/chapter-10.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: "Handling Input and Output Efficiently"
|
||||
author: "Edson Brandi"
|
||||
date: "2025-08-01"
|
||||
status: "planned"
|
||||
part: 2
|
||||
chapter: 10
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
estimatedReadTime: 23
|
||||
---
|
||||
|
||||
planned
|
||||
14
translations/pt_BR/chapters/part3/chapter-11.md
Normal file
14
translations/pt_BR/chapters/part3/chapter-11.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Concurrency in Drivers"
|
||||
description: "Understanding and managing concurrent operations in device drivers"
|
||||
partNumber: 3
|
||||
partName: "Concurrency and Synchronization"
|
||||
chapter: 11
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
15
translations/pt_BR/chapters/part3/chapter-12.md
Normal file
15
translations/pt_BR/chapters/part3/chapter-12.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: "Synchronization Mechanisms"
|
||||
description: "Implementing proper synchronization in FreeBSD device drivers"
|
||||
partNumber: 3
|
||||
partName: "Concurrency and Synchronization"
|
||||
chapter: 12
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
|
||||
14
translations/pt_BR/chapters/part3/chapter-13.md
Normal file
14
translations/pt_BR/chapters/part3/chapter-13.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Timers and Delayed Work"
|
||||
description: "Implementing time-based operations and delayed execution in drivers"
|
||||
partNumber: 3
|
||||
partName: "Concurrency and Synchronization"
|
||||
chapter: 13
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
translations/pt_BR/chapters/part3/chapter-14.md
Normal file
14
translations/pt_BR/chapters/part3/chapter-14.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Taskqueues and Deferred Work"
|
||||
description: "Using taskqueues for deferred processing in device drivers"
|
||||
partNumber: 3
|
||||
partName: "Concurrency and Synchronization"
|
||||
chapter: 14
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
translations/pt_BR/chapters/part3/chapter-15.md
Normal file
14
translations/pt_BR/chapters/part3/chapter-15.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "More Synchronization — Conditions, Semaphores, and Coordination"
|
||||
description: "Advanced synchronization techniques for complex driver scenarios"
|
||||
partNumber: 3
|
||||
partName: "Concurrency and Synchronization"
|
||||
chapter: 15
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
translations/pt_BR/chapters/part4/chapter-16.md
Normal file
14
translations/pt_BR/chapters/part4/chapter-16.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Accessing Hardware"
|
||||
description: "Direct hardware access techniques for device drivers"
|
||||
partNumber: 4
|
||||
partName: "Hardware and Platform-Level Integration"
|
||||
chapter: 16
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
translations/pt_BR/chapters/part4/chapter-17.md
Normal file
14
translations/pt_BR/chapters/part4/chapter-17.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Simulating Hardware"
|
||||
description: "Creating virtual hardware for testing and development purposes"
|
||||
partNumber: 4
|
||||
partName: "Hardware and Platform-Level Integration"
|
||||
chapter: 17
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
translations/pt_BR/chapters/part4/chapter-18.md
Normal file
14
translations/pt_BR/chapters/part4/chapter-18.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Writing a PCI Driver"
|
||||
description: "Developing drivers for PCI and PCIe devices"
|
||||
partNumber: 4
|
||||
partName: "Hardware and Platform-Level Integration"
|
||||
chapter: 18
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
translations/pt_BR/chapters/part4/chapter-19.md
Normal file
14
translations/pt_BR/chapters/part4/chapter-19.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Handling Interrupts"
|
||||
description: "Implementing interrupt handling in FreeBSD device drivers"
|
||||
partNumber: 4
|
||||
partName: "Hardware and Platform-Level Integration"
|
||||
chapter: 19
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
15
translations/pt_BR/chapters/part4/chapter-20.md
Normal file
15
translations/pt_BR/chapters/part4/chapter-20.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: "Advanced Interrupt Handling"
|
||||
description: "Sophisticated interrupt handling techniques and optimizations"
|
||||
partNumber: 4
|
||||
partName: "Hardware and Platform-Level Integration"
|
||||
chapter: 20
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
|
||||
15
translations/pt_BR/chapters/part4/chapter-21.md
Normal file
15
translations/pt_BR/chapters/part4/chapter-21.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: "DMA and High-Speed Data Transfer"
|
||||
description: "Implementing Direct Memory Access for efficient data transfer"
|
||||
partNumber: 4
|
||||
partName: "Hardware and Platform-Level Integration"
|
||||
chapter: 21
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
|
||||
14
translations/pt_BR/chapters/part4/chapter-22.md
Normal file
14
translations/pt_BR/chapters/part4/chapter-22.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Power Management"
|
||||
description: "Implementing power management features in device drivers"
|
||||
partNumber: 4
|
||||
partName: "Hardware and Platform-Level Integration"
|
||||
chapter: 22
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
15
translations/pt_BR/chapters/part5/chapter-23.md
Normal file
15
translations/pt_BR/chapters/part5/chapter-23.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: "Debugging and Tracing"
|
||||
description: "Tools and techniques for debugging FreeBSD device drivers"
|
||||
partNumber: 5
|
||||
partName: "Debugging, Tools, and Real-World Practices"
|
||||
chapter: 23
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
|
||||
15
translations/pt_BR/chapters/part5/chapter-24.md
Normal file
15
translations/pt_BR/chapters/part5/chapter-24.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: "Integrating with the Kernel"
|
||||
description: "Best practices for kernel integration and driver architecture"
|
||||
partNumber: 5
|
||||
partName: "Debugging, Tools, and Real-World Practices"
|
||||
chapter: 24
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
|
||||
14
translations/pt_BR/chapters/part5/chapter-25.md
Normal file
14
translations/pt_BR/chapters/part5/chapter-25.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Advanced Topics and Practical Tips"
|
||||
description: "Advanced techniques and practical advice for driver development"
|
||||
partNumber: 5
|
||||
partName: "Debugging, Tools, and Real-World Practices"
|
||||
chapter: 25
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
translations/pt_BR/chapters/part6/chapter-26.md
Normal file
14
translations/pt_BR/chapters/part6/chapter-26.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "USB and Serial Drivers"
|
||||
description: "Developing drivers for USB and serial communication devices"
|
||||
partNumber: 6
|
||||
partName: "Writing Transport-Specific Drivers"
|
||||
chapter: 26
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
translations/pt_BR/chapters/part6/chapter-27.md
Normal file
14
translations/pt_BR/chapters/part6/chapter-27.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Working with Storage Devices and the VFS Layer"
|
||||
description: "Developing storage device drivers and VFS integration"
|
||||
partNumber: 6
|
||||
partName: "Writing Transport-Specific Drivers"
|
||||
chapter: 27
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
translations/pt_BR/chapters/part6/chapter-28.md
Normal file
14
translations/pt_BR/chapters/part6/chapter-28.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Writing a Network Driver"
|
||||
description: "Developing network interface drivers for FreeBSD"
|
||||
partNumber: 6
|
||||
partName: "Writing Transport-Specific Drivers"
|
||||
chapter: 28
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
translations/pt_BR/chapters/part7/chapter-29.md
Normal file
14
translations/pt_BR/chapters/part7/chapter-29.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Portability and Driver Abstraction"
|
||||
description: "Creating portable drivers across different FreeBSD architectures"
|
||||
partNumber: 7
|
||||
partName: "Mastery Topics: Special Scenarios and Edge Cases"
|
||||
chapter: 29
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
translations/pt_BR/chapters/part7/chapter-30.md
Normal file
14
translations/pt_BR/chapters/part7/chapter-30.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Virtualisation and Containerization"
|
||||
description: "Driver development for virtualized and containerized environments"
|
||||
partNumber: 7
|
||||
partName: "Mastery Topics: Special Scenarios and Edge Cases"
|
||||
chapter: 30
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
15
translations/pt_BR/chapters/part7/chapter-31.md
Normal file
15
translations/pt_BR/chapters/part7/chapter-31.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: "Security Best Practices"
|
||||
description: "Implementing security measures in FreeBSD device drivers"
|
||||
partNumber: 7
|
||||
partName: "Mastery Topics: Special Scenarios and Edge Cases"
|
||||
chapter: 31
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
|
||||
14
translations/pt_BR/chapters/part7/chapter-32.md
Normal file
14
translations/pt_BR/chapters/part7/chapter-32.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Device Tree and Embedded Development"
|
||||
description: "Driver development for embedded systems using device tree"
|
||||
partNumber: 7
|
||||
partName: "Mastery Topics: Special Scenarios and Edge Cases"
|
||||
chapter: 32
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
translations/pt_BR/chapters/part7/chapter-33.md
Normal file
14
translations/pt_BR/chapters/part7/chapter-33.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Performance Tuning and Profiling"
|
||||
description: "Optimizing driver performance through profiling and tuning"
|
||||
partNumber: 7
|
||||
partName: "Mastery Topics: Special Scenarios and Edge Cases"
|
||||
chapter: 33
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
translations/pt_BR/chapters/part7/chapter-34.md
Normal file
14
translations/pt_BR/chapters/part7/chapter-34.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Advanced Debugging Techniques"
|
||||
description: "Sophisticated debugging methods for complex driver issues"
|
||||
partNumber: 7
|
||||
partName: "Mastery Topics: Special Scenarios and Edge Cases"
|
||||
chapter: 34
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
15
translations/pt_BR/chapters/part7/chapter-35.md
Normal file
15
translations/pt_BR/chapters/part7/chapter-35.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: "Asynchronous I/O and Event Handling"
|
||||
description: "Implementing asynchronous operations and event-driven architectures"
|
||||
partNumber: 7
|
||||
partName: "Mastery Topics: Special Scenarios and Edge Cases"
|
||||
chapter: 35
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
|
||||
14
translations/pt_BR/chapters/part7/chapter-36.md
Normal file
14
translations/pt_BR/chapters/part7/chapter-36.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Creating Drivers Without Documentation (Reverse Engineering)"
|
||||
description: "Techniques for developing drivers when documentation is unavailable"
|
||||
partNumber: 7
|
||||
partName: "Mastery Topics: Special Scenarios and Edge Cases"
|
||||
chapter: 36
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
translations/pt_BR/chapters/part7/chapter-37.md
Normal file
14
translations/pt_BR/chapters/part7/chapter-37.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Submitting Your Driver to the FreeBSD Project"
|
||||
description: "Process and guidelines for contributing drivers to FreeBSD"
|
||||
partNumber: 7
|
||||
partName: "Mastery Topics: Special Scenarios and Edge Cases"
|
||||
chapter: 37
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
14
translations/pt_BR/chapters/part7/chapter-38.md
Normal file
14
translations/pt_BR/chapters/part7/chapter-38.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Final Thoughts and Next Steps"
|
||||
description: "Concluding thoughts and guidance for continued learning"
|
||||
partNumber: 7
|
||||
partName: "Mastery Topics: Special Scenarios and Edge Cases"
|
||||
chapter: 38
|
||||
lastUpdated: "2025-08-01"
|
||||
status: "planned"
|
||||
author: "Edson Brandi"
|
||||
reviewer: "TBD"
|
||||
translator: "TBD"
|
||||
---
|
||||
|
||||
planned
|
||||
Loading…
Reference in a new issue