UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
4,461 Views
Registered: ‎05-14-2017

Booting a custom Debian from uSD with a tested working kernel

Jump to solution

Hello,

 

I am trying to boot a custom Debian distro with 4.1.33 pulsar linux kernel with u-boot compiled from scratch, all on a Microzed board.

 

Both the Debian and kernel work fine because I have already tested with a pre-compiled u-boot.

Now, I want to load the custom Debian  from the uSD using my own compiled u-boot.

 

U-boot has been download from the github repo (https://github.com/Xilinx/u-boot-xlnx), and I can run it successfully, but it cannot boot the Debian from the uSD, simply becuase it cannot find the rootfs..

 

My uSD has two partitions:

 

/dev/mmcblk0p1 labeled as "boot". Here is where u-boot is installed.

/dev/mmcblk0p2 labeled "rootfs". Here is where my Debian is installed.

 

The content of "boot" partition is:

 

boot.bin
devicetree.dtb
u-boot
u-boot.bin
u-boot.img
uImage
uInitrd.img
uramdisk.image.gz

 

As said, when I run the board, u-boot cannot find my debian installed into the "rootfs" partition, but it fails as shown in the attached capture.

 

How do I correctly tell u-boot where is my rootfs content and load it ?

Thank you in advance,

Simon

 

 

 

sshot.png
0 Kudos
1 Solution

Accepted Solutions
Explorer
Explorer
8,135 Views
Registered: ‎05-14-2017

Re: Booting a custom Debian from uSD with a tested working kernel

Jump to solution

Hello @watari

 

The bootargs command is not the only one problem. This is a whole complete configuration problem.

 

>> Did you write rootfs image to 2nd partition of uSD card ?

>> Also, did you configure kernel to turn on uSD ?

Yes both of them.

 

However, I solved. I report the steps I followed.

 

The SD card has been formatted following the procedure described

 

here: http://www.wiki.xilinx.com/Prepare+Boot+Medium

 

A custom debian can be made with debootstrap, nothing new for our folks. Then one can modify as each one could.

 

The u-boot has been compiled from scratch. The make command is reported above, while the kernel has been compiled to have a loadaddr to 0x01000000. Not sure how much is it important.

 

Finally, I copied the entire settings of the working precompiled u-boot mentioned earlier and put all into a uEnv.txt file into the boot partition. I just modified a few parameters as the root=/dev/<hd> since in my case is /dev/mmcblk0p2, the rootfstype (mine is ext4), dtb filename and boot.bin name.

 

It works like a charm. Now I am ready to work as I want.

 

Regards,

Simon

0 Kudos
7 Replies
Explorer
Explorer
4,452 Views
Registered: ‎05-14-2017

Re: Booting a custom Debian from uSD with a tested working kernel

Jump to solution

Here I paste the complete boot output sequence:

 

U-Boot SPL 2017.01-00012-g374a838 (Jun 06 2017 - 11:43:17)
mmc boot
Trying to boot from MMC1
reading fpga.bin
spl_load_image_fat: error reading image fpga.bin, err - -1
spl: error reading image fpga.bin, err - 1
reading system.dtb
spl_load_image_fat_os: error reading image system.dtb, err - -1
reading u-boot.img
reading u-boot.img


U-Boot 2017.01-00012-g374a838 (Jun 06 2017 - 11:43:17 +0200)

Model: Zynq MicroZED Board
Board: Xilinx Zynq
DRAM:  ECC disabled 1 GiB
MMC:   sdhci@e0100000: 0 (SD)
SF: Detected s25fl128s_64k with page size 256 Bytes, erase size 64 KiB, total 16 MiB
In:    serial@e0001000
Out:   serial@e0001000
Err:   serial@e0001000
Model: Zynq MicroZED Board
Board: Xilinx Zynq
Net:   ZYNQ GEM: e000b000, phyaddr 0, interface rgmii-id
eth0: ethernet@e000b000
reading uEnv.txt
39 bytes read in 16 ms (2 KiB/s)
Importing environment from SD ...
Hit any key to stop autoboot:  0
Device: sdhci@e0100000
Manufacturer ID: 2
OEM: 544d
Name: SA08G
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 7.2 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading uEnv.txt
39 bytes read in 16 ms (2 KiB/s)
Loaded environment from uEnv.txt
Importing environment from SD ...
Copying Linux from SD to RAM...
reading uImage
4959128 bytes read in 461 ms (10.3 MiB/s)
reading devicetree.dtb
12206 bytes read in 15 ms (793.9 KiB/s)
reading uramdisk.image.gz
5310143 bytes read in 496 ms (10.2 MiB/s)
## Booting kernel from Legacy Image at 02080000 ...
   Image Name:   Linux-4.1.33-simo-pulsar
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4959064 Bytes = 4.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 04000000 ...
   Image Name:   
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    5310079 Bytes = 5.1 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 02000000
   Booting using the fdt blob at 0x2000000
   Loading Kernel Image ... OK
   Loading Ramdisk to 1faef000, end 1ffff67f ... OK
   Loading Device Tree to 1fae9000, end 1faeefad ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 4.1.33-simo-pulsar (simo@szzdev) (gcc version 5.2.0 (GCC) ) #8 SMP PREEMPT Tue Jun 6 12:03:10 CEST 2017
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: Zynq Micro Zed Development Board
bootconsole [earlycon0] enabled
cma: Reserved 40 MiB at 0x3d800000
Memory policy: Data cache writealloc
PERCPU: Embedded 13 pages/cpu @bcebc000 s21504 r8192 d23552 u53248
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 259840
Kernel command line: console=ttyPS0,115200 earlyprintk
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 980912K/1048576K available (7575K kernel code, 544K rwdata, 1960K rodata, 488K init, 629K bss, 26704K reserved, 40960K cma-reserved)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xc0800000 - 0xff000000   (1000 MB)
    lowmem  : 0x80000000 - 0xc0000000   (1024 MB)
    modules : 0x7f000000 - 0x80000000   (  16 MB)
      .text : 0x80008000 - 0x80957fa8   (9536 kB)
      .init : 0x80958000 - 0x809d2000   ( 488 kB)
      .data : 0x809d2000 - 0x80a5a1fc   ( 545 kB)
       .bss : 0x80a5a1fc - 0x80af76f0   ( 630 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
Preemptible hierarchical RCU implementation.
    Additional per-CPU info printed with stalls.
    RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
L2C: platform modifies aux control register: 0x02060000 -> 0x32460000
L2C: DT/platform modifies aux control register: 0x02060000 -> 0x32460000
L2C-310 erratum 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 512 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76460001
slcr mapped to c0804000
zynq_clock_init: clkc starts at c0804100
Zynq clock init
sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
clocksource arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns
clocksource ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537538477 ns
timer #0 at c0808000, irq=17
Console: colour dummy device 80x30
Calibrating delay loop... 1325.46 BogoMIPS (lpj=6627328)
pid_max: default: 32768 minimum: 301
Security Framework initialized
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys net_cls
Initializing cgroup subsys debug
CPU: Testing write buffer coherency: ok
ftrace: allocating 26763 entries in 79 pages
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x82c0 - 0x8318
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (2657.48 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
xor: measuring software checksum speed
   arm4regs  :  1017.600 MB/sec
   8regs     :   774.800 MB/sec
   32regs    :   818.800 MB/sec
xor: using function: arm4regs (1017.600 MB/sec)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
cpuidle: using governor menu
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0xc0880000
raid6: int32x1  gen()   105 MB/s
raid6: int32x1  xor()   114 MB/s
raid6: int32x2  gen()   128 MB/s
raid6: int32x2  xor()   108 MB/s
raid6: int32x4  gen()   125 MB/s
raid6: int32x4  xor()    94 MB/s
raid6: int32x8  gen()   120 MB/s
raid6: int32x8  xor()    85 MB/s
raid6: using algorithm int32x2 gen() 128 MB/s
raid6: .... xor() 108 MB/s, rmw enabled
raid6: using intx1 recovery algorithm
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
Switched to clocksource arm_global_timer
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
rootfs image is not initramfs (no cpio magic); looks like an initrd
Freeing initrd memory: 5188K (9faef000 - a0000000)
CPU PMU: Failed to parse /pmu/interrupt-affinity[0]
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
futex hash table entries: 512 (order: 3, 32768 bytes)
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
aufs 4.1-20150629
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.dmac:     DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 25, base_baud = 3125000) is a xuartps
�console [ttyPS0] enabled
console [ttyPS0] enabled
bootconsole [earlycon0] disabled
bootconsole [earlycon0] disabled
xdevcfg f8007000.devcfg: ioremap 0xf8007000 to c0826000
[drm] Initialized drm 1.1.0 20060810
brd: module loaded
loop: module loaded
zynq-qspi e000d000.spi: couldn't determine configuration info about dual memories. defaulting to single memory
m25p80 spi32766.0: found s25fl128s, expected m25p80
m25p80 spi32766.0: s25fl128s (16384 Kbytes)
5 ofpart partitions found on MTD device spi32766.0
Creating 5 MTD partitions on "spi32766.0":
0x000000000000-0x000000100000 : "qspi-fsbl-uboot"
0x000000100000-0x000000600000 : "qspi-linux"
0x000000600000-0x000000620000 : "qspi-device-tree"
0x000000620000-0x000000c00000 : "qspi-rootfs"
0x000000c00000-0x000001000000 : "qspi-bitstream"
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
macb e000b000.ethernet: failed to get macb_clk (4294967294)
macb: probe of e000b000.ethernet failed with error -2
libphy: XEMACPS mii bus: probed
xemacps e000b000.ethernet: pdev->id -1, baseaddr 0xe000b000, irq 27
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
usbcore: registered new interface driver usb-storage
ci_hdrc ci_hdrc.0: EHCI Host Controller
ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
md: linear personality registered for level -1
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
md: raid10 personality registered for level 10
md: multipath personality registered for level -4
md: faulty personality registered for level -5
device-mapper: ioctl: 4.31.0-ioctl (2015-3-12) initialised: dm-devel@redhat.com
Xilinx Zynq CpuIdle Driver started
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
sdhci-arasan e0100000.sdhci: No vmmc regulator found
sdhci-arasan e0100000.sdhci: No vqmmc regulator found
mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using ADMA
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
oprofile: using arm/armv7-ca9
u32 classifier
    Actions configured
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
Key type dns_resolver registered
Registering SWP/SWPB emulation handler
Btrfs loaded
console [netcon0] enabled
netconsole: network logging started
mmc0: new high speed SDHC card at address 1234
mmcblk0: mmc0:1234 SA08G 7.21 GiB
hctosys: unable to open rtc device (rtc0)
 mmcblk0: p1 p2
md: Waiting for all devices to be available before autodetect
md: If you don't use raid, use raid=noautodetect
md: Autodetecting RAID arrays.
md: Scanned 0 and added 0 devices.
md: autorun ...
md: ... autorun DONE.
RAMDISK: gzip image found at block 0
RAMDISK: incomplete write (3290 != 32768)
write error
VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
0100            4096 ram0  (driver?)
0101            4096 ram1  (driver?)
0102            4096 ram2  (driver?)
0103            4096 ram3  (driver?)
0104            4096 ram4  (driver?)
0105            4096 ram5  (driver?)
0106            4096 ram6  (driver?)
0107            4096 ram7  (driver?)
0108            4096 ram8  (driver?)
0109            4096 ram9  (driver?)
010a            4096 ram10  (driver?)
010b            4096 ram11  (driver?)
010c            4096 ram12  (driver?)
010d            4096 ram13  (driver?)
010e            4096 ram14  (driver?)
010f            4096 ram15  (driver?)
1f00            1024 mtdblock0  (driver?)
1f01            5120 mtdblock1  (driver?)
1f02             128 mtdblock2  (driver?)
1f03            6016 mtdblock3  (driver?)
1f04            4096 mtdblock4  (driver?)
b300         7563264 mmcblk0  driver: mmcblk
  b301          204800 mmcblk0p1 00000000-01
  b302         7357440 mmcblk0p2 00000000-02
VFS: Unable to mount root fs on unknown-block(0,0)
User configuration error - no valid root filesystem found
Kernel panic - not syncing: Invalid configuration from end user prevents continuing
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.1.33-simo-pulsar #8
Hardware name: Xilinx Zynq Platform
[<80018e2c>] (unwind_backtrace) from [<80013848>] (show_stack+0x20/0x24)
[<80013848>] (show_stack) from [<806ca658>] (dump_stack+0x84/0xa4)
[<806ca658>] (dump_stack) from [<806c81b8>] (panic+0x98/0x1f8)
[<806c81b8>] (panic) from [<80959474>] (mount_block_root+0x22c/0x280)
[<80959474>] (mount_block_root) from [<80959698>] (mount_root+0xe8/0x10c)
[<80959698>] (mount_root) from [<80959824>] (prepare_namespace+0x168/0x1c8)
[<80959824>] (prepare_namespace) from [<80958f78>] (kernel_init_freeable+0x244/0x29c)
[<80958f78>] (kernel_init_freeable) from [<806c6f98>] (kernel_init+0x1c/0xf4)
[<806c6f98>] (kernel_init) from [<8000f468>] (ret_from_fork+0x14/0x2c)
CPU1: stopping
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.1.33-simo-pulsar #8
Hardware name: Xilinx Zynq Platform
[<80018e2c>] (unwind_backtrace) from [<80013848>] (show_stack+0x20/0x24)
[<80013848>] (show_stack) from [<806ca658>] (dump_stack+0x84/0xa4)
[<806ca658>] (dump_stack) from [<80016490>] (handle_IPI+0x188/0x34c)
[<80016490>] (handle_IPI) from [<80009434>] (gic_handle_irq+0x68/0x70)
[<80009434>] (gic_handle_irq) from [<806d0000>] (__irq_svc+0x40/0x74)
Exception stack(0xbc943f08 to 0xbc943f50)
3f00:                   00000001 80828134 bdd52461 00000000 bdd52461 00000000
3f20: 80a44e48 00000000 bcecce10 00000000 80a5790c bc943f9c bc943f28 bc943f50
3f40: 803b8ee4 80570ac8 60000113 ffffffff
[<806d0000>] (__irq_svc) from [<80570ac8>] (cpuidle_enter_state+0x260/0x3c8)
[<80570ac8>] (cpuidle_enter_state) from [<80570c80>] (cpuidle_enter+0x24/0x28)
[<80570c80>] (cpuidle_enter) from [<8005fabc>] (call_cpuidle+0x58/0x5c)
[<8005fabc>] (call_cpuidle) from [<8005fdd8>] (cpu_startup_entry+0x318/0x408)
[<8005fdd8>] (cpu_startup_entry) from [<800160a8>] (secondary_start_kernel+0x114/0x130)
[<800160a8>] (secondary_start_kernel) from [<000094cc>] (0x94cc)
---[ end Kernel panic - not syncing: Invalid configuration from end user prevents continuing

0 Kudos
Visitor mhaen
Visitor
4,446 Views
Registered: ‎11-23-2016

Re: Booting a custom Debian from uSD with a tested working kernel

Jump to solution
Looks like you boot your Linux from the ramdisk image not from your root partition. You'll need to change that, though I'm not sure how. I only used PetaLinux so far and didn't edit u-boot outside of that.
0 Kudos
Highlighted
Explorer
Explorer
4,423 Views
Registered: ‎05-14-2017

Re: Booting a custom Debian from uSD with a tested working kernel

Jump to solution

Hi,

 

I don't understand if this is a problem related to the rootfs partition, or to the uramdisk.image.gz..

 

It can be seen from the boot procedure the error message:

 

RAMDISK: gzip image found at block 0
RAMDISK: incomplete write (3290 != 32768)
write error

 

I use the following script to compile u-boot:

 

CROSSCC="/opt/arm32/gcc-armhf-xilinx-sysroot/x86_64-linux/usr/bin/arm-wrs-linux-gnueabi/arm-wrs-linux-gnueabi-gcc"
CROSSLD="/opt/arm32/gcc-armhf-xilinx-sysroot/x86_64-linux/usr/bin/arm-wrs-linux-gnueabi/arm-wrs-linux-gnueabi-ld"
CROSSOBJCPY="/opt/arm32/gcc-armhf-xilinx-sysroot/x86_64-linux/usr/bin/arm-wrs-linux-gnueabi/arm-wrs-linux-gnueabi-objcopy"

 

make clean
make zynq_microzed_defconfig
make -j 6 CC=${CROSSCC} LD=${CROSSLD} OBJCOPY=${CROSSOBJCPY} all
mkimage -A arm -O linux -T ramdisk -C gzip -d arm_ramdisk.image.gz uramdisk.image.gz

 

The arm-wrs-linux-gnueabi-gcc is the compiler obtained with bitbake from this repo, while the arm_ramdisk.image.gz is the file that can be downloaded here.

 

I strongly suspect that the ramdisk image is not created correctly.

Do someone has some hint ?

 

Regards,

Simon

Tags (2)
0 Kudos
Scholar watari
Scholar
4,409 Views
Registered: ‎06-16-2013

Re: Booting a custom Debian from uSD with a tested working kernel

Jump to solution

Hi @simozz

 

I'm sure that you use ramdisk image instead of rootfs.

Did you write rootfs image to 2nd partition of uSD card ?

Also, did you configure kernel to turn on uSD ?

 

I'm not sure how to help you. But I recommend to confirm boot-argument on uBoot.

Especially you describe the followings.

 

bootargs = "console=ttyPS0,115200 earlyprintk root=/dev/sda2 rw rootwait"

 

Thank you.

Best regards,

0 Kudos
Explorer
Explorer
8,136 Views
Registered: ‎05-14-2017

Re: Booting a custom Debian from uSD with a tested working kernel

Jump to solution

Hello @watari

 

The bootargs command is not the only one problem. This is a whole complete configuration problem.

 

>> Did you write rootfs image to 2nd partition of uSD card ?

>> Also, did you configure kernel to turn on uSD ?

Yes both of them.

 

However, I solved. I report the steps I followed.

 

The SD card has been formatted following the procedure described

 

here: http://www.wiki.xilinx.com/Prepare+Boot+Medium

 

A custom debian can be made with debootstrap, nothing new for our folks. Then one can modify as each one could.

 

The u-boot has been compiled from scratch. The make command is reported above, while the kernel has been compiled to have a loadaddr to 0x01000000. Not sure how much is it important.

 

Finally, I copied the entire settings of the working precompiled u-boot mentioned earlier and put all into a uEnv.txt file into the boot partition. I just modified a few parameters as the root=/dev/<hd> since in my case is /dev/mmcblk0p2, the rootfstype (mine is ext4), dtb filename and boot.bin name.

 

It works like a charm. Now I am ready to work as I want.

 

Regards,

Simon

0 Kudos
Scholar watari
Scholar
4,367 Views
Registered: ‎06-16-2013

Re: Booting a custom Debian from uSD with a tested working kernel

Jump to solution

Hi @simozz

 

I'm relieved to resolve this issue yourself.

 

But I mention to you about uEnv.txt.

 

> Finally, I copied the entire settings of the working precompiled u-boot mentioned earlier and put all into a uEnv.txt file into the boot partition.

 

This idea is fine. But, maybe, latest or current u-boot doesn't support to boot by uEnv.txt.

Then I recommend to describe bootargs in bootargs section of device tree.

If you try it, you need to put only three files ()BOOT.bin, uImage and devicetree.dtb) on the first partition.

 

Thank you.

Best regards,

0 Kudos
Explorer
Explorer
4,361 Views
Registered: ‎05-14-2017

Re: Booting a custom Debian from uSD with a tested working kernel

Jump to solution

Hello @watari

 

> Then I recommend to describe bootargs in bootargs section of device tree.

> If you try it, you need to put only three files ()BOOT.bin, uImage and devicetree.dtb) on the first partition.

 

I will keep in mind this and I will try it.

Thank you for the suggestion.

 

Regards,

Simon

0 Kudos